:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #040612;
  color: #f8fbff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 222, 255, .17), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(176, 38, 255, .2), transparent 30rem),
    radial-gradient(circle at 55% 92%, rgba(255, 35, 151, .1), transparent 28rem),
    linear-gradient(155deg, #030512 0%, #090824 50%, #02040c 100%);
}

button { font: inherit; }
.hidden { display: none !important; }

.game-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(15px, 3vw, 32px);
}

.game-header,
.score-strip,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-lockup img { width: 54px; height: 54px; object-fit: contain; }
.brand-lockup h1 { margin: -2px 0 0; font-size: clamp(1.3rem, 4vw, 2.05rem); letter-spacing: .1em; font-style: italic; }
.eyebrow, .panel-tag { color: #82ebff; font-size: .68rem; font-weight: 900; letter-spacing: .2em; }

.sound-button,
.primary-button {
  border: 1px solid rgba(112, 224, 255, .42);
  border-radius: 10px;
  color: #f8fbff;
  background: rgba(13, 19, 39, .84);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
}

.sound-button { padding: 10px 14px; }
.sound-button[aria-pressed="false"] { color: #8992a7; border-color: rgba(137, 146, 167, .25); }

.score-strip {
  margin: 22px 0 13px;
  padding: 13px clamp(12px, 3vw, 28px);
  border: 1px solid rgba(130, 235, 255, .17);
  border-radius: 14px;
  background: rgba(7, 12, 28, .8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.score-strip div { display: grid; min-width: 82px; text-align: center; }
.score-strip span { color: #8791a8; font-size: .63rem; font-weight: 800; letter-spacing: .15em; }
.score-strip strong { margin-top: 2px; font-size: clamp(1.25rem, 4vw, 1.9rem); font-variant-numeric: tabular-nums; }

.quiz-stage {
  position: relative;
  display: grid;
  min-height: min(650px, calc(100vh - 220px));
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(79, 212, 255, .26);
  border-radius: 24px;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% -12%, rgba(128, 84, 255, .28), transparent 42%),
    radial-gradient(ellipse at 50% 112%, rgba(0, 218, 255, .17), transparent 46%),
    linear-gradient(180deg, #090a22 0%, #050817 55%, #02040c 100%);
  box-shadow: 0 28px 95px rgba(0, 0, 0, .68), 0 0 70px rgba(47, 189, 255, .09), inset 0 0 0 1px rgba(255,255,255,.025);
}

.quiz-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .36;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(126, 234, 255, .13) 50%, transparent 50.2%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(93, 207, 255, .04) 80px 81px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(93, 207, 255, .035) 80px 81px);
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.studio-set { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.studio-truss { position: absolute; top: 0; width: 34px; height: 74%; border-inline: 2px solid rgba(137, 221, 255, .2); background: repeating-linear-gradient(35deg, transparent 0 17px, rgba(116,207,255,.13) 18px 20px, transparent 21px 34px); }
.truss-left { left: 3.8%; transform: skewY(-7deg); }
.truss-right { right: 3.8%; transform: scaleX(-1) skewY(-7deg); }
.studio-truss i { position: absolute; left: -7px; width: 45px; height: 10px; border-radius: 2px; background: linear-gradient(90deg,#19294a,#607ba7 50%,#101b35); box-shadow: 0 0 18px rgba(85,207,255,.3); }
.studio-truss i:nth-child(1) { top: 9%; }.studio-truss i:nth-child(2) { top: 31%; }.studio-truss i:nth-child(3) { top: 54%; }.studio-truss i:nth-child(4) { top: 77%; }
.light-beam { position: absolute; top: -10%; width: 20%; height: 95%; transform-origin: 50% 0; opacity: .18; filter: blur(4px); background: linear-gradient(to bottom,rgba(109,224,255,.55),rgba(80,156,255,.1) 48%,transparent 82%); clip-path: polygon(48% 0,52% 0,100% 100%,0 100%); }
.beam-left { left: 5%; transform: rotate(-18deg); }.beam-centre { left: 40%; opacity: .12; }.beam-right { right: 5%; transform: rotate(18deg); background: linear-gradient(to bottom,rgba(231,83,255,.55),rgba(125,67,255,.1) 48%,transparent 82%); }
.studio-screen { position: absolute; top: 7%; left: 50%; display: grid; width: 210px; height: 98px; place-items: center; transform: translateX(-50%) perspective(500px) rotateX(-3deg); border: 1px solid rgba(118,233,255,.23); border-radius: 8px; background: linear-gradient(145deg,rgba(14,35,69,.75),rgba(34,12,70,.72)); box-shadow: 0 0 42px rgba(81,101,255,.2), inset 0 0 25px rgba(94,218,255,.07); opacity: .65; }
.studio-screen img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(106,214,255,.45)); }
.studio-screen span { color: #a8efff; font-size: .48rem; font-weight: 900; letter-spacing: .22em; }
.stage-floor { position: absolute; left: -10%; right: -10%; bottom: -16%; height: 43%; transform: perspective(460px) rotateX(58deg); transform-origin: 50% 100%; border-top: 1px solid rgba(94,228,255,.28); background: repeating-linear-gradient(90deg,transparent 0 99px,rgba(80,218,255,.09) 100px 101px), repeating-linear-gradient(0deg,transparent 0 54px,rgba(80,218,255,.07) 55px 56px), linear-gradient(180deg,rgba(11,29,50,.8),#030610); box-shadow: 0 -18px 55px rgba(45,220,255,.08); }
.stage-floor span { position: absolute; top: 20%; width: 18%; height: 8px; border-radius: 50%; background: rgba(83,225,255,.25); filter: blur(5px); }.stage-floor span:nth-child(1){left:17%}.stage-floor span:nth-child(2){left:41%}.stage-floor span:nth-child(3){right:17%}
.audience-line { position: absolute; right: 5%; bottom: 8%; left: 5%; height: 36px; opacity: .28; background: radial-gradient(ellipse at bottom,rgba(91,214,255,.7) 0 18%,transparent 20%) 0 100%/25px 30px repeat-x; filter: blur(.5px); }

.stage-glow {
  position: absolute;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: rgba(80, 212, 255, .1);
  filter: blur(85px);
  pointer-events: none;
}

.overlay-panel,
.question-card {
  position: relative;
  z-index: 1;
  width: min(790px, calc(100% - 40px));
  padding: clamp(27px, 5vw, 54px);
  border: 1px solid rgba(115, 227, 255, .25);
  border-radius: 20px;
  background: linear-gradient(145deg,rgba(10,18,42,.96),rgba(5,8,24,.96));
  box-shadow: 0 26px 80px rgba(0,0,0,.7), 0 0 0 6px rgba(3,7,19,.65), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
}

.overlay-panel { text-align: center; }
.overlay-panel h2 { margin: 12px 0; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.06; }
.overlay-panel > p { max-width: 570px; margin: 0 auto 26px; color: #b7c1d7; line-height: 1.6; }
.keyboard-hint { display: block; margin-top: 15px; color: #6f7b94; font-size: .72rem; }

.primary-button {
  padding: 14px 22px;
  border: 0;
  color: #030711;
  background: linear-gradient(110deg, #81f653 0%, #55edcf 44%, #55d6ff 100%);
  box-shadow: 0 10px 30px rgba(75, 226, 211, .23);
}
.primary-button:hover, .primary-button:focus-visible { filter: brightness(1.08); transform: translateY(-1px); }

.question-card { padding: clamp(22px, 4vw, 44px); }
.question-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category { color: #06101b; padding: 6px 9px; border-radius: 6px; background: #82efd8; font-size: .64rem; font-weight: 950; letter-spacing: .13em; }
.question-count { color: #7f8aa2; font-size: .67rem; font-weight: 850; letter-spacing: .12em; }
.question-timer { height: 5px; margin: 20px 0 25px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.question-timer span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #72f1c9, #64ddff); transform-origin: left; }
.question-timer span.urgent { background: linear-gradient(90deg, #ffb52e, #ff477f); }
.question { min-height: 2.5em; margin: 0 0 28px; color: #f9fbff; font-size: clamp(1.42rem, 4vw, 2.15rem); font-weight: 820; line-height: 1.25; }

.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.answer-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 70px;
  padding: 12px 16px;
  border: 1px solid rgba(126, 145, 190, .24);
  border-radius: 6px 16px 6px 16px;
  color: #eaf1ff;
  background: linear-gradient(115deg,rgba(24,35,69,.94),rgba(12,17,42,.94));
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.answer-button:hover, .answer-button:focus-visible { transform: translateY(-2px); border-color: #70e8ef; background: rgba(39, 57, 91, .92); outline: none; }
.answer-button:disabled { cursor: default; }
.answer-key { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #8cf4eb; background: rgba(113, 237, 237, .1); font-size: .72rem; font-weight: 950; }
.answer-text { font-weight: 720; line-height: 1.25; }
.answer-button.correct { border-color: #64f3b6; background: rgba(25, 148, 105, .26); }
.answer-button.wrong { border-color: #ff5a81; background: rgba(190, 42, 78, .24); }
.feedback { min-height: 1.4em; margin: 18px 0 0; color: #8ef4d5; text-align: center; font-size: .76rem; font-weight: 900; letter-spacing: .08em; }
.feedback.wrong { color: #ff8aa5; }

.result-medal { display: grid; width: 92px; height: 44px; margin: 15px auto 5px; place-items: center; border: 1px solid rgba(116,240,232,.48); clip-path: polygon(10% 0,90% 0,100% 50%,90% 100%,10% 100%,0 50%); background: linear-gradient(100deg,rgba(25,102,122,.35),rgba(75,40,153,.4)); box-shadow: 0 0 30px rgba(69,226,218,.14); color: #b5fff5; font-size: .68rem; font-weight: 950; letter-spacing: .13em; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 auto 25px; }
.result-grid div { display: grid; gap: 3px; padding: 13px 8px; border-radius: 11px; background: rgba(255,255,255,.035); }
.result-grid strong { color: #8bf2dd; font-size: 1.3rem; }
.result-grid span { color: #78849c; font-size: .56rem; font-weight: 900; letter-spacing: .11em; }

footer { padding: 14px 3px 0; color: #7f8aa2; font-size: .76rem; }
footer p { margin: 0; }
footer strong { color: #cbd5e8; }

@media (max-width: 620px) {
  .game-shell { padding: 12px; }
  .brand-lockup img { width: 44px; height: 44px; }
  .brand-lockup h1 { font-size: 1.14rem; }
  .sound-button { padding: 8px 9px; font-size: .62rem; }
  .score-strip { gap: 4px; margin-top: 15px; }
  .score-strip div { min-width: 0; }
  .score-strip span { font-size: .52rem; letter-spacing: .09em; }
  .score-strip strong { font-size: 1.18rem; }
  .quiz-stage { min-height: 610px; border-radius: 18px; }
  .overlay-panel, .question-card { width: calc(100% - 20px); padding: 22px 15px; border-radius: 15px; }
  .overlay-panel h2 { font-size: 1.8rem; }
  .overlay-panel > p { font-size: .86rem; line-height: 1.45; }
  .question { min-height: 3.3em; margin-bottom: 19px; font-size: 1.34rem; }
  .answers { grid-template-columns: 1fr; gap: 8px; }
  .answer-button { min-height: 57px; padding: 9px 11px; }
  .question-timer { margin: 15px 0 20px; }
  footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-height: 720px) and (min-width: 621px) {
  .quiz-stage { min-height: 480px; }
  .question-card { padding: 22px 34px; }
  .question { margin-bottom: 17px; font-size: 1.55rem; }
  .answer-button { min-height: 58px; }
  .question-timer { margin: 14px 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
