:root {
  --bg-1: #050a30;
  --bg-2: #1a1a6e;
  --gold: #f5c518;
  --gold-dark: #c99a00;
  --text: #ffffff;
  --muted: #b8c0ff;
  --panel: rgba(10, 16, 70, 0.85);
  --border: #4a6cff;
  --correct: #1fbf5b;
  --wrong: #e53935;
  --selected: #ff9800;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg-1) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.container { width: 100%; max-width: 820px; }

.screen { display: none; text-align: center; animation: fadeIn 0.4s ease; }
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Start screen */
.logo {
  width: 120px; height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 800;
  color: var(--gold);
  border: 4px solid var(--gold);
  background: radial-gradient(circle, #2a2a9e, var(--bg-1));
  box-shadow: 0 0 40px rgba(245, 197, 24, 0.4);
}

h1, h2 {
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: var(--gold);
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }

.subtitle { color: var(--muted); margin-bottom: 32px; font-size: 1.05rem; }

/* Buttons */
.btn-primary {
  font: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 48px;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  color: var(--bg-1);
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  box-shadow: 0 4px 20px rgba(245, 197, 24, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(245, 197, 24, 0.55); }
.btn-primary:active { transform: translateY(0); }
.hidden { visibility: hidden; }

/* Status + progress */
.status-bar {
  display: flex; justify-content: space-between;
  font-weight: 600; color: var(--muted);
  margin-bottom: 8px;
}
#score-text { color: var(--gold); }

.progress {
  height: 8px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden; margin-bottom: 32px;
}
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 0.4s ease;
}

/* Lifelines + start over */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 24px;
}
.lifelines { display: flex; gap: 10px; flex-wrap: wrap; }

.lifeline, .btn-ghost {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
}
.lifeline {
  background: var(--panel);
  border: 2px solid var(--gold);
}
.lifeline:hover:not(:disabled) { background: #2a3a9e; transform: translateY(-1px); }
.lifeline:disabled { cursor: default; opacity: 0.6; }
.lifeline.used {
  opacity: 0.3;
  border-color: var(--muted);
  text-decoration: line-through;
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--muted);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

@media (max-width: 600px) {
  .toolbar { justify-content: center; }
}

/* Question — hexagon-ish panel */
.question-box {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--border);
  clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
  padding: 32px 48px;
  margin-bottom: 28px;
  min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 30px rgba(74, 108, 255, 0.3);
}
#question-text { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 600; line-height: 1.4; }

/* Answers */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 600px) { .answers { grid-template-columns: 1fr; } }

.answer {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  text-align: left;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  background: var(--panel);
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%);
  outline: 2px solid var(--border);
  outline-offset: -2px;
  transition: background 0.2s, transform 0.15s;
}
.answer:hover:not(:disabled) { background: #2a3a9e; transform: scale(1.02); }
.answer:disabled { cursor: default; }
.answer.eliminated { visibility: hidden; }

.answer .letter { color: var(--gold); font-weight: 800; min-width: 22px; }

.answer.selected { background: var(--selected); }
.answer.correct  { background: var(--correct); animation: pulse 0.6s ease 2; }
.answer.wrong    { background: var(--wrong); }
.answer.selected .letter,
.answer.correct .letter,
.answer.wrong .letter { color: #fff; }

@keyframes pulse {
  50% { transform: scale(1.04); }
}

/* Result */
.result-circle {
  width: 200px; height: 200px;
  margin: 24px auto;
  border-radius: 50%;
  border: 6px solid var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, #2a2a9e, var(--bg-1));
  box-shadow: 0 0 50px rgba(245, 197, 24, 0.4);
}
#result-score { font-size: 3rem; font-weight: 800; color: var(--gold); }
#result-percent { font-size: 1.2rem; color: var(--muted); }
