:root {
  --color-bg: #0d1117;
  --color-card-bg: #151a22;
  --color-card-hover: #1b2230;
  --color-row-bg: #1c2330;
  --color-text: #eef1f5;
  --color-text-muted: #9aa3ad;
  --color-border: rgba(238, 241, 245, 0.08);
  --color-accent: #4f8ff7;
  --color-accent-hover: #6aa2ff;
  --color-accent-soft: rgba(79, 143, 247, 0.12);
  --color-accent-strong: rgba(79, 143, 247, 0.25);
  --color-win: #22c55e;
  --color-live: #ef4444;
  --color-gold: #f59e0b;
  --font-family: 'Poppins', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.35);
  --border-radius: 1rem;
}

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

html {
  background-color: var(--color-bg);
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

.footer {
  background-color: var(--color-card-bg);
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  border-top: 1px solid var(--color-border);
}

/* Bottom Navigation - Mobile Only */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-card-bg);
  border-top: 1px solid var(--color-border);
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 1000;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-item.active {
  color: var(--color-accent);
}

.bottom-nav-item:hover {
  color: var(--color-text);
}

.footer-content p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.footer-content a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-content a:visited {
  color: var(--color-accent);
}

.footer-content a:hover {
  color: white;
  text-decoration: underline;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
}

/* Calendar Navigation */
#calendar-nav {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.dates-container {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  position: relative;
}

.dates-container::-webkit-scrollbar {
  display: none;
}

.calendar-day {
  padding: 0.625rem 1rem;
  border-radius: 0.625rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-width: 5rem;
  text-align: center;
  flex-shrink: 0;
  border: 2px solid transparent;
  font-weight: 500;
}

.calendar-day:hover {
  background: var(--color-row-bg);
}

.calendar-day.today {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.calendar-day.selected {
  background: var(--color-accent);
  color: white;
}

/* Date Display */
.date-display {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 1.5rem 0;
  text-align: center;
  letter-spacing: -0.025em;
}

/* Games Grid */
.games-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.game-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 160px;
}

.matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  gap: 1rem;
  flex: 1;
}

.team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 80px;
}

.team-logo-card {
  transform: scale(2.5);
  margin: 22px;
}

.team-abbr {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.score-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  /* Critical for text truncation/marquee in flex item */
}

.scores {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.score {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score-divider {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* Team Logo Styles */
.team-logo {
  width: 28px;
  height: 28px;
  background-image: url('../assets/nba-sprite-sheet.png');
  background-repeat: no-repeat;
  background-size: 168px 140px;
}

/* Team Logo Positions */
.team-logo.atlanta-hawks {
  background-position: 0 0;
}

.team-logo.boston-celtics {
  background-position: -28px 0;
}

.team-logo.brooklyn-nets {
  background-position: -56px 0;
}

.team-logo.charlotte-hornets {
  background-position: -84px 0;
}

.team-logo.chicago-bulls {
  background-position: -112px 0;
}

.team-logo.cleveland-cavaliers {
  background-position: -140px 0;
}

.team-logo.dallas-mavericks {
  background-position: 0 -28px;
}

.team-logo.denver-nuggets {
  background-position: -28px -28px;
}

.team-logo.detroit-pistons {
  background-position: -56px -28px;
}

.team-logo.golden-state-warriors {
  background-position: -84px -28px;
}

.team-logo.houston-rockets {
  background-position: -112px -28px;
}

.team-logo.indiana-pacers {
  background-position: -140px -28px;
}

.team-logo.la-clippers {
  background-position: 0 -56px;
}

.team-logo.los-angeles-lakers {
  background-position: -28px -56px;
}

.team-logo.memphis-grizzlies {
  background-position: -56px -56px;
}

.team-logo.miami-heat {
  background-position: -84px -56px;
}

.team-logo.milwaukee-bucks {
  background-position: -112px -56px;
}

.team-logo.minnesota-timberwolves {
  background-position: -140px -56px;
}

.team-logo.new-orleans-pelicans {
  background-position: 0 -84px;
}

.team-logo.new-york-knicks {
  background-position: -28px -84px;
}

.team-logo.oklahoma-city-thunder {
  background-position: -56px -84px;
}

.team-logo.orlando-magic {
  background-position: -84px -84px;
}

.team-logo.philadelphia-76ers {
  background-position: -112px -84px;
}

.team-logo.phoenix-suns {
  background-position: -140px -84px;
}

.team-logo.portland-trail-blazers {
  background-position: 0 -112px;
}

.team-logo.sacramento-kings {
  background-position: -28px -112px;
}

.team-logo.san-antonio-spurs {
  background-position: -56px -112px;
}

.team-logo.toronto-raptors {
  background-position: -84px -112px;
}

.team-logo.utah-jazz {
  background-position: -112px -112px;
}

.team-logo.washington-wizards {
  background-position: -140px -112px;
}

.loser {
  opacity: 0.5;
}

.game-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.live-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--color-live);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--color-live);
}

.broadcast-container {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 180px;
  /* Limit width to prevent expansion */
  overflow: hidden;
  white-space: nowrap;
}

.broadcast-scroll {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scroll-infinite 20s linear infinite;
  padding-left: 0;
}

.broadcast-scroll span {
  font-size: 0.7rem;
  /* Slightly smaller */
  color: var(--color-text-muted);
  font-weight: 500;
  opacity: 0.8;
}

.broadcast-separator {
  color: var(--color-accent);
  opacity: 0.6;
}

@keyframes scroll-infinite {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.broadcast-info-large {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-align: center;
}

.box-score-btn {
  text-align: center;
  padding: 0.75rem;
  background: var(--color-row-bg);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border-top: 1px solid var(--color-border);
}

.box-score-btn:hover {
  background: var(--color-accent);
  color: white;
}

/* Mobile styles for new card design */
@media (max-width: 768px) {
  .game-card {
    min-height: 120px;
  }

  .matchup {
    padding: 1rem;
  }

  .team-side {
    min-width: 60px;
  }

  .team-logo-card {
    transform: scale(1.8);
    margin: 16px;
  }

  .team-abbr {
    font-size: 0.875rem;
  }

  .score {
    font-size: 1.5rem;
  }

  .score-divider {
    font-size: 1.25rem;
  }

  .game-status {
    font-size: 0.75rem;
  }

  .box-score-btn {
    font-size: 0.75rem;
    padding: 0.625rem;
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-overlay.visible {
  display: flex;
}

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

/* Skeleton Loader */
.box-score-skeleton {
  width: 100%;
  animation: fade-in 0.3s ease;
}

.skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
}

.skeleton-team {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skeleton-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-row-bg);
  animation: shimmer 1.5s infinite linear;
}

.skeleton-name {
  width: 120px;
  height: 24px;
  background: var(--color-row-bg);
  border-radius: 4px;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-score {
  width: 40px;
  height: 40px;
  background: var(--color-row-bg);
  border-radius: 8px;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.skeleton-status {
  width: 80px;
  height: 20px;
  background: var(--color-row-bg);
  border-radius: 4px;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-clock {
  width: 60px;
  height: 16px;
  background: var(--color-row-bg);
  border-radius: 4px;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.skeleton-tab {
  width: 100px;
  height: 40px;
  background: var(--color-row-bg);
  border-radius: 8px;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-row {
  width: 100%;
  height: 40px;
  background: var(--color-row-bg);
  border-radius: 4px;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-row.header {
  height: 50px;
  margin-bottom: 0.5rem;
}

@keyframes shimmer {
  0% {
    background-color: var(--color-row-bg);
  }

  50% {
    background-color: rgba(50, 58, 72, 0.7);
  }

  100% {
    background-color: var(--color-row-bg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

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

/* Desktop/Tablet: Center the displayed dates - REMOVED to fix Chrome scrolling bug */
/* @media (min-width: 768px) {
  .dates-container {
    justify-content: center;
  }
} */

/* Mobile: no arrows, lazy load dates, allow horizontal scroll */
@media (max-width: 768px) {
  #app {
    padding: 0.5rem;
  }

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

  .team-name {
    font-size: 0.875rem;
  }

  .team-score {
    font-size: 1.125rem;
  }

  .date-display {
    font-size: 1.5rem;
    margin: 0.75rem 0;
  }

  .calendar-day {
    padding: 0.375rem 0.75rem;
  }

  /* On mobile, do not center all dates since user can scroll */
  .dates-container {
    justify-content: flex-start;
  }
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.header-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.05em;
  text-decoration: none;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  background: var(--color-row-bg);
  padding: 0.375rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
}

.tab-link {
  padding: 0.75rem 1.25rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.tab-link:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.tab-link.active {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 2px 12px rgba(79, 143, 247, 0.35);
}

/* Standings Page */
.standings-header {
  text-align: center;
  margin-bottom: 2rem;
}

.standings-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.season-info {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

#standings-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

.conference-section {
  min-width: 0;
  /* Allow flex item to shrink below content size */
}

.conference-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.standings-table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  /* Prevent wrapper from expanding beyond container */
  max-width: 100%;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.standings-table thead {
  background: var(--color-row-bg);
}

.standings-table th {
  padding: 1rem 0.75rem;
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.standings-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

.standings-table tbody tr:hover {
  background: var(--color-row-bg);
}

.standings-table tbody tr:last-child {
  border-bottom: none;
}

.standings-table td {
  padding: 1rem 0.75rem;
  color: var(--color-text);
}

.rank-col {
  text-align: center;
  font-weight: 600;
  width: 50px;
}

.team-col {
  min-width: 200px;
}

.stat-col {
  text-align: center;
  font-weight: 500;
  min-width: 60px;
}

.team-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-info .team-link {
  position: relative;
  display: inline-block;
  transition: color 0.15s ease;
}

.team-info:hover .team-name {
  color: var(--color-accent);
}

/* Playoff indicators */
.playoff-spot {
  border-left: 3px solid var(--color-win);
}

.playin-spot {
  border-left: 3px solid #f59e0b;
}

/* Legend */
.standings-legend {
  display: flex;
  gap: 2rem;
  justify-content: flex-start;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.legend-indicator {
  width: 20px;
  height: 3px;
  border-radius: 2px;
}

.playoff-indicator {
  background: var(--color-win);
}

.playin-indicator {
  background: #f59e0b;
}

.no-data,
.error-message {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

.error-message {
  color: var(--color-live);
}

/* Tablet Responsive */
@media (max-width: 1200px) {
  #standings-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .conference-header {
    font-size: 1.375rem;
  }

  .standings-table-wrapper {
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #app {
    padding: 0;
  }

  main {
    gap: 0.75rem;
    padding: 0 0.75rem 0.75rem;
  }

  .site-header {
    margin-bottom: 1rem;
  }

  .header-content {
    padding: 0.875rem 1rem;
    gap: 1rem;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .tab-nav {
    display: none;
  }

  .bottom-nav {
    display: flex;
  }

  main {
    padding-bottom: 5rem;
  }

  .footer {
    padding-bottom: 5rem;
  }

  #calendar-nav {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }

  .calendar-day {
    min-width: 4.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .date-display {
    font-size: 1.5rem;
    margin: 1rem 0;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .game-card {
    border-radius: 0.875rem;
  }

  .team-row {
    padding: 1rem;
  }

  .team-row::after {
    left: 1rem;
    right: 1rem;
  }

  .team-info {
    gap: 0.75rem;
  }

  .team-logo {
    width: 24px;
    height: 24px;
  }

  /* Scale sprite positions for smaller logos */
  .team-logo.atlanta-hawks {
    background-position: 0 0;
    background-size: 144px 120px;
  }

  .team-logo.boston-celtics {
    background-position: -24px 0;
    background-size: 144px 120px;
  }

  .team-logo.brooklyn-nets {
    background-position: -48px 0;
    background-size: 144px 120px;
  }

  .team-logo.charlotte-hornets {
    background-position: -72px 0;
    background-size: 144px 120px;
  }

  .team-logo.chicago-bulls {
    background-position: -96px 0;
    background-size: 144px 120px;
  }

  .team-logo.cleveland-cavaliers {
    background-position: -120px 0;
    background-size: 144px 120px;
  }

  .team-logo.dallas-mavericks {
    background-position: 0 -24px;
    background-size: 144px 120px;
  }

  .team-logo.denver-nuggets {
    background-position: -24px -24px;
    background-size: 144px 120px;
  }

  .team-logo.detroit-pistons {
    background-position: -48px -24px;
    background-size: 144px 120px;
  }

  .team-logo.golden-state-warriors {
    background-position: -72px -24px;
    background-size: 144px 120px;
  }

  .team-logo.houston-rockets {
    background-position: -96px -24px;
    background-size: 144px 120px;
  }

  .team-logo.indiana-pacers {
    background-position: -120px -24px;
    background-size: 144px 120px;
  }

  .team-logo.la-clippers {
    background-position: 0 -48px;
    background-size: 144px 120px;
  }

  .team-logo.los-angeles-lakers {
    background-position: -24px -48px;
    background-size: 144px 120px;
  }

  .team-logo.memphis-grizzlies {
    background-position: -48px -48px;
    background-size: 144px 120px;
  }

  .team-logo.miami-heat {
    background-position: -72px -48px;
    background-size: 144px 120px;
  }

  .team-logo.milwaukee-bucks {
    background-position: -96px -48px;
    background-size: 144px 120px;
  }

  .team-logo.minnesota-timberwolves {
    background-position: -120px -48px;
    background-size: 144px 120px;
  }

  .team-logo.new-orleans-pelicans {
    background-position: 0 -72px;
    background-size: 144px 120px;
  }

  .team-logo.new-york-knicks {
    background-position: -24px -72px;
    background-size: 144px 120px;
  }

  .team-logo.oklahoma-city-thunder {
    background-position: -48px -72px;
    background-size: 144px 120px;
  }

  .team-logo.orlando-magic {
    background-position: -72px -72px;
    background-size: 144px 120px;
  }

  .team-logo.philadelphia-76ers {
    background-position: -96px -72px;
    background-size: 144px 120px;
  }

  .team-logo.phoenix-suns {
    background-position: -120px -72px;
    background-size: 144px 120px;
  }

  .team-logo.portland-trail-blazers {
    background-position: 0 -96px;
    background-size: 144px 120px;
  }

  .team-logo.sacramento-kings {
    background-position: -24px -96px;
    background-size: 144px 120px;
  }

  .team-logo.san-antonio-spurs {
    background-position: -48px -96px;
    background-size: 144px 120px;
  }

  .team-logo.toronto-raptors {
    background-position: -72px -96px;
    background-size: 144px 120px;
  }

  .team-logo.utah-jazz {
    background-position: -96px -96px;
    background-size: 144px 120px;
  }

  .team-logo.washington-wizards {
    background-position: -120px -96px;
    background-size: 144px 120px;
  }

  .team-name {
    font-size: 0.9375rem;
  }

  .team-score {
    font-size: 1.5rem;
  }

  .game-status {
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
  }

  #standings-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .standings-header h1 {
    font-size: 1.75rem;
  }

  .season-info {
    font-size: 1rem;
  }

  .conference-section {
    min-width: 0;
  }

  .conference-header {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .standings-table-wrapper {
    /* Enable smooth horizontal scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .standings-table {
    font-size: 0.8125rem;
    min-width: 500px;
    /* Minimum width to ensure readability */
  }

  .standings-table th,
  .standings-table td {
    padding: 0.625rem 0.5rem;
  }

  .mobile-hide {
    display: none;
  }

  .team-col {
    min-width: 160px;
  }

  .stat-col {
    min-width: 45px;
  }

  .rank-col {
    width: 40px;
  }

  .team-logo {
    width: 24px;
    height: 24px;
  }

  .standings-legend {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .footer {
    padding: 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Teams Page */
.teams-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: 1400px;
  margin: 0 auto;
}

.team-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.team-card-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.team-card-placeholder {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-row-bg);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.team-card-content {
  width: 100%;
}

.team-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.team-card-abbr {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.team-card-record {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.team-card-standing {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Mobile adjustments for Leaders and Teams */
@media (max-width: 768px) {
  .teams-header h2 {
    font-size: 1.75rem;
  }

  .teams-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .team-card {
    padding: 1.25rem;
  }

  .team-card-logo,
  .team-card-placeholder {
    width: 64px;
    height: 64px;
  }

  .team-card-name {
    font-size: 1rem;
  }
}

/* Box Score Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-y: auto;
}

.modal-content {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  margin: 3% auto;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  width: 95%;
  max-width: 1100px;
  border-radius: var(--border-radius);
  position: relative;
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
}

.close-modal {
  color: var(--color-text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: var(--color-text);
}

.box-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
}

.box-score-header .team-header {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  background: none !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
}

.box-score-header .team-header.home {
  justify-content: flex-end;
  text-align: right;
}

.box-score-header .team-header.away {
  justify-content: flex-start;
  text-align: left;
}

.team-details {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.team-details h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
}

.team-details h2 a,
.team-details h2 a:link,
.team-details h2 a:visited,
.team-details h2 a:active,
.team-details h2 a:focus {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.team-details h2 a:hover {
  color: var(--color-accent) !important;
}

.team-details,
.team-details * {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.team-record {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.team-header.home .team-record {
  text-align: right;
}

.team-header.away .team-record {
  text-align: left;
}

.team-logo-link {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.team-logo-link:hover {
  opacity: 0.8;
}

.team-logo-large {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.score-large {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-text);
  min-width: 50px;
  text-align: center;
}

.game-info-large {
  text-align: center;
  min-width: 100px;
}

.game-status-large {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.game-clock-large {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* Tabs */
.box-score-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--color-row-bg);
  padding: 0.375rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-family);
  border-radius: 0.5rem;
}

.tab-btn:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 2px 12px rgba(79, 143, 247, 0.35);
}

.tab-btn.active::after {
  display: none;
}

/* Stats Views */
.stats-container {
  /* Reset flex */
  display: block;
  overflow-x: hidden;
  /* Hide overflow from container, handle in wrapper */
}

.team-stats-view {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-stats-view.active {
  opacity: 1;
}

/* Full Width Table Styling */
.stats-table-wrapper {
  overflow-x: auto;
  margin: 0;
  padding-bottom: 10px;
  border-radius: var(--border-radius);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
}

.stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  white-space: nowrap;
}

.stats-table th,
.stats-table td {
  padding: 0.75rem 0.625rem;
  text-align: right;
  border-bottom: 1px solid var(--color-border);
}

.stats-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  background: var(--color-row-bg);
  z-index: 10;
}

.stats-table td {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

/* Sticky First Column */
.stats-table .sticky-col {
  position: sticky;
  left: 0;
  background: var(--color-card-bg);
  z-index: 20;
  text-align: left;
  border-right: 1px solid var(--color-border);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.stats-table th.sticky-col {
  background: var(--color-row-bg);
}

.stats-table th.sticky-col {
  z-index: 30;
}

.stats-table td.player-name {
  font-family: var(--font-family);
  color: var(--color-text);
  font-weight: 500;
  min-width: 160px;
  max-width: 200px;
}

.stats-table td.player-name .name-full {
  display: inline;
}

.stats-table td.player-name .name-short {
  display: none;
}

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

.stats-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Highlight Points */
.stats-table td.stat-pts {
  font-weight: 700;
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .modal-content {
    margin: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    padding: 1rem;
  }

  .box-score-header {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .team-header {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .team-header.home {
    justify-content: flex-end;
  }

  .team-header.away {
    justify-content: flex-start;
  }

  .team-details h2 {
    display: none;
  }

  .team-record {
    font-size: 0.625rem;
  }

  .team-logo-large {
    width: 36px;
    height: 36px;
  }

  .score-large {
    font-size: 1.5rem;
  }

  .game-info-large {
    min-width: auto;
  }

  .game-status-large {
    font-size: 0.75rem;
  }

  .game-clock-large {
    font-size: 0.625rem;
  }

  .box-score-tabs {
    gap: 0.25rem;
    padding: 0.25rem;
  }

  .tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    flex: 1;
    text-align: center;
  }

  .stats-table {
    font-size: 0.75rem;
  }

  .stats-table th,
  .stats-table td {
    padding: 0.5rem 0.375rem;
  }

  .stats-table td.player-name {
    min-width: 110px;
  }

  .stats-table td.player-name .name-full {
    display: none;
  }

  .stats-table td.player-name .name-short {
    display: inline;
  }

  .stats-table .sticky-col {
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.4);
  }
}

/* Team Link Styles */
.team-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.team-link:hover {
  color: var(--color-accent);
}

.team-details .team-link {
  color: var(--color-text);
  background: none;
  border: none;
  padding: 0;
}

.team-info .team-link {
  color: var(--color-text);
}

.team-name {
  display: inline;
}

/* Team Page Styles */
.back-button {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--color-accent);
}

/* Content Back Button (within page content) */
.content-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.content-back-button:hover {
  background: var(--color-row-bg);
  color: var(--color-accent);
}

.content-back-button i {
  font-size: 1rem;
}

.content-back-button span {
  display: none;
}

.team-header {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.team-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.team-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.team-logo-compact {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.team-info-compact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.team-name-compact {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.team-standing-compact {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.team-header-right {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.records-inline {
  display: flex;
  gap: 1.5rem;
}

.record-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.record-value-inline {
  font-size: 1.125rem;
  font-weight: 700;
}

.record-label-inline {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.next-game-compact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent-soft);
  border-radius: 0.5rem;
  border-left: 3px solid var(--color-accent);
}

.next-game-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
}

.next-game-opponent {
  font-size: 0.9rem;
  font-weight: 600;
}

.next-game-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.team-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.team-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 1rem;
  align-items: start;
}

.stats-column {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.gamelog-column {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  /* height handled by JS */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* Stats Categories - Ultra Compact */
.stats-categories-compact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-title-compact {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stat-item-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  background: var(--color-row-bg);
  border-radius: 0.25rem;
}

.stat-label-compact {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.stat-value-compact {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Roster Grid - Compact */
.roster-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.roster-player-card {
  background: var(--color-row-bg);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

.roster-player-card:hover {
  background: var(--color-card-hover);
}

.roster-player-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.roster-jersey {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 30px;
}

.roster-player-info {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

.roster-player-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-player-position {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.roster-player-stats {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.05);
}

.roster-stat {
  font-size: 0.7rem;
  color: var(--color-text);
  font-weight: 500;
}

.roster-stat-label {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Game Log Compact */
.game-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
  /* Space for scrollbar */
}

.game-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--color-row-bg);
  border-radius: 0.5rem;
  transition: background 0.2s ease;
  border-left: 3px solid transparent;
}

.game-log-item.completed.win {
  background: rgba(34, 197, 94, 0.08);
  border-left-color: var(--color-win);
}

.game-log-item.completed.loss {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: var(--color-live);
}

.game-log-item.completed:hover {
  background: var(--color-card-hover);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

.game-log-item.completed.win:hover {
  background: rgba(34, 197, 94, 0.18);
  border-left-width: 4px;
}

.game-log-item.completed.loss:hover {
  background: rgba(239, 68, 68, 0.18);
  border-left-width: 4px;
}

.game-log-item.upcoming {
  border-left-color: var(--color-accent);
}

.game-left {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.game-date-compact {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.game-opponent-compact {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.game-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-compact {
  display: none;
}

.score-compact {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.game-time-compact {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.no-data {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem;
  font-size: 1rem;
}

.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  text-align: center;
}

.error-message i {
  font-size: 3rem;
  color: var(--color-live);
}

.error-message p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

@media (max-width: 968px) {
  .team-layout {
    grid-template-columns: 1fr;
  }

  .gamelog-column {
    position: relative;
    top: 0;
    max-height: 500px;
  }

  .stats-categories {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .team-header {
    padding: 1rem;
  }

  .team-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .team-header-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .records-inline {
    width: 100%;
    justify-content: space-around;
  }

  .next-game-compact {
    width: 100%;
  }

  .team-logo-compact {
    width: 40px;
    height: 40px;
  }

  .team-name-compact {
    font-size: 1.25rem;
  }

  .team-standing-compact {
    font-size: 0.7rem;
  }

  .record-value-inline {
    font-size: 1rem;
  }

  .record-label-inline {
    font-size: 0.65rem;
  }

  .stats-column,
  .gamelog-column {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .gamelog-column {
    max-height: 400px;
  }

  .roster-grid-compact {
    grid-template-columns: 1fr;
  }

  .roster-player-card {
    padding: 0.5rem 0.625rem;
  }
}

/* Player Page Styles - Modern Tech-Minimal Design */
.player-header {
  margin-bottom: 1.5rem;
}

/* Hero Section */
.player-hero {
  position: relative;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.player-hero-bg {
  display: none;
}

.player-hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}

.player-hero-photo {
  flex-shrink: 0;
}

.player-hero-photo img {
  width: 140px;
  height: 140px;
  border-radius: 1rem;
  object-fit: cover;
  border: 2px solid var(--color-accent-strong);
  background: var(--color-row-bg);
}

.player-hero-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 1rem;
  background: var(--color-row-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-text-muted);
  border: 2px solid var(--color-border);
}

.player-hero-info {
  flex: 1;
  min-width: 0;
}

.player-hero-number {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.player-hero-name {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.player-hero-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.player-hero-position {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-row-bg);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
}

.player-hero-team {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Injury Tag */
.player-injury-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.player-injury-tag i {
  font-size: 0.625rem;
}

/* Hero Stats */
.player-hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.hero-stat {
  text-align: center;
  min-width: 70px;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Player Content Grid */
.player-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.player-info-card,
.player-stats-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.25rem;
}

.player-info-card {
  display: flex;
  flex-direction: column;
}

.player-stats-card {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.card-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  border-radius: 0.5rem;
  color: var(--color-accent);
  font-size: 0.75rem;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* Bio Grid */
.bio-grid {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.bio-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bio-row:last-child {
  border-bottom: none;
}

.bio-row-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.bio-row-label i {
  width: 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-accent);
  opacity: 0.7;
}

.bio-row-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Last Game Loading */
.last-game-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.mini-loader {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Last Game Stats - Full Width Layout */
#last-game-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 120px;
}

.last-game-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.last-game-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: center;
  gap: 0;
  width: 100%;
}

.last-game-stat {
  text-align: center;
  padding: 0.5rem;
}

.stat-value-lg {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label-sm {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  display: block;
}

.last-game-details {
  text-align: right;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 1px solid var(--color-border);
  min-width: 120px;
}

.last-game-opp {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.last-game-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.last-game-result {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.last-game-result.win {
  color: var(--color-win);
}

.last-game-result.loss {
  color: var(--color-live);
}

/* Live Game Styles */
.last-game-stats.live {
  position: relative;
}

.last-game-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-live);
  margin-bottom: 0.375rem;
}

.last-game-live-badge .live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-live);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.last-game-score-live {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0.25rem 0;
}

.last-game-status {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.no-data-text {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem 0;
  width: 100%;
}

.no-stats-note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Modern Stats Table */
.stats-table-container {
  overflow-x: auto;
  margin: -0.25rem;
  padding: 0.25rem;
}

.modern-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.modern-stats-table th {
  padding: 0.625rem 0.75rem;
  text-align: center;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.modern-stats-table th:first-child {
  text-align: left;
}

.modern-stats-table td {
  padding: 0.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.modern-stats-table td.row-label {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modern-stats-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.modern-stats-table tbody tr:last-child {
  border-bottom: none;
}

.no-stats-message {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem;
  font-size: 0.875rem;
}

.player-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  align-items: start;
}

.player-bio-section,
.player-stats-section {
  background: var(--color-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.player-stats-section {
  overflow: hidden;
}

/* Key Stats Cards - PTS/REB/AST */
.key-stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.key-stat-card {
  background: var(--color-row-bg);
  border: 1px solid var(--color-accent-strong);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.key-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 143, 247, 0.25);
}

.key-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.1;
}

.key-stat-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.key-stat-type {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.player-stats-table-wrapper {
  overflow-y: auto;
  flex: 1;
}

.recent-games-list {
  overflow-y: auto;
  flex: 1;
}

.player-bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.bio-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--color-row-bg);
  border-radius: 0.5rem;
}

.bio-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bio-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.player-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stats-category-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Player Stats Table */
.player-stats-table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  background: var(--color-row-bg);
  border: 1px solid var(--color-border);
}

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

.player-stats-table th {
  padding: 0.75rem 0.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
}

.player-stats-table th:first-child {
  text-align: left;
  padding-left: 1rem;
}

.player-stats-table td {
  padding: 0.875rem 0.5rem;
  text-align: center;
  color: var(--color-text);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}

.player-stats-table td.stat-label-col {
  text-align: left;
  font-weight: 600;
  padding-left: 1rem;
  color: var(--color-text);
}

.player-stats-table tbody tr:last-child td {
  border-bottom: none;
}

.player-stats-table tbody tr:hover {
  background: var(--color-accent-soft);
}

/* Recent Games */
.recent-games-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recent-game-item {
  background: var(--color-row-bg);
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  transition: background 0.2s ease;
}

.recent-game-item:hover {
  background: var(--color-card-hover);
}

.recent-game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.recent-game-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  min-width: 60px;
}

.recent-game-opponent {
  flex: 1;
  font-weight: 600;
  color: var(--color-text);
}

.recent-game-result {
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.recent-game-result.win {
  color: var(--color-win);
  background: rgba(34, 197, 94, 0.1);
}

.recent-game-result.loss {
  color: var(--color-live);
  background: rgba(239, 68, 68, 0.1);
}

.recent-game-stats {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-left: 60px;
}

.no-stats-game {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding-left: 60px;
}

/* Improved Team Header - Prominent Next Game */
.team-header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
}

.team-header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.next-game-prominent {
  background: var(--color-row-bg);
  border: 2px solid var(--color-accent);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 300px;
}

.next-game-label-prominent {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.next-game-matchup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.next-game-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.next-game-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.next-game-opponent-prominent {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
}

.next-game-datetime {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.next-game-datetime i {
  color: var(--color-accent);
}

.no-upcoming-game {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

/* Roster Player Card Link Styles */
.roster-player-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.roster-player-card:hover .roster-player-name {
  color: var(--color-accent);
}

/* Box Score Player Name Link */
.player-name-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.player-name-link:hover {
  color: var(--color-accent);
}

/* Mobile styles for player page */
@media (max-width: 768px) {
  .player-hero-content {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .player-hero-photo img,
  .player-hero-placeholder {
    width: 100px;
    height: 100px;
  }

  .player-hero-name {
    font-size: 1.5rem;
  }

  .player-hero-details {
    justify-content: center;
  }

  .player-hero-stats {
    gap: 1rem;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-stat {
    min-width: 55px;
  }

  .player-page-grid {
    grid-template-columns: 1fr;
  }

  .player-info-card,
  .player-stats-card {
    padding: 1rem;
  }

  .modern-stats-table th,
  .modern-stats-table td {
    padding: 0.5rem 0.375rem;
    font-size: 0.75rem;
  }

  .modern-stats-table th {
    font-size: 0.625rem;
  }

  .team-header-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-header-center {
    order: -1;
  }

  .next-game-prominent {
    min-width: 0;
    width: 100%;
  }
}

/* Team Page - Clean Redesign */
.team-page-header {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.team-page-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.team-page-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.team-page-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.team-page-record {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.record-value {
  font-weight: 600;
  color: var(--color-text);
}

.record-separator {
  opacity: 0.5;
}

.record-standing {
  color: var(--color-text-muted);
}

.team-page-grid {
  display: grid;
  grid-template-columns: auto 240px;
  gap: 1.5rem;
  justify-content: start;
}

.team-section {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  padding: 1rem;
  width: fit-content;
  min-width: 280px;
}

.team-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Game Log List */
.game-log-list {
  display: flex;
  flex-direction: column;
}

.game-log-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.875rem;
}

.game-log-item:last-child {
  border-bottom: none;
}

.game-log-item:hover {
  background: var(--color-row-bg);
  margin: 0 -1rem;
  padding: 0.5rem 1rem;
}

.game-log-date {
  width: 55px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.game-log-matchup {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.game-log-vsat {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  width: 16px;
}

.game-log-opponent {
  font-weight: 600;
  color: var(--color-text);
}

.game-log-result {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
}

.game-log-wl {
  font-weight: 700;
  width: 16px;
}

.game-log-result.win .game-log-wl {
  color: var(--color-win);
}

.game-log-result.loss .game-log-wl {
  color: var(--color-live);
}

.game-log-score {
  color: var(--color-text-muted);
}

/* Roster List */
.roster-list {
  display: flex;
  flex-direction: column;
}

.roster-item {
  display: flex;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.15s ease;
  font-size: 0.875rem;
}

.roster-item:last-child {
  border-bottom: none;
}

.roster-item:hover {
  color: var(--color-accent);
}

.roster-jersey {
  width: 35px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.roster-name {
  flex: 1;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.roster-name:hover {
  color: var(--color-accent);
}

.roster-pos {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  width: 25px;
  text-align: right;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .team-page-header {
    padding: 1rem;
    gap: 1rem;
  }

  .team-page-logo {
    width: 60px;
    height: 60px;
  }

  .team-page-name {
    font-size: 1.25rem;
  }

  .team-page-grid {
    grid-template-columns: 1fr;
  }

  .team-section {
    padding: 1rem;
  }
}

/* Player Page Redesign Styles */
.player-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
}

.player-bio-section {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  height: fit-content;
}

.player-stats-section {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

.player-bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.bio-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.bio-item:last-child {
  border-bottom: none;
}

.bio-label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.bio-value {
  font-weight: 600;
  color: var(--color-text);
}

/* Recent Games List */
.recent-games-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.recent-game-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--color-row-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.recent-game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.recent-game-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  width: 60px;
}

.recent-game-opponent {
  font-weight: 600;
  color: var(--color-text);
}

.recent-game-result {
  font-weight: 700;
  font-size: 0.875rem;
}

.recent-game-result.win {
  color: var(--color-win);
}

.recent-game-result.loss {
  color: var(--color-live);
}

.recent-game-score {
  font-family: monospace;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Mobile Responsiveness for Player Page */
@media (max-width: 768px) {
  .player-layout {
    grid-template-columns: 1fr;
  }
}
