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

:root {
  --blue-dark: #0d2b4e;
  --blue-mid: #1a4a7a;
  --blue-accent: #1976d2;
  --blue-light: #bbdefb;
  --blue-pale: #e3f2fd;
  --blue-faint: #f0f6ff;
  --text: #222;
  --muted: #666;
  --border: #eee;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f5f5; color: var(--text); }

/* NAV */
nav { background: var(--blue-dark); padding: 0 2rem; display: flex; align-items: center; gap: 2rem; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.nav-logo { font-size: 1.1rem; font-weight: 700; padding: 1rem 0; white-space: nowrap; color: var(--blue-light); }
.nav-logo a { color: inherit; text-decoration: none; }
.nav-links { display: flex; flex: 1; }
.nav-item { position: relative; }
.nav-item > a { display: block; padding: 1rem; color: #ddd; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.nav-item > a:hover, .nav-item:hover > a { background: var(--blue-mid); color: white; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: var(--blue-dark); min-width: 200px; box-shadow: 0 4px 12px rgba(0,0,0,.4); border-top: 2px solid var(--blue-accent); }
.nav-item:hover .dropdown { display: block; }
.dropdown a { display: block; padding: .6rem 1rem; color: #ccc; text-decoration: none; font-size: .85rem; border-bottom: 1px solid #1a3a5a; }
.dropdown a:hover { background: var(--blue-mid); color: white; }
.dropdown-section { padding: .35rem 1rem .2rem; font-size: .7rem; color: #6a9aca; text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid #1a4a7a; margin-top: .2rem; }
.dropdown-viewall { font-size: .75rem !important; color: #6a9aca !important; padding: .4rem 1rem !important; display: block; border-top: 1px solid #1a3a5a; font-style: italic; }

/* HERO */
.hero { background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 60%, #1565c0 100%); color: white; padding: 3.5rem 2rem; text-align: center; }
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: .4rem; }
.hero p { color: var(--blue-light); margin-bottom: 1.5rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-stat .num { font-size: 2rem; font-weight: 700; color: #90caf9; }
.hero-stat .label { font-size: .75rem; color: #64b5f6; text-transform: uppercase; letter-spacing: .05em; }

/* BREADCRUMB */
.breadcrumb { padding: .65rem 2rem; background: white; border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.breadcrumb a { color: #1565c0; text-decoration: none; }

/* SEASON BANNER */
.season-banner { background: white; border-bottom: 3px solid var(--blue-accent); padding: .9rem 2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.badge { display: inline-block; background: var(--blue-accent); color: white; padding: .2rem .7rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.season-title { font-size: 1.05rem; font-weight: 600; color: var(--blue-dark); }
.season-sub { font-size: .82rem; color: var(--muted); margin-left: auto; }
.external-link { font-size: .78rem; color: var(--blue-accent); text-decoration: none; border: 1px solid var(--blue-accent); padding: .25rem .65rem; border-radius: 4px; white-space: nowrap; }
.external-link:hover { background: var(--blue-accent); color: white; }

/* STAT TABS */
.stat-tabs { display: flex; background: var(--blue-faint); border-bottom: 2px solid var(--blue-light); padding: 0 2rem; }
.stat-tab { padding: .6rem 1.2rem; font-size: .85rem; color: #555; border-bottom: 3px solid transparent; margin-bottom: -2px; text-decoration: none; }
.stat-tab.active, .stat-tab:hover { color: var(--blue-dark); font-weight: 600; border-bottom-color: var(--blue-accent); background: white; }

/* CONTENT */
.content { max-width: 1150px; margin: 0 auto; padding: 1.5rem 2rem; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--blue-accent); display: flex; justify-content: space-between; align-items: baseline; }
.section-sub { font-size: .78rem; font-weight: 400; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }

/* CARDS */
.card { background: white; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.league-card { background: white; border-radius: 8px; padding: 1.1rem; border-top: 4px solid var(--blue-accent); box-shadow: 0 1px 4px rgba(0,0,0,.08); text-decoration: none; color: inherit; display: block; }
.league-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.league-card h3 { color: var(--blue-dark); margin-bottom: .2rem; }
.league-card .meta { font-size: .78rem; color: var(--muted); }

/* TABLES */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .83rem; }
th { background: var(--blue-faint); color: var(--blue-dark); padding: .55rem .7rem; text-align: right; font-weight: 600; border-bottom: 2px solid var(--blue-light); white-space: nowrap; }
th:first-child, th.left { text-align: left; }
td { padding: .5rem .7rem; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
td:first-child, td.left { text-align: left; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f5f9ff; }
.gully-row td { background: var(--blue-pale) !important; }
.gully-row td.left { font-weight: 700; color: #0d47a1; }
.rank { font-weight: 700; color: #999; }
.rank-1 { color: #f57f17; }
.rank-2 { color: #78909c; }
.rank-3 { color: #8d6e63; }

/* MATCH CARDS */
.match-card { background: white; border-radius: 6px; padding: .85rem 1rem; margin-bottom: .6rem; display: flex; align-items: center; gap: 1rem; border-left: 4px solid var(--blue-accent); box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.match-card.lost { border-left-color: #e53935; }
.match-date { font-size: .72rem; color: var(--muted); min-width: 72px; }
.match-teams { flex: 1; }
.match-teams strong { font-size: .9rem; }
.match-teams .vs { font-size: .75rem; color: var(--muted); }
.match-result { font-size: .82rem; font-weight: 600; text-align: right; }
.match-result.won { color: #1565c0; }
.match-result.lost { color: #c62828; }
.match-result.upcoming { color: var(--muted); font-weight: 400; font-style: italic; }
.match-card.won { border-left-color: #1565c0; }
.scorecard-link { font-size: .72rem; color: var(--blue-accent); text-decoration: none; margin-left: .5rem; }

/* PLAYER CARDS */
.player-card { background: white; border-radius: 8px; padding: 1rem; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.player-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-light); display: flex; align-items: center; justify-content: center; margin: 0 auto .5rem; font-weight: 700; color: var(--blue-dark); }
.player-name { font-weight: 600; font-size: .85rem; }
.player-role { font-size: .72rem; color: var(--muted); }
.player-captain { display: inline-block; background: #fff3e0; color: #e65100; font-size: .68rem; padding: .1rem .35rem; border-radius: 10px; margin-top: .25rem; font-weight: 600; }

/* STAT CHIPS */
.stat-chips { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.chip { background: white; border-radius: 8px; padding: .75rem 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); text-align: center; min-width: 80px; }
.chip .val { font-size: 1.4rem; font-weight: 700; color: var(--blue-dark); }
.chip .lbl { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* STANDINGS SECTION */
.standings-section { margin-bottom: 1.5rem; }
.standings-section h3 { font-size: 1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: .5rem; padding: .5rem .75rem; background: var(--blue-faint); border-radius: 4px; border-left: 3px solid var(--blue-accent); }

footer { background: var(--blue-dark); color: #64b5f6; text-align: center; padding: 1.25rem; font-size: .82rem; margin-top: 2.5rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 1.8rem; }
}
