:root {
  color-scheme: dark;
  --bg: #071526;
  --bg-deep: #030914;
  --panel: rgba(8, 24, 43, 0.92);
  --panel-soft: rgba(16, 45, 76, 0.72);
  --line: rgba(177, 214, 255, 0.2);
  --text: #f6fbff;
  --muted: #a9bfd6;
  --gold: #f3c04f;
  --gold-deep: #a86b10;
  --blue: #2d8dff;
  --green: #36d399;
  --red: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(31, 98, 168, 0.55), transparent 36rem),
    linear-gradient(145deg, var(--bg-deep), var(--bg) 54%, #0e2241);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell.compact {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.hero {
  min-height: 34vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
}

.subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.5;
}

.panel,
.quiz-board,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.panel {
  padding: 28px;
}

.section-heading,
.topbar,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar a,
.secondary-link {
  color: var(--text);
  border-bottom: 1px solid rgba(243, 192, 79, 0.65);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-link {
  color: #151007;
  background: linear-gradient(180deg, #ffe08a, var(--gold));
  box-shadow: inset 0 -2px 0 rgba(99, 62, 0, 0.28);
}

.secondary-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.question-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.question-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.question-card:hover,
.answer:hover {
  transform: translateY(-2px);
  border-color: rgba(243, 192, 79, 0.72);
  background: rgba(24, 62, 104, 0.9);
}

.question-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 700;
}

.question-card strong {
  display: block;
  line-height: 1.35;
}

.quiz-board,
.result-card {
  padding: clamp(24px, 5vw, 56px);
}

.quiz-board h1,
.result-card h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.06;
}

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

.answer {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(243, 192, 79, 0.38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 43, 84, 0.95), rgba(8, 26, 52, 0.95));
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.answer span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #130d05;
  background: var(--gold);
  font-weight: 800;
}

.answer strong {
  font-size: 1.1rem;
  line-height: 1.25;
}

.result-card {
  border-color: rgba(243, 192, 79, 0.42);
}

.result-card.correct {
  border-color: rgba(54, 211, 153, 0.7);
}

.result-card.wrong {
  border-color: rgba(255, 107, 107, 0.72);
}

.result-answer {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.explanation {
  margin: 34px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.explanation ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.disabled {
  pointer-events: none;
  opacity: 0.38;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding: 24px 0;
  }

  .hero {
    min-height: 30vh;
  }

  .panel {
    padding: 18px;
  }

  .section-heading,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .answers {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .answer {
    min-height: 72px;
  }
}
