/* SportsMatrix theme — base #141E30 */
:root {
  --primary: #141e30;
  --primary-light: #1c2a42;
  --primary-mid: #243550;
  --primary-soft: #2d4060;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-solid: #1c2a42;
  --panel-2: rgba(255, 255, 255, 0.12);
  --panel-hover: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.18);
  --border-light: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #a8b8d0;
  --accent: #e85d5d;
  --accent-hover: #f07070;
  --nav-blue: #141e30;
  --nav-red: #b21f1f;
  --live: #ff6b6b;
  --green: #4ade80;
  --scheduled: #7dd3fc;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(20, 30, 48, 0.45);
  --font: "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--primary-soft) var(--primary);
  scrollbar-width: thin;
}

::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: var(--primary); border-radius: 7px; }
::-webkit-scrollbar-thumb {
  background-color: var(--primary-soft);
  border-radius: 7px;
  border: 3px solid var(--primary);
}
::-webkit-scrollbar-thumb:hover { background-color: var(--primary-mid); }

body {
  font-family: var(--font);
  font-size: 15px;
  background: #141e30;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: #7dd3fc; text-decoration: none; }
a:hover { color: #e0f2fe; text-decoration: underline; }

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

/* ── Top banner (same as SportsMatrix public nav) ── */
.top-banner,
.topbar {
  background: linear-gradient(90deg, #141e30, var(--nav-red));
  padding: 12px 24px;
  min-height: 70px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-radius: 0 0 16px 16px;
}

.nav-container,
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  gap: 16px;
  min-height: 48px;
}

.nav-brand { flex-shrink: 0; display: flex; align-items: center; }
.nav-brand a, .logo { display: flex; align-items: center; text-decoration: none; }
.nav-brand a:hover, .logo:hover { text-decoration: none; }

.nav-logo,
.logo-img {
  height: 56px;
  width: auto;
  max-height: 64px;
  object-fit: contain;
  display: block;
}

nav.main-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

nav.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

nav.main-nav a i { font-size: 0.85rem; opacity: 0.9; }

nav.main-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: white;
}

nav.main-nav a.active {
  background: rgba(255, 255, 255, 0.22);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ── Layout ── */
.page-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

body.is-loading main {
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 960px) {
  .nav-logo, .logo-img { height: 40px; max-height: 44px; }
}

/* ── Page header ── */
.page-header { margin-bottom: 28px; }

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 16px rgba(20, 30, 48, 0.6);
  letter-spacing: 0.02em;
}

.page-header .sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

.page-header .sub .val { color: #e2e8f0; font-weight: 600; }

.page-header h1 .page-icon {
  color: #fca5a5;
  font-size: 0.85em;
  flex-shrink: 0;
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.2fr 1fr; align-items: stretch; }
}

.hero-panel {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.7), rgba(178, 31, 31, 0.3));
  pointer-events: none;
  opacity: 0.85;
}

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

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 20px rgba(20, 30, 48, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-title .line2 {
  display: block;
  color: #fca5a5;
  font-size: 0.85em;
  margin-top: 4px;
}

.hero-tag {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-top: 16px;
}

.hero-tag .val { color: white; font-weight: 600; }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 500px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-block {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-block .num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: white;
}

.stat-block .lbl {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-block.live .num { color: var(--live); }
.stat-block.neon .num { color: var(--green); }
.stat-block.cyan .num { color: #60a5fa; }

/* ── Sections ── */
.section { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.section-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2 i {
  color: #fca5a5;
  font-size: 1rem;
  opacity: 0.95;
}

.section-head a {
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.section-head a:hover { color: white; }

/* ── Badges ── */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
}

.badge.live {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge.finished {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.badge.scheduled {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.badge.postponed {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

/* ── Match cards ── */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.match-card {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: block;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

@media (hover: hover) {
  .match-card:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: var(--primary-mid);
    text-decoration: none;
    color: inherit;
  }
}

.match-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.match-card .group {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.scoreboard .team {
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
}

.scoreboard .team.home { text-align: right; }
.scoreboard .team.away { text-align: left; }

.team-flag {
  width: 28px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.team-with-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-with-flag--right {
  flex-direction: row-reverse;
  justify-content: flex-start;
  text-align: right;
}

.team-with-flag--left {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

.team-with-flag .team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scoreboard .team .team-with-flag {
  max-width: 100%;
}

.scoreboard .score {
  font-size: 1.35rem;
  font-weight: 900;
  color: #f8fafc;
  min-width: 68px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(20, 30, 48, 0.65);
  text-align: center;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
}

.match-card .meta {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Match face: flag + name columns, score/time in centre (no VS) ── */
.match-face {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}

.match-side {
  min-width: 0;
  display: flex;
}

.match-side--home {
  justify-content: flex-end;
  padding-right: 4px;
}

.match-side--away {
  justify-content: flex-start;
  padding-left: 4px;
}

.team-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.team-face__name {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.match-face .team-flag {
  width: 40px;
  height: auto;
}

.match-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 0 8px;
  min-width: 100px;
  max-width: 130px;
}

.match-mid__date {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
  width: 100%;
}

.match-mid__venue {
  font-size: 0.64rem;
  font-weight: 600;
  color: rgba(168, 184, 208, 0.85);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.match-mid__score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.4rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(20, 30, 48, 0.65);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.match-mid__sep {
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1rem;
}

.match-mid__time {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--scheduled);
  white-space: nowrap;
}

.match-mid__label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-mid__status {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--scheduled);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.match-mid__dash {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1;
}

.match-mid__live {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--live);
  letter-spacing: 0.04em;
}

.match-face--featured {
  gap: 16px 24px;
  margin: 8px 0 4px;
}

.match-face--featured .team-face__name {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.match-face--featured .team-flag {
  width: 48px;
  height: auto;
}

.match-face--featured .match-mid__score {
  font-size: 1.85rem;
  padding: 8px 18px;
}

.match-face--hero {
  gap: 20px 28px;
  max-width: 720px;
  margin: 0 auto;
}

.match-face--hero .team-face__name {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  -webkit-line-clamp: 4;
}

.match-face--hero .team-flag {
  width: 56px;
  height: auto;
}

.match-face--hero .match-mid__score {
  font-size: clamp(2rem, 5vw, 2.75rem);
  padding: 10px 22px;
  background: transparent;
  border: none;
}

.match-face--hero .match-mid__sep {
  font-size: 0.75em;
}

.match-face--hero .match-mid {
  min-width: 120px;
  max-width: 180px;
  gap: 8px;
}

.match-face--hero .match-mid__date {
  font-size: 0.78rem;
}

.match-face--hero .match-mid__venue {
  font-size: 0.72rem;
  -webkit-line-clamp: 3;
}

.match-face--featured .match-mid {
  min-width: 110px;
  max-width: 150px;
}

/* ── Featured live ── */
.featured-live {
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.85), rgba(178, 31, 31, 0.4));
  border: 1px solid rgba(255, 107, 107, 0.5);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.featured-live .teams-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.featured-live .team-block,
.featured-live .team-with-flag.team-block {
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.featured-live .big-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 1.75rem;
  font-weight: 900;
  text-align: center;
  margin: 14px 0;
  color: white;
}

.featured-live .big-score .sep { color: var(--muted); }
.featured-live .big-score .team-flag {
  width: 32px;
  height: auto;
}

.team-with-flag .team-flag {
  width: 26px;
  height: auto;
}

.featured-live .clock {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--live);
}

/* ── Filters ── */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--primary-light);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-btn:hover {
  background: var(--panel-hover);
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

.filter-btn.active {
  background: linear-gradient(90deg, var(--nav-blue), var(--nav-red));
  border-color: transparent;
  color: white;
}

/* ── Standings ── */
.standings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 1024px) {
  .standings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.group-table {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.group-table .group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 14px 18px;
  background: linear-gradient(90deg, #141e30, #1c2a42);
  border-bottom: 2px solid rgba(178, 31, 31, 0.45);
  color: white;
  letter-spacing: 0.03em;
}

.group-table .group-head .group-label {
  text-transform: uppercase;
}

.group-table .group-head .group-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.group-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.group-table table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

.group-table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.68rem;
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: #141e30;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.group-table th.col-rank,
.group-table td.col-rank {
  width: 40px;
}

.group-table th.col-team {
  text-align: left;
  padding-left: 14px;
  width: 38%;
}

.group-table th.col-stat,
.group-table td.col-stat {
  width: 44px;
}

.group-table th.col-pts,
.group-table td.col-pts {
  width: 52px;
}

.group-table td {
  padding: 11px 6px;
  border-bottom: 1px solid var(--border-light);
  color: #e2e8f0;
  text-align: center;
  vertical-align: middle;
}

.group-table td.col-rank {
  font-weight: 700;
  color: var(--muted);
  width: 36px;
}

.group-table td.col-team {
  text-align: left;
  padding-left: 14px;
  padding-right: 10px;
  font-weight: 600;
}

.group-table .col-team .team-with-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  vertical-align: middle;
}

.group-table .col-team .team-flag {
  flex-shrink: 0;
  width: 22px;
  min-width: 22px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.group-table .col-team .team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-table td.col-stat {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.group-table td.col-pts {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

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

.group-table tr.qual td {
  background: rgba(74, 222, 128, 0.08);
}

.group-table tr.qual td.col-rank {
  color: var(--green);
  font-weight: 800;
}

.group-table tr.qual td.col-team {
  border-left: 3px solid var(--green);
  padding-left: 11px;
}

.group-table tbody tr:nth-child(even):not(.qual) td {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Data tables ── */
.data-table-wrap {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: rgba(20, 30, 48, 0.6);
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: #e2e8f0;
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.08); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .rank { color: var(--muted); }
.data-table .player-name { font-weight: 700; font-size: 0.9375rem; color: white; }
.data-table .goals { color: #4ade80; font-weight: 900; font-size: 1.05rem; }

/* ── Match detail ── */
.match-hero {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.match-hero .mega-score {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 900;
  margin: 18px 0;
  color: white;
  letter-spacing: 0.06em;
}

.match-hero .mega-score .dash { color: var(--muted); margin: 0 10px; }

.match-hero .teams-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.match-hero .teams-row.vs-row {
  gap: 20px;
}

.match-hero .vs-divider {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.match-hero .team-block,
.match-hero .team-with-flag.team-block {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
}

.events-panel {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.events-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.event-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.event-row .min {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.8125rem;
}

.event-row.goal .desc { color: #4ade80; font-weight: 600; }
.event-row.card .desc { color: #fbbf24; }
.event-row.sub .desc { color: #93c5fd; }

.events-scroll { max-height: 400px; overflow-y: auto; }

/* ── Match squads ── */
.squad-panel {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.squad-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.squads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.squad-team {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}

.squad-team__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(20, 30, 48, 0.45);
}

.squad-team__count {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.squad-team__list {
  max-height: 420px;
  overflow-y: auto;
}

.squad-player {
  display: grid;
  grid-template-columns: 36px 1fr 28px;
  gap: 10px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8125rem;
}

.squad-player:last-child { border-bottom: none; }

.squad-player__jersey {
  font-weight: 800;
  color: #93c5fd;
  text-align: center;
}

.squad-player__name {
  font-weight: 600;
  color: #e2e8f0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-player__pos {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

.squad-team--empty .squad-team__missing {
  padding: 24px 16px;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 768px) {
  .squads-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.empty-state a { color: #93c5fd; font-weight: 600; }

/* ── Quick links ── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.quick-link {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

@media (hover: hover) {
  .quick-link:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: var(--primary-mid);
    text-decoration: none;
    color: inherit;
  }
}

.quick-link .ql-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.95), rgba(178, 31, 31, 0.5));
  color: white;
  font-size: 1.1rem;
}

.quick-link .ql-body { min-width: 0; }

.quick-link .ql-title {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quick-link .ql-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}

/* ── Footer (SportsMatrix — same as public site) ── */
.site-footer {
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, #0a1026, #0a0a1a);
  color: #cbd5e1;
  margin-top: 80px;
  overflow-x: hidden;
  flex-shrink: 0;
}

.footer-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1.4fr 2fr 1.1fr;
  gap: 40px;
  box-sizing: border-box;
}

.footer-logo {
  height: 48px;
  margin-bottom: 12px;
  display: block;
}

.footer-brand h3 {
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: #f8fafc;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 340px;
  color: #94a3b8;
}

.footer-links-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(0, 212, 255, 0.3);
  color: #f1f5f9;
}

.footer-column a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  text-decoration: none;
}

.footer-column a:hover {
  color: #00d4ff;
  text-decoration: none;
}

.footer-column a i {
  width: 16px;
  text-align: center;
  color: #00d4ff;
  font-size: 0.85rem;
}

.footer-contact .contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  align-items: center;
}

.footer-contact .contact-item i {
  color: #00d4ff;
  width: 16px;
  text-align: center;
}

.footer-contact .contact-item a {
  color: #cbd5e1;
  padding: 0;
}

.footer-contact .contact-item a:hover {
  color: #00d4ff;
  text-decoration: underline;
  padding-left: 0;
}

.footer-bottom {
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 14px;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-bottom p { margin: 0; }

.footer-bottom a {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 600;
}

.footer-bottom a:hover { text-decoration: underline; }

/* Mobile bottom nav (SportsMatrix-style sticky bar) */
.wc-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(90deg, #141e30, var(--nav-red));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  justify-content: space-around;
  align-items: stretch;
  gap: 6px;
}

.wc-mobile-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 10px;
}

.wc-mobile-bar a i { font-size: 1.15rem; }

.wc-mobile-bar a.active,
.wc-mobile-bar a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

@media (max-width: 1100px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-contact {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-contact .contact-item { justify-content: center; }
}

/* Global site links (Contact, News) in World Cup header */
nav.main-nav--global {
  flex-shrink: 0;
}

/* ── Mobile / tablet ── */
@media (max-width: 900px) {
  /* WC section links use bottom bar; keep Contact + News in top banner */
  nav.main-nav:not(.main-nav--global) {
    display: none;
  }

  nav.main-nav--global {
    display: flex;
    margin-left: auto;
    gap: 4px;
    flex-wrap: nowrap;
  }

  nav.main-nav--global a {
    padding: 8px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
  }

  nav.main-nav--global a i {
    font-size: 0.8rem;
  }

  .top-banner,
  .topbar {
    padding: 10px 16px;
    min-height: 58px;
    border-radius: 0 0 12px 12px;
  }

  .nav-container,
  .topbar-inner {
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    gap: 8px;
  }

  .nav-logo,
  .logo-img {
    height: 42px;
    max-height: 46px;
  }

  main {
    padding: 20px 16px 24px;
  }

  .page-main {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .site-footer {
    margin-top: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 36px 20px;
    gap: 28px;
    text-align: center;
  }

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-links-group {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
  }

  .footer-contact {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-contact .contact-item { justify-content: center; }

  .wc-mobile-bar { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 28px;
  }

  .hero-panel {
    padding: 28px 22px;
  }

  .hero-title {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-block {
    padding: 16px 10px;
  }

  .stat-block .num {
    font-size: 1.65rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-head a {
    font-size: 0.75rem;
  }

  .match-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .match-card {
    padding: 16px 14px;
  }

  .match-face {
    gap: 10px 12px;
  }

  .match-face .team-flag {
    width: 36px;
    height: auto;
  }

  .team-face__name {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
  }

  .match-mid {
    min-width: 88px;
    max-width: 108px;
    padding: 0 4px;
    gap: 4px;
  }

  .match-mid__date {
    font-size: 0.62rem;
  }

  .match-mid__venue {
    font-size: 0.6rem;
  }

  .match-mid__score {
    font-size: 1.2rem;
    padding: 5px 10px;
    gap: 4px;
  }

  .match-mid__time {
    font-size: 0.85rem;
  }

  .match-face--featured .team-flag {
    width: 42px;
    height: auto;
  }

  .match-face--featured .team-face__name {
    font-size: 0.85rem;
  }

  .match-face--featured .match-mid__score {
    font-size: 1.55rem;
  }

  .match-face--hero {
    gap: 12px 16px;
  }

  .match-face--hero .team-flag {
    width: 48px;
    height: auto;
  }

  .featured-live {
    padding: 20px 16px;
  }

  .filter-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 16px;
  }

  .filter-row::-webkit-scrollbar { display: none; }

  .filter-btn {
    flex: 0 0 auto;
    padding: 9px 16px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .standings-grid {
    grid-template-columns: 1fr;
  }

  .group-table table {
    min-width: 380px;
    font-size: 0.78rem;
  }

  .group-table th,
  .group-table td {
    padding: 9px 4px;
  }

  /* Keep rank + team (with flag) visible while scrolling stats horizontally */
  .group-table th.col-rank,
  .group-table td.col-rank {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #141e30;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
  }

  .group-table td.col-rank {
    background: var(--primary-light);
  }

  .group-table th.col-team,
  .group-table td.col-team {
    position: sticky;
    left: 40px;
    z-index: 2;
    min-width: 128px;
    max-width: none;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
  }

  .group-table th.col-team {
    background: #141e30;
  }

  .group-table td.col-team {
    background: var(--primary-light);
    padding-left: 10px;
  }

  .group-table tr.qual td.col-rank,
  .group-table tr.qual td.col-team {
    background: rgba(74, 222, 128, 0.08);
  }

  .group-table tbody tr:nth-child(even):not(.qual) td.col-rank,
  .group-table tbody tr:nth-child(even):not(.qual) td.col-team {
    background: rgba(255, 255, 255, 0.02);
  }

  .group-table .col-team .team-flag {
    width: 20px;
    min-width: 20px;
  }

  .group-table .group-head {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .group-table .group-head .group-hint {
    font-size: 0.62rem;
  }

  .data-table-wrap {
    margin: 0 -4px;
    border-radius: 12px;
  }

  .data-table {
    font-size: 0.78rem;
  }

  .data-table th,
  .data-table td {
    padding: 10px 10px;
  }

  .page-header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .match-hero {
    padding: 24px 16px;
  }

  .match-hero .mega-score {
    font-size: 2rem;
  }

  .match-hero .teams-row {
    gap: 16px;
  }

  .match-hero .team-block {
    font-size: 1rem;
    max-width: 45%;
    line-height: 1.3;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .quick-link {
    padding: 18px 16px;
  }
}

@media (max-width: 520px) {
  main {
    padding: 16px 12px 20px;
  }

  .footer-links-group {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-column a {
    justify-content: center;
  }

  .footer-inner {
    padding: 28px 16px;
  }

  .footer-brand h3 {
    font-size: 1.4rem;
  }

  .wc-mobile-bar a {
    font-size: 0.58rem;
    padding: 6px 2px;
  }

  .wc-mobile-bar a i {
    font-size: 1.05rem;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-block .lbl {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
