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

:root {
  --bg:        #0a0e1a;
  --surface:   #111827;
  --surface2:  #1c2537;
  --border:    #1f2d45;
  --accent:    #c9a84c;
  --accent2:   #e8c76a;
  --text:      #e8eaf0;
  --muted:     #6b7a99;
  --green:     #22c55e;
  --red:       #ef4444;
  --radius:    10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: linear-gradient(135deg, #0d1b36 0%, #0a1628 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trophy {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.6));
}

.title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

nav {
  display: flex;
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-btn.active {
  color: var(--accent2);
  border-color: var(--border);
  background: var(--surface2);
}

/* ── Main ── */
main {
  max-width: 1000px;
  width: 100%;
  margin: 32px auto;
  padding: 0 24px;
  flex: 1;
}

.view { display: none; }
.view.active { display: block; }

main:has(#view-knockouts.active) { max-width: 1440px; }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 20px;
}

.draw-btn {
  margin-left: auto;
  background: linear-gradient(135deg, #b8860b, #7a5800);
  border: 1px solid rgba(255,200,60,0.35);
  color: #ffd700;
  padding: 7px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  box-shadow: 0 0 12px rgba(255,180,0,0.2);
}
.draw-btn:hover {
  background: linear-gradient(135deg, #d4960d, #9a6e00);
  box-shadow: 0 0 20px rgba(255,180,0,0.4);
}
.draw-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.badge.live {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.empty-card {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ── Leaderboard table ── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  background: var(--surface2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.leaderboard-table tr:last-child td { border-bottom: none; }

.leaderboard-table tbody tr:hover {
  background: var(--surface2);
}

.rank-col, .pts-col { width: 60px; text-align: center; }

.rank {
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
}

.rank.gold   { color: #fbbf24; }
.rank.silver { color: #94a3b8; }
.rank.bronze { color: #b45309; }

.player-name {
  font-weight: 800;
  font-size: 20px;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.chip {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.chip.alive {
  border-color: rgba(34,197,94,0.4);
  color: var(--green);
  background: rgba(34,197,94,0.08);
}

.chip.eliminated {
  opacity: 0.4;
  text-decoration: line-through;
}

.pts {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent2);
  text-align: center;
}

.player-teams-mobile { display: none; }

.empty-row td {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Filter pills ── */
.filter-pills {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.pill:hover { color: var(--text); border-color: #2d4060; }

.pill.active {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent2);
}

/* ── Matches ── */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Date group */
.date-group { margin-bottom: 20px; }

.date-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.date-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.date-count {
  font-size: 11px;
  color: var(--muted);
}

.date-matches {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Match card */
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  transition: border-color 0.2s;
}

.match-card:hover { border-color: #2d4060; }

.match-card.is-live {
  border-color: rgba(239,68,68,0.4);
  background: linear-gradient(135deg, rgba(239,68,68,0.04), var(--surface));
  box-shadow: 0 0 16px rgba(239,68,68,0.08);
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 20px;
}

.match-team.away {
  justify-content: flex-end;
  text-align: right;
}

.flag { font-size: 28px; line-height: 1; }

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.match-score {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent2);
  letter-spacing: 2px;
  line-height: 1;
}

.match-score.dim { color: var(--muted); font-size: 16px; font-weight: 600; letter-spacing: 1px; }

.match-kickoff {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

/* Status badges */
.status-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 3px;
}

.badge-live {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.35);
  animation: livePulse 1.4s ease-in-out infinite;
}

.badge-ht {
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
}

.badge-ft {
  background: rgba(107,122,153,0.12);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-sched {
  background: rgba(34,197,94,0.08);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
  font-size: 9px;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Countdown */
.match-countdown {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  min-height: 14px;
}

/* Match meta — sits under time in center column */
.match-meta {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
}

.flag { font-size: 28px; }

/* ══════════════════════════════════════
   KNOCKOUTS BRACKET
══════════════════════════════════════ */

:root {
  --slot:  70px;   /* R32 slot height — all others are multiples */
  --conn:  14px;   /* connector arm width */
  --cline: #243650;
}

.bracket-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 0 24px;
}

.bracket {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  margin: 0 auto;
  gap: 0;
}

.bracket-halves {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: calc(var(--slot) * 8);
}

.bracket-left,
.bracket-right {
  display: flex;
  align-items: stretch;
  height: 100%;
}

/* ── Round columns ── */
.bm-round {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 140px;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

/* Entry slot — fixed height per round */
.bm-entry {
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.bm-round.r32 .bm-entry { height: calc(var(--slot) * 1); }
.bm-round.r16 .bm-entry { height: calc(var(--slot) * 2); }
.bm-round.qf  .bm-entry { height: calc(var(--slot) * 4); }
.bm-round.sf  .bm-entry { height: calc(var(--slot) * 8); }

/* ── Connector lines — LEFT side (branches go rightward) ── */

/* Top entry of each pair: ─┐ */
.bracket-left .bm-round:not(.sf) .bm-entry[data-pos="top"]::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: var(--conn);
  height: 50%;
  border-top:   2px solid var(--cline);
  border-right: 2px solid var(--cline);
  pointer-events: none;
}

/* Bottom entry of each pair: ─┘ */
.bracket-left .bm-round:not(.sf) .bm-entry[data-pos="bottom"]::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 0;
  width: var(--conn);
  height: 50%;
  border-bottom: 2px solid var(--cline);
  border-right:  2px solid var(--cline);
  pointer-events: none;
}

/* Incoming horizontal — all left-side entries except R32 */
.bracket-left .bm-round:not(.r32) .bm-entry::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  width: var(--conn);
  border-top: 2px solid var(--cline);
  pointer-events: none;
}

/* SF → Final connector removed (final is now above the bracket) */
.bracket-left .bm-round.sf .bm-entry::after { content: none; }

/* ── Connector lines — RIGHT side (branches go leftward) ── */

.bracket-right .bm-round:not(.sf) .bm-entry[data-pos="top"]::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  width: var(--conn);
  height: 50%;
  border-top:  2px solid var(--cline);
  border-left: 2px solid var(--cline);
  pointer-events: none;
}

.bracket-right .bm-round:not(.sf) .bm-entry[data-pos="bottom"]::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 0;
  width: var(--conn);
  height: 50%;
  border-bottom: 2px solid var(--cline);
  border-left:   2px solid var(--cline);
  pointer-events: none;
}

.bracket-right .bm-round:not(.r32) .bm-entry::before {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: var(--conn);
  border-top: 2px solid var(--cline);
  pointer-events: none;
}

.bracket-right .bm-round.sf .bm-entry::after { content: none; }

/* Round column gap = connector arm width */
.bracket-left  { gap: var(--conn); }
.bracket-right { gap: var(--conn); }

/* ── Round labels ── */
.bm-round::before {
  content: attr(data-label);
  position: absolute;
  top: -24px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Match card ── */
.bm-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  font-size: 12px;
  transition: border-color 0.15s;
  cursor: default;
}

.bm-card:hover { border-color: #2d4060; }

.bm-card.live {
  border-color: rgba(239,68,68,0.45);
  box-shadow: 0 0 10px rgba(239,68,68,0.1);
}

.bm-team {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  line-height: 1;
}

.bm-flag { font-size: 14px; flex-shrink: 0; }

.bm-name {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 11px;
}

.bm-name.tbd { color: var(--muted); font-style: italic; font-weight: 400; }

.bm-score {
  font-weight: 800;
  font-size: 13px;
  color: var(--accent2);
  min-width: 14px;
  text-align: right;
}

.bm-team.won  .bm-name  { color: #ffd700; }
.bm-team.lost .bm-name  { color: var(--muted); }
.bm-team.lost .bm-score { color: var(--muted); }

.bm-divider {
  height: 1px;
  background: var(--border);
  margin: 0 6px;
}

/* ── Grand Final Hero ── */
.final-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 56px 28px;
  margin-bottom: 0;
  background: linear-gradient(160deg, rgba(201,168,76,0.13) 0%, rgba(201,168,76,0.05) 55%, transparent 100%);
  border: 1px solid rgba(201,168,76,0.3);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  position: relative;
  min-width: 420px;
}

.final-hero.live {
  border-color: rgba(239,68,68,0.45);
  box-shadow: 0 0 40px rgba(239,68,68,0.1);
}

.final-hero-crown {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255,215,0,0.55));
}

.final-hero-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 7px;
  color: #c9a84c;
}

.final-hero-matchup {
  display: flex;
  align-items: center;
  gap: 36px;
}

.finalist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.finalist-flag { font-size: 52px; line-height: 1; }

.finalist-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.finalist-name.tbd {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
}

.finalist-score {
  font-size: 30px;
  font-weight: 900;
  color: #ffd700;
  line-height: 1;
}

.finalist.winner .finalist-name { color: #ffd700; }
.finalist.loser  .finalist-name  { color: var(--muted); }
.finalist.loser  .finalist-score { color: var(--muted); }

.final-hero-vs {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 4px;
  padding-top: 24px; /* nudge below flags, near names */
}

/* thin border connecting hero to bracket halves */
.final-hero-connector {
  width: 100%;
  display: flex;
  height: 32px;
  border-left: 1px solid rgba(201,168,76,0.3);
  border-right: 1px solid rgba(201,168,76,0.3);
}

/* ── 3rd place ── */
.third-place-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  gap: 8px;
}

.third-place-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

/* ── Groups ── */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.group-title {
  background: var(--surface2);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.group-table { width: 100%; border-collapse: collapse; }

.group-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.group-table th:first-child { text-align: left; }

.group-table td {
  padding: 10px 12px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.group-table tr:last-child td { border-bottom: none; }
.group-table td:first-child { text-align: left; font-weight: 500; }

.group-flag { font-size: 16px; margin-right: 4px; }

.pts-cell { font-weight: 700; color: var(--accent2); }

.qualify-row td:first-child { border-left: 2px solid rgba(34,197,94,0.5); }

/* ══════════════════════════════════════
   PODIUM
══════════════════════════════════════ */

@keyframes blockRise {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes cardDrop {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes crownFloat {
  0%, 100% { transform: translateY(0)   rotate(-6deg) scale(1);    }
  50%       { transform: translateY(-10px) rotate(6deg) scale(1.12); }
}
@keyframes goldPulse {
  0%, 100% {
    box-shadow:
      0 0 18px  3px rgba(255,210,50,0.35),
      0 0 50px  8px rgba(255,175,0, 0.18),
      inset 0 1px 0 rgba(255,255,255,0.18);
  }
  50% {
    box-shadow:
      0 0 36px  6px rgba(255,215,0, 0.65),
      0 0 90px 18px rgba(255,160,0, 0.35),
      0 0 140px 30px rgba(255,120,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.25);
  }
}
@keyframes shimmer {
  0%        { left: -80%; }
  55%, 100% { left: 160%; }
}
@keyframes ringRotate {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}
@keyframes spotPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.75; }
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.3); }
}

/* Stage */
.podium-stage {
  position: relative;
  background:
    radial-gradient(ellipse 80% 90% at 50% 110%, rgba(80,40,0,0.45) 0%, transparent 65%),
    radial-gradient(ellipse 120% 60% at 50% 100%, rgba(20,10,50,0.9) 0%, transparent 70%),
    linear-gradient(175deg, #0c1222 0%, #080c18 100%);
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
  padding: 48px 20px 0;
}

/* Spotlight beam */
.podium-stage::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left:  140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 320px solid rgba(255,210,60,0.055);
  pointer-events: none;
  animation: spotPulse 3s ease-in-out infinite;
}

/* Star field */
.podium-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12%  18%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px   1px   at 28%  72%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(2px   2px   at 44%  10%, rgba(255,230,100,0.50) 0%, transparent 100%),
    radial-gradient(1px   1px   at 58%  55%, rgba(255,255,255,0.30) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70%  25%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px   1px   at 82%  80%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(2px   2px   at 92%  38%, rgba(255,220,80, 0.40) 0%, transparent 100%),
    radial-gradient(1px   1px   at 6%   60%, rgba(255,255,255,0.20) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 35%  42%, rgba(255,240,140,0.35) 0%, transparent 100%),
    radial-gradient(1px   1px   at 76%  60%, rgba(255,255,255,0.30) 0%, transparent 100%);
  pointer-events: none;
  animation: starTwinkle 4s ease-in-out infinite alternate;
}

.podium-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

/* ── Individual spot ── */
.podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  width: 180px;
  position: relative;
}

.p1::before {
  content: '🐔';
  position: absolute;
  font-size: 400px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
  user-select: none;
}

.p1 > * { position: relative; z-index: 1; }

/* Info card above block */
.podium-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  animation: cardDrop 0.7s cubic-bezier(0.22,1,0.36,1) both;
}

.p2 .podium-info { animation-delay: 0.3s; }
.p1 .podium-info { animation-delay: 0.1s; }
.p3 .podium-info { animation-delay: 0.5s; }

/* Avatar */
.podium-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  position: relative;
  background: var(--surface2);
  color: var(--text);
  letter-spacing: 0;
}

.p1 .podium-avatar {
  width: 70px;
  height: 70px;
  font-size: 26px;
  background: linear-gradient(135deg, #2a1e00, #1a1200);
  color: #ffd700;
  border: 2px solid rgba(255,210,50,0.4);
  box-shadow: 0 0 20px rgba(255,190,0,0.35), 0 0 0 4px rgba(255,180,0,0.1);
}

.p2 .podium-avatar {
  border: 2px solid rgba(180,185,200,0.4);
  box-shadow: 0 0 14px rgba(160,170,190,0.25);
}

.p3 .podium-avatar {
  border: 2px solid rgba(180,110,40,0.4);
  box-shadow: 0 0 14px rgba(180,110,40,0.2);
}

/* Spinning ring on 1st place avatar */
.p1 .podium-avatar::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed rgba(255,210,60,0.5);
  animation: ringRotate 6s linear infinite;
}

.podium-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

.p1 .podium-name { font-size: 17px; }

.podium-pts {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.p1 .podium-pts {
  font-size: 14px;
  color: #ffd700;
  background: rgba(255,200,0,0.12);
  border: 1px solid rgba(255,200,0,0.3);
}

.p2 .podium-pts {
  color: #b0bac8;
  background: rgba(180,190,210,0.1);
  border: 1px solid rgba(180,190,210,0.25);
}

.p3 .podium-pts {
  color: #c88040;
  background: rgba(180,110,40,0.1);
  border: 1px solid rgba(180,110,40,0.25);
}

/* Crown */
.podium-crown {
  font-size: 30px;
  margin-bottom: 4px;
  animation: crownFloat 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,210,0,0.7));
  user-select: none;
}

/* Podium blocks */
.podium-block {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transform-origin: bottom;
  animation: blockRise 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

.p1 .podium-block { height: 130px; animation-delay: 0s; }
.p2 .podium-block { height: 88px;  animation-delay: 0.2s; }
.p3 .podium-block { height: 64px;  animation-delay: 0.35s; }

.p1 .podium-block {
  background: linear-gradient(175deg, #b8860b 0%, #7a5800 50%, #4a3500 100%);
  border-top: 2px solid rgba(255,220,80,0.5);
  border-left: 1px solid rgba(255,200,60,0.25);
  border-right: 1px solid rgba(255,200,60,0.25);
  animation: blockRise 0.6s cubic-bezier(0.22,1,0.36,1) both, goldPulse 2.5s ease-in-out infinite;
}

.p2 .podium-block {
  background: linear-gradient(175deg, #6a7280 0%, #3d4550 50%, #252b35 100%);
  border-top: 2px solid rgba(190,200,215,0.4);
  border-left: 1px solid rgba(180,185,200,0.15);
  border-right: 1px solid rgba(180,185,200,0.15);
}

.p3 .podium-block {
  background: linear-gradient(175deg, #7a4a18 0%, #4a2c0a 50%, #2c1a06 100%);
  border-top: 2px solid rgba(200,130,60,0.4);
  border-left: 1px solid rgba(180,110,40,0.15);
  border-right: 1px solid rgba(180,110,40,0.15);
}

/* Shimmer sweep on 1st */
.p1 .podium-block::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.06),
    transparent);
  animation: shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

.podium-rank {
  position: relative;
  z-index: 1;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.p1 .podium-rank { color: rgba(255,230,100,0.6); font-size: 52px; }
.p2 .podium-rank { color: rgba(200,210,225,0.45); }
.p3 .podium-rank { color: rgba(200,140,70,0.45); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* Twemoji */
img.emoji {
  height: 1em;
  width: 1em;
  vertical-align: -0.1em;
  display: inline-block;
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════ */
@media (max-width: 600px) {

  /* Header: stack logo above scrollable nav */
  header { padding: 0; }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 12px 16px 0;
    gap: 10px;
    max-width: 100%;
  }
  .logo { justify-content: center; }
  .trophy { font-size: 22px; }
  .title { font-size: 17px; }
  nav {
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
    border-top: 1px solid var(--border);
    margin: 0 -16px;
  }
  nav::-webkit-scrollbar { display: none; }
  .nav-btn {
    flex: 1;
    min-width: max-content;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
  }
  .nav-btn.active {
    background: transparent;
    border-bottom-color: var(--accent);
    color: var(--accent2);
  }

  /* Main */
  main { padding: 0 12px; margin: 16px auto; }

  /* Podium */
  .podium-stage { padding: 20px 4px 0; }
  .podium-wrap { gap: 4px; }
  .podium-spot { width: 104px; }
  .podium-avatar { width: 42px; height: 42px; font-size: 16px; }
  .p1 .podium-avatar { width: 52px; height: 52px; font-size: 20px; }
  .p2 .podium-avatar, .p3 .podium-avatar { width: 38px; height: 38px; font-size: 14px; }
  .podium-crown { font-size: 20px; margin-bottom: 2px; }
  .podium-name { font-size: 11px; }
  .p1 .podium-name { font-size: 13px; }
  .podium-pts { font-size: 10px; }
  .p1 .podium-pts { font-size: 11px; }
  .p2 .podium-pts, .p3 .podium-pts { font-size: 10px; }
  .p1 .podium-block { height: 80px; }
  .p2 .podium-block { height: 56px; }
  .p3 .podium-block { height: 40px; }
  .p1::before { font-size: 240px; }

  /* Leaderboard table: hide 4 team columns, show teams inside player cell */
  .team-col { display: none; }
  .leaderboard-table th:nth-child(3),
  .leaderboard-table th:nth-child(4),
  .leaderboard-table th:nth-child(5),
  .leaderboard-table th:nth-child(6) { display: none; }
  .player-teams-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
  }
  .player-teams-mobile .chip { font-size: 10px; padding: 2px 6px; }
  .leaderboard-table th,
  .leaderboard-table td { padding: 10px 8px; }
  .rank-col, .pts-col { width: 44px; }
  .player-name { font-size: 15px; }
  .pts { font-size: 18px; }

  /* Match cards */
  .match-card { padding: 10px 12px; }
  .match-teams { gap: 6px; }
  .match-team { font-size: 14px; gap: 5px; }
  .flag { font-size: 20px; line-height: 1; }
  .match-center { min-width: 54px; }
  .match-score { font-size: 18px; }
  .match-kickoff { font-size: 14px; }
  .match-countdown { font-size: 10px; }
  .match-meta { font-size: 9px; }

  /* Groups */
  .groups-grid { grid-template-columns: 1fr; gap: 10px; }
  .group-table th,
  .group-table td { padding: 7px 8px; font-size: 12px; }
  .group-title { padding: 8px 12px; font-size: 11px; }

  /* Section header / filter pills */
  .section-header { flex-wrap: wrap; gap: 6px; }
  .filter-pills { gap: 4px; }
  .pill { padding: 5px 12px; font-size: 12px; }
}
