* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, #0b1e3a 0%, #10294f 55%, #0b1e3a 100%);
  color: #eaf2ff;
  min-height: 100vh;
  padding: 24px 16px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.2rem;
  letter-spacing: 1px;
}

.section-heading {
  text-align: center;
  font-size: 1.7rem;
  letter-spacing: 1px;
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
  margin: 38px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

.subtitle {
  color: #9fb8dd;
  font-size: 1.1rem;
  margin-top: 6px;
}

.subtitle strong { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  transition: background 0.15s ease;
}

.btn:hover { background: #1d4ed8; }

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #cfe0f7;
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn.danger { background: #b91c1c; }
.btn.danger:hover { background: #991b1b; }

/* ---------- leader banner ---------- */
.leader-banner {
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 24px;
  font-size: 1.25rem;
  font-weight: 600;
}

.leader-banner.sky { border-color: #7cd4fd; box-shadow: 0 0 24px rgba(125, 211, 252, 0.25); }
.leader-banner.blue { border-color: #60a5fa; box-shadow: 0 0 24px rgba(96, 165, 250, 0.25); }
.leader-banner.tie { border-color: #fbbf24; box-shadow: 0 0 24px rgba(251, 191, 36, 0.2); }
.leader-banner.a-leads { border-color: #7cd4fd; box-shadow: 0 0 24px rgba(125, 211, 252, 0.25); }
.leader-banner.b-leads { border-color: #60a5fa; box-shadow: 0 0 24px rgba(96, 165, 250, 0.25); }

#leader-text { color: #fff; }

/* ---------- team cards ---------- */
.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
}

.vs {
  align-self: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.team-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
}

.team-card.sky { border-top: 5px solid #7cd4fd; }
.team-card.blue { border-top: 5px solid #3b82f6; }

.person {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: #9fb8dd;
  margin-bottom: 6px;
}

.team-card h2 { font-size: 1.4rem; margin-bottom: 14px; }

.points {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

.points-label {
  color: #9fb8dd;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin: 6px 0 18px;
}

/* ---------- challenges ---------- */
.challenge {
  margin-bottom: 48px;
}

.challenge-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.challenge-title .vs {
  font-size: 1.1rem;
  color: #fbbf24;
  padding: 0 8px;
}

.handicap-note {
  text-align: center;
  color: #fbbf24;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.teams.single {
  grid-template-columns: 1fr;
}

/* ---------- question challenges ---------- */
.teams.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.team-card.green { border-top: 5px solid #22c55e; }
.team-card.red { border-top: 5px solid #ef4444; }

.team-card.winning {
  border-color: #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}

.answer-word {
  font-size: 2.4rem;
  line-height: 1;
}

.gap-lines {
  list-style: none;
  text-align: left;
  margin-top: 12px;
  width: 100%;
}

.gap-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}

.gap-lines li span:first-child {
  color: #9fb8dd;
}

.gap-lines li.strong {
  font-weight: 700;
  color: #fbbf24;
}

.gap-lines li.strong span:first-child {
  color: #fbbf24;
}

/* ---------- footer ---------- */
footer {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: #8ea9cf;
  font-size: 0.9rem;
}

.error { color: #f87171; font-weight: 600; }

.hidden { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .teams {
    grid-template-columns: 1fr;
  }
  .vs {
    text-align: center;
  }
  .points { font-size: 3rem; }
}
