/* ── Soccer Knockout Pick'em — dark stadium night theme ─────────────
   Deep navy pitch black, floodlight glow, electric lime + gold accents.
   Hand-coded. */

:root {
  --pitch: #06101f;
  --pitch-2: #0a1a30;
  --surface: #0f2138;
  --surface-2: #14294a;
  --line: rgba(148, 210, 255, 0.14);
  --text: #eaf4ff;
  --muted: #8fa8c4;
  --lime: #b6f542;
  --lime-dark: #8fd415;
  --gold: #f5c542;
  --err: #ff6b6b;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

.hidden { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--pitch);
  background-image:
    radial-gradient(70% 45% at 50% 0%, rgba(84, 140, 255, 0.16), transparent 65%),
    radial-gradient(40% 35% at 12% 22%, rgba(182, 245, 66, 0.07), transparent 70%),
    radial-gradient(40% 35% at 88% 18%, rgba(245, 197, 66, 0.06), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 60px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 78px 0 54px;
  overflow: hidden;
}

/* center-circle + halfway-line pitch motif */
.pitch-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 118%, transparent 138px, var(--line) 138px, var(--line) 141px, transparent 141px),
    radial-gradient(circle at 50% 118%, transparent 218px, var(--line) 218px, var(--line) 221px, transparent 221px),
    linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, 100% 2px;
  background-position: center, center, 50% calc(100% - 1px);
  opacity: 0.9;
}

.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(245, 197, 66, 0.45);
  border-radius: 999px;
  padding: 7px 22px;
  margin-bottom: 24px;
  background: rgba(245, 197, 66, 0.07);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 5.4rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero h1 .glow {
  color: var(--lime);
  text-shadow: 0 0 34px rgba(182, 245, 66, 0.45);
}

.hero .sub {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-meta { display: flex; justify-content: center; gap: 14px; margin-top: 32px; }

.meta-chip {
  min-width: 92px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

.meta-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--lime);
  line-height: 1.1;
}

.meta-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 22px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(84, 140, 255, 0.10);
  border: 1px solid rgba(84, 140, 255, 0.35);
  font-size: 0.95rem;
}

.note-warn { background: rgba(245, 197, 66, 0.10); border-color: rgba(245, 197, 66, 0.4); }

/* ── Round bar / progress ─────────────────────────────────────────── */
.round-bar { margin: 8px 0 30px; }

.round-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.round-tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: default;
}

.round-tab.is-active { color: var(--pitch); background: var(--lime); border-color: var(--lime); }
.round-tab.is-done { color: var(--lime); border-color: rgba(182, 245, 66, 0.5); }

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), var(--gold));
  transition: width 0.35s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.round-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.04em;
}

.round-hint { text-align: center; color: var(--muted); font-size: 0.92rem; margin: 4px 0 26px; }

/* ── Matchups ─────────────────────────────────────────────────────── */
.matches {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 700px) { .matches { grid-template-columns: 1fr 1fr; } }

.match {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  position: relative;
}

.match-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 10px;
}

.match-teams { display: flex; align-items: stretch; gap: 8px; }

.team-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

.team-btn img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.team-btn:hover { border-color: rgba(182, 245, 66, 0.5); transform: translateY(-1px); }

.team-btn.is-picked {
  border-color: var(--lime);
  background: rgba(182, 245, 66, 0.12);
  color: var(--lime);
  box-shadow: 0 0 22px rgba(182, 245, 66, 0.18);
}

.team-btn.is-dimmed { opacity: 0.38; }

.vs {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold);
  font-size: 0.9rem;
}

/* ── Round nav / champion ─────────────────────────────────────────── */
.round-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.round-nav .btn:only-child { margin-left: auto; }

.champion {
  margin-top: 34px;
  text-align: center;
  padding: 30px 22px;
  border-radius: 18px;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(245, 197, 66, 0.14), transparent 70%),
    var(--surface);
  border: 1px solid rgba(245, 197, 66, 0.45);
}

.champion-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.champion-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 28px rgba(245, 197, 66, 0.35);
  margin: 6px 0 18px;
}

/* ── Card / form ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 30px;
  max-width: 560px;
  margin: 30px auto 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.card-sub { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 8px 0 26px; }

.field { margin-bottom: 18px; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(182, 245, 66, 0.15);
}

input::placeholder { color: var(--muted); opacity: 0.6; }

input.error { border-color: var(--err); }

.field-hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }

.form-error { color: var(--err); font-size: 0.9rem; text-align: center; margin-top: 14px; font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 30px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.2;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid rgba(182, 245, 66, 0.5); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(120deg, var(--lime), var(--lime-dark));
  color: #0a1503;
  box-shadow: 0 12px 34px rgba(182, 245, 66, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-big { font-size: 1.25rem; padding: 16px 40px; }
.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(10, 21, 3, 0.3);
  border-top-color: #0a1503;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Done state ───────────────────────────────────────────────────── */
.done-card { text-align: center; max-width: 640px; }

.done-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: rgba(182, 245, 66, 0.12);
  border: 1px solid rgba(182, 245, 66, 0.45);
}

.done-champion {
  margin: 22px auto;
  padding: 20px;
  border-radius: 14px;
  background: rgba(245, 197, 66, 0.07);
  border: 1px dashed rgba(245, 197, 66, 0.45);
}

.divider { border: none; border-top: 1px solid var(--line); margin: 26px 0; }

.done-card h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.picks-summary { display: flex; flex-direction: column; gap: 10px; text-align: left; }

.summary-round {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}

.summary-round-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.summary-picks { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }
.summary-picks strong { color: var(--text); font-weight: 600; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--err);
  color: #fff;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 120;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  max-width: 92vw;
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 30px 20px 26px;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

#wbx-powered-by-slot { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
