/* ── Reset & base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0f0e0a;
  --surface:    #1c1a14;
  --surface2:   #252218;
  --gold:       #c9a84c;
  --gold-dark:  #8b6914;
  --gold-glow:  rgba(201, 168, 76, 0.25);
  --gold-light: #e8c97a;
  --text:       #f0ead8;
  --muted:      #8a8070;
  --correct:    #2a5c2a;
  --wrong:      #5c1a1a;
  --radius:     10px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ── Header ──────────────────────────────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 2px solid var(--gold-dark);
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.trophy-icon { margin-right: 6px; }

#score-display {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ── Main layout ─────────────────────────────────────────────────────── */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ── Progress bar ────────────────────────────────────────────────────── */
#progress-container { margin-bottom: 24px; }

#progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

#progress-bar-track {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

#progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Start screen ────────────────────────────────────────────────────── */
#start-screen {
  text-align: center;
  padding: 40px 20px;
}

.statuette-divider {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

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

#start-screen h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  font-style: italic;
}

#start-screen p {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.year-note {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--gold-dark);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--gold);
  margin: 12px 0 24px;
  min-height: 36px;
  font-style: italic;
}

.year-note:empty { display: none; }

.options-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.option-group label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid #3a3020;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

select:focus { border-color: var(--gold); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
button {
  display: inline-block;
  padding: 13px 32px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

#start-btn, #restart-btn {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0f0e0a;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 24px var(--gold-glow);
}

#start-btn:hover, #restart-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 36px rgba(201, 168, 76, 0.45);
  transform: translateY(-1px);
}

#next-btn {
  margin-top: 16px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid #3a3020;
  width: 100%;
}

#next-btn:hover {
  background: #2e2a1a;
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* ── Loading ─────────────────────────────────────────────────────────── */
#loading-screen {
  text-align: center;
  padding: 80px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--surface2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

/* ── Question card ───────────────────────────────────────────────────── */
#question-card {
  background: var(--surface);
  border: 1px solid #2a2515;
  border-radius: var(--radius);
  padding: 28px 24px;
}

#question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

#question-year {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  font-weight: 700;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
}

#question-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
}

#question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Options grid ────────────────────────────────────────────────────── */
#options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 500px) {
  #options-grid { grid-template-columns: 1fr; }
}

.option-btn {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid #3a3020;
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  line-height: 1.4;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: #2e2a1a;
  transform: translateY(-1px);
}

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

.option-btn.correct {
  background: var(--correct);
  border-color: #3a7a3a;
  color: #c8f0c8;
}

.option-btn.wrong {
  background: var(--wrong);
  border-color: #7a2a2a;
  color: #f0c8c8;
}

.option-btn.reveal {
  background: var(--correct);
  border-color: #3a7a3a;
  color: #c8f0c8;
}

/* ── Feedback ────────────────────────────────────────────────────────── */
#feedback {
  min-height: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 8px;
}

#feedback.correct { color: #7acc7a; }
#feedback.wrong   { color: #e07070; }

/* ── Fact box ────────────────────────────────────────────────────────── */
#fact-box {
  margin-top: 12px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--gold-light);
  line-height: 1.5;
  font-style: italic;
}

/* ── Results ─────────────────────────────────────────────────────────── */
#results-screen {
  text-align: center;
  padding: 40px 20px;
}

#results-screen h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 20px;
  font-style: italic;
}

#results-score {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 8px;
  text-shadow: 0 0 30px var(--gold-glow);
}

#results-grade {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}

#results-breakdown {
  background: var(--surface);
  border: 1px solid #2a2515;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  text-align: left;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1e1c12;
  font-size: 0.9rem;
}

.breakdown-row:last-child { border-bottom: none; }

.breakdown-label { color: var(--muted); flex: 1; }
.breakdown-score { font-weight: 700; color: var(--gold); margin-left: 12px; }

.nominee-badge {
  font-size: 0.65rem;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--gold);
  padding: 1px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  font-weight: 700;
}
