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

:root {
  --accent: #ff4d5e;
  --teal: #2dd4bf; --red: #ef4444; --amber: #fbbf24;
  --border: rgba(255,255,255,0.16);
  --glass: rgba(255,255,255,0.06);
  --glass-2: rgba(255,255,255,0.09);
  --text: #fff;
  --muted: rgba(255,255,255,0.62);
  --faint: rgba(255,255,255,0.42);
  --radius: 18px;
  font-synthesis-weight: none;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse 120% 80% at 50% -5%, #173a68 0%, #0b2143 45%, #061325 100%);
  background-attachment: fixed;
}
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(90px);
  pointer-events: none; z-index: 0;
}
body::before { width: 520px; height: 520px; top: -140px; left: -120px; background: color-mix(in srgb, var(--accent) 34%, transparent); }
body::after  { width: 460px; height: 460px; bottom: -120px; right: -110px; background: rgba(45,212,191,0.22); }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: 12px 16px 0;
  background: rgba(6,19,37,0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 0.5px solid var(--border);
}
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-ball { font-size: 26px; line-height: 1; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.tagline { font-size: 11px; font-weight: 600; color: var(--muted); }

.lang { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--glass); border: 0.5px solid var(--border); color: var(--text);
  font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 12px; cursor: pointer;
}
.lang-btn:hover { background: var(--glass-2); }
.caret { color: var(--muted); font-size: 10px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  background: #0d223f; border: 0.5px solid var(--border); border-radius: 12px;
  padding: 6px; min-width: 160px; box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.lang-opt {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 9px; cursor: pointer;
}
.lang-opt:hover { background: var(--glass-2); color: var(--text); }
.lang-opt.active { color: var(--accent); }

/* Championship tabs */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; max-width: 1400px; margin: 0 auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px; white-space: nowrap;
  background: var(--glass); border: 0.5px solid var(--border); color: var(--text);
  font-size: 13px; font-weight: 700; padding: 9px 14px; border-radius: 13px; cursor: pointer;
}
.tab:hover:not(.locked) { background: var(--glass-2); }
.tab.active {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}
.tab.locked { opacity: 0.45; cursor: default; }
.tab-flag { font-size: 15px; line-height: 1; }
.tab-soon {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--faint); border: 0.5px solid var(--border); border-radius: 6px; padding: 1px 5px;
}

/* ── Board ───────────────────────────────────────────── */
main { position: relative; z-index: 1; }
.board { max-width: 1400px; margin: 0 auto; padding: 16px; }
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}
.col {
  background: var(--glass); border: 0.5px solid var(--border); border-radius: 24px;
  padding: 14px; box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}
.col-wide { margin-top: 14px; }
.col-title {
  font-size: 13px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--muted); padding: 4px 4px 12px;
}
.col-body { display: flex; flex-direction: column; gap: 10px; }

/* ── Match card ──────────────────────────────────────── */
.day-heading {
  font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase;
  letter-spacing: 0.6px; padding: 2px 4px 4px;
}
.match {
  background: rgba(255,255,255,0.05); border: 0.5px solid var(--border); border-radius: 16px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.match.is-live { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.match-top { display: flex; align-items: center; justify-content: space-between; min-height: 18px; }
.chip {
  font-size: 10px; font-weight: 800; letter-spacing: 0.4px; color: var(--muted);
  padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,0.08);
}
.chip.live {
  color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.ko { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.grp { font-size: 10px; font-weight: 700; color: var(--faint); }
.teamrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.teamrow .team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tname { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teamrow.win .tname { font-weight: 800; }
.score { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.teamrow.win .score { color: var(--text); }
.venue { font-size: 11px; color: var(--faint); text-align: center; padding-top: 2px; }

/* Crest */
.crest {
  width: var(--sz, 24px); height: var(--sz, 24px); flex: 0 0 auto; position: relative;
  border-radius: 50%; overflow: hidden; background: rgba(255,255,255,0.10);
  display: inline-flex; align-items: center; justify-content: center;
}
.crest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.crest-fallback { font-size: calc(var(--sz, 24px) * 0.42); font-weight: 800; color: var(--muted); }

/* ── Standings ───────────────────────────────────────── */
.st-table { display: flex; flex-direction: column; }
.st-group {
  font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--faint); padding: 12px 4px 6px;
}
.st-row {
  display: grid; align-items: center; gap: 4px;
  grid-template-columns: 30px minmax(0, 1fr) repeat(5, 26px) 30px;
  padding: 7px 4px; font-variant-numeric: tabular-nums;
}
.st-head { color: var(--faint); font-size: 11px; font-weight: 700; }
.st-head .st-col { text-align: center; }
.st-pos { display: flex; justify-content: center; }
.ball {
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.6);
}
.ball.zoned { color: #08131f; }
.st-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.st-name .tname { font-size: 14px; }
.st-col { text-align: center; font-size: 13px; color: rgba(255,255,255,0.85); }
.st-col.pts { font-weight: 800; color: var(--text); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 4px 4px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.ldot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Bracket ─────────────────────────────────────────── */
.bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.bracket-round { flex: 0 0 260px; display: flex; flex-direction: column; gap: 10px; }
.round-label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--faint); padding: 2px 2px 4px;
}

/* ── Ads ─────────────────────────────────────────────── */
.ad { display: block; margin: 14px auto; max-width: 1400px; }
.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  min-height: 90px; border: 1px dashed var(--border); border-radius: 12px;
  color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(255,255,255,0.02);
}

/* ── Empty / loading ─────────────────────────────────── */
.empty { color: var(--faint); font-size: 14px; text-align: center; padding: 32px 8px; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 32px 16px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.store {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 0.5px solid var(--border); color: var(--text);
  font-size: 13px; font-weight: 700; padding: 11px 18px; border-radius: 13px; text-decoration: none;
}
.store:hover:not(.disabled) { background: var(--glass-2); }
.store.disabled { opacity: 0.5; cursor: default; }
.store-badge { width: 16px; height: 16px; border-radius: 4px; background: var(--text); opacity: 0.85; }
.store-badge.play { background: var(--teal); }
.footlinks { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.footlinks a { color: var(--accent); text-decoration: none; }
.footlinks a:hover { text-decoration: underline; }
.disclaimer { font-size: 11px; color: var(--faint); max-width: 640px; line-height: 1.6; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 16px; }
  .tname { font-size: 14px; }
}
