:root {
  --bg: #070b14;
  --surface: #0f172a;
  --card: #111827;
  --border: #1e293b;
  --border-hover: #334155;
  --gold: #fbbf24;
  --gold-dim: #fbbf2433;
  --emerald: #34d399;
  --emerald-dim: #34d39922;
  --red: #ef4444;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(251,191,36,0.08), transparent),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(52,211,153,0.06), transparent);
}

.shell { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

/* Nav */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  display: grid; place-items: center; font-size: 20px;
}
.brand h1 { font-size: 1.25rem; font-weight: 700; }
.brand h1 span { color: var(--gold); }
.site-nav {
  display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px; flex: 1;
}
.site-nav-primary { width: 100%; }
.site-nav-link {
  border: none; border-radius: 8px; padding: 12px 20px; background: transparent;
  color: var(--muted); font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: rgba(52, 211, 153, 0.2);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; user-select: none; -webkit-user-select: none;
}
.site-nav-link:hover { color: var(--text); }
.site-nav-link.active { background: var(--emerald-dim); color: var(--emerald); }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-user { color: var(--muted); font-size: 0.85rem; margin-right: 8px; }

/* Buttons */
.btn {
  border: none; border-radius: 10px; padding: 9px 16px;
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-block;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--emerald); color: #042f2e; }
.btn-primary:hover { background: #6ee7b7; }
.btn-gold { background: var(--gold); color: #0f172a; }
.btn-gold:hover { background: #fcd34d; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-secondary:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-danger { background: transparent; border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,0.1); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* Cards & panels */
.panel { display: none; animation: fadeIn 0.25s ease; }
.panel.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.card:hover { border-color: var(--border-hover); }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.card-meta { color: var(--muted); font-size: 0.85rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.input, .select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: inherit; font-size: 0.9rem;
  padding: 10px 14px; outline: none;
}
.input:focus, .select:focus, textarea:focus { border-color: var(--emerald); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.alert {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.9rem;
}
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: var(--emerald-dim); border: 1px solid rgba(52,211,153,0.3); color: var(--emerald); }
.alert-info { background: var(--gold-dim); border: 1px solid rgba(251,191,36,0.3); color: var(--gold); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-public { background: var(--emerald-dim); color: var(--emerald); }
.badge-private { background: rgba(239,68,68,0.15); color: #fca5a5; }
.badge-locked { background: rgba(148,163,184,0.15); color: var(--muted); }

/* Pool list */
.pool-card { cursor: pointer; }
.pool-card .card-title { display: flex; justify-content: space-between; align-items: center; }

/* Leaderboard */
.lb-layout {
  display: grid; grid-template-columns: minmax(240px, 280px) 1fr; gap: 20px; align-items: start;
}
.lb-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.lb-prize-cards { display: flex; flex-direction: column; gap: 10px; }
.lb-prize-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; text-align: center;
}
.lb-prize-card.total { border-color: rgba(251,191,36,0.35); background: linear-gradient(135deg, rgba(251,191,36,0.08), transparent); }
.lb-prize-card.gold .lb-prize-val { color: var(--gold); }
.lb-prize-card.silver .lb-prize-val { color: #cbd5e1; }
.lb-prize-card.bronze .lb-prize-val { color: #d97706; }
.lb-prize-val { font-family: "JetBrains Mono", monospace; font-size: 1.35rem; font-weight: 700; }
.lb-prize-lbl { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.lb-scoring-card { margin-bottom: 0 !important; }
.lb-scoring-card .score-table { margin-top: 0; font-size: 0.8rem; }
.lb-card { margin-bottom: 0 !important; padding: 0; overflow: hidden; }
.lb-podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  padding: 24px 20px 0; background: linear-gradient(180deg, rgba(251,191,36,0.06), transparent);
  border-bottom: 1px solid var(--border);
}
.lb-podium-slot {
  flex: 1; max-width: 180px; text-align: center; padding: 16px 12px; border-radius: 12px 12px 0 0;
  background: var(--surface); border: 1px solid var(--border); border-bottom: none;
}
.lb-podium-slot.first { padding-bottom: 28px; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.06); }
.lb-podium-slot.second { padding-bottom: 20px; }
.lb-podium-slot.third { padding-bottom: 14px; }
.lb-podium-medal { font-size: 1.6rem; margin-bottom: 6px; }
.lb-podium-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-podium-meta { font-size: 0.75rem; color: var(--muted); margin: 2px 0 8px; }
.lb-podium-score { font-family: "JetBrains Mono", monospace; font-size: 1.4rem; font-weight: 700; color: var(--emerald); }
.lb-entries { padding: 8px 0; }
.lb-entry { border-bottom: 1px solid rgba(30,41,59,0.6); }
.lb-entry:last-child { border-bottom: none; }
.lb-entry-summary {
  display: grid; grid-template-columns: 44px 1fr auto 20px; align-items: center; gap: 12px;
  padding: 14px 20px; cursor: pointer; list-style: none;
}
.lb-entry-summary::-webkit-details-marker { display: none; }
.lb-entry-summary::after {
  content: '▾'; color: var(--muted); font-size: 0.75rem; text-align: center;
  transition: transform 0.2s;
}
.lb-entry[open] .lb-entry-summary::after { transform: rotate(180deg); }
.lb-entry-top .lb-entry-summary { background: rgba(251,191,36,0.04); }
.lb-entry-rank { font-size: 1.1rem; text-align: center; }
.lb-entry-info strong { display: block; }
.lb-entry-meta { font-size: 0.78rem; color: var(--muted); }
.lb-entry-score { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--emerald); font-size: 1.15rem; }
.lb-entry-body { padding: 0 20px 16px 76px; }
.lb-team-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.lb-team-table th, .lb-team-table td { padding: 6px 8px; border-bottom: 1px solid rgba(30,41,59,0.4); }
.lb-team-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; text-align: left; }
.lb-team-table th.num, .lb-team-table td.num { text-align: right; font-family: "JetBrains Mono", monospace; }
.lb-team-flag { width: 22px; height: 15px; border-radius: 2px; vertical-align: middle; margin-right: 8px; object-fit: cover; }

/* Legacy row (manage tab refresh) */
.lb-row {
  display: grid; grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid rgba(30,41,59,0.6);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--gold); font-size: 1.1rem; }
.lb-score { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--emerald); font-size: 1.2rem; }

/* Team chips on cards */
.team-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.team-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 8px; font-size: 0.78rem;
}
.team-chip img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.team-chip .pts { color: var(--gold); font-family: "JetBrains Mono", monospace; font-size: 0.72rem; }

/* Scoring table */
.score-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 12px; }
.score-table th, .score-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.score-table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; text-align: left; }
.score-table th.num, .score-table td.num { text-align: right; font-family: "JetBrains Mono", monospace; }
.score-table tr.champion td { color: var(--gold); font-weight: 600; }
.score-table-caption { color: var(--muted); font-size: 0.8rem; margin-top: 8px; line-height: 1.5; }

/* Settings page */
.settings-page { display: flex; flex-direction: column; gap: 20px; }
.settings-block { margin-bottom: 0; }
.settings-block h3 { font-size: 1rem; margin-bottom: 6px; color: var(--gold); }
.settings-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 14px; line-height: 1.5; }
.settings-edit-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.settings-edit-table th, .settings-edit-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.settings-edit-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.settings-edit-table th.num, .settings-edit-table td.num { text-align: right; }
.settings-edit-table tr.champion td { color: var(--gold); }
.settings-edit-table .input.compact {
  width: 88px; padding: 6px 10px; text-align: right; font-family: "JetBrains Mono", monospace;
}
.settings-edit-table .computed {
  font-family: "JetBrains Mono", monospace; color: var(--muted); font-size: 0.85rem;
}
.settings-edit-table .computed.live { color: var(--emerald); }
.settings-actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px;
}
.prize-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.prize-row { display: grid; grid-template-columns: 100px 1fr 72px; gap: 12px; align-items: center; }
.prize-row label { font-size: 0.88rem; color: var(--text); }
.prize-row .input.compact { width: 72px; text-align: right; }
.prize-bar-track { height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.prize-bar-fill { height: 100%; border-radius: 4px; transition: width 0.2s; }
.prize-bar-fill.p1 { background: var(--gold); }
.prize-bar-fill.p2 { background: var(--emerald); }
.prize-bar-fill.p3 { background: #60a5fa; }
.prize-sum { font-size: 0.85rem; margin-top: 10px; color: var(--muted); }
.prize-sum.valid { color: var(--emerald); }
.prize-sum.invalid { color: #fca5a5; }
.entry-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 8px;
}
.entry-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center;
}
.entry-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--gold); font-family: "JetBrains Mono", monospace; }
.entry-stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* Payment info */
.payment-card { border-color: rgba(52,211,153,0.25); }
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.payment-method {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.payment-badge {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0;
}
.payment-badge.venmo { background: rgba(59,130,246,0.15); color: #93c5fd; }
.payment-badge.zelle { background: rgba(168,85,247,0.15); color: #d8b4fe; }
.payment-value { font-family: "JetBrains Mono", monospace; font-size: 0.9rem; word-break: break-all; }
.payment-note {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  background: var(--gold-dim); border: 1px solid rgba(251,191,36,0.25);
  color: var(--gold); font-size: 0.85rem; line-height: 1.5;
}

/* Admin sections */
.admin-section { margin-bottom: 28px; }
.admin-section h3 { font-size: 1rem; margin-bottom: 12px; color: var(--gold); }
.participant-list { list-style: none; }
.participant-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(30,41,59,0.5);
}
.participant-list li:last-child { border-bottom: none; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 5px; }
.tab {
  flex: 1; min-width: 100px; padding: 9px 14px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); font-family: inherit; font-size: 0.85rem;
  font-weight: 600; cursor: pointer;
}
.tab.active { background: var(--gold); color: #0f172a; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.hidden { display: none !important; }

footer {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border);
  text-align: center; color: var(--muted); font-size: 0.8rem;
}

@media (max-width: 600px) {
  .lb-entry-summary { grid-template-columns: 36px 1fr auto; padding: 12px 14px; }
  .lb-entry-body { padding-left: 14px; }
  .lb-podium { gap: 6px; padding: 16px 8px 0; }
  .lb-podium-slot { padding: 12px 8px; }
  .lb-podium-name { font-size: 0.8rem; }
  .wc-match-card { grid-template-columns: 1fr; text-align: center; }
  .wc-match-team, .wc-match-team.away { flex-direction: row; justify-content: center; text-align: center; }
  .add-participant-row { grid-template-columns: 1fr; }
}

/* Participants & draw */
.add-participant-row {
  display: grid; grid-template-columns: 1fr 100px auto; gap: 10px; align-items: end; margin-bottom: 16px;
}
.participant-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.participant-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.participant-item-info strong { display: block; margin-bottom: 2px; }
.participant-item-meta { font-size: 0.82rem; color: var(--muted); }
.participant-item-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.cards-select { width: 72px; padding: 8px 10px; }
.draw-panel {
  margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border);
}
.draw-options { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.draw-option {
  flex: 1; min-width: 180px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all 0.2s;
}
.draw-option:hover { border-color: var(--border-hover); }
.draw-option.selected { border-color: var(--gold); background: var(--gold-dim); }
.draw-option input { margin-right: 8px; }
.draw-option-title { font-weight: 600; font-size: 0.9rem; display: block; }
.draw-option-desc { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.btn-draw {
  width: 100%; padding: 16px 24px; font-size: 1.05rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #d97706); color: #0f172a; font-weight: 700;
  border: none; cursor: pointer; box-shadow: 0 4px 24px var(--gold-dim);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-draw:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 32px var(--gold-dim); }
.btn-draw:disabled { opacity: 0.5; cursor: not-allowed; }

/* Draw overlay animation */
.draw-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(7, 11, 20, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(8px);
}
.draw-modal {
  width: min(520px, 100%); background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 24px; text-align: center; box-shadow: var(--shadow, 0 8px 32px rgba(0,0,0,0.5));
}
.draw-header h2 { font-size: 1.3rem; margin: 12px 0 4px; color: var(--gold); }
.draw-header p { color: var(--muted); font-size: 0.9rem; }
.draw-spinner-ring {
  width: 48px; height: 48px; margin: 0 auto;
  border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.draw-stage { margin: 28px 0; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.draw-slot {
  width: 200px; height: 120px; border-radius: 16px; border: 2px solid var(--gold);
  background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; box-shadow: 0 0 30px var(--gold-dim);
  animation: slotPulse 0.3s ease infinite alternate;
}
@keyframes slotPulse { from { box-shadow: 0 0 20px var(--gold-dim); } to { box-shadow: 0 0 40px rgba(251,191,36,0.25); } }
.draw-slot-flag { width: 64px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.draw-slot-name { font-size: 1.1rem; font-weight: 700; }
.draw-slot.shuffling .draw-slot-name { animation: textBlur 0.08s linear; }
@keyframes textBlur { 0%,100% { opacity: 1; } 50% { opacity: 0.6; transform: scale(0.98); } }
.draw-reveal { text-align: left; max-height: 320px; overflow-y: auto; margin-top: 8px; }
.draw-reveal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; animation: revealIn 0.4s ease;
}
@keyframes revealIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.draw-reveal-card h4 { color: var(--gold); margin-bottom: 8px; font-size: 0.95rem; }
.draw-reveal-teams { display: flex; flex-wrap: wrap; gap: 6px; }
.draw-reveal-team {
  display: flex; align-items: center; gap: 5px; font-size: 0.78rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px;
  animation: teamPop 0.35s ease backwards;
}
@keyframes teamPop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.draw-reveal-team img { width: 20px; height: 14px; border-radius: 2px; }
.draw-progress { height: 4px; background: var(--surface); border-radius: 2px; overflow: hidden; margin-top: 16px; }
.draw-progress-bar { height: 100%; background: var(--gold); width: 0%; transition: width 0.3s ease; }
.draw-done-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.bulk-hint { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }

/* Home tournament banner */
.home-tournament-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; cursor: pointer; transition: border-color 0.2s, transform 0.15s;
}
.home-tournament-banner:hover { border-color: var(--emerald); transform: translateY(-1px); }
.banner-arrow { font-size: 1.4rem; color: var(--emerald); flex-shrink: 0; }

/* Tournament hub */
.wc-timezone-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px;
}
.wc-timezone-label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.wc-timezone-toggle {
  display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
}
.wc-tz-btn {
  border: none; border-radius: 8px; padding: 8px 14px; background: transparent;
  color: var(--muted); font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.wc-tz-btn:hover { color: var(--text); }
.wc-tz-btn.active { background: var(--emerald-dim); color: var(--emerald); }
.wc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.wc-stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; text-align: center;
}
.wc-stat-val { font-family: "JetBrains Mono", monospace; font-size: 1.6rem; font-weight: 700; color: var(--gold); }
.wc-stat-val.live { color: var(--emerald); }
.wc-stat-lbl { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.wc-controls {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; align-items: center;
}
.wc-controls .input, .wc-controls .select { width: auto; min-width: 160px; flex: 1; }
.wc-info-list { list-style: none; color: var(--muted); font-size: 0.88rem; line-height: 1.8; }
.wc-info-list li::before { content: '▸ '; color: var(--emerald); }
.wc-matches { display: flex; flex-direction: column; gap: 10px; }
.wc-match-card {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
}
.wc-match-card.live { border-color: rgba(52,211,153,0.4); box-shadow: 0 0 20px rgba(52,211,153,0.08); }
.wc-match-team { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; }
.wc-match-team.away { flex-direction: row-reverse; text-align: right; }
.wc-match-team img { width: 28px; height: 19px; border-radius: 3px; object-fit: cover; }
.wc-match-center { text-align: center; min-width: 100px; }
.match-score-num { font-family: "JetBrains Mono", monospace; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.match-vs { color: var(--muted); font-size: 0.85rem; }
.wc-match-meta { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.badge-live { background: rgba(52,211,153,0.2); color: var(--emerald); animation: pulse 1.5s ease infinite; }
.badge-finished { background: rgba(148,163,184,0.15); color: var(--muted); }
.badge-group { background: var(--gold-dim); color: var(--gold); }
.badge-knockout { background: rgba(96,165,250,0.15); color: #93c5fd; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.groups-layout {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.group-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.group-card-header {
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 0.9rem;
}
.group-card-header span { color: var(--gold); }
.team-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid rgba(30,41,59,0.4);
}
.team-row:last-child { border-bottom: none; }
.team-flag { width: 28px; height: 19px; border-radius: 3px; object-fit: cover; }
.team-name { flex: 1; font-size: 0.88rem; }
.team-row .code { font-family: "JetBrains Mono", monospace; font-size: 0.75rem; color: var(--muted); }
.standings-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.standings-table th, .standings-table td { padding: 8px 10px; border-bottom: 1px solid rgba(30,41,59,0.4); text-align: center; }
.standings-table th:first-child, .standings-table td:first-child { text-align: left; }
.standings-table th { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; }
.standings-table .pts { font-weight: 700; color: var(--gold); font-family: "JetBrains Mono", monospace; }
.wc-bracket { display: flex; flex-direction: column; gap: 24px; }
.wc-bracket-round h3 { font-size: 0.95rem; color: var(--gold); margin-bottom: 12px; }
.wc-bracket-matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wc-bracket-match {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: 0.85rem;
}
.wc-bracket-match strong { font-family: "JetBrains Mono", monospace; color: var(--emerald); text-align: center; }
.wc-bracket-match small { grid-column: 1 / -1; color: var(--muted); font-size: 0.72rem; text-align: center; margin-top: 4px; }
.spinner {
  width: 32px; height: 32px; margin: 0 auto 12px;
  border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .lb-layout { grid-template-columns: 1fr; }
  .lb-sidebar { position: static; }
  .lb-prize-cards { display: grid; grid-template-columns: repeat(2, 1fr); }
  .lb-prize-card.total { grid-column: 1 / -1; }
  .wc-stats { grid-template-columns: repeat(2, 1fr); }
  .topnav {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg); padding-top: max(12px, env(safe-area-inset-top));
    margin-bottom: 20px; flex-direction: column; align-items: stretch;
  }
  .site-nav-primary {
    order: 1; width: 100%; justify-content: stretch;
  }
  .site-nav-primary .site-nav-link { flex: 1; }
  .brand { order: 2; justify-content: center; width: 100%; }
  .nav-links {
    order: 3; width: 100%; justify-content: center;
  }
  .nav-links .btn { min-height: 44px; display: inline-flex; align-items: center; }
  .pool-card { cursor: pointer; touch-action: manipulation; }
  .tabs .tab { min-height: 44px; padding: 10px 14px; }
}
