:root {
  color-scheme: dark;
  --bg: #060816;
  --panel: rgba(255,255,255,0.05);
  --line: rgba(255,255,255,0.08);
  --text: #f6f7fb;
  --muted: #b6bdd6;
  --accent: #7fa8ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(96,132,255,0.18), transparent 40%),
    radial-gradient(circle at bottom, rgba(119,255,227,0.12), transparent 40%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

.shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.hero,
.summary,
.game {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero {
  min-height: 80vh;
  justify-content: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 12px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(44px, 9vw, 92px);
}

h2 {
  font-size: clamp(32px, 5vw, 52px);
}

.lead,
.question,
.result-body {
  color: var(--muted);
  line-height: 1.8;
}

.primary-button,
.ghost-button,
.choice-button {
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #7fa8ff, #8df0ff);
  color: #07111f;
  border: none;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 700;
  width: fit-content;
}

.primary-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 10px 14px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.score-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-pill span {
  font-size: 12px;
  color: var(--muted);
}

.score-pill strong {
  font-size: 20px;
}

.visual-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.visual-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#rendererBadge {
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.choice-button {
  background: rgba(255,255,255,0.04);
  border-radius: 20px;
  padding: 18px;
  text-align: left;
  font-size: 16px;
}

.choice-button:hover {
  background: rgba(255,255,255,0.08);
}

.choice-button.correct {
  border-color: rgba(100,255,180,0.7);
}

.choice-button.selected {
  border-color: rgba(127,168,255,1);
}

.result {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: rgba(255,255,255,0.04);
  display: flex;
  gap: 24px;
  align-items: center;
}

.result-score,
.final-score {
  font-size: 64px;
  font-weight: 800;
}

.result-score small,
.final-score small {
  font-size: 24px;
  color: var(--muted);
}

.result-title {
  font-size: 24px;
  margin: 0 0 8px;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1100px);
  }

  .game-header {
    flex-direction: column;
  }

  .result {
    flex-direction: column;
    align-items: flex-start;
  }
}
