/* ==========================================================================
   duar - Minimalist Neon Dark Mode Stylesheet
   Mobile-first, responsive full-page (no scroll on standard screens), zero emoji
   ========================================================================== */

:root {
  --bg: #07070a;
  --bg-surface: #111118;
  --bg-card: #151520;
  --border: #222230;
  --border-light: #333346;
  --text-main: #f0f0f8;
  --text-muted: #8b8b9e;
  --flame-orange: #ff5500;
  --flame-red: #ff0044;
  --truth-cyan: #00d2ff;
  --dare-pink: #ff0055;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}

/* App Container */
#app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.85rem 1.1rem;
  position: relative;
  overflow-y: auto;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffaa00, var(--flame-orange), var(--flame-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(255, 85, 0, 0.35);
}

.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s, border-color 0.2s;
}

.btn-icon:hover {
  border-color: var(--border-light);
}

.btn-icon:active {
  transform: scale(0.92);
}

/* Main Area */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  animation: fadeIn 0.2s ease-out;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Screen 1: Setup / Start
   ========================================================================== */
#screen-setup {
  justify-content: space-between;
  padding: 1.25rem 0 0.5rem 0;
}

.setup-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.85rem;
}

.setup-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--flame-orange);
  background: rgba(255, 85, 0, 0.1);
  border: 1px solid rgba(255, 85, 0, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
}

.hero-title {
  font-size: clamp(2rem, 7.5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 380px;
}

.setup-action {
  width: 100%;
  padding-top: 1rem;
  flex-shrink: 0;
}

/* Common Primary Button */
.btn-primary {
  width: 100%;
  padding: 1.05rem;
  background: linear-gradient(135deg, var(--flame-orange), var(--flame-red));
  border: none;
  border-radius: 1rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 85, 0, 0.35);
  transition: transform 0.1s, box-shadow 0.2s;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(255, 85, 0, 0.2);
}

/* ==========================================================================
   Screen 2: Active Gameplay (Tap-to-Pass)
   ========================================================================== */
#screen-play {
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.play-content {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.2rem 1.4rem;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  min-height: 240px;
}

.question-text {
  font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  letter-spacing: -0.01em;
}

/* Stalling Alert Banner */
.stall-alert {
  background: rgba(255, 0, 68, 0.18);
  border: 1px solid var(--flame-red);
  color: #ff99b0;
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: pulseAlert 0.35s infinite alternate;
}

/* ==========================================================================
   Screen 3: Explosion & Interactive ToD Selection (Centering Focus)
   ========================================================================== */
#screen-exploded {
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 0.5rem 0;
}

.explosion-header {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.explosion-title {
  font-size: clamp(3rem, 10vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--flame-red);
  text-shadow: 0 0 30px rgba(255, 0, 68, 0.7);
  line-height: 1;
}

.explosion-reason {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* Fase 1: Pilihan TRUTH atau DARE (Tepat di tengah) */
.penalty-choice-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 0;
}

.choice-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.btn-choice {
  width: 100%;
  padding: 1.25rem;
  border-radius: 1.1rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s, box-shadow 0.2s, background-color 0.2s;
}

.btn-truth {
  background: rgba(0, 210, 255, 0.12);
  color: var(--truth-cyan);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}

.btn-truth:active {
  transform: scale(0.97);
  background: rgba(0, 210, 255, 0.25);
}

.btn-dare {
  background: rgba(255, 0, 85, 0.12);
  color: var(--dare-pink);
  border-color: rgba(255, 0, 85, 0.4);
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.15);
}

.btn-dare:active {
  transform: scale(0.97);
  background: rgba(255, 0, 85, 0.25);
}

/* Fase 2: Hasil Kartu Truth / Dare (Terpusat Presisi di Tengah Layar) */
.penalty-result-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  padding: 0.5rem 0;
  animation: fadeIn 0.2s ease-out;
}

.penalty-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.2rem 1.4rem;
  width: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
}

.penalty-badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  text-transform: uppercase;
}

.badge-truth {
  background: rgba(0, 210, 255, 0.15);
  color: var(--truth-cyan);
  border: 1px solid rgba(0, 210, 255, 0.35);
}

.badge-dare {
  background: rgba(255, 0, 85, 0.15);
  color: var(--dare-pink);
  border: 1px solid rgba(255, 0, 85, 0.35);
}

.penalty-text {
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  line-height: 1.45;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

/* ==========================================================================
   Animations & Dynamic Modes
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseAlert {
  from { opacity: 0.7; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.pop-in {
  animation: popInAnim 0.16s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popInAnim {
  0% { transform: scale(0.94); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Tick Strobe Sync */
body.tick-flash {
  background-color: #17080b;
}

/* Warning Mode */
body.warning-mode {
  background-color: #1a0508;
}

/* Exploded Mode (Screen Shake & Strobe) */
body.exploded-mode {
  background-color: #220308;
  animation: screenShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShake {
  10%, 90% { transform: translate3d(-3px, 2px, 0); }
  20%, 80% { transform: translate3d(4px, -3px, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 4px, 0); }
  40%, 60% { transform: translate3d(5px, -4px, 0); }
}
