/* =========================================================
   BATTLE 3x3 — Public Frontend
   Design System v1.0
   Theme: Premium Dark / Basketball Court
   Fonts: Bebas Neue (display) + Plus Jakarta Sans (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --bg:          #090c15;
  --surface:     #0f1523;
  --card:        #141c2e;
  --card-hover:  #1a2540;
  --border:      #1e2d4a;
  --border-soft: #1a2438;

  --orange:      #f97316;
  --orange-glow: rgba(249, 115, 22, 0.15);
  --orange-dim:  #c2580f;
  --blue:        #3b82f6;
  --blue-dim:    #1d4ed8;
  --gold:        #f59e0b;
  --green:       #10b981;
  --red:         #ef4444;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:  #4b6280;

  --nav-h:       64px;
  /* Shared vertical rhythm — context bar → content, and between page sections */
  --section-gap: clamp(40px, 5.5vw, 80px);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --transition:  0.2s cubic-bezier(0.4,0,0.2,1);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Hard-stop any runaway child overflow */
.nav, section, .home-hero, .page-content, .container, footer {
  max-width: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Typography ───────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
h1,h2,h3,h4,h5 { line-height: 1.2; }

.stat-number {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ── Layout ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-content {
  /*
   * On pages that have a page-hero before this div the context bar
   * (margin-top: var(--nav-h)) already pushes content below the nav.
   * Top pad matches the gap after the league context bar everywhere else.
   */
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  min-height: 100vh;
}

/* ── Navigation ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(9, 12, 21, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-logo-text span {
  color: var(--orange);
}

/* Below the logo text, show the full name as a sub-label on desktop only */
.nav-logo-sub {
  display: none;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
  margin-top: 1px;
}

@media (min-width: 900px) {
  .nav-logo-sub { display: block; }
  .nav-logo { flex-direction: row; align-items: center; }
  .nav-logo-text-wrap { display: flex; flex-direction: column; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--card);
}

.nav-link.active {
  color: var(--orange);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* League selector in nav */
.league-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  transition: background var(--transition);
}

.league-pill:hover { background: var(--card-hover); }
.league-pill-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot {
  0%,100% { opacity:1; transform: scale(1); }
  50% { opacity:0.5; transform: scale(0.8); }
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Hero / Page Headers ─────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--surface) 0%, #0d1626 100%);
  border-bottom: 1px solid var(--border);
  padding: var(--section-gap) 0 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--orange-glow);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: 0.03em;
  line-height: 1;
}

.page-hero p {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 15px;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(249,115,22,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* ── Player Cards ─────────────────────────────────────── */
.player-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fadeInUp 0.4s both;
}

.player-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: 0 12px 40px rgba(249,115,22,0.15);
}

.player-card-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  background: var(--surface);
  display: block;
}

.player-card-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--surface), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.player-card-body {
  padding: 14px 16px 16px;
}

.player-card-jersey {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--orange);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.player-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.player-card-team {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.player-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.stat-cell {
  text-align: center;
}

.stat-cell .val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  display: block;
  line-height: 1;
}

.stat-cell .lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ── Grid layouts ─────────────────────────────────────── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

/* ── Stat Cards (big numbers) ─────────────────────────── */
.big-stat {
  text-align: center;
  padding: 20px 16px;
}

.big-stat .value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--orange);
  display: block;
  line-height: 1;
}

.big-stat .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}

/* ── Tables ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

thead th:hover { color: var(--text-secondary); }
thead th.sorted { color: var(--orange); }

tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--card-hover); }

tbody td {
  padding: 12px 16px;
  white-space: nowrap;
}

tbody td.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: normal;
}

.rank-cell {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  width: 40px;
}

.rank-cell.top { color: var(--orange); }

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.table-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-orange  { background: var(--orange-glow); color: var(--orange); }
.badge-blue    { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-green   { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-red     { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-gold    { background: rgba(245,158,11,0.15); color: var(--gold); }
.badge-muted   { background: var(--surface); color: var(--text-muted); }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: var(--orange-dim);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ── Filters / Search ─────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.search-box input:focus { border-color: var(--orange); }
.search-box input::placeholder { color: var(--text-muted); }

.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.filter-select {
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--orange); }
.filter-select option { background: var(--card); }

.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.tab-btn.active {
  background: var(--orange);
  color: #fff;
}
.tab-btn:hover:not(.active) { color: var(--text-primary); background: var(--card-hover); }

/* ── Game Cards ───────────────────────────────────────── */
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeInUp 0.35s both;
}

.game-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;            /* gap so date and badges don't collide */
  flex-wrap: nowrap;   /* stay on one line */
  min-width: 0;        /* allow flex children to shrink */
}

.game-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.game-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-team.away { flex-direction: row-reverse; text-align: right; }

.team-logo-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface);
  padding: 4px;
  flex-shrink: 0;
}

.team-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  flex-shrink: 0;
}

.team-name-sm {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.game-score {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.score-val {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--text-primary);
  width: 40px;
  text-align: center;
}

.score-sep {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.score-val.winner { color: var(--orange); }

/* Badges group on right side of game card meta — never wrap, never overflow */
.game-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
  
/* ── Standings Table Specifics ────────────────────────── */
.standing-pos {
  font-family: var(--font-display);
  font-size: 1.1rem;
  width: 32px;
  text-align: center;
}

.standing-pos.playoff { color: var(--orange); }

.team-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Section Headers ──────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-top: 4px; /* prevent collision with parent border */
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.section-title span { color: var(--orange); }

.view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all:hover { text-decoration: underline; }

/* ── League Context Banner ────────────────────────────── */
/*
 * The <nav> is position:fixed so it is removed from normal flow.
 * Without a margin-top offset the context bar renders from y=0
 * — right behind the fixed nav bar. This one rule fixes the date
 * text "touching" the nav: push the bar down by the nav height.
 */
.league-context-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  margin-top: var(--nav-h); /* push below the fixed nav */
  position: sticky;
  top: var(--nav-h);       /* stick right below the nav */
  z-index: 90;             /* below nav (z:100) but above content */
}

.league-context-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

.league-context-inner strong { color: var(--text-primary); }

.season-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.season-status-pill.active   { background: rgba(16,185,129,0.15); color: var(--green); }
.season-status-pill.playoffs { background: var(--orange-glow); color: var(--orange); }
.season-status-pill.completed{ background: var(--surface); color: var(--text-muted); }
.season-status-pill.upcoming { background: rgba(59,130,246,0.15); color: var(--blue); }

/* League switcher dropdown */
.league-dropdown {
  position: relative;
}

.league-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  z-index: 200;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  display: none;
}

.league-dropdown-menu.open { display: block; }

.league-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-soft);
}
.league-dropdown-item:last-child { border-bottom: none; }
.league-dropdown-item:hover { background: var(--card-hover); }
.league-dropdown-item.selected { color: var(--orange); }

.league-dropdown-label {
  padding: 8px 16px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--surface);
}

/* ── MVP Highlight Card ───────────────────────────────── */
.mvp-card {
  background: linear-gradient(135deg, var(--card) 0%, #1a1a0a 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s both;
}

.mvp-card::before {
  content: '👑';
  position: absolute;
  right: 20px;
  top: 16px;
  font-size: 2rem;
  opacity: 0.4;
}

.mvp-card-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--gold);
  flex-shrink: 0;
}

.mvp-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 3px solid var(--gold);
  flex-shrink: 0;
}

.mvp-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 4px;
}

.mvp-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.mvp-team {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.mvp-stats {
  display: flex;
  gap: 16px;
}

/* ── Player Detail Page ───────────────────────────────── */
.player-hero {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  padding: 40px 0 32px;
}

.player-hero-photo {
  width: 160px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.player-hero-placeholder {
  width: 160px;
  height: 200px;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.player-hero-info {
  flex: 1;
}

.player-hero-number {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--orange);
  opacity: 0.15;
  position: absolute;
  right: 0;
  top: 0;
  line-height: 1;
  pointer-events: none;
}

.player-hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 20px;
}

.player-hero-stat-grid {
  display: flex;
  gap: 32px;
}

.player-hero-stat { text-align: left; }
.player-hero-stat .v {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--text-primary);
  line-height: 1;
}
.player-hero-stat .l {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-fade { animation: fadeIn 0.5s both; }
.animate-up   { animation: fadeInUp 0.5s both; }

/* stagger children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.40s; }

/* ── Loading States ───────────────────────────────────── */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  color: var(--text-muted);
  flex-direction: column;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ── Footer ───────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════
   FOOTER  — 3-column layout
══════════════════════════════════════════════════════════════════ */
.footer {
  background: #070b14;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px 0 0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Col 1: Brand ── */
.footer-brand-col { display: flex; flex-direction: column; }

.footer-logo-img {
  height: 76px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left top;
  display: block;
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 4px 0 14px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 260px;
}

/* ── Cols 2 & 3: Link columns ── */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  line-height: 1.3;
}
.footer-col a:hover { color: var(--orange); }

/* ── Social icons ── */
.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
  text-decoration: none;
}
.footer-social-icon:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  transform: translateY(-2px);
}

/* ── Bottom bar ── */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Remove old email styles (no longer used) ── */
.footer-contact  { display: none; }
.footer-email-link { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
  .footer-desc { max-width: 100%; }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 32px;
  }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    z-index: 99;
  }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }

  .player-hero { flex-direction: column; align-items: flex-start; }
  .player-hero-photo, .player-hero-placeholder { width: 120px; height: 150px; }

  .mvp-card { flex-direction: column; align-items: flex-start; }

  .game-score .score-val { font-size: 1.5rem; }

  .filter-bar { gap: 8px; }
  .filter-select { padding: 8px 12px; font-size: 13px; }

  .player-hero-stat-grid { gap: 20px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  .player-hero-stat-grid { gap: 12px; }

  .league-pill .pill-text { display: none; }

  .page-hero { padding: var(--section-gap) 0 0; }

  table { font-size: 13px; }
  thead th, tbody td { padding: 10px 12px; }
}

/* ── Home page specific ───────────────────────────────── */
/* ══════════════════════════════════════════════════════════════
   HERO — Full-bleed image, gradient overlay, text left
   ══════════════════════════════════════════════════════════════ */
.home-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);            /* fallback when no image */
}

/* Background image layer — filled via JS */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;   /* bias toward upper body — better for player photos */
  background-repeat: no-repeat;
  transition: opacity .5s ease;
  opacity: 0;                        /* starts hidden; JS sets to 1 after preload */
}

/* No image: subtle dark gradient keeps it looking intentional */
.hero-bg:not([style*="url"]) {
  background: linear-gradient(135deg, #090c15 0%, #0d1829 50%, #0a0d15 100%);
  opacity: 1 !important;             /* gradient always visible, no preload needed */
}

/* Gradient overlay:
   Left side is fully dark so text is always readable.
   Right side fades to transparent so the hero image shows through. */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--bg)               0%,
    var(--bg)               25%,
    rgba(9,12,21,0.94)      38%,
    rgba(9,12,21,0.60)      55%,
    rgba(9,12,21,0.20)      75%,
    transparent             100%
  );
  z-index: 1;
}

/* Two-column layout: text left, PoTW card right */
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 40px;
  align-items: center;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0 56px;
  max-width: 520px;
}

.home-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  margin-bottom: 20px;
}

.home-hero h1 .accent { color: var(--orange); }

.home-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 24px;
  line-height: 1.75;
}

/* Identity pills row */
.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  backdrop-filter: blur(4px);
}

.hero-tag--accent {
  color: var(--orange);
  background: rgba(249,115,22,.08);
  border-color: rgba(249,115,22,.25);
}

.home-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* PoTW card column — sits on top of the image */
.hero-potw-col {
  position: relative;
  z-index: 2;
}

/* Mobile: stack to single column, image fills background only */
@media (max-width: 768px) {
  .home-hero {
    min-height: 480px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-potw-col {
    display: none;               /* PoTW moves to weekly leaders strip below */
  }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(9,12,21,0.2)  0%,
      rgba(9,12,21,0.75) 40%,
      var(--bg)          80%
    );
  }
  .home-hero-content {
    padding: 48px 0 44px;
  }
  .hero-bg {
    background-position: center 15%;  /* show upper body on mobile */
    /* No opacity override here — JS controls opacity via preload */
  }
  /* On mobile the text sits on top of the image so darken it more */
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(9,12,21,0.35)  0%,
      rgba(9,12,21,0.80) 45%,
      var(--bg)           85%
    );
  }
}



.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}

/* Home sections */
/*
 * All home sections use the same vertical rhythm — 48px top/bottom.
 * Sections that set padding-top:0 inline override this; those inline
 * styles are removed from index.html and replaced with a shared class.
 * The court-line already provides 40px margin below it, so the
 * 48px section padding gives ~88px total gap — generous and consistent.
 */
.home-section {
  padding: var(--section-gap) 0 0;
  border-top: 1px solid var(--border-soft);
}

/* First section directly after the stats bar needs no top border */
.home-section:first-of-type {
  border-top: none;
}

/* Court line decoration */
.court-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0.3;
  margin: 0; /* home-section padding provides all the breathing room */
}

/* ── Color utility ────────────────────────────────────── */
.text-orange  { color: var(--orange); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-blue    { color: var(--blue); }
.text-red     { color: var(--red); }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }

/* ── Tooltip ──────────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

/* ── About page ───────────────────────────────────────── */
.about-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  background: linear-gradient(160deg, #0d1829, #090c15);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color var(--transition);
}

.about-feature:hover { border-color: var(--orange); }
.about-feature-icon { font-size: 2rem; margin-bottom: 12px; }
.about-feature-title { font-weight: 700; margin-bottom: 8px; }
.about-feature-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

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

/* ── Login Button in Nav ──────────────────────────────── */
/* Desktop: show inline in nav-right, hide mobile item */
.nav-login-btn-desktop {
  display: inline-flex;
}
.nav-login-mobile {
  display: none;
}

/* ── Game Cards — consistent dimensions & equal style ── */
.game-card {
  /* Enforce min-height so all cards have same visual weight */
  min-height: 110px;
}

/* Team name in game cards — never overflow, use ellipsis */
.team-name-sm {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}

/* ── Standings Table — MVP Race style ────────────────── */
/* The standings table is rendered inside .table-wrap so it
   already shares the shared <table> rules. These extra rules
   align it visually with the MVP race table. */
.standings-table td,
.standings-table th {
  white-space: nowrap;
}

.standings-table .team-name-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  display: inline-block;
}

/* ── WhatsApp FAB ────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-fab svg {
  display: block;
  flex-shrink: 0;
}

/* ── Responsive — 768 px ─────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-gap: clamp(32px, 5vw, 48px);
  }

  /* Login: hide desktop btn, show inside mobile menu */
  .nav-login-btn-desktop { display: none; }
  .nav-login-mobile { display: block; padding: 4px 12px 8px; }

  /* League context bar — tighter padding on mobile, margin-top already set globally */
  .league-context-bar {
    padding: 9px 0 10px;
  }

  /* All home sections — consistent comfortable rhythm on mobile */
  .home-section {
    padding-top: var(--section-gap);
  }

  /* Section header: always has a gap from any element above */
  .section-header {
    padding-top: 8px;
    margin-bottom: 16px;
  }

  /* Game card body — prevent team names pushing score off screen */
  .game-body {
    gap: 8px;
  }

  .team-name-sm {
    font-size: 13px;
    max-width: 80px;
  }

  .score-val {
    font-size: 1.6rem;
    width: 32px;
  }

  /* Standings table — show only essential columns on mobile */
  .standings-table th.hide-mobile,
  .standings-table td.hide-mobile {
    display: none;
  }

  /* WhatsApp FAB — slightly smaller on mobile */
  .whatsapp-fab {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 16px;
  }
  .whatsapp-fab svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .team-name-sm {
    max-width: 60px;
    font-size: 12px;
  }

  .score-val {
    font-size: 1.4rem;
    width: 28px;
  }

  /* On very small screens the score separator takes up space */
  .score-sep {
    font-size: 10px;
  }

  /* Keep cards a comfortable touch target */
  .game-card {
    padding: 14px 14px;
  }

  /* Section padding */
  .home-section {
    padding: 24px 0;
  }
}


/* ══════════════════════════════════════════════════════════
   RICH CONTENT — Global styles for text-editor rendered HTML
   Applied to any .rich-content wrapper (bio, descriptions, etc.)
   Matches the .bio-content link style used on player profiles.
   ══════════════════════════════════════════════════════════ */
.rich-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}
.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5 {
  color: var(--text-primary);
  margin: 1em 0 .4em;
}
.rich-content p { margin-bottom: .7em; }
.rich-content ul, .rich-content ol { padding-left: 1.5em; }
.rich-content li { margin-bottom: .3em; }
.rich-content strong, .rich-content b { color: var(--text-primary); }
.rich-content em, .rich-content i { color: var(--text-secondary); }
.rich-content blockquote {
  border-left: 3px solid var(--orange);
  padding-left: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin: .8em 0;
}
/* THE CORE: links inside any rich-content area always render orange */
.rich-content a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(249,115,22,.3);
  transition: opacity .15s, border-color .15s;
}
.rich-content a:hover {
  opacity: .80;
  border-bottom-color: var(--orange);
}

/* Alias — bio already uses .bio-content; keep both working */
.bio-content a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(249,115,22,.3);
  transition: opacity .15s, border-color .15s;
}
.bio-content a:hover { opacity: .80; border-bottom-color: var(--orange); }

/* ══════════════════════════════════════════════════════════
   FREE AGENT badge
   ══════════════════════════════════════════════════════════ */
.free-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245,158,11,.4);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
  margin-bottom: 16px;
  width: fit-content;
}

/* ══════════════════════════════════════════════════════════
   SEASON SELECTOR — context bar enhancement
   ══════════════════════════════════════════════════════════ */
.season-selector-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.season-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.season-selector-btn:hover { border-color: var(--orange); background: var(--card-hover); }
.season-selector-btn .ss-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.season-selector-btn .ss-dot.historical { background: var(--text-muted); }
.season-selector-btn svg { flex-shrink: 0; transition: transform .2s; }
.season-selector-btn.open svg { transform: rotate(180deg); }
.season-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: dropIn .15s ease;
}
.season-dropdown.open { display: block; }
@keyframes dropIn {
  from { opacity:0; transform: translateY(-6px); }
  to   { opacity:1; transform: translateY(0); }
}
.season-dropdown-label {
  padding: 8px 14px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.season-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
  gap: 8px;
}
.season-dropdown-item:hover { background: var(--card-hover); }
.season-dropdown-item.active {
  background: rgba(249,115,22,.08);
  color: var(--orange);
}
.season-dropdown-item .ss-status {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.season-dropdown-item .ss-status.active   { background: rgba(16,185,129,.12); color: var(--green); }
.season-dropdown-item .ss-status.completed { background: var(--surface); color: var(--text-muted); }
.season-dropdown-item .ss-status.upcoming { background: rgba(59,130,246,.12); color: var(--blue); }

/* Viewing-season banner on content pages */
.view-season-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(245,158,11,.06);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 13px;
  gap: 12px;
  flex-wrap: wrap;
}
.view-season-banner .vsb-label {
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-season-banner .vsb-reset {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.view-season-banner .vsb-reset:hover { color: var(--orange); }

/* ══════════════════════════════════════════════════════════
   PERFORMANCE CHART v2 — Multi-stat tabbed chart
   ══════════════════════════════════════════════════════════ */
.chart-stat-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chart-stat-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: all .2s;
  font-family: var(--font-body);
}
.chart-stat-tab:hover { border-color: var(--orange); color: var(--text-secondary); }
.chart-stat-tab.active {
  background: rgba(249,115,22,.12);
  border-color: var(--orange);
  color: var(--orange);
}
.chart-stat-tab .tab-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  z-index: 50;
  max-width: 170px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  display: none;
}
.chart-tooltip strong { color: var(--text-primary); display: block; margin-bottom: 2px; }
.chart-tooltip.visible { display: block; }

/* ══════════════════════════════════════════════════════════
   CONTEXT BAR — wider to hold season selector
   ══════════════════════════════════════════════════════════ */
.league-context-inner {
  flex-wrap: wrap;
  gap: 6px 12px;
}


/* ══════════════════════════════════════════════════════════
   PLAYER OF THE WEEK — Hero feature card
   ══════════════════════════════════════════════════════════ */
.potw-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(249,115,22,.12) 0%, rgba(245,158,11,.06) 100%);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.potw-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(249,115,22,.15) 0%, transparent 70%);
  pointer-events: none;
}
.potw-card:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 32px rgba(249,115,22,.15);
}
.potw-photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--orange);
  flex-shrink: 0;
}
.potw-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid var(--orange);
  flex-shrink: 0;
}
.potw-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 3px;
  display: flex; align-items: center; gap: 5px;
}
.potw-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: .04em;
  line-height: 1;
  margin-bottom: 4px;
}
.potw-team { font-size: 12px; color: var(--text-muted); }
.potw-stats {
  display: flex;
  gap: 16px;
  text-align: center;
  flex-shrink: 0;
}
.potw-stat-item .psi-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--orange);
}
.potw-stat-item .psi-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-top: 2px;
}
@media (max-width: 480px) {
  .potw-card { grid-template-columns: auto 1fr; }
  .potw-stats { display: none; }
}

/* ══════════════════════════════════════════════════════════
   LEAGUE RECORDS — Record row cards
   ══════════════════════════════════════════════════════════ */
.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.record-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .2s, background .2s;
}
.record-card:hover { border-color: rgba(249,115,22,.3); background: var(--card-hover); }
.record-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.record-val {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--orange);
  flex-shrink: 0;
  min-width: 52px;
}
.record-unit {
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}
.record-body { flex: 1; min-width: 0; }
.record-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.record-holder { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.record-context { font-size: 11px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .records-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   MVP PAGE — 4-card race layout (matches home page style)
   ══════════════════════════════════════════════════════════ */
.mvp-race-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .mvp-race-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .mvp-race-grid { grid-template-columns: repeat(2, 1fr); } }

/* MVP card — same structure as home page player card */
.mvp-race-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
}
.mvp-race-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249,115,22,.3);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.mvp-race-card.rank-1 { border-color: rgba(245,158,11,.4); }
.mvp-race-card.rank-1:hover { border-color: var(--gold); box-shadow: 0 8px 32px rgba(245,158,11,.15); }
.mvp-race-rank {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 1.3rem;
  z-index: 2;
}
.mvp-race-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
}
.mvp-race-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.mvp-race-body {
  padding: 14px 14px 16px;
  flex: 1;
}
.mvp-race-jersey { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.mvp-race-name { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .03em; line-height: 1.1; margin-bottom: 3px; }
.mvp-race-team { font-size: 11px; color: var(--text-secondary); margin-bottom: 10px; }
.mvp-race-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mvp-race-stat {
  padding: 7px 4px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.mvp-race-stat:last-child { border-right: none; }
.mvp-race-stat .rs-val { font-family: var(--font-display); font-size: 1.15rem; line-height: 1; display: block; }
.mvp-race-stat .rs-lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .09em; margin-top: 2px; display: block; }
.mvp-race-stat.rs-ppg .rs-val { color: var(--orange); }

/* ── Rankings vs MVP distinction label ─────────────────── */
.section-distinction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.section-distinction.efficiency { border-color: rgba(249,115,22,.3); color: var(--orange); background: rgba(249,115,22,.06); }
.section-distinction.volume     { border-color: rgba(59,130,246,.3);  color: var(--blue);   background: rgba(59,130,246,.06); }

/* ══════════════════════════════════════════════════════════
   PLAYER PROFILE — MVP Award badge
   ══════════════════════════════════════════════════════════ */
.mvp-award-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}
.mvp-award-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════
   TEAM PAGE — Season History
   ══════════════════════════════════════════════════════════ */
.season-history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.season-history-row:last-child { border-bottom: none; }
.season-history-row:hover { background: var(--card-hover); }

/* ══════════════════════════════════════════════════════════
   VIEW SEASON BANNER — used across all content pages
   ══════════════════════════════════════════════════════════ */
.view-season-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(59,130,246,.06);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 13px;
  gap: 12px;
  flex-wrap: wrap;
}
.view-season-banner .vsb-label {
  color: var(--blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-season-banner .vsb-reset {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.view-season-banner .vsb-reset:hover { color: var(--orange); }


/* ══════════════════════════════════════════════════════════════
   GAME HIGHLIGHTS — YouTube Embed & Link Card
   Phase 1 Addition
   ══════════════════════════════════════════════════════════════ */

/* Responsive 16:9 YouTube container */
.yt-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}
.yt-embed-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Highlights embed wrapper */
.highlights-embed-wrap {
  max-width: 800px;
  margin: 0 auto;
}

/* Hero button for highlighting games with video */
.highlights-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: rgba(255,0,0,.12);
  border: 1px solid rgba(255,0,0,.3);
  border-radius: 30px;
  color: #ff4444;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.highlights-hero-btn:hover {
  background: rgba(255,0,0,.22);
  border-color: rgba(255,0,0,.55);
  color: #ff4444;
}

/* Fallback link card for non-YouTube highlight URLs */
.highlights-link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .2s;
}
.highlights-link-card:hover { border-color: var(--orange); }

/* ══════════════════════════════════════════════════════════════
   SEASON CONTEXT — sticky topbar offset fix
   When context bar is sticky, page sections need correct offset.
   ══════════════════════════════════════════════════════════════ */

/* Add a CSS custom property so JS/pages can read the combined sticky height */
:root {
  --context-bar-h: 44px; /* approximate height of league-context-bar */
  --sticky-offset:  calc(var(--nav-h) + var(--context-bar-h));
}

/* ══════════════════════════════════════════════════════════════
   RANKINGS NOTE — hide on mobile (MVP page)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .rankings-note { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   SEASON STATE — Award cards, recap banner, next-season teaser
   ══════════════════════════════════════════════════════════════ */

/* Season Awards grid — 2 cards side by side, centred */
#season-awards-grid {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.award-card {
  background: linear-gradient(160deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 200px;
  flex: 1 1 200px;
  max-width: 260px;
  text-decoration: none;
  color: inherit;
}

.award-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.award-card-photo {
  width: 100px;
  height: 130px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: top;
}

.award-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: .04em;
  line-height: 1.1;
}

.award-card-role {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 12px;
  border: 1px solid currentColor;
}

/* Next season teaser — subtle court-line separator above */
#next-season-section {
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  #season-awards-grid {
    justify-content: center;
  }
  .award-card {
    max-width: 100%;
    flex: 1 1 100%;
  }
}
/* ══════════════════════════════════════════════════════════════════════
   COMPACT PORTRAIT CARD  (.mpc)
   Used on: Home page MVP Race  ·  Stats page MVP Race
   Kept here so styles are globally available to all pages.
   ══════════════════════════════════════════════════════════════════════ */

/* Grid wrapper — both home & stats use this class */
.mvp-race-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

/* Card shell */
.mpc {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition:
    transform .25s cubic-bezier(.34,1.4,.64,1),
    border-color .22s ease,
    box-shadow .25s ease;
}
.mpc:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: var(--accent, var(--orange));
  box-shadow: 0 14px 36px rgba(0,0,0,.26), 0 0 0 1px var(--accent, var(--orange));
}

/* Rank variants */
.mpc--rank-1 {
  border-color: rgba(249,115,22,.38);
  background: linear-gradient(155deg, var(--card) 60%, rgba(249,115,22,.05));
}
.mpc--rank-1:hover {
  box-shadow: 0 16px 42px rgba(249,115,22,.2), 0 0 0 1px rgba(249,115,22,.5);
}
.mpc--rank-2 { border-color: rgba(148,163,184,.18); }
.mpc--rank-3 { border-color: rgba(205,127,50,.18); }

/* Rank strip */
.mpc-rank-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.04);
}
.mpc-medal { font-size: 1rem; line-height: 1; }
.mpc-rank-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent, var(--orange));
}

/* Photo area */
.mpc-photo-area {
  position: relative;
  width: 100%;
  padding-top: 58%;
  overflow: hidden;
  background: var(--surface);
}
.mpc-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .4s ease;
}
.mpc:hover .mpc-photo { transform: scale(1.05); }
.mpc-avatar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--surface);
}
.mpc-photo-glow {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--card) 10%, transparent);
  pointer-events: none;
}

/* Body */
.mpc-body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.mpc-name {
  font-family: var(--font-display);
  font-size: .82rem;
  letter-spacing: .04em;
  line-height: 1.15;
}
.mpc-team {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: -4px;
}

/* PPG feature box */
.mpc-ppg-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
}
.mpc-ppg-val {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--accent, var(--orange));
  flex-shrink: 0;
}
.mpc-ppg-right { flex: 1; min-width: 0; }
.mpc-ppg-lbl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}
.mpc-ppg-bar-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.mpc-ppg-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, var(--orange)), color-mix(in srgb, var(--accent, var(--orange)) 55%, white));
  border-radius: 2px;
  width: 0%;
  transition: width .85s cubic-bezier(.22,1,.36,1) .35s;
}
.mpc.sr-visible .mpc-ppg-bar { width: var(--bar-w, 0%); }

/* Stats row */
.mpc-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mpc-stat { flex: 1; text-align: center; }
.mpc-stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
}
.mpc-stat-lbl {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
.mpc-stat-divider {
  width: 1px; height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* Shine sweep on hover */
.mpc-shine {
  position: absolute;
  top: -50%; left: -80%;
  width: 55%; height: 200%;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.05) 50%, transparent 62%);
  transform: skewX(-12deg);
  transition: left .5s ease;
  pointer-events: none;
  z-index: 2;
}
.mpc:hover .mpc-shine { left: 130%; }

/* Responsive grid breakpoints */
@media (max-width: 900px) { .mvp-race-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .mvp-race-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mvp-race-grid::-webkit-scrollbar { display: none; }
  .mvp-race-grid > .mpc {
    min-width: 72vw;
    max-width: 72vw;
    scroll-snap-align: center;
    flex-shrink: 0;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   SNAP SLIDER DOTS
   Shared by: home page (wl-dots, mvp-dots, lu-dots) + stats page
   ══════════════════════════════════════════════════════════════════════ */
.snap-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: none; padding: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.snap-dot--active {
  background: var(--orange);
  transform: scale(1.3);
}