:root {
  --bg: #09070d;
  --surface: #14111a;
  --surface-2: #1b1720;
  --ink: #f7f3fb;
  --muted: #aaa2b1;
  --line: rgba(255,255,255,.14);
  --hot: #e849ff;
  --good: #73e2a7;
  --bad: #ff8c78;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 78% 16%, rgba(232,73,255,.13), transparent 32%), var(--bg); font-family: "Noto Sans TC", sans-serif; font-size: 16px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.game-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1120px)/2)); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font: 700 .86rem/1 "Space Grotesk", sans-serif; letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 34px; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; }
.back-link { color: var(--muted); font-size: .9rem; }
.game-shell { width: min(1120px, calc(100% - 48px)); margin: auto; padding: 74px 0 64px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 72px; align-items: start; }
.eyebrow { margin: 0 0 20px; color: var(--hot); font: 600 .75rem/1.4 "Space Grotesk", sans-serif; letter-spacing: .18em; }
.game-intro { position: sticky; top: 48px; padding-top: 34px; }
.game-intro h1 { margin: 0 0 28px; font: 700 clamp(3rem, 5.2vw, 5.4rem)/1.02 "Space Grotesk", "Noto Sans TC", sans-serif; letter-spacing: -.055em; }
.game-intro > p:last-child { max-width: 440px; color: var(--muted); font-size: 1.08rem; }
.game-card { position: relative; min-height: 610px; padding: 58px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(232,73,255,.08), transparent 42%), var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.settings-button { position: absolute; top: 20px; right: 20px; z-index: 4; width: 58px; height: 58px; border: 1px solid rgba(232,73,255,.62); border-radius: 50%; background: rgba(232,73,255,.13); cursor: pointer; font-size: 1.55rem; line-height: 1; box-shadow: 0 0 0 5px rgba(232,73,255,.055), 0 10px 30px rgba(0,0,0,.28); transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.settings-button:hover, .settings-button:focus-visible { border-color: var(--hot); background: rgba(232,73,255,.22); transform: rotate(18deg) scale(1.04); outline: none; }
.settings-panel { position: absolute; top: 86px; right: 20px; z-index: 5; width: 224px; padding: 18px; border: 1px solid var(--line); background: #211b27; box-shadow: 0 16px 44px rgba(0,0,0,.45); }
.settings-panel p { margin: 0 0 12px; color: var(--muted); font-size: .82rem; }
.settings-panel .settings-divider { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mode-option { width: 100%; padding: 11px 13px; text-align: left; border: 0; background: transparent; cursor: pointer; }
.mode-option:hover, .mode-option.is-active { background: rgba(232,73,255,.13); color: var(--hot); }
.screen { display: none; min-height: 490px; flex-direction: column; justify-content: center; }
.screen.is-active { display: flex; }
.screen h2 { margin: 16px 0 14px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.12; }
.screen > p { color: var(--muted); }
.mode-label { width: fit-content; color: var(--hot); font: 600 .74rem/1.4 "Space Grotesk", "Noto Sans TC", sans-serif; letter-spacing: .1em; }
.primary-action, .secondary-action, .next-button { min-height: 52px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; cursor: pointer; }
.primary-action { width: fit-content; margin-top: 20px; color: var(--bg); background: var(--ink); border: 1px solid var(--ink); }
.secondary-action { border: 1px solid rgba(255,255,255,.35); }
.question-topline { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .88rem; }
.progress-track { height: 3px; margin: 16px 0 28px; overflow: hidden; background: rgba(255,255,255,.1); }
.progress-track span { display: block; width: 20%; height: 100%; background: var(--hot); transition: width .25s ease; }
.play-button { width: 100%; min-height: 106px; margin: 18px 0 28px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid rgba(232,73,255,.5); background: rgba(232,73,255,.08); cursor: pointer; font-weight: 700; }
.play-button:hover { background: rgba(232,73,255,.14); }
.play-button.is-playing .play-icon { animation: pulse .7s ease infinite alternate; }
.play-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--bg); background: var(--hot); font-size: .75rem; }
.answer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.answer-button { min-height: 64px; padding: 10px 16px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 600; }
.answer-button:hover:not(:disabled) { border-color: var(--hot); }
.answer-button.is-correct { border-color: var(--good); background: rgba(115,226,167,.11); }
.answer-button.is-wrong { border-color: var(--bad); background: rgba(255,140,120,.1); }
.answer-button:disabled { cursor: default; }
.feedback { min-height: 28px; margin: 18px 0 0; }
.feedback.correct { color: var(--good); }
.feedback.wrong { color: var(--bad); }
.next-button { align-self: flex-end; margin-top: 10px; border: 0; color: var(--bg); background: var(--hot); }
.result-score { color: var(--hot); font: 700 clamp(3.8rem, 8vw, 7rem)/1 "Space Grotesk", sans-serif; }
#result-title { font-size: clamp(3.8rem, 8vw, 7rem); line-height: 1; }
.result-note { margin-top: 24px; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: .9rem; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.result-actions .primary-action { margin-top: 0; }
.synthesis-note { grid-column: 2; margin: -44px 0 0; color: #746d79; font-size: .78rem; }
@keyframes pulse { to { transform: scale(1.12); box-shadow: 0 0 20px rgba(232,73,255,.5); } }
@media (max-width: 820px) {
  .game-header { height: 66px; padding-inline: 16px; }
  .game-shell { width: min(100% - 28px, 680px); padding: 44px 0; grid-template-columns: 1fr; gap: 26px; }
  .game-intro { position: static; padding-top: 0; }
  .game-intro h1 { font-size: clamp(2.7rem, 12vw, 4.6rem); }
  .game-intro > p:last-child { margin-bottom: 0; }
  .game-card { min-height: 580px; padding: 48px 24px 30px; }
  .screen { min-height: 500px; }
  .synthesis-note { grid-column: 1; margin: -10px 0 0; }
}
@media (max-width: 480px) {
  .answer-grid { grid-template-columns: 1fr; }
  .play-button { min-height: 88px; }
  .result-actions { flex-direction: column; }
  .result-actions > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
