/* CSS Variables - Color Palette */
:root {
  /* Primary Colors - More Vibrant */
  --dark-blue: #0a0f1f;
  --medium-blue: #0e479d;
  --light-blue: #1a6df1;
  --trim-blue: #0c2e8c;

  /* Accent Colors - More Vibrant */
  --yellow: #fbbf24;
  --light-yellow: #fde047;
  --gold: #f59e0b;
  --red: #dc2626;

  /* Neutral Colors */
  --white: #ffffff;
  --light-gray: #f8fafc;
  --gray: #e2e8f0;
  --dark-gray: #64748b;
  --text-dark: #374151;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--medium-blue) 0%, var(--medium-blue) 100%);
  --gradient-nav: linear-gradient(90deg, var(--medium-blue) 0%, var(--dark-blue) 50%, var(--light-blue) 100%);
  --gradient-accent: linear-gradient(135deg, var(--yellow), var(--light-yellow));
  --gradient-hover: linear-gradient(135deg, var(--light-yellow), var(--yellow));

  /* Shadows */
  --shadow-primary: rgba(10, 15, 31, 0.3);
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.15);
}

/* Base styles */
body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0 auto;
  padding: 0;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--gray) 100%);
  max-width: 1280px;
  line-height: 1.6;
}

/* Page Hero Section (Shared between Player and League pages) */
.page-hero {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 40px 30px;
  margin: -30px -30px 30px -30px;
  border-radius: 16px 16px 0 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.page-hero-content {
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  z-index: 1;
}

.page-hero-image {
  flex-shrink: 0;
}

.page-hero-image img {
  border: 4px solid var(--yellow);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

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

.page-hero-name {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-hero-details {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.page-hero-number {
  font-size: 24px;
  font-weight: 600;
  color: var(--yellow);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-hero-position {
  font-size: 18px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.page-hero-description {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 600px;
}

/* Player-specific hero styles */
.player-hero .page-hero-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
}

/* League-specific hero styles */
.league-hero .page-hero-image img {
  width: 600px;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

.league-hero .page-hero-description {
  max-width: 500px;
}

/* Content Cards Section (Shared between Player and League pages) */
.content-section {
  margin-bottom: 40px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.content-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray);
}

.content-card h3 {
  color: var(--dark-blue);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 8px;
}

.content-card .statsheet {
  margin: 0;
  box-shadow: none;
  border: none;
}

.content-card .statsheet th,
.content-card .statsheet td {
  padding: 8px 12px;
  font-size: 14px;
}

/* Mini Hero Section for League Cards */
.mini-hero {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 20px;
  margin: -25px -25px 20px -25px;
  border-radius: 16px 16px 0 0;
  position: relative;
  overflow: hidden;
}

.mini-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.mini-hero-content {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.mini-hero-image {
  flex-shrink: 0;
}

.mini-hero-image img {
  width: 80px;
  height: 60px;
  border: 2px solid var(--yellow);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  border-radius: 8px;
}

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

.mini-hero-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: var(--white);
  border: none;
  padding: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mini-hero-stats {
  display: flex;
  gap: 15px;
}

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

.mini-stat-number {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mini-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 2px;
}

/* Media Grid Section (Shared between Player and League pages) */
.media-section {
  margin-bottom: 40px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.media-grid .media-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.media-grid .media-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.media-grid .media-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-grid .media-item:hover img {
  transform: scale(1.05);
}

.media-grid .media-item .caption {
  padding: 12px;
  background: white;
  color: var(--text-dark);
  font-weight: 500;
  text-align: center;
}

/* Mobile adjustments for page hero */
@media screen and (max-width: 768px) {
  .page-hero {
    padding: 30px 20px;
    margin: -30px -30px 20px -30px;
  }

  .page-hero-content {
    flex-direction: column;
    /* text-align: center; */
    gap: 20px;
  }

  .page-hero-image img {
    width: 150px;
    height: 150px;
  }

  .page-hero-name {
    font-size: 28px;
  }

  .page-hero-details {
    justify-content: center;
    gap: 15px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  /* Player-specific mobile adjustments */
  .player-hero .page-hero-image img {
    width: 150px;
    height: 150px;
  }

  /* League-specific mobile adjustments */
  .league-hero .page-hero-image img {
    width: 250px;
    height: 150px;
  }
}

/* All Players Page Hero Section */
.players-hero {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 40px 30px;
  margin: -30px -30px 30px -30px;
  border-radius: 16px 16px 0 0;
  position: relative;
  overflow: hidden;
}

.players-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.players-hero-content {
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.players-hero-image {
  flex-shrink: 0;
}

.players-hero-image img {
  width: 300px;
  height: 200px;
  border-radius: 12px;
  border: 3px solid var(--yellow);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

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

.players-hero-info h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 15px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.players-hero-info p {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 25px;
  max-width: 500px;
}

.players-stats {
  display: flex;
  gap: 30px;
}

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

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 5px;
}

/* Players Table Section */
.players-table-section {
  margin-bottom: 40px;
}

.players-table-section .roster {
  margin-top: 0;
}

/* Mobile adjustments for players page */
@media screen and (max-width: 768px) {
  .players-hero {
    padding: 30px 20px;
    margin: -30px -30px 20px -30px;
  }

  .players-hero-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .players-hero-image img {
    width: 250px;
    height: 150px;
  }

  .players-hero-info h1 {
    font-size: 28px;
  }

  .players-hero-info p {
    font-size: 16px;
  }

  .players-stats {
    justify-content: center;
    gap: 20px;
  }

  .stat-number {
    font-size: 28px;
  }
}

/* League-specific styles that extend the shared page-hero */
.league-hero {
  /* Inherits from .page-hero */
}

.league-hero-content {
  /* Inherits from .page-hero-content */
}

.league-hero-image {
  /* Inherits from .page-hero-image */
}

.league-hero-info {
  /* Inherits from .page-hero-info */
}

.league-name {
  /* Inherits from .page-hero-name */
}

.league-stats {
  /* Inherits from .page-hero-details */
  margin-bottom: 25px;
}

.league-description {
  /* Inherits from .page-hero-description */
}

/* League Info Section */
.league-info-section {
  margin-bottom: 40px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.info-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray);
}

.info-card h3 {
  color: var(--dark-blue);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 8px;
}

.info-card .statsheet {
  margin: 0;
  box-shadow: none;
  border: none;
}

.info-card .statsheet th,
.info-card .statsheet td {
  padding: 8px 12px;
  font-size: 14px;
}

.schedule-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schedule-links li {
  margin-bottom: 12px;
}

.schedule-links a {
  display: block;
  color: var(--dark-blue);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--light-gray);
  border: 1px solid var(--gray);
  transition: all 0.3s ease;
  font-weight: 500;
}

.schedule-links a:hover {
  background: var(--gradient-accent);
  color: var(--dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
  border-color: var(--yellow);
}

/* League Sections */
.roster-section,
.games-section,
.previous-seasons-section,
.videos-section {
  margin-bottom: 40px;
}

.videos-section h2 {
  margin-bottom: 20px;
}

.header {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 25px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--shadow-primary);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.header-logo {
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  backdrop-filter: blur(10px);
}

.header-logo img {
  height: 50px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header .site-title {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.header .site-title {
  margin: 0;
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  flex: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
}

.header .site-title {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.header .site-title:hover {
  color: var(--yellow);
  transform: translateY(-1px);
}

.header .site-title img {
  height: 50px;
  vertical-align: middle;
  margin-right: 15px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Navigation styles */
nav#nav {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-nav);
  box-shadow: 0 2px 10px var(--shadow-primary);
  position: relative;
}

nav#nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
}

nav#nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

nav#nav ul li {
  margin: 0 5px;
}

nav#nav ul li a {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 18px 25px;
  display: inline-block;
  border-radius: 8px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

nav#nav ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

nav#nav ul li a:hover::before {
  left: 100%;
}

nav#nav ul li a.active {
  color: var(--dark-blue);
  background: var(--gradient-accent);
  box-shadow: 0 4px 12px var(--shadow-medium);
  transform: translateY(-2px);
  font-weight: 600;
  outline: 2px solid var(--dark-blue);
}

nav#nav ul li a:hover {
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Search input */
input[type="search"] {
  padding: 12px 16px;
  margin: 20px 0;
  width: 30%;
  box-sizing: border-box;
  border: 2px solid var(--gray);
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

input[type="search"]:focus {
  outline: none;
  border-color: var(--dark-blue);
  box-shadow: 0 4px 16px var(--shadow-primary);
  transform: translateY(-1px);
}

/* Search drop-down */
.search-dropdown {
  position: relative;
  display: inline-block;
}

.search-dropdown-content {
  display: none;
  position: absolute;
  background: white;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray);
}

input[type="search"]:focus + .search-dropdown .search-dropdown-content {
  display: block;
}

.search-dropdown-content a {
  color: var(--text-dark);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--gray);
}

.search-dropdown-content a:hover {
  background: var(--gradient-primary);
  color: var(--white);
  transform: translateX(4px);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .header {
    padding: 20px 15px;
    flex-direction: column;
    text-align: center;
  }

  .header-logo {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .header .site-title {
    font-size: 24px;
    text-align: center;
  }

  nav#nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
    padding: 8px;
    overflow-x: auto;
    width: 100%;
  }

  nav#nav ul li {
    margin: 0;
    flex: 0 0 auto;
  }

  nav#nav ul li a {
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 0;
  }

  input[type="search"] {
    width: 90%;
    margin: 15px auto;
  }

  .sidebar .photo {
    flex: 0 0 auto;
    width: 140px;
    min-width: 140px;
  }

  .sidebar .photo img {
    width: 100%;
    height: 105px;
    object-fit: cover;
  }

  .sidebar .photo .caption {
    font-size: 11px;
    margin-top: 8px;
    line-height: 1.3;
  }
}

/* Layout styles */
.container {
  background: transparent;
  gap: 20px;
  padding: 20px;
}

.sidebar {
  background: white;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray);
  margin-bottom: 20px;
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  align-items: center;
}

.sidebar .photo {
  flex: 1;
  margin: 0;
  text-align: center;
  padding: 10px;
}

.sidebar .photo img {
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.sidebar .photo:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar .photo .caption {
  font-size: 11px;
  margin-top: 8px;
  line-height: 1.2;
  color: var(--dark-gray);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.sidebar .photo .caption .large-icon {
  font-size: 24px;
  margin-right: 8px;
}

.sidebar h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--dark-blue);
  font-size: 20px;
  font-weight: 600;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 8px;
}

.sidebar #leagueimage {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  border: 1px solid var(--gray);
}

.sidebar #leagueimage:hover,
.sidebar #leagueimage:focus {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.sidebar #leagueimagecaption {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--dark-gray);
  font-weight: 500;
}

.caption {
  font-size: 0.85em;
  text-overflow: ellipsis;
  color: var(--dark-gray);
}

#photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: stretch;
  gap: 15px;
}

.photo-item {
  flex: 1 1 30%;
  margin: 0;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-item abbr {
  display: block;
  text-align: center;
  padding: 12px;
  background: white;
  color: var(--text-dark);
  font-weight: 500;
}

.sidebar ul#links {
  list-style-type: none;
  padding: 0;
}

.sidebar ul#links li {
  margin-bottom: 12px;
}

.sidebar ul#links li a {
  color: var(--dark-blue);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
  display: block;
  font-weight: 500;
}

.sidebar ul#links li a:hover {
  color: var(--medium-blue);
  background: var(--gradient-accent);
  color: var(--dark-blue);
  transform: translateX(4px);
}

.sidebar-section {
  margin-top: 25px;
  margin-bottom: 25px;
}

main {
  flex: 1;
  background: var(--white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray);
}

h2 {
  color: var(--dark-blue);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 8px;
}

.splash {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

table tr th,
table tr td {
  white-space: nowrap;
}

table.seasons {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

table.seasons th,
table.seasons td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray);
}

table.seasons th {
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
}

table.seasons tr:hover {
  background: var(--gradient-accent);
  color: var(--dark-blue);
}

table.roster a.playername {
  color: var(--dark-blue);
  font-weight: 600;
}

a {
  color: var(--dark-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--medium-blue);
  text-decoration: none;
}

a.current {
  color: var(--dark-blue) !important;
  font-weight: 600;
  background: var(--gradient-accent);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Image fit */
.sidebar img {
  max-width: 100%;
  height: auto;
  display: block;
}

.extra {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments */
@media screen and (max-width: 1280px) {
  .container {
    flex-direction: column-reverse;
    padding: 15px;
  }

  .sidebar,
  main {
    max-width: 100%;
    flex-basis: auto;
    margin-left: 0;
  }

  /* .extra {
    display: none;
  } */

  .champion {
    font-size: 18px;
  }

  .videos iframe {
    width: 100%;
    height: 200px;
  }
}

@media screen and (max-width: 480px) {
  .sidebar {
    padding: 8px 10px;
    gap: 12px;
  }

  .sidebar .photo {
    flex: 0 0 auto;
    width: 120px;
    min-width: 120px;
  }

  .sidebar .photo img {
    width: 100%;
    height: 90px;
    object-fit: cover;
  }

  .sidebar .photo .caption {
    font-size: 10px;
    margin-top: 6px;
    line-height: 1.3;
  }
}

/* Error style */
p.error {
  color: var(--red);
  border: 2px solid var(--red);
  padding: 15px;
  font-size: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--light-gray), var(--gray));
}

.details {
  font-size: 14px;
  position: relative;
  bottom: 2px;
  color: var(--dark-gray);
}

.sidebar .photo {
  display: block;
  text-decoration: none;
  color: var(--text-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sidebar .photo:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sidebar img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sidebar img:hover,
.sidebar img:focus {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.caption {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--dark-gray);
  font-weight: 500;
}

.videos {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.videos iframe {
  width: 70%;
  height: 400px;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.latest-games {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.latest-games .game {
  flex: 1;
  margin: 0;
  text-align: center;
  border: 2px solid var(--gray);
  padding: 20px;
  text-decoration: none;
  color: var(--dark-blue);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 15px var(--shadow-light);
  transition: all 0.3s ease;
}

.latest-games .game:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-medium);
  border-color: var(--yellow);
}

.latest-games .game .league {
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 8px;
  display: block;
}

.latest-games div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  flex: 1;
}

.latest-games .game .notable {
  white-space: normal;
  font-size: 0.9em;
  color: var(--dark-gray);
  padding: 8px 0;
  text-align: left;
}
.notable abbr {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

/* Roster Table Styles */
table.roster {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

table.roster th,
table.roster td {
  text-align: left;
  padding: 12px 16px;
  border: none;
}

table.roster th {
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
}

table.roster tr:nth-child(odd) {
  background: var(--light-gray);
}

table.roster tr:nth-child(even) {
  background: white;
}

table.roster tr.inactive,
table.roster tr.inactive a {
  color: var(--dark-gray);
  opacity: 0.7;
}

table.roster img {
  border-radius: 50%;
  width: auto;
  height: 50px;
  border: 3px solid var(--yellow);
  box-shadow: 0 2px 8px var(--shadow-light);
}

table.roster tr:hover {
  background: var(--gradient-accent);
  color: var(--dark-blue);
  transform: scale(1.01);
}

/* table.roster tr td.notable {
  white-space: normal;
} */

table.roster a {
  color: var(--dark-blue);
  text-decoration: none;
  font-weight: 500;
}

table.roster a:hover {
  color: var(--medium-blue);
  text-decoration: none;
}

/* Filter links container */
#yearSeasonSwitcher,
#levelSwitcher {
  margin-bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#yearSeasonSwitcher a,
#levelSwitcher a {
  text-decoration: none;
  color: var(--dark-blue);
  background: var(--white);
  border: 2px solid var(--gray);
  padding: 8px 16px;
  border-radius: 8px;
  margin: 0;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 8px var(--shadow-light);
}

#yearSeasonSwitcher a:hover,
#levelSwitcher a:hover {
  color: var(--dark-blue);
  background: var(--gradient-accent);
  border-color: var(--yellow);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

#yearSeasonSwitcher a[style*="font-weight: bold"],
#levelSwitcher a[style*="font-weight: bold"] {
  color: var(--white);
  background: var(--gradient-primary);
  border-color: var(--dark-blue);
  box-shadow: 0 4px 12px var(--shadow-primary);
}

/* Navigation links */
.prevnext {
  text-align: center;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.prevnext a {
  text-decoration: none;
  color: var(--white);
  background: var(--gradient-primary);
  padding: 12px 20px;
  border-radius: 8px;
  margin: 0;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-primary);
  font-weight: 500;
}

.prevnext a:hover {
  background: var(--gradient-hover);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-primary);
}

.statsheet {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  margin: 50px auto;
  background: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray);
}

.statsheet th {
  width: 30%;
}

.statsheet th,
.statsheet td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray);
}

.statsheet th {
  background: var(--gradient-primary);
  color: var(--white);
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
}

.statsheet td {
  color: var(--text-dark);
  font-family: "Inter", Arial, sans-serif;
  font-weight: 500;
}

.statsheet tr:last-child th,
.statsheet tr:last-child td {
  border-bottom: none;
}

.statsheet tr:hover {
  background: var(--gradient-accent);
  color: var(--dark-blue);
}

.champion {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-blue);
  text-align: center;
  margin: 20px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 12px;
  color: #fff;
  background: #123b69;
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sort-button {
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sort-button:hover { text-decoration: underline; }
.sort-button::after { content: " ↕"; }
[aria-sort="ascending"] .sort-button::after { content: " ↑"; }
[aria-sort="descending"] .sort-button::after { content: " ↓"; }

.sort-button:focus-visible, .table-container:focus-visible, .game-note summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

td.notable {
  min-width: 12rem;
  max-width: 24rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.game-note summary { position: relative; cursor: pointer; }

/* Table horizontal scroll */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table-container table {
  min-width: 100%;
  white-space: nowrap;
}

/* Ensure all tables can scroll horizontally when needed */
table.roster,
table.seasons,
table.statsheet {
  min-width: 100%;
}

/* Add scrollbar styling for webkit browsers */
.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--gray);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-hover);
}

/* Homepage refresh: readable links, championship photo, compact leaders. */
main article a, .leaderboard-season a, .points-table a, .seasons td a, footer a {
  color: #1354a6;
  text-decoration: underline;
  text-underline-offset: 3px;
}
main article a:hover, .points-table a:hover, .leaderboard-season a:hover {
  color: #0a2e63;
}
.page-hero a {
  color: #fff1a8;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.page-hero a:hover { color: white; }
a:focus-visible { outline: 3px solid #fbbf24; outline-offset: 4px; }
.home-hero .championship-photo {
  width: 56%;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--yellow);
}
.home-hero .championship-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  box-shadow: none;
}
.championship-photo figcaption {
  background: rgba(5, 18, 42, 0.72);
  color: white;
  padding: 14px 20px;
  font-size: clamp(13px, 1.5vw, 18px);
  line-height: 1.45;
  text-align: center;
}
.home-hero .page-hero-name { font-size: clamp(26px, 4vw, 38px); text-wrap: balance; }
.home-hero .page-hero-details { flex-wrap: wrap; justify-content: flex-start; }
.home-hero .page-hero-description { max-width: none; opacity: 1; }
.content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-card { min-width: 0; }
.latest-games { flex-wrap: wrap; }
.latest-games .game { min-width: 0; flex-basis: 150px; }
.latest-games .game div { max-width: none; white-space: normal; overflow: visible; }
.latest-games .matchup-record { font-size: 14px; color: #334155; line-height: 1.5; margin-bottom: 0; }
.points-leaderboards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 30px 0; }
.points-card { min-width: 0; padding: 20px; background: #f8fafc; border: 1px solid #d5dfed; border-radius: 14px; }
.points-card h2 { margin-top: 0; margin-bottom: 8px; }
.leaderboard-season { margin-top: 0; font-size: 14px; }
.points-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.points-table caption { text-align: left; color: #475569; font-size: 12px; padding-bottom: 12px; }
.points-table th, .points-table td { padding: 10px 5px; text-align: right; white-space: normal; border-bottom: 1px solid #d5dfed; }
.points-table th:nth-child(2), .points-table tbody th { text-align: left; }
.points-table thead th { font-size: 12px; color: #475569; }
.points-table th { cursor: default; }
.points-table td:last-child { color: #0e479d; font-size: 17px; }
@media (max-width: 768px) {
  .content-grid, .points-leaderboards { grid-template-columns: minmax(0, 1fr); }
  .points-card { padding: 16px; }
  .home-hero .page-hero-content { align-items: stretch; }
  .home-hero .championship-photo { width: auto; }
  .home-hero .championship-photo figcaption { padding: 8px 10px; font-size: 12px; }
  .home-hero .page-hero-details { gap: 12px; }
  .content-card { padding: 16px; }
  .latest-games .game { flex-basis: 100%; padding: 14px; }
}
