/* ============================================
   LEAN EDGE SPORTS — Player Detail Page
   player.css
============================================ */

/* --- LOADING STATE --- */
.player-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 160px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

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

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* --- ERROR STATE --- */
.player-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 140px 20px;
  text-align: center;
}

.player-error .ti-user-off { font-size: 48px; color: var(--text-muted); opacity: 0.4; }
.player-error h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; color: var(--white); }
.player-error p  { font-size: 14px; color: var(--text-muted); max-width: 360px; line-height: 1.6; }
.player-error a  { color: var(--red); text-decoration: none; font-weight: 600; font-size: 13px; }
.player-error a:hover { text-decoration: underline; }

/* --- PAGE LAYOUT --- */
.player-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 185px 40px 80px;
}

/* --- BACK LINK --- */
.back-link {
  position: relative;
  z-index: 101;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--white); }
.back-link .ti { font-size: 15px; }


/* --- HERO SECTION --- */
.player-hero {
  display: flex;
  flex-direction: column;
  padding: 24px;
  margin-bottom: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
}

.player-tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.player-name {
  margin-bottom: 10px;
}

.player-meta {
  margin-bottom: 20px;
}

.player-season-compare-row {
  margin-bottom: 20px;
}

.hero-stat-pair {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-stat-pair .position-rank-card {
  margin: 0;
}

.injury-status-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 140px;
  font-family: 'Barlow', sans-serif;
}

.injury-status-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin: 2px 0 4px;
}

.injury-loading { color: var(--text-muted); font-size: 20px; }
.injury-healthy { color: #22c55e; }
.injury-out { color: #ff6b6b; }
.injury-questionable { color: #facc15; }

.injury-status-desc,
.injury-status-return {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.player-tier-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
}

.tier-elite     .player-tier-badge { background: rgba(212,175,55,0.15); color: #D4AF37; border: 1px solid rgba(212,175,55,0.3); }
.tier-excellent .player-tier-badge { background: rgba(34,197,94,0.12);  color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.tier-solid     .player-tier-badge { background: rgba(96,165,250,0.12); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.tier-average   .player-tier-badge { background: rgba(255,255,255,0.06); color: var(--grey-font); border: 1px solid rgba(255,255,255,0.1); }
.tier-early     .player-tier-badge { background: rgba(203,213,225,0.12);  color: #cbd5e1; border: 1px solid rgba(203,213,225,0.3); }

.player-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-name .fav-star-btn { font-size: 28px; }

.player-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.player-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.player-meta-item .ti { font-size: 14px; }

.player-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.player-meta-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.12);
}

.player-score-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 140px;
  font-family: 'Barlow', sans-serif;
}

.player-score-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
}

.tier-elite     .player-score-num { color: #D4AF37; }
.tier-excellent .player-score-num { color: #22c55e; }
.tier-solid     .player-score-num { color: #60a5fa; }
.tier-average   .player-score-num { color: var(--white); }
.tier-early     .player-score-num { color: #cbd5e1; }

.season-select-hero {
  padding: 10px 32px 10px 20px;
  background-color: rgba(255,255,255,0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ff6b6b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid rgba(196,18,48,0.3);
  border-radius: 9px;
  color: #ff6b6b;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
}

.season-select-hero option { background: var(--dark-navy); color: var(--white); }

.player-season-compare-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.player-season-compare-row .season-select-hero,
.player-season-compare-row .compare-this-btn {
  white-space: nowrap;
}

/* --- SECTION TITLES --- */
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 16px;
}

.section-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 36px 0;
}

/* --- TWO-COLUMN LAYOUT --- */
.player-two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 0;
  align-items: start;
}

.player-two-col > div {
  min-width: 0;
}

/* --- FULL STATS TABLE --- */
.stats-table-wrap {
  background: var(--dark-navy);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Barlow', sans-serif;
}

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

.stats-table thead th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.stats-table thead th:nth-child(2),
.stats-table thead th:nth-child(3),
.stats-table thead th:nth-child(4),
.stats-table thead th:nth-child(5) { text-align: center; }

.stats-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}

.stats-table tbody tr:last-child { border-bottom: none; }
.stats-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.stats-table tbody td {
  padding: 11px 16px;
  font-size: 14px;
  color: var(--grey-font);
}

.th-stat-name {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--dark-navy);
}

.td-stat-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--dark-navy);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.th-team-breakdown-name,
.td-team-breakdown-name {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--dark-navy);
}

.td-team-breakdown-name {
  z-index: 2;
}

.td-stat-full {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 0 !important;
}

.td-prev {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.td-trend { text-align: center; }

/* Trend arrows */
.trend-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trend { font-size: 18px; font-weight: 700; line-height: 1; }
.trend-diff { font-size: 11px; font-weight: 700; font-family: 'Barlow', sans-serif; }
.trend-up   { color: #4ade80; }
.trend-down { color: #ff6b6b; }
.trend-flat { color: var(--text-muted); font-size: 16px; }

/* --- PERCENTILE BARS --- */
.td-val {
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  padding-bottom: 8px !important;
}

.stat-num {
  display: block;
  margin-bottom: 5px;
}

.pct-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.pct-bar-track {
  width: 64px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.pct-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.pct-label {
  font-size: 10px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  white-space: nowrap;
  min-width: 34px;
  text-align: left;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-title-row .section-title {
  margin-bottom: 0;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.player-team-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.2s, color 0.2s;
}

.player-team-link:hover {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.6);
}

/* --- RADAR CHART CARD --- */
.radar-card {
  background: var(--dark-navy);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 22px;
}

.radar-svg { width: 100%; max-width: 280px; display: block; margin: 0 auto; }

/* --- SEASON HISTORY STRIP --- */
.history-strip {
  display: flex;
  background: rgba(17,29,66,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
}

.history-season {
  flex: 1;
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.15s;
}

.history-season:last-child { border-right: none; }
.history-season:hover { background: rgba(255,255,255,0.04); }
.history-season.hs-active { background: rgba(196,18,48,0.08); }

.hs-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}

.hs-score {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 800;
  display: block;
  margin-bottom: 3px;
}

.hs-record {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.hs-tier {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

.hs-no-data {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 8px;
  display: block;
}

/* --- TREND CHART --- */
.trend-chart-card {
  background: var(--dark-navy);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 22px;
}

.trend-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.trend-stat-select {
  padding: 6px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--white);
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
}

.trend-stat-select option { background: var(--dark-navy); }
.trend-svg { width: 100%; overflow: visible; }

/* --- SIMILAR PLAYERS --- */
.similar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.similar-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background 0.15s, border-color 0.15s;
}

.similar-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

.sim-pct  { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.sim-name { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 2px; line-height: 1.3; }
.sim-pos  { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }

.sim-stats {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.sim-stats span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 5px;
  border-radius: 4px;
}

/* --- COMPARE BUTTON --- */
.compare-this-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.compare-this-btn:hover { background: rgba(255,255,255,0.12); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .player-two-col { grid-template-columns: 1fr; }
  .similar-grid   { grid-template-columns: repeat(3, 1fr); }
}

/* --- MOBILE-ONLY ABBREVIATIONS KEY --- */
.stats-key-section-mobile {
  display: none;
}

@media (max-width: 768px) {
  .player-page    { padding: 100px 24px 60px; }

  .player-quick-stats {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pqs-item {
    flex: 1 0 auto;
  }

  .td-stat-full,
  .season-stats-table thead th:nth-child(2) {
    display: none;
  }

  .stats-key-section-mobile {
    display: block;
    width: calc(100% + 36px);
    margin: 0 -18px 12px;
  }

  .stats-table thead th {
    padding: 12px 6px;
    letter-spacing: 0.03em;
  }

  .stats-table thead th.th-stat-name {
    padding-left: 16px;
  }

  .stats-table-wrap {
    width: calc(100% + 36px);
    margin: 0 -18px;
  }

  .radar-card {
    width: calc(100% + 36px);
    margin: 0 -18px;
    padding: 18px;
  }

  .ch-label {
    min-height: 26px;
  }
}

.stats-key-section-mobile .stats-key-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.stats-key-section-mobile .key-toggle {
  width: 100%;
  padding: 14px 20px;
  background: var(--darkest-navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  color: var(--grey-font);
  transition: color 0.2s, background 0.2s;
}

.stats-key-section-mobile .key-toggle:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
}

.stats-key-section-mobile .key-toggle .ti-help {
  font-size: 15px;
  vertical-align: -2px;
  margin-right: 8px;
  color: var(--red);
}

.stats-key-section-mobile .key-chevron {
  font-size: 15px;
  transition: transform 0.25s ease;
}

.stats-key-section-mobile .key-chevron.open {
  transform: rotate(180deg);
}

.stats-key-section-mobile .stats-key-content {
  padding: 16px 20px 20px;
  background: rgba(13, 24, 48, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-key-section-mobile .key-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stats-key-section-mobile .key-item:last-child {
  border-bottom: none;
}

.stats-key-section-mobile .key-abbr {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  min-width: 44px;
  flex-shrink: 0;
}

.stats-key-section-mobile .key-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .player-name  { font-size: 38px; }
  .history-strip { flex-wrap: wrap; }
  .history-season { flex: 1 0 30%; }
  .similar-grid { grid-template-columns: repeat(2, 1fr); }

  .similar-card:nth-child(5) {
    display: none;
  }
  .hero-stat-pair { flex-wrap: wrap; }
}

/* --- TABLE INNER HEADER (title now inside card for alignment) --- */
.table-inner-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-wrap: wrap;
}

/* --- PLAYER QUICK STATS STRIP --- */
.player-quick-stats {
  display: flex;
  gap: 0;
  margin-top: 20px;
  background: rgba(17,29,66,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
}

.pqs-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-right: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.pqs-item:last-child { border-right: none; }

/* Re-applied after the rule above, which unconditionally reset this
   back to a shrinkable flex item -- undoing the mobile horizontal-scroll
   behavior .player-quick-stats (overflow-x: auto) depends on. */
@media (max-width: 768px) {
  .pqs-item {
    flex: 1 0 auto;
  }
}

.pqs-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 3px;
}

/* GP's "of 82" -- sits on its own middle line, same position as the
   colored rank line on the other quick-stat columns, so GP keeps
   the same three-line rhythm as the rest of the row even though it
   doesn't have a rank of its own. */
.pqs-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 1px 0;
}

.pqs-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- POSITION RANK CARD spacing below --- */
.position-rank-card {
  margin-bottom: 20px;
  display: inline-flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 2px;
  min-width: 140px;
  font-family: 'Barlow', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.position-rank-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(46,117,182,0.4);
}

.prc-link {
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  margin-top: 8px;
}

.prc-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.prc-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  margin-bottom: 2px;
}

.prc-pos {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-font);
  margin-bottom: 6px;
}

.prc-pct {
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 6px;
}

.pr-movement {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pr-up   { color: #4ade80; }
.pr-down { color: #ff6b6b; }
.pr-flat { color: var(--text-muted); }

/* --- CAREER HIGHS STRIP --- */
.career-highs-strip {
  background: rgba(17,29,66,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 0;
}

.career-highs-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.career-highs-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.career-highs-cells {
  display: flex;
  gap: 0;
}

.ch-cell {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.ch-cell:last-child { border-right: none; }

.ch-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-align: center;
  line-height: 1.3;
}

.ch-value {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #4ade80;
  line-height: 1;
  margin-bottom: 3px;
}

.ch-season {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

/* --- DRAFT INFO ROW --- */
.player-draft-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  font-family: 'Barlow', sans-serif;
}

.player-draft-row .ti {
  font-size: 14px;
  color: var(--red);
}

.player-draft-link {
  color: var(--grey-font);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.player-draft-link:hover {
  color: var(--white);
}

/* --- RADAR CHART TOOLTIP --- */
.radar-tooltip {
  position: absolute;
  z-index: 200;
  max-width: 220px;
  padding: 10px 14px;
  background: var(--dark-navy);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
  color: var(--grey-font);
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: none;
}

/* --- GAME LOG --- */
.game-log-card {
  background: rgba(17,29,66,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
}

.home-away-card {
  background: rgba(17,29,66,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 28px;
}

.home-away-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-away-narrative {
  font-size: 13px;
  color: var(--grey-font);
  line-height: 1.5;
  margin: 0 0 14px;
}

/* Only 3 columns of data -- without this the table stretches to
   fill the card's full width, leaving Home and Away far apart with
   a lot of empty space between them. */
.home-away-table {
  max-width: 360px;
  table-layout: fixed;
}

.home-away-table th,
.home-away-table td {
  width: 33.33%;
}

/* .bs-table's shared nth-child(2) rule left-aligns and dims that
   column (meant for the Game Log's "Opp" column and box score
   panels) -- reset it here so the Home column matches Away:
   centered and full white, not accidentally muted. */
.home-away-table td:nth-child(2) {
  text-align: center;
  color: var(--white);
}

/* --- COLLAPSIBLE SECTIONS (Game Log, Home vs Away) --- */
.section-collapse-btn {
  flex-shrink: 0;
  margin-left: 12px;
  padding: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.section-collapse-btn:hover {
  color: var(--white);
}

.section-collapse-icon {
  display: block;
  transition: transform 0.2s;
}

.section-collapse-btn[aria-expanded="false"] .section-collapse-icon {
  transform: rotate(180deg);
}

.section-collapsible-body.collapsed {
  display: none;
}

.game-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.game-log-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 16px;
}

.game-log-exclude-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  color: var(--text-muted);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.game-log-exclude-toggle:hover {
  color: var(--white);
}

.game-log-exclude-toggle input[type="checkbox"] {
  accent-color: #ff6b6b;
  cursor: pointer;
}


.game-log-toggle {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}

.glt-btn {
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--grey-font);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.glt-btn:hover {
  color: var(--white);
}

.glt-btn.active {
  background: var(--red);
  color: var(--white);
}

.bs-table-wrap {
  overflow-x: auto;
  padding: 4px 16px 16px;
}

.bs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
  white-space: nowrap;
}

.bs-table thead th {
  text-align: center;
  padding: 8px 10px;
  color: var(--grey-font);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bs-table thead th:first-child,
.bs-table thead th:nth-child(2) {
  text-align: left;
}

.bs-table tbody td,
.bs-table tfoot td {
  text-align: center;
  padding: 7px 10px;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bs-table tbody td:first-child,
.bs-table tbody td:nth-child(2),
.bs-table tfoot td:first-child {
  text-align: left;
  color: var(--grey-font);
}

.game-log-pts {
  font-weight: 700;
}

.game-log-inactive-row td {
  color: var(--grey-font);
  font-style: italic;
}

/* Freeze the header row so it stays visible while scrolling through
   a long game list -- the table body scrolls within its own
   container instead of the whole page, so the column headers never
   disappear off the top of the screen. Scoped to
   .game-log-table-wrap specifically, not the shared .bs-table-wrap
   class (also used by box score panels, which shouldn't get this
   height cap). */
.game-log-table-wrap {
  max-height: 480px;
  overflow-y: auto;
}

.game-log-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--darkest-navy);
}

/* Freeze Date/Opp/Result on mobile, where the table has to scroll
   horizontally to see MIN through FG% -- otherwise you lose track of
   which row/game you're even looking at while scrolling right.
   tfoot's "Season average" label is a single colspan=3 cell (not 3
   separate cells), so only its nth-child(1) rule applies here --
   deliberately NOT extending the nth-child(2)/(3) rules to tfoot,
   or they'd incorrectly catch the MIN/PTS footer cells instead. */
@media (max-width: 768px) {
  .game-log-table thead th:nth-child(1),
  .game-log-table tbody td:nth-child(1),
  .game-log-table tfoot td:nth-child(1) {
    position: sticky;
    left: 0;
    min-width: 55px;
    background: var(--darkest-navy);
  }

  .game-log-table thead th:nth-child(2),
  .game-log-table tbody td:nth-child(2) {
    position: sticky;
    left: 55px;
    min-width: 55px;
    background: var(--darkest-navy);
  }

  .game-log-table thead th:nth-child(3),
  .game-log-table tbody td:nth-child(3) {
    position: sticky;
    left: 110px;
    min-width: 90px;
    background: var(--darkest-navy);
    box-shadow: 2px 0 4px rgba(0,0,0,0.3);
  }

  .game-log-table thead th:nth-child(1),
  .game-log-table thead th:nth-child(2),
  .game-log-table thead th:nth-child(3) {
    z-index: 5;
  }

  .game-log-table tbody td:nth-child(1),
  .game-log-table tbody td:nth-child(2),
  .game-log-table tbody td:nth-child(3),
  .game-log-table tfoot td:nth-child(1) {
    z-index: 1;
  }
}

.bs-table tfoot td {
  font-weight: 700;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: none;
}

.bs-table tfoot td:first-child {
  color: var(--grey-font);
  font-weight: 500;
  font-style: normal;
}

.bs-net-pos { color: #4ade80; }
.bs-net-neg { color: #f87171; }

.box-score-loading,
.box-score-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--grey-font);
  font-size: 13px;
}

.box-score-empty i {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

/* Static fallback content (players/<id>/index.html, generated by
   scripts/build-player-pages.js). Shown briefly before player.js
   hydrates the page into the full interactive version -- also what
   a non-JS crawler sees permanently, so it needs to look intentional
   on its own, not like a broken loading state. */
.static-stats-table {
  width: 100%;
  max-width: 420px;
  border-collapse: collapse;
  margin: 12px 0 24px;
}

.static-stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
}

.static-stats-table td:first-child {
  color: var(--text-muted);
}

.static-stats-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--white);
}

.static-draft-line {
  color: var(--text-muted);
  font-size: 13px;
  margin: -6px 0 20px;
}

.static-fallback-note {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}
