/* =========================================================
   SHOW DA CIDADANIA · Glassmorphism Premium
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg-0: #050818;
  --bg-1: #0a0e2c;
  --bg-2: #11173f;

  /* Glass */
  --glass-bg: rgba(18, 24, 64, 0.42);
  --glass-bg-strong: rgba(22, 30, 78, 0.62);
  --glass-border: rgba(255, 222, 130, 0.18);
  --glass-border-strong: rgba(255, 222, 130, 0.34);
  --glass-shadow: 0 30px 80px -40px rgba(8, 12, 40, 0.9),
                  0 2px 0 rgba(255, 255, 255, 0.04) inset,
                  0 -2px 60px rgba(255, 215, 107, 0.05) inset;

  /* Brand palette */
  --gold: #FFD86B;
  --gold-bright: #FFE89A;
  --gold-soft: rgba(255, 216, 107, 0.18);
  --gold-deep: #C9982E;
  --gold-glow: 0 0 30px rgba(255, 216, 107, 0.35),
               0 0 60px rgba(255, 216, 107, 0.18);

  --cyan: #6EE7E0;
  --violet: #9F7BFF;
  --rose: #FF7AA8;

  /* Semantic */
  --success: #4ADE80;
  --success-glow: rgba(74, 222, 128, 0.35);
  --danger: #F87171;
  --danger-glow: rgba(248, 113, 113, 0.32);

  /* Text */
  --text: #F6F4FF;
  --text-dim: rgba(246, 244, 255, 0.68);
  --text-muted: rgba(246, 244, 255, 0.42);

  /* Fonts */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 8px; }
ol, ul { list-style: none; }
em { font-style: italic; }
.display { font-family: var(--font-display); font-feature-settings: "ss01" on, "ss02" on; }

[hidden] { display: none !important; }

/* ---------- Atmospheric backdrop ---------- */
.cosmos {
  position: fixed; inset: 0;
  z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 0%, #1a1d5a 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, #2d1a5e 0%, transparent 55%),
    linear-gradient(180deg, #060920 0%, #050818 60%, #03050f 100%);
}

.aurora {
  position: absolute; border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: drift 28s ease-in-out infinite alternate;
}
.aurora--gold {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255, 200, 90, 0.5), transparent 70%);
  top: -8%; left: -6%;
}
.aurora--violet {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(140, 90, 255, 0.42), transparent 70%);
  bottom: -14%; right: -10%;
  animation-duration: 36s; animation-delay: -8s;
}
.aurora--cyan {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(80, 230, 220, 0.32), transparent 70%);
  top: 45%; left: 55%;
  animation-duration: 42s; animation-delay: -16s;
}

@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 30px) scale(0.95); }
}

.stars { position: absolute; inset: 0; }
.stars span {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 6px rgba(255, 232, 154, 0.7);
  animation: twinkle 4s ease-in-out infinite;
}
.stars span:nth-child(3n)   { background: #ffffff; box-shadow: 0 0 4px #fff; }
.stars span:nth-child(5n)   { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); width: 1.5px; height: 1.5px; }
.stars span:nth-child(7n+1) { width: 3px; height: 3px; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.2); }
}

.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: grainShift 6s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-3%,2%); }
  40%  { transform: translate(2%,-1%); }
  60%  { transform: translate(-1%,-3%); }
  80%  { transform: translate(3%,1%); }
  100% { transform: translate(0,0); }
}

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
}

/* =========================================================
   Modal — shared
   ========================================================= */
.modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  z-index: 50;
  animation: modalFade 0.6s var(--ease-out) both;
}

.modal::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(10, 14, 44, 0.4) 0%, rgba(3, 5, 15, 0.85) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal__card {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(2rem, 4vw, 3.25rem);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: var(--glass-shadow);
  text-align: center;
  overflow: hidden;
  animation: cardRise 0.7s var(--ease-out) 0.1s both;
}

.modal__card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 216, 107, 0.08) 0%, transparent 40%, transparent 70%, rgba(159, 123, 255, 0.06) 100%);
  pointer-events: none;
}

.modal__card::after {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 60%; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 216, 107, 0.65), transparent);
}

@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardRise {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  padding: 0.45rem 1rem;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(255, 216, 107, 0.05);
}
.eyebrow__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.modal__title {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 1.4rem 0 0.4rem;
  color: var(--text);
}
.modal__title em {
  color: var(--gold-bright);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(180deg, #FFE89A 0%, #FFC04A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 216, 107, 0.3));
}

.modal__lede {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 44ch;
  margin: 0 auto 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.feature {
  padding: 1.1rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  transition: all 0.4s var(--ease-out);
}
.feature:hover {
  border-color: var(--gold-soft);
  background: rgba(255, 216, 107, 0.04);
  transform: translateY(-2px);
}
.feature__num {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold-bright);
  line-height: 1;
  letter-spacing: -0.04em;
}
.feature__num small { font-size: 0.55em; font-weight: 400; opacity: 0.7; margin-left: 1px; }
.feature__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Voice toggle */
.voice-toggle {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s var(--ease-out);
}
.voice-toggle:hover { border-color: var(--gold-soft); }
.voice-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.voice-toggle__track {
  position: relative;
  flex-shrink: 0;
  width: 44px; height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: background 0.3s var(--ease-out);
}
.voice-toggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.3s var(--ease-out);
}
.voice-toggle input:checked + .voice-toggle__track {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  box-shadow: 0 0 16px rgba(255, 216, 107, 0.4);
}
.voice-toggle input:checked + .voice-toggle__track .voice-toggle__thumb {
  transform: translateX(20px);
}
.voice-toggle__copy { display: flex; flex-direction: column; flex: 1; }
.voice-toggle__title { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.voice-toggle__hint { font-size: 0.78rem; color: var(--text-muted); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  color: #1a1305;
  background: linear-gradient(180deg, #FFE89A 0%, #FFCA47 55%, #E5A815 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -2px 0 rgba(0,0,0,0.15) inset,
    0 12px 30px -10px rgba(255, 200, 70, 0.55),
    0 0 40px -10px rgba(255, 216, 107, 0.5);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -2px 0 rgba(0,0,0,0.15) inset,
    0 18px 40px -10px rgba(255, 200, 70, 0.7),
    0 0 60px -10px rgba(255, 216, 107, 0.7);
}

.btn--xl {
  width: 100%;
  padding: 1.1rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 16px;
}

/* Secondary "back to menu" button (bundle launcher) */
.btn--ghost {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  text-decoration: none;
}
.btn--ghost:hover {
  transform: translateY(-2px);
  color: var(--gold-bright);
  border-color: var(--glass-border-strong);
  background: rgba(255, 216, 107, 0.06);
}

/* "Menu" pill inside the in-game header controls */
.menu-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 42px; padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s var(--ease-out);
}
.menu-link svg { width: 18px; height: 18px; }
.menu-link:hover {
  background: rgba(255, 216, 107, 0.08);
  border-color: var(--gold-soft);
  color: var(--gold-bright);
  transform: translateY(-1px);
}
@media (max-width: 768px) {
  .menu-link__label { display: none; }
  .menu-link { padding: 0; width: 42px; justify-content: center; }
}

/* Stop button */
.btn--stop {
  display: inline-flex; flex-direction: row; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1.1rem 0.7rem 0.9rem;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--text);
  border-radius: 14px;
  font-weight: 600;
  transition: all 0.25s var(--ease-out);
}
.btn--stop svg { width: 18px; height: 18px; color: var(--danger); flex-shrink: 0; }
.btn--stop:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.5);
  transform: translateY(-2px);
}
.btn__main { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.btn__sub { font-size: 0.8rem; color: var(--gold-bright); font-weight: 700; }

/* =========================================================
   Game shell
   ========================================================= */
.game {
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: clamp(1rem, 2.5vw, 2rem);
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: 1440px;
  margin: 0 auto;
  animation: gameEnter 0.7s var(--ease-out) both;
}
@keyframes gameEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.game__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand__mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--gold);
  background: radial-gradient(circle at 30% 30%, rgba(255, 216, 107, 0.25), transparent 70%);
  border-radius: 12px;
  border: 1px solid var(--gold-soft);
  filter: drop-shadow(0 0 10px rgba(255, 216, 107, 0.4));
}
.brand__mark svg { width: 26px; height: 26px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__title {
  font-size: 1.25rem; font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand__title em {
  color: var(--gold-bright);
  font-style: italic;
}
.brand__sub {
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.game__controls { display: flex; gap: 0.5rem; }

.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-dim);
  transition: all 0.25s var(--ease-out);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover {
  background: rgba(255, 216, 107, 0.08);
  border-color: var(--gold-soft);
  color: var(--gold-bright);
  transform: translateY(-1px);
}
.icon-btn[aria-pressed="true"] {
  background: rgba(255, 216, 107, 0.12);
  border-color: var(--gold-soft);
  color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(255, 216, 107, 0.25);
}
.icon-btn--ladder { display: none; }

/* =========================================================
   Game main layout
   ========================================================= */
.game__main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(1rem, 2vw, 1.5rem);
  flex: 1;
}

/* Play area (left) */
.play {
  display: flex; flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
  min-width: 0;
}

.play__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.play__meta { display: flex; align-items: center; gap: 1rem; }
.meta__num {
  font-size: 3rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
}
.meta__col { display: flex; flex-direction: column; line-height: 1.2; }
.meta__label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted);
}
.meta__level { font-size: 1rem; font-weight: 600; color: var(--text); }

/* Timer ring */
.timer {
  position: relative;
  width: 78px; height: 78px;
  display: grid; place-items: center;
}
.timer__ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 10px rgba(255, 216, 107, 0.3));
}
.timer__track {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
  fill: none;
}
.timer__progress {
  stroke: var(--gold);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.4s var(--ease-out);
}
.timer__num {
  position: relative;
  font-size: 1.7rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.04em;
}
.timer--warning .timer__progress { stroke: #FFA552; }
.timer--warning .timer__num { color: #FFA552; }
.timer--danger .timer__progress { stroke: var(--danger); }
.timer--danger .timer__num {
  color: var(--danger);
  animation: pulse 0.7s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Question card */
.qcard {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  animation: qcardEnter 0.5s var(--ease-out);
}
@keyframes qcardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qcard::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255, 216, 107, 0.5) 50%, transparent 90%);
}

.qcard__bgnum {
  position: absolute;
  right: -20px; bottom: -50px;
  font-size: 18rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: rgba(255, 216, 107, 0.04);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

.qcard__inner {
  position: relative;
  display: flex; flex-direction: column;
  gap: 1.4rem;
}

.qcard__text {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text);
}

.qcard__replay {
  display: inline-flex; align-items: center; gap: 0.7rem;
  align-self: flex-start;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  background: rgba(110, 231, 224, 0.06);
  border: 1px solid rgba(110, 231, 224, 0.18);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  transition: all 0.25s var(--ease-out);
}
.qcard__replay:hover {
  background: rgba(110, 231, 224, 0.12);
  border-color: rgba(110, 231, 224, 0.4);
  transform: translateY(-1px);
}
.qcard__replay[disabled] { opacity: 0.4; pointer-events: none; }

.audio-wave {
  display: inline-flex; align-items: flex-end; gap: 2px;
  height: 14px;
}
.audio-wave span {
  width: 2.5px;
  background: var(--cyan);
  border-radius: 2px;
  height: 4px;
}
.audio-wave.audio-wave--playing span {
  animation: wavePulse 0.9s ease-in-out infinite;
}
.audio-wave.audio-wave--playing span:nth-child(2) { animation-delay: 0.1s; }
.audio-wave.audio-wave--playing span:nth-child(3) { animation-delay: 0.2s; }
.audio-wave.audio-wave--playing span:nth-child(4) { animation-delay: 0.3s; }
@keyframes wavePulse {
  0%, 100% { height: 3px; }
  50% { height: 14px; }
}

/* Expert banner */
.expert-banner {
  margin-top: 1.2rem;
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.8rem 1.1rem;
  background: linear-gradient(90deg, rgba(159, 123, 255, 0.12), rgba(159, 123, 255, 0.02));
  border: 1px solid rgba(159, 123, 255, 0.35);
  border-radius: 12px;
  color: var(--violet);
  font-size: 0.92rem;
  font-weight: 500;
  animation: expertPop 0.4s var(--ease-out);
}
.expert-banner strong {
  color: var(--gold-bright);
  font-weight: 700;
  padding: 1px 8px;
  background: rgba(255, 216, 107, 0.15);
  border-radius: 6px;
  margin-left: 4px;
}
.expert-banner svg {
  width: 18px; height: 18px;
  color: var(--violet);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(159, 123, 255, 0.6));
}
@keyframes expertPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* =========================================================
   Options
   ========================================================= */
.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  text-align: left;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s var(--ease-out);
  overflow: hidden;
  font-family: var(--font-body);
  animation: optionEnter 0.5s var(--ease-out) both;
}
.option:nth-child(1) { animation-delay: 0.05s; }
.option:nth-child(2) { animation-delay: 0.1s; }
.option:nth-child(3) { animation-delay: 0.15s; }
.option:nth-child(4) { animation-delay: 0.2s; }
@keyframes optionEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.option::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 216, 107, 0.08), transparent 50%);
  opacity: 0; transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}

.option:hover:not(:disabled) {
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
  box-shadow:
    0 12px 30px -16px rgba(255, 216, 107, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.option:hover:not(:disabled)::before { opacity: 1; }
.option:disabled { cursor: default; }

.option__letter {
  display: grid; place-items: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: var(--gold-bright);
  background: rgba(255, 216, 107, 0.08);
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  transition: all 0.3s var(--ease-out);
  letter-spacing: -0.02em;
}
.option:hover:not(:disabled) .option__letter {
  background: rgba(255, 216, 107, 0.18);
  box-shadow: 0 0 18px rgba(255, 216, 107, 0.4);
}

.option__text {
  position: relative;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}

.option__audience {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--gold-bright);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.4s var(--ease-out);
}
.option__audience.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.option__audience-bar {
  position: absolute; left: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  border-radius: 0 0 16px 16px;
  width: 0;
  transition: width 0.8s var(--ease-out) 0.2s;
  box-shadow: 0 0 10px rgba(255, 216, 107, 0.5);
}

/* Option states */
.option.is-correct {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.18), rgba(74, 222, 128, 0.06));
  border-color: var(--success);
  box-shadow: 0 0 40px -8px var(--success-glow), 0 0 0 1px var(--success) inset;
  animation: correctBurst 0.6s var(--ease-out);
}
.option.is-correct .option__letter {
  background: var(--success);
  color: #062a13;
  border-color: var(--success);
  box-shadow: 0 0 20px var(--success-glow);
}
@keyframes correctBurst {
  0% { transform: scale(1); }
  30% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

.option.is-wrong {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(248, 113, 113, 0.06));
  border-color: var(--danger);
  box-shadow: 0 0 30px -8px var(--danger-glow), 0 0 0 1px var(--danger) inset;
  animation: wrongShake 0.5s var(--ease-out);
}
.option.is-wrong .option__letter {
  background: var(--danger);
  color: #2a0606;
  border-color: var(--danger);
}
@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.option.is-eliminated {
  opacity: 0.32;
  pointer-events: none;
  filter: grayscale(0.5);
}
.option.is-eliminated .option__text {
  text-decoration: line-through;
  text-decoration-color: var(--danger);
  text-decoration-thickness: 2px;
}

.option.is-expert-tip {
  border-color: var(--violet);
  box-shadow:
    0 0 30px -8px rgba(159, 123, 255, 0.45),
    0 0 0 1px var(--violet) inset;
  animation: expertPulse 1.6s ease-in-out infinite;
}
@keyframes expertPulse {
  0%, 100% { box-shadow: 0 0 30px -8px rgba(159, 123, 255, 0.45), 0 0 0 1px var(--violet) inset; }
  50%      { box-shadow: 0 0 50px -4px rgba(159, 123, 255, 0.6), 0 0 0 1px var(--violet) inset; }
}

/* =========================================================
   Helps & stop area
   ========================================================= */
.play__bottom {
  display: flex; flex-wrap: wrap; gap: 0.8rem;
  align-items: center; justify-content: space-between;
}

.helps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.help {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-align: left;
  transition: all 0.25s var(--ease-out);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 0;
}
.help:hover:not(.is-disabled) {
  border-color: var(--gold-soft);
  background: rgba(255, 216, 107, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(255, 216, 107, 0.5);
}
.help__icon {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: rgba(255, 216, 107, 0.1);
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  color: var(--gold-bright);
  flex-shrink: 0;
}
.help__icon svg { width: 18px; height: 18px; }
.help__body { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.help__label { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.help__hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.help.is-disabled {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(0.8);
}

/* =========================================================
   Prize ladder (right column)
   ========================================================= */
.ladder {
  position: relative;
  padding: 1.4rem 1.2rem 1.2rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ladder::before {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 50%; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

.ladder__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1rem;
}
.ladder__eyebrow {
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}
.ladder__title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: 0.3rem;
}
.ladder__title em {
  color: var(--gold-bright);
  font-style: italic;
  background: linear-gradient(180deg, #FFE89A 0%, #FFC04A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ladder__close {
  display: none;
  padding: 0.35rem;
  color: var(--text-dim);
  border-radius: 8px;
}
.ladder__close svg { width: 20px; height: 20px; }

.ladder__list {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.3rem;
  flex: 1;
}

.ladder__item {
  position: relative;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.4s var(--ease-out);
  border: 1px solid transparent;
}

.ladder__item-tier {
  display: grid; place-items: center;
  width: 22px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.04em;
}
.ladder__item-value {
  flex: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.ladder__item-icon {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ladder__item-icon svg { width: 100%; height: 100%; }

/* Safe tier */
.ladder__item--safe { color: var(--text); }
.ladder__item--safe .ladder__item-icon { color: var(--cyan); }

/* Final tier */
.ladder__item--final .ladder__item-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, #FFE89A 0%, #FFC04A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ladder__item--final .ladder__item-tier { color: var(--gold-deep); }

/* Active row */
.ladder__item--active {
  background: linear-gradient(90deg, rgba(255, 216, 107, 0.18), rgba(255, 216, 107, 0.04));
  border-color: var(--gold-soft);
  color: var(--text);
  box-shadow:
    0 0 24px -8px rgba(255, 216, 107, 0.4),
    0 0 0 1px rgba(255, 216, 107, 0.25) inset;
  animation: activePulse 2s ease-in-out infinite;
}
.ladder__item--active .ladder__item-tier { color: var(--gold-bright); }
.ladder__item--active .ladder__item-value { color: var(--gold-bright); }
@keyframes activePulse {
  0%, 100% { box-shadow: 0 0 24px -8px rgba(255, 216, 107, 0.4), 0 0 0 1px rgba(255, 216, 107, 0.25) inset; }
  50%      { box-shadow: 0 0 36px -4px rgba(255, 216, 107, 0.6), 0 0 0 1px rgba(255, 216, 107, 0.4) inset; }
}

/* Completed row */
.ladder__item--done {
  opacity: 0.45;
  text-decoration: none;
}
.ladder__item--done .ladder__item-value {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 216, 107, 0.3);
}

.ladder__legend {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.9rem; padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.ladder__legend svg {
  width: 14px; height: 14px;
  color: var(--cyan);
  flex-shrink: 0;
}

/* =========================================================
   Final result
   ========================================================= */
.modal__card--final { width: min(620px, 100%); }

.result {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.4rem;
  margin: 1.6rem 0 1rem;
}
.result__prefix {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.result__amount {
  display: flex; align-items: baseline; justify-content: center; gap: 0.4rem;
  padding: 0.15em 0.12em 0.05em;
  filter: drop-shadow(0 0 32px rgba(255, 216, 107, 0.35));
}
.modal__credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  line-height: 1.4;
}
.modal__credit__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gold);
  opacity: 0.8;
}
.modal__credit a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.modal__credit a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}
.modal__credit__sep {
  opacity: 0.45;
  margin: 0 0.1em;
}

.result__unit {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.result__num {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.18;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #FFF5C6 0%, #FFE89A 30%, #FFB838 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1.4rem 0 1.6rem;
}
.final-stats__item {
  padding: 0.85rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.final-stats__num {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 600; font-style: italic;
  color: var(--gold-bright);
  letter-spacing: -0.03em;
}
.final-stats__label {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

/* =========================================================
   Sparkle burst (correct answer celebration)
   ========================================================= */
.burst {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
}
.spark {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
  animation: sparkOut 1.2s var(--ease-out) forwards;
}
@keyframes sparkOut {
  0%   { transform: translate(0,0) scale(0); opacity: 1; }
  20%  { transform: translate(var(--dx,0), var(--dy,0)) scale(1.4); opacity: 1; }
  100% { transform: translate(calc(var(--dx,0) * 2.5), calc(var(--dy,0) * 2.5 + 80px)) scale(0); opacity: 0; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .game__main { grid-template-columns: 1fr; }
  .icon-btn--ladder { display: grid; }

  .ladder {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(360px, 90vw);
    border-radius: 22px 0 0 22px;
    border-right: none;
    transform: translateX(110%);
    transition: transform 0.45s var(--ease-out);
    z-index: 40;
  }
  .ladder.is-open { transform: translateX(0); }
  .ladder__close { display: grid; }
}

@media (max-width: 768px) {
  .options { grid-template-columns: 1fr; }
  .helps { grid-template-columns: repeat(2, 1fr); }
  .play__bottom { flex-direction: column; align-items: stretch; }
  .btn--stop { width: 100%; justify-content: center; }
  .brand__sub { display: none; }
  .meta__num { font-size: 2.4rem; }
  .timer { width: 64px; height: 64px; }
  .timer__num { font-size: 1.4rem; }
  .qcard__bgnum { font-size: 12rem; right: -10px; bottom: -30px; }
  .help__hint { display: none; }
  .help__body { flex-direction: row; }
  .help { padding: 0.6rem; }
}

@media (max-width: 480px) {
  .game { padding: 0.8rem; }
  .game__header { padding: 0.5rem 0.8rem; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__title { font-size: 1.05rem; }
  .qcard { padding: 1.25rem 1.2rem; }
  .qcard__text { font-size: 1.1rem; }
  .modal__card { padding: 1.75rem 1.4rem; }
  .modal__title { font-size: 2.3rem; }
  .feature-grid { gap: 0.5rem; }
  .feature__num { font-size: 1.6rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
