:root {
  color-scheme: dark;
  --bg: #060a1f;
  --panel: #0d1740;
  --panel-2: #14245f;
  --gold: #f2c94c;
  --gold-deep: #b57a19;
  --cyan: #4dd8ff;
  --white: #ffffff;
  --muted: #adbbdf;
  --danger: #f05252;
  --success: #32d583;
  --line: rgba(255, 255, 255, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(77, 216, 255, 0.16), transparent 35%),
    radial-gradient(circle at 76% 0%, rgba(242, 201, 76, 0.18), transparent 30%),
    var(--bg);
}

.app::before,
.app::after {
  content: "";
  position: fixed;
  width: 36vw;
  height: 120vh;
  top: -15vh;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(77, 216, 255, 0.24), transparent 68%);
  filter: blur(10px);
  opacity: 0.44;
  transform-origin: top;
  animation: sweep 8s ease-in-out infinite alternate;
}

.app::before {
  left: 4vw;
  transform: rotate(24deg);
}

.app::after {
  right: 4vw;
  transform: rotate(-24deg);
  animation-delay: -3s;
}

.screen {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.hidden {
  display: none !important;
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 18px;
}

.stage-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(77, 216, 255, 0.26);
  border-radius: 8px;
  background: #020817;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.hero-art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.35));
  animation: floatStage 5.8s ease-in-out infinite;
}

.stage-title {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  padding: 10px 22px;
  border: 1px solid rgba(242, 201, 76, 0.72);
  border-radius: 8px;
  color: #fff6c5;
  background: rgba(2, 6, 23, 0.42);
  box-shadow: 0 0 42px rgba(77, 216, 255, 0.26), inset 0 0 24px rgba(242, 201, 76, 0.12);
  font-size: clamp(28px, 4.8vw, 58px);
  font-weight: 1000;
  text-shadow: 0 0 22px rgba(77, 216, 255, 0.72);
  animation: titleGlow 2.4s ease-in-out infinite alternate;
}

.light-beam {
  position: absolute;
  z-index: 1;
  top: 5%;
  width: 34%;
  height: 84%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(77, 216, 255, 0.34), transparent 70%);
  filter: blur(18px);
  opacity: 0.6;
  animation: beamPulse 3.6s ease-in-out infinite alternate;
}

.beam-left {
  left: 8%;
  transform: rotate(22deg);
}

.beam-right {
  right: 8%;
  transform: rotate(-22deg);
  animation-delay: -1.4s;
}

.hero-copy h1 {
  margin: 4px 0 14px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-copy {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(77, 216, 255, 0.14), transparent 42%),
    rgba(13, 23, 64, 0.5);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-button {
  color: #06102f;
  background: linear-gradient(180deg, #ffe889, var(--gold));
  box-shadow: 0 12px 32px rgba(242, 201, 76, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.lifeline:hover,
.answer:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 42px rgba(242, 201, 76, 0.32);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.player-card {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(242, 201, 76, 0.28);
  border-radius: 8px;
  background: rgba(13, 23, 64, 0.78);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.player-card label {
  display: block;
  margin-bottom: 9px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.start-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.start-row input {
  min-height: 46px;
  border: 1px solid rgba(77, 216, 255, 0.36);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.start-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.18);
}

.form-note {
  display: none;
  margin: 10px 0 0 !important;
  color: #ffd0d0 !important;
  font-size: 13px !important;
}

.form-note.visible {
  display: block;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.start-actions .ghost-button {
  flex: 1 1 170px;
}

.ghost-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  text-decoration: none;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 0;
}

.rules-grid article {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 64, 0.78);
}

.rule-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rule-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #06102f;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(242, 201, 76, 0.24);
}

.rules-grid article::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 54%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: rotate(18deg);
  animation: shine 7s ease-in-out infinite;
}

.rules-grid strong {
  display: block;
  color: var(--gold);
}

.rules-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(30px, 5vw, 52px);
}

.timer-pill {
  min-width: 132px;
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(242, 201, 76, 0.46);
  border-radius: 8px;
  padding: 8px 14px;
  background: rgba(13, 23, 64, 0.78);
  box-shadow: inset 0 0 22px rgba(242, 201, 76, 0.12);
}

.timer-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.timer-pill strong {
  color: var(--gold);
  font-size: 24px;
  letter-spacing: 0;
  animation: timerPulse 1.8s ease-in-out infinite;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.mobile-game-bar {
  display: none;
}

.question-panel,
.ladder,
.check,
.save-form,
.scores {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 64, 0.86);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.question-panel {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 18px;
}

.question-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  background: linear-gradient(120deg, transparent, rgba(77, 216, 255, 0.22), transparent);
  opacity: 0.7;
  pointer-events: none;
  animation: panelGlow 5s linear infinite;
}

.question-panel > * {
  position: relative;
}

.lifelines {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.lifeline {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(77, 216, 255, 0.45);
  border-radius: 8px;
  color: var(--white);
  background: #13266b;
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.lifeline i {
  color: var(--gold);
  font-size: 18px;
}

.lifeline span {
  font-size: 12px;
  line-height: 1;
}

.lifeline:not(:disabled) {
  box-shadow: inset 0 0 18px rgba(77, 216, 255, 0.16);
  animation: lifelineReady 3.4s ease-in-out infinite;
}

.studio-panel {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(77, 216, 255, 0.36);
  border-radius: 8px;
  padding: 0;
  background:
    radial-gradient(circle at 42% 20%, rgba(77, 216, 255, 0.18), transparent 42%),
    rgba(5, 14, 45, 0.9);
}

.studio-panel::after {
  content: "";
  position: absolute;
  inset: -60% auto auto -10%;
  width: 30%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: rotate(20deg);
  animation: shine 5.8s ease-in-out infinite;
}

.studio-panel img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 300px;
  object-fit: cover;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.32));
  animation: consoleFloat 4.8s ease-in-out infinite;
}

.lifeline:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  text-decoration: line-through;
  transform: scale(0.96);
  animation: lifelineUsed 360ms ease both;
}

.question-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 24px;
  border: 2px solid rgba(242, 201, 76, 0.58);
  border-radius: 8px;
  background: linear-gradient(180deg, #152a74, #0b1744);
  box-shadow: inset 0 0 42px rgba(77, 216, 255, 0.16);
  animation: questionEnter 420ms ease both;
}

.question-card::before {
  content: "";
  position: absolute;
  inset: -60% -10%;
  background: conic-gradient(from 90deg, transparent, rgba(77, 216, 255, 0.18), transparent, rgba(242, 201, 76, 0.14), transparent);
  animation: rotateHalo 12s linear infinite;
}

.question-card p {
  position: relative;
  margin: 0;
  text-align: center;
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 850;
  line-height: 1.35;
}

.question-card,
.question-card *,
.answers,
.answers * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer {
  position: relative;
  overflow: hidden;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(77, 216, 255, 0.42);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--white);
  background: #0f2160;
  text-align: left;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, opacity 170ms ease;
  animation: answerIn 360ms ease both;
}

.answer:nth-child(2) {
  animation-delay: 60ms;
}

.answer:nth-child(3) {
  animation-delay: 120ms;
}

.answer:nth-child(4) {
  animation-delay: 180ms;
}

.answer:hover,
.answer:focus-visible {
  outline: 2px solid var(--gold);
}

.answer.disabled {
  visibility: hidden;
}

.answer.correct {
  border-color: var(--success);
  background: rgba(50, 213, 131, 0.2);
  animation: correctPulse 760ms ease both;
}

.answer.wrong {
  border-color: var(--danger);
  background: rgba(240, 82, 82, 0.18);
  animation: wrongShake 360ms ease both;
}

.answer-letter {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06102f;
  background: var(--gold);
  font-weight: 1000;
}

.answer-text {
  min-width: 0;
  line-height: 1.35;
  font-weight: 750;
}

.hint-box {
  position: relative;
  margin-top: 14px;
  padding: 16px 44px 16px 16px;
  border: 1px solid rgba(242, 201, 76, 0.42);
  border-radius: 8px;
  background: rgba(242, 201, 76, 0.1);
  color: #ffeeb1;
  line-height: 1.5;
  animation: hintIn 220ms ease both;
}

.hint-box.guaranteed-hint {
  border-color: rgba(242, 201, 76, 0.78);
  background:
    radial-gradient(circle at 18% 50%, rgba(242, 201, 76, 0.22), transparent 38%),
    rgba(242, 201, 76, 0.16);
  color: #fff4c2;
  box-shadow: 0 0 32px rgba(242, 201, 76, 0.22);
  animation: guaranteedPop 1.35s ease both;
}

.hint-box.guaranteed-hint::before,
.hint-box.guaranteed-hint::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    28px 15px 0 #4dd8ff,
    58px -4px 0 #ffffff,
    92px 18px 0 #f2c94c;
  opacity: 0;
  animation: confettiBurst 1.2s ease both;
}

.hint-box.guaranteed-hint::before {
  left: 18px;
  top: 18px;
}

.hint-box.guaranteed-hint::after {
  right: 120px;
  top: 20px;
  animation-delay: 120ms;
}

.hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.audience-row {
  display: grid;
  grid-template-columns: 26px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.audience-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.audience-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gold);
  animation: growBar 850ms ease both;
}

.ladder {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 16px;
}

.scores h3 {
  margin: 0 0 12px;
}

.ladder-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.side-title {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 201, 76, 0.62);
  border-radius: 8px;
  color: #fff7c8;
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 216, 255, 0.2), transparent 56%),
    rgba(3, 8, 27, 0.66);
  box-shadow: 0 0 34px rgba(77, 216, 255, 0.16), inset 0 0 22px rgba(242, 201, 76, 0.1);
  font-size: 24px;
  font-weight: 1000;
  text-shadow: 0 0 18px rgba(77, 216, 255, 0.65);
  animation: titleGlow 2.4s ease-in-out infinite alternate;
}

.ladder-actions .timer-pill {
  width: 100%;
}

.ladder ol {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.end-game-button {
  width: 100%;
  margin-top: auto;
}

.ladder li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--muted);
}

.ladder li.active {
  color: #06102f;
  background: var(--gold);
  font-weight: 950;
  box-shadow: 0 0 20px rgba(242, 201, 76, 0.34);
  animation: activePrize 1.6s ease-in-out infinite alternate;
}

.ladder li.safe {
  color: var(--white);
  border: 1px solid rgba(242, 201, 76, 0.35);
}

.ladder li.active.safe {
  color: #06102f;
  border-color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, #fff1a6, #f2c94c);
  text-shadow: none;
  box-shadow: 0 0 0 2px rgba(6, 16, 47, 0.35), 0 0 28px rgba(242, 201, 76, 0.5);
}

.ladder li.active.safe span,
.ladder li.active.safe strong {
  color: #06102f;
}

.result-screen {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 16px;
}

.check {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 44px);
  border-color: rgba(242, 201, 76, 0.7);
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.2), transparent 42%),
    #f9fafb;
  color: #0b1744;
  animation: checkReveal 460ms ease both;
}

.check-visual {
  position: relative;
  overflow: hidden;
  height: clamp(150px, 24vw, 220px);
  margin: 0 0 24px;
  border: 2px solid rgba(181, 122, 25, 0.42);
  border-radius: 8px;
  background: #07123a;
  box-shadow: 0 18px 38px rgba(6, 16, 47, 0.18);
}

.check-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(242, 201, 76, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.42));
}

.check-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.check-visual span {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  padding: 8px 20px;
  border: 1px solid rgba(242, 201, 76, 0.72);
  border-radius: 8px;
  color: #fff7c8;
  background: rgba(3, 8, 27, 0.5);
  font-size: clamp(30px, 6vw, 58px);
  font-weight: 1000;
  text-shadow: 0 0 18px rgba(77, 216, 255, 0.78);
}

.check-label {
  margin: 0 0 12px;
  color: var(--gold-deep);
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.check h2 {
  margin: 0 0 24px;
  font-size: clamp(42px, 8vw, 84px);
  letter-spacing: 0;
}

.check-time {
  margin: -12px 0 22px;
  color: #334155;
  font-weight: 850;
}

.check strong {
  display: block;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 2px solid #0b1744;
  font-size: clamp(26px, 5vw, 44px);
}

.save-form,
.scores {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h3 {
  margin: 0;
}

.section-heading h3,
.scores h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading h3 i,
.scores h3 i {
  color: var(--gold);
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.save-form label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-weight: 800;
}

.save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.save-row input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.score-list {
  display: grid;
  gap: 14px;
}

.score-section {
  display: grid;
  gap: 8px;
}

.score-section h4 {
  margin: 0;
  color: var(--gold);
  font-size: 15px;
  font-weight: 950;
}

.score-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.score-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.score-empty {
  color: var(--muted);
}

.score-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.score-lifelines {
  color: #d8e7ff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.score-time i,
.score-points i,
.score-lifelines i {
  margin-right: 5px;
  color: var(--gold);
}

.score-points {
  color: #ffeeb1;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: min(720px, 88vh);
  overflow: auto;
  border: 1px solid rgba(242, 201, 76, 0.46);
  border-radius: 8px;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 0%, rgba(77, 216, 255, 0.16), transparent 38%),
    #0d1740;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
  animation: modalIn 220ms ease both;
}

.modal-card h2 {
  margin: 8px 0 14px;
  font-size: clamp(28px, 5vw, 42px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-size: 24px;
}

.rules-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.million-celebration {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(242, 201, 76, 0.3), transparent 26%),
    radial-gradient(circle at 50% 48%, rgba(77, 216, 255, 0.22), transparent 42%),
    rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
}

.million-card {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 2px solid rgba(242, 201, 76, 0.8);
  border-radius: 8px;
  padding: clamp(26px, 7vw, 56px);
  color: #fff7c8;
  background:
    radial-gradient(circle at 50% 0%, rgba(77, 216, 255, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(13, 23, 64, 0.96), rgba(4, 10, 35, 0.98));
  box-shadow:
    0 0 70px rgba(242, 201, 76, 0.24),
    inset 0 0 34px rgba(77, 216, 255, 0.18);
  text-align: center;
  animation: millionCardPop 950ms cubic-bezier(0.2, 1.15, 0.32, 1) both;
}

.million-card i {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06102f;
  background: linear-gradient(180deg, #fff2a5, var(--gold));
  font-size: 34px;
  box-shadow: 0 0 36px rgba(242, 201, 76, 0.42);
  animation: crownPulse 1.1s ease-in-out infinite alternate;
}

.million-card span {
  color: var(--cyan);
  font-size: clamp(24px, 5vw, 46px);
  font-weight: 1000;
  text-shadow: 0 0 20px rgba(77, 216, 255, 0.72);
}

.million-card strong {
  width: 100%;
  color: var(--gold);
  font-size: clamp(34px, 8.5vw, 86px);
  line-height: 0.98;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 0 30px rgba(242, 201, 76, 0.42);
}

.million-card p {
  margin: 0;
  color: var(--white);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
}

.confetti-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-field span {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(-24px) rotate(0deg) scale(var(--scale));
  animation: confettiFall linear forwards;
}

@media (max-width: 820px) {
  .screen {
    padding: 16px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 10px;
    margin-bottom: 12px;
  }

  .hero-art {
    min-height: 210px;
  }

  .stage-wrap {
    min-height: 280px;
  }

  .stage-title {
    top: 44%;
  }

  .rules-grid,
  .game-layout,
  .answers {
    grid-template-columns: 1fr;
  }

  .mobile-game-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(104px, auto) 46px;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
  }

  .rules-grid {
    margin-top: 0;
  }

  .topbar {
    align-items: flex-start;
  }

  .studio-panel {
    grid-template-columns: 1fr;
  }

  .ladder {
    position: static;
  }

  .ladder-actions,
  .end-game-button {
    display: none;
  }

  .mobile-game-bar .side-title {
    min-height: 46px;
    padding: 0 10px;
    font-size: 18px;
  }

  .mobile-game-bar .timer-pill {
    min-width: 0;
    min-height: 46px;
    padding: 5px 9px;
  }

  .mobile-game-bar .timer-pill span {
    font-size: 10px;
  }

  .mobile-game-bar .timer-pill strong {
    font-size: 18px;
  }

  .mobile-end-button {
    width: 46px;
    min-height: 46px;
    padding: 0;
    align-self: stretch;
  }

  .ladder ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .save-row {
    grid-template-columns: 1fr;
  }

  .start-row {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }
}

@media (max-width: 430px) {
  .million-celebration {
    padding: 10px;
  }

  .million-card {
    padding: 22px 12px;
  }

  .million-card strong {
    font-size: clamp(30px, 9.4vw, 40px);
  }

  .lifelines {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    flex-direction: column;
  }

  .topbar .ghost-button,
  .start-actions .ghost-button,
  .result-actions button {
    width: 100%;
  }

  .timer-pill {
    width: 100%;
    justify-items: start;
  }

  .mobile-game-bar .timer-pill {
    justify-items: center;
  }

  .score-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .score-row strong,
  .score-points,
  .score-time,
  .score-lifelines {
    grid-column: 2;
  }
}

@keyframes sweep {
  from {
    opacity: 0.25;
    transform: rotate(18deg) translateX(-3vw);
  }
  to {
    opacity: 0.56;
    transform: rotate(28deg) translateX(3vw);
  }
}

@keyframes floatStage {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.015);
  }
}

@keyframes beamPulse {
  from {
    opacity: 0.34;
  }
  to {
    opacity: 0.76;
  }
}

@keyframes shine {
  0%,
  42% {
    transform: translateX(-120%) rotate(18deg);
  }
  62%,
  100% {
    transform: translateX(260%) rotate(18deg);
  }
}

@keyframes panelGlow {
  from {
    transform: translateX(-55%);
  }
  to {
    transform: translateX(55%);
  }
}

@keyframes questionEnter {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes rotateHalo {
  to {
    transform: rotate(360deg);
  }
}

@keyframes answerIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes correctPulse {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.025);
    box-shadow: 0 0 24px rgba(50, 213, 131, 0.34);
  }
}

@keyframes wrongShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  55% {
    transform: translateX(5px);
  }
  78% {
    transform: translateX(-3px);
  }
}

@keyframes hintIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes growBar {
  from {
    width: 0;
  }
}

@keyframes activePrize {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.15);
  }
}

@keyframes titleGlow {
  from {
    filter: brightness(1);
    box-shadow: 0 0 30px rgba(77, 216, 255, 0.2), inset 0 0 20px rgba(242, 201, 76, 0.1);
  }
  to {
    filter: brightness(1.16);
    box-shadow: 0 0 54px rgba(77, 216, 255, 0.38), inset 0 0 28px rgba(242, 201, 76, 0.18);
  }
}

@keyframes timerPulse {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(242, 201, 76, 0);
  }
  50% {
    text-shadow: 0 0 18px rgba(242, 201, 76, 0.42);
  }
}

@keyframes lifelineReady {
  0%,
  100% {
    border-color: rgba(77, 216, 255, 0.45);
    box-shadow: inset 0 0 18px rgba(77, 216, 255, 0.16);
  }
  50% {
    border-color: rgba(242, 201, 76, 0.56);
    box-shadow: inset 0 0 22px rgba(77, 216, 255, 0.22), 0 0 18px rgba(242, 201, 76, 0.14);
  }
}

@keyframes lifelineUsed {
  from {
    transform: scale(1.04);
    filter: brightness(1.35);
  }
  to {
    transform: scale(0.96);
    filter: brightness(0.82);
  }
}

@keyframes guaranteedPop {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  34% {
    opacity: 1;
    transform: scale(1.025) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes confettiBurst {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.4);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px) scale(1);
  }
}

@keyframes checkReveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes consoleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes millionCardPop {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.82);
  }
  58% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes crownPulse {
  from {
    transform: scale(1) rotate(-3deg);
  }
  to {
    transform: scale(1.08) rotate(3deg);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translateY(-24px) rotate(0deg) scale(var(--scale));
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0.95;
    transform: translate(var(--drift), 108vh) rotate(var(--spin)) scale(var(--scale));
  }
}

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

@media print {
  body {
    background: white;
  }

  body * {
    visibility: hidden;
  }

  #check,
  #check * {
    visibility: visible;
  }

  #check {
    position: absolute;
    inset: 20mm auto auto 20mm;
    width: calc(100% - 40mm);
    box-shadow: none;
  }

  .check-visual {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
