:root {
  --bg: #05080d;
  --panel: #0b1420;
  --panel-2: #0f1f2e;
  --line: rgba(98, 255, 181, 0.32);
  --line-strong: #62ffb5;
  --cyan: #00f5ff;
  --yellow: #ffe600;
  --red: #ff3b5c;
  --blue: #76b9ff;
  --text: #e7f6ff;
  --muted: rgba(231, 246, 255, 0.64);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --font-hud: 'Orbitron', monospace;
  --font-ui: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 245, 255, 0.2), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(255, 230, 0, 0.13), transparent 26%),
    linear-gradient(135deg, #07100d 0%, #061525 48%, #090813 100%);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

.scanlines,
.pitch-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.scanlines {
  z-index: 20;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.16) 3px,
    rgba(0, 0, 0, 0.16) 4px
  );
  opacity: 0.55;
}

.pitch-grid {
  z-index: 0;
  background-image:
    linear-gradient(rgba(98, 255, 181, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 255, 181, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.quiz-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
}

.header-link,
.quiz-btn {
  border: 1px solid rgba(0, 245, 255, 0.36);
  background: rgba(3, 14, 23, 0.72);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
}

.header-link {
  padding: 10px 12px;
  transition: border-color 0.16s, color 0.16s, box-shadow 0.16s;
}

.header-link:hover {
  border-color: var(--cyan);
  color: white;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.25);
}

.brand {
  justify-self: center;
  font-family: var(--font-hud);
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: 5px;
  text-align: center;
  text-transform: uppercase;
}

.brand span {
  color: var(--line-strong);
  text-shadow: 0 0 18px rgba(98, 255, 181, 0.6);
}

.quiz-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(920px, calc(100% - 32px));
  margin: 18px auto 80px;
}

.scoreboard,
.quiz-card,
.result-card {
  border: 1px solid rgba(98, 255, 181, 0.28);
  background: linear-gradient(180deg, rgba(12, 31, 42, 0.94), rgba(6, 16, 27, 0.96));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.scoreboard {
  display: grid;
  grid-template-columns: minmax(82px, 130px) 1fr minmax(82px, 130px);
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 16px;
}

.score-team {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.score-team span,
.score-center span,
.category-row,
.result-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.score-team strong {
  font-family: var(--font-hud);
  font-size: 30px;
  color: var(--yellow);
}

.away strong {
  color: var(--blue);
}

.score-center {
  display: grid;
  gap: 11px;
  text-align: center;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(98, 255, 181, 0.44);
  background: rgba(0, 0, 0, 0.28);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--line-strong), var(--cyan));
  box-shadow: 0 0 22px rgba(98, 255, 181, 0.44);
  transition: width 0.24s ease;
}

.quiz-card,
.result-card {
  min-height: 470px;
  padding: clamp(22px, 5vw, 42px);
}

.category-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--line-strong);
}

.timer-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

#timer-label {
  min-width: 44px;
  color: var(--yellow);
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: right;
}

.timer-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 230, 0, 0.34);
  background: rgba(0, 0, 0, 0.28);
}

.timer-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--line-strong));
  box-shadow: 0 0 18px rgba(255, 230, 0, 0.34);
  transition: width 0.18s linear, background 0.18s linear;
}

.timer-fill.low {
  background: linear-gradient(90deg, var(--red), var(--yellow));
  box-shadow: 0 0 18px rgba(255, 59, 92, 0.42);
}

#question-text,
.result-card h1 {
  margin: 26px 0;
  font-family: var(--font-hud);
  font-size: clamp(26px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: 1px;
  text-wrap: balance;
}

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

.option-button {
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(0, 245, 255, 0.28);
  background: rgba(0, 245, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 700;
  line-height: 1.12;
  text-align: left;
  transition: transform 0.16s, border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

.option-button:hover:not(:disabled),
.option-button:focus-visible {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.16);
  box-shadow: 0 0 22px rgba(0, 245, 255, 0.18);
  transform: translateY(-2px);
}

.option-button:disabled {
  cursor: default;
}

.option-button.correct {
  border-color: var(--line-strong);
  background: rgba(98, 255, 181, 0.22);
}

.option-button.incorrect {
  border-color: var(--red);
  background: rgba(255, 59, 92, 0.18);
}

.feedback {
  min-height: 58px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 21px;
  font-weight: 600;
}

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

.feedback.bad {
  color: #ff8ca1;
}

.actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, opacity 0.16s;
}

.quiz-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(0, 245, 255, 0.24);
}

.quiz-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.quiz-btn.primary {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(98, 255, 181, 0.28), rgba(0, 245, 255, 0.15));
  color: white;
}

.quiz-btn.secondary {
  color: var(--muted);
}

.result-card {
  display: grid;
  place-items: center;
  text-align: center;
}

.result-card p {
  max-width: 620px;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.3;
}

.result-kicker {
  color: var(--line-strong);
}

.final-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 22px;
}

.final-score span {
  font-family: var(--font-hud);
  font-size: clamp(62px, 13vw, 108px);
  line-height: 0.9;
  color: var(--yellow);
}

.final-score small {
  color: var(--muted);
  font-family: var(--font-hud);
  font-size: 26px;
}

.result-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .quiz-header {
    grid-template-columns: 1fr 1fr;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .header-link {
    text-align: center;
  }

  .scoreboard {
    grid-template-columns: 1fr;
  }

  .score-team {
    display: none;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .actions-row {
    flex-direction: column-reverse;
  }

  .quiz-btn {
    width: 100%;
  }
}

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