:root {
  --bg: #090a1a;
  --panel: rgba(17, 21, 48, 0.78);
  --panel-strong: rgba(24, 30, 68, 0.94);
  --text: #f6f7ff;
  --muted: #b9c0e8;
  --line: rgba(255, 255, 255, 0.14);
  --cyan: #37f5ff;
  --pink: #ff4fd8;
  --gold: #ffd166;
  --green: #5dffb3;
  --red: #ff6b7d;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(55, 245, 255, 0.14), transparent 24rem),
    radial-gradient(circle at 85% 12%, rgba(255, 79, 216, 0.16), transparent 26rem),
    linear-gradient(135deg, #070812 0%, #0d1029 48%, #10081f 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent 90%);
}

button {
  font: inherit;
}

.game-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  place-items: center;
  position: relative;
}

.hero,
.quiz,
.results {
  width: 100%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
}

.hero {
  padding: clamp(28px, 6vw, 72px);
}

.quiz,
.results {
  padding: clamp(22px, 4vw, 42px);
}

.hidden {
  display: none !important;
}

.orb {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.38;
  pointer-events: none;
}

.orb-one {
  right: -95px;
  top: -95px;
  background: var(--cyan);
}

.orb-two {
  left: -120px;
  bottom: -120px;
  background: var(--pink);
}

.brand-row,
.quiz-top,
.results-header {
  position: relative;
  z-index: 1;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.logo-mark {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(55, 245, 255, 0.22), rgba(255, 79, 216, 0.22)),
    rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 36px rgba(55, 245, 255, 0.2);
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.08em;
  font-size: 30px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--cyan);
  font-weight: 800;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3rem, 10vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow: 0 0 40px rgba(255, 79, 216, 0.22);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  line-height: 1.55;
  margin-bottom: 28px;
}

.disclaimer {
  position: relative;
  z-index: 1;
  color: rgba(246, 247, 255, 0.72);
  line-height: 1.5;
  margin-bottom: 24px;
}

.hero-stats,
.result-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.hero-stats div,
.result-grid div {
  padding: 18px;
  background: rgba(0, 0, 0, 0.23);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.hero-stats strong,
.result-grid strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.hero-stats span,
.result-grid span {
  color: var(--muted);
  font-size: 0.92rem;
}

.action-row,
.nav-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.centered {
  justify-content: center;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.choice-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-btn {
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #071024;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(55, 245, 255, 0.18);
}

.secondary-btn,
.ghost-btn {
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-weight: 800;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.choice-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.ghost-btn:focus-visible,
.choice-btn:focus-visible {
  outline: 3px solid rgba(255, 209, 102, 0.8);
  outline-offset: 3px;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.timer-card {
  min-width: 112px;
  text-align: center;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
}

.timer-card span {
  display: block;
  font-weight: 900;
  font-size: 1.35rem;
}

.timer-card small {
  color: var(--muted);
}

.progress-wrap {
  margin-bottom: 20px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: 10px;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
  transition: width 260ms ease;
}

.question-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 34px);
  margin-bottom: 18px;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.difficulty,
.score-preview {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
}

.prompt {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  white-space: pre-line;
}

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

.choice-btn {
  text-align: left;
  padding: 17px 18px;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-weight: 800;
  line-height: 1.35;
}

.choice-btn .letter {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(55, 245, 255, 0.12);
  color: var(--cyan);
  font-size: 0.84rem;
}

.choice-btn.correct {
  background: rgba(93, 255, 179, 0.15);
  border-color: rgba(93, 255, 179, 0.72);
}

.choice-btn.incorrect {
  background: rgba(255, 107, 125, 0.14);
  border-color: rgba(255, 107, 125, 0.72);
}

.choice-btn:disabled {
  cursor: default;
  transform: none;
}

.feedback {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.5;
}

.feedback strong {
  color: var(--text);
}

.nav-row {
  justify-content: space-between;
}

.results-header {
  text-align: center;
  margin-bottom: 26px;
}

.score-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 30px;
}

.score-ring {
  width: 190px;
  height: 190px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #0b0e25 57%, transparent 58%),
    conic-gradient(var(--cyan) 0deg, var(--pink) 220deg, rgba(255,255,255,0.14) 220deg 360deg);
  box-shadow: 0 0 48px rgba(255, 79, 216, 0.16);
}

.score-ring span {
  font-size: 4rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.score-ring small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.score-copy h3 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.score-copy p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
  margin-bottom: 0;
}

.result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.review-box {
  margin: 20px 0 24px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.review-box summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 900;
}

.review-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.review-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
}

.review-item strong {
  display: block;
  margin-bottom: 6px;
}

.review-item p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .game-shell {
    width: min(100% - 20px, 1040px);
    padding: 16px 0;
  }

  .hero,
  .quiz,
  .results {
    border-radius: 24px;
  }

  .brand-row,
  .quiz-top,
  .score-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .timer-card {
    width: 100%;
  }

  .hero-stats,
  .result-grid,
  .choice-grid,
  .score-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .score-panel {
    text-align: center;
  }

  .progress-labels {
    flex-direction: column;
    gap: 4px;
  }

  .nav-row,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }
}

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