@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }

:root {
  --blue: #1e40af; --blue-light: #dbeafe; --blue-mid: #1d4ed8; --blue-muted: #93c5fd;
  --pink: #9d174d; --pink-light: #fce7f3; --pink-muted: #f9a8d4;
  --slate: #374151; --slate-light: #f3f4f6; --slate-muted: #d1d5db;
  --green: #065f46; --green-light: #d1fae5; --green-muted: #6ee7b7;
  --bg: #f8fafc; --surface: #ffffff; --border: #e2e8f0;
  --text: #0f172a; --text-muted: #64748b; --text-faint: #94a3b8;
  --radius: 10px; --radius-sm: 6px;
}

body { font-family: 'Barlow', sans-serif; background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.65; }

a { color: inherit; text-decoration: none; }

.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }

/* NAV */
.site-nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 12px; font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; margin-right: auto; }
.nav-logo img { width: 62px; height: 62px; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-link { font-size: 15px; font-weight: 500; padding: 7px 14px; border-radius: var(--radius-sm); color: var(--text-muted); transition: background 0.15s, color 0.15s; }
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: #1e40af; color: #ffffff; border-radius: var(--radius-sm); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.2s; }

/* PAGE HEADER */
.page-header { padding: 2rem 0 1.5rem; }
.eyebrow { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; }
.page-title { font-family: 'Barlow Condensed', sans-serif; font-size: 42px; font-weight: 700; line-height: 1.05; }
.page-sub { font-size: 15px; color: var(--text-muted); margin-top: 0.35rem; }

/* CARDS */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { background: var(--bg); border-bottom: 1px solid var(--border); padding: 0.7rem 1.1rem; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* SECTION LABEL */
.section-label { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.6rem; }

/* BADGE */
.badge { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; }
.badge-final { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.badge-tie { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-upcoming { background: #eff6ff; color: #1d4ed8; }

/* TABLES */
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { padding: 0.65rem 0.85rem; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #ffffff; text-align: center; background: #1e40af; border-bottom: 1px solid #1d4ed8; cursor: pointer; user-select: none; }
.data-table th.left { text-align: left; }
.data-table th:hover { background: #1d4ed8; color: #ffffff; }
.data-table th.sorted { color: #bfdbfe; }
.data-table td { padding: 0.38rem 0.85rem; font-size: 15px; text-align: center; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.data-table td.left { text-align: left; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr:nth-child(even) { background: var(--bg); }
.data-table tbody tr:nth-child(even):hover { background: #e8edf2; }
.player-name { font-weight: 500; color: var(--text); font-size: 16px; }
.player-team-tag { font-size: 13px; color: var(--text-muted); display: block; }
.stat-hi { font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 600; color: var(--text); }
.jersey-num { font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 600; color: var(--text-muted); }
.pos-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.rank-num { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; color: var(--text-muted); }
.rank-1 { font-weight: 700; color: var(--text); font-size: 18px; }

/* TEAM DOT */
.team-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }

/* FILTER / TAB BUTTONS */
.filter-row { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.f-btn { font-size: 14px; padding: 7px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; font-family: 'Barlow', sans-serif; transition: all 0.15s; }
.f-btn:hover { background: var(--bg); color: var(--text); }
.f-btn.active { background: #1e40af; color: #fff; border-color: #1e40af; }
.tab-row { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; width: fit-content; margin-bottom: 1rem; }
.tab-btn { font-size: 15px; font-weight: 500; padding: 9px 22px; background: transparent; color: var(--text-muted); cursor: pointer; font-family: 'Barlow', sans-serif; border: none; border-right: 1px solid var(--border); transition: all 0.15s; }
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { background: var(--bg); color: var(--text); }
.tab-btn.active { background: #1e40af; color: #fff; }

/* HERO */
.hero-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem; }
.hero-league-name { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(28px, 4.5vw, 52px); font-weight: 700; line-height: 1.05; white-space: nowrap; }
.hero-meta { display: flex; gap: 2rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.hero-meta-item strong { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 600; line-height: 1.2; }
.hero-meta-item span { font-size: 14px; color: var(--text-muted); }

/* TEAM SWITCHER */
.team-switcher { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.ts-btn { font-size: 14px; padding: 7px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; font-family: 'Barlow', sans-serif; display: flex; align-items: center; gap: 7px; transition: all 0.15s; }
.ts-btn:hover { background: var(--bg); color: var(--text); }
.ts-btn.active { background: #1e40af; color: #fff; border-color: #1e40af; }
.ts-btn .ts-dot { width: 8px; height: 8px; border-radius: 50%; }

/* STREAK DOTS */
.streak-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.streak-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* GAME ROW */
.game-row { display: grid; grid-template-columns: 52px 1fr 68px 1fr 76px; align-items: center; gap: 6px; padding: 0.38rem 1rem; border-bottom: 1px solid var(--border); }
.game-row:last-child { border-bottom: none; }
.game-row:hover { background: var(--bg); }
/* Schedule page uses full dates — needs wider date column */
.schedule-game-row { grid-template-columns: 100px 1fr 68px 1fr 76px; }
.game-date-col { font-size: 13px; color: var(--text-muted); line-height: 1.3; white-space: nowrap; }
.game-date-col strong { display: inline; font-size: 13px; font-weight: 500; color: var(--text); }
.game-team-col { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; min-width: 0; }
.game-team-col a, .game-team-col span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-team-col.away { justify-content: flex-end; }
.game-score { text-align: center; font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; width: 68px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 1px; }
.score-sep { font-size: 14px; color: var(--text-muted); font-weight: 400; margin: 0 1px; }
.game-status { text-align: right; }
.winner { color: var(--text); }
.loser { color: var(--text-muted); font-weight: 400; }

/* TEAM CARD (teams page) */
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.team-card-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--border); }
.team-logo-circle { width: 56px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.team-card-title { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; margin-bottom: 2px; }
.team-card-record { font-size: 15px; color: var(--text-muted); }
.team-card-rank { text-align: right; }
.team-card-rank-num { font-family: 'Barlow Condensed', sans-serif; font-size: 34px; font-weight: 700; line-height: 1; }
.team-card-rank-lbl { font-size: 13px; color: var(--text-muted); }
.team-stats-row { border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, 1fr); }
.tstat { padding: 0.85rem 0; text-align: center; border-right: 1px solid var(--border); }
.tstat:last-child { border-right: none; }
.tstat-val { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 600; display: block; }
.tstat-lbl { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.team-card-footer { display: flex; gap: 0.5rem; padding: 0.85rem 1.25rem; background: var(--bg); border-top: 1px solid var(--border); }
.tc-btn { font-size: 14px; padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; font-family: 'Barlow', sans-serif; transition: background 0.15s; }
.tc-btn:hover { background: var(--border); }

/* ROSTER HERO */
.roster-hero { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.roster-hero-stats { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.rhs { font-size: 14px; color: var(--text-muted); }
.rhs strong { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 600; color: var(--text); line-height: 1.2; }

/* STANDINGS TABLE */
.standings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }

/* TWO COL */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }

/* LEADERS */
.leader-row { display: grid; grid-template-columns: 28px 1fr 44px 44px; align-items: center; padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); font-size: 15px; gap: 8px; }
.leader-row:last-child { border-bottom: none; }
.leader-stat { text-align: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 19px; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; margin-top: 3rem; text-align: center; font-size: 14px; color: var(--text-faint); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .hero-league-name { font-size: 26px; white-space: normal; }
  .hero-meta { gap: 0.75rem; flex-wrap: wrap; }
  .hero-block { flex-direction: column; align-items: center; text-align: center; }
  .hero-block img { width: 160px !important; height: 160px !important; }
  .two-col { grid-template-columns: 1fr; }
  .team-stats-row { border-bottom: 1px solid var(--border); grid-template-columns: repeat(3, 1fr); }
  .game-row { grid-template-columns: 42px 1fr 52px 1fr 58px; gap: 3px; padding: 0.38rem 0.6rem; }
  .schedule-game-row { grid-template-columns: 68px 1fr 52px 1fr 58px; }
  .game-score { font-size: 16px; width: 52px; }
  .game-date-col { font-size: 11px; }
  .game-date-col strong { font-size: 12px; }
  .game-team-col { font-size: 12px; gap: 3px; }
  .badge { font-size: 10px; padding: 2px 5px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.75rem 1.25rem; gap: 0.25rem; z-index: 99; }
  .page-title { font-size: 28px; }
  .filter-row { gap: 0.35rem; flex-wrap: wrap; }
  .f-btn { font-size: 12px; padding: 5px 9px; }
  .tab-btn { font-size: 13px; padding: 7px 14px; }
  .roster-hero { flex-direction: column; text-align: center; }
  .roster-hero-stats { justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
  .data-table th { padding: 0.35rem 0.35rem; font-size: 11px; background: #1e40af; }
  .data-table td { padding: 0.28rem 0.35rem; font-size: 12px; }
  .tstat-val { font-size: 20px; }
  .tstat-lbl { font-size: 11px; }
  .team-card-title { font-size: 22px; }
  .team-card-rank-num { font-size: 28px; }
  .team-card-header img { width: 100px !important; height: 100px !important; }
  .roster-hero img[alt] { width: 150px !important; height: 150px !important; }
  #teams-grid { grid-template-columns: repeat(2, 1fr) !important; }
  #teams-grid img { width: 100px !important; height: 100px !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .reg-layout { grid-template-columns: 1fr !important; }
  .player-hero { flex-direction: column; align-items: center; text-align: center; }
  .player-hero-stats { justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
  .team-switcher { flex-wrap: wrap; }
  .hero-meta-item strong { font-size: 20px; }
  .season-toggle { flex-wrap: wrap; }
  .box-header { flex-direction: column; align-items: center; }
  .box-score { font-size: 36px; }
  tfoot td { font-size: 14px !important; padding: 0.35rem 0.5rem !important; }
}

/* SEASON TYPE TOGGLE */
.season-toggle { display: flex; gap: 6px; margin-bottom: 1.25rem; align-items: center; }
.season-toggle-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-right: 4px; }
.s-btn { padding: 6px 14px; font-size: 13px; font-weight: 600; font-family: 'Barlow', sans-serif; border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text-muted); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.s-btn:hover { border-color: #94a3b8; color: var(--text); }
.s-btn.active { background: #1e40af; border-color: #1e40af; color: #fff; }
.s-btn.active-playoff { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.s-btn.active-combined { background: #0891b2 !important; border-color: #0891b2 !important; color: #fff !important; }

/* CLICKABLE GAME ROW */
.game-row-link { color: inherit; }
.game-row-link:hover .game-row { background: #eff6ff; }

/* ANNOUNCEMENT BANNER */
.announcement-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-top: 1rem; display: block; }
@media (max-width: 640px) {
  .announcement-img { max-height: 240px; }
}
