/* ----------------------------------------------------
   DESIGN SYSTEM & CONSTANTES (VANILLA CSS)
   ---------------------------------------------------- */

:root {
  /* Fonts */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-title: 'Outfit', var(--font-main);

  /* Thème sombre global */
  --bg-app: #090d16;
  --bg-sidebar: rgba(13, 20, 35, 0.85);
  --bg-card: rgba(22, 32, 54, 0.65);
  --bg-card-hover: rgba(30, 45, 75, 0.8);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-bright: rgba(255, 255, 255, 0.12);
  
  /* Textes */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #627288;
  
  /* Statuts de matchs & Positions */
  --color-win: #10b981;
  --color-draw: #64748b;
  --color-loss: #ef4444;
  
  --color-cl: #2563eb;
  --color-el: #ea580c;
  --color-ecl: #16a34a;
  --color-relegation: #dc2626;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Thème Premier League */
body.league-pl {
  --league-accent: #e90052;
  --league-accent-rgb: 233, 0, 82;
  --league-bg-gradient: radial-gradient(circle at 80% 20%, rgba(61, 25, 90, 0.25) 0%, rgba(9, 13, 22, 0) 60%);
  --sidebar-accent: #3d195a;
}



/* Thème La Liga */
body.league-pd {
  --league-accent: #ffd900;
  --league-accent-rgb: 255, 217, 0;
  --league-bg-gradient: radial-gradient(circle at 80% 20%, rgba(238, 28, 37, 0.15) 0%, rgba(9, 13, 22, 0) 60%);
  --sidebar-accent: #ee1c25;
}

/* Thème Serie A */
body.league-sa {
  --league-accent: #00e5ff;
  --league-accent-rgb: 0, 229, 255;
  --league-bg-gradient: radial-gradient(circle at 80% 20%, rgba(0, 47, 108, 0.3) 0%, rgba(9, 13, 22, 0) 60%);
  --sidebar-accent: #002f6c;
}

/* Thème Ligue 1 */
body.league-fl1 {
  --league-accent: #daff1a;
  --league-accent-rgb: 218, 255, 26;
  --league-bg-gradient: radial-gradient(circle at 80% 20%, rgba(15, 82, 186, 0.3) 0%, rgba(9, 13, 22, 0) 60%);
  --sidebar-accent: #0f52ba;
}

/* Thème Bundesliga */
body.league-bl1 {
  --league-accent: #df0000;
  --league-accent-rgb: 223, 0, 0;
  --league-bg-gradient: radial-gradient(circle at 80% 20%, rgba(223, 0, 0, 0.15) 0%, rgba(9, 13, 22, 0) 60%);
  --sidebar-accent: #df0000;
}

/* ----------------------------------------------------
   BASE STYLES
   ---------------------------------------------------- */

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  background-image: var(--league-bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar stylisée */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ----------------------------------------------------
   LAYOUT: SIDEBAR & MAIN CONTENT
   ---------------------------------------------------- */

.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  padding-left: 0.5rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--league-accent);
  transition: var(--transition-normal);
  filter: drop-shadow(0 0 8px rgba(var(--league-accent-rgb), 0.5));
}

.brand-name {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-name span {
  color: var(--league-accent);
  transition: var(--transition-normal);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.nav-league {
  background: transparent;
  border: 1px solid transparent;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-title);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1rem;
  text-align: left;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.nav-league::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(var(--league-accent-rgb), 0.08) 0%, rgba(var(--league-accent-rgb), 0) 100%);
  opacity: 0;
  transition: var(--transition-normal);
}

.nav-league:hover {
  color: var(--text-primary);
  border-color: var(--border-glass-bright);
  background-color: rgba(255, 255, 255, 0.02);
}

.nav-league.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(var(--league-accent-rgb), 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-league.active::before {
  opacity: 1;
}

.league-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--league-accent);
  transform: scaleY(0);
  transition: var(--transition-normal);
}

.nav-league.active .league-indicator {
  transform: scaleY(1);
}

.league-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  grid-row: span 2;
  filter: grayscale(40%) contrast(90%);
  transition: var(--transition-normal);
  background-color: #ffffff;
  border-radius: 6px;
  padding: 4px;
}

.nav-league:hover .league-logo-img,
.nav-league.active .league-logo-img {
  filter: grayscale(0%) contrast(100%) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.league-name {
  font-size: 1.05rem;
  font-weight: 600;
  grid-column: 2;
}

.league-country {
  font-size: 0.8rem;
  color: var(--text-muted);
  grid-column: 2;
}

.sidebar-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

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

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ----------------------------------------------------
   LEAGUE HEADER
   ---------------------------------------------------- */

.league-header {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.league-header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(var(--league-accent-rgb), 0.08) 0%, rgba(var(--league-accent-rgb), 0) 70%);
  pointer-events: none;
}

.league-info {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.league-badge-container {
  width: 80px;
  height: 80px;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.league-emblem-large {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.league-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.league-country-tag {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--league-accent);
  transition: var(--transition-normal);
}

#league-title {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}

.season-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.header-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 1rem 1.5rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 130px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

/* ----------------------------------------------------
   TABS & FILTERS BAR
   ---------------------------------------------------- */

.tabs-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1rem;
  gap: 2rem;
}

.tabs-list {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-glass-bright);
}

.actions-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Recherche */
.search-wrapper {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

#search-input:focus {
  border-color: rgba(var(--league-accent-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--league-accent-rgb), 0.15);
}

/* Sélecteur de Journée */
.matchday-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.2s ease;
}

.matchday-selector-wrapper label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.styled-select {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: var(--transition-fast);
}

.styled-select:focus {
  border-color: rgba(var(--league-accent-rgb), 0.5);
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------
   DISPLAY PANELS (TAB PANELS)
   ---------------------------------------------------- */

.display-panel {
  position: relative;
  min-height: 400px;
}

.tab-panel {
  display: none;
  animation: tabFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-panel.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------
   TABLES
   ---------------------------------------------------- */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
}

.data-table th {
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1.2rem 1.25rem;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

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

/* Alignements & Largeurs de colonnes */
.text-center { text-align: center; }
.text-right { text-align: right; }

.col-pos { width: 50px; font-weight: 700; text-align: center; }
.col-team { font-weight: 600; }
.col-stat { width: 60px; color: var(--text-secondary); }
.col-pts { width: 70px; font-weight: 700; color: var(--text-primary); font-size: 1.05rem; }
.col-form { width: 180px; }

/* Styles d'equipes dans la table */
.team-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-crest {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.team-shortname {
  color: var(--text-primary);
}

.team-tla {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Lignes indicatrices de qualification */
.row-cl { border-left: 4px solid var(--color-cl); }
.row-el { border-left: 4px solid var(--color-el); }
.row-ecl { border-left: 4px solid var(--color-ecl); }
.row-relegation { border-left: 4px solid var(--color-relegation); }

/* Forme Recente */
.form-container {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.form-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

.form-dot.W { background-color: var(--color-win); }
.form-dot.D { background-color: var(--color-draw); }
.form-dot.L { background-color: var(--color-loss); }

/* Legende */
.legend-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding: 0 0.5rem;
}

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

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-color.cl { background-color: var(--color-cl); }
.legend-color.el { background-color: var(--color-el); }
.legend-color.ecl { background-color: var(--color-ecl); }
.legend-color.relegation { background-color: var(--color-relegation); }

/* ----------------------------------------------------
   MATCHS (FIXTURES)
   ---------------------------------------------------- */

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  perspective: 1000px;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color var(--transition-fast), background var(--transition-fast);
}

.match-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-glass-bright);
  background: var(--bg-card-hover);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
}

.match-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}

.match-status-badge.live {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  animation: flash 1.5s infinite;
  display: flex;
  align-items: center;
  gap: 4px;
}

.match-status-badge.live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
}

.match-status-badge.finished {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

@keyframes flash {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.match-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.match-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.match-team-crest {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.match-team-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.match-score {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-secondary);
  width: 30px;
  text-align: right;
  transition: color var(--transition-fast);
}

.match-card:hover .match-score {
  color: var(--text-primary);
}

/* Mettre en valeur l'equipe victorieuse */
.winner .match-team-name {
  color: #fff;
  font-weight: 700;
}

.winner .match-score {
  color: var(--league-accent) !important;
  text-shadow: 0 0 8px rgba(var(--league-accent-rgb), 0.3);
}

/* ----------------------------------------------------
   MEILLEURS BUTEURS
   ---------------------------------------------------- */

.col-player { font-weight: 600; }

.player-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.player-position {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ----------------------------------------------------
   LOADER & SKELETONS
   ---------------------------------------------------- */

.loader-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.skeleton-header {
  height: 40px;
  width: 200px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.skeleton-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
}

.skeleton-row {
  height: 48px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.skeleton-header::after,
.skeleton-row::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ----------------------------------------------------
   ERROR PANEL
   ---------------------------------------------------- */

.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  width: 100%;
}

.error-card {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 20px;
  padding: 3rem 2rem;
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  backdrop-filter: blur(10px);
}

.error-icon {
  color: #ef4444;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.3));
}

.error-card h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
}

.error-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--league-accent);
  color: #000;
  border: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--league-accent-rgb), 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--league-accent-rgb), 0.6);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ----------------------------------------------------
   RESPONSIVE DESIGN
   ---------------------------------------------------- */

@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding: 1.25rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
  }

  .sidebar-brand {
    margin-bottom: 0;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-grow: 0;
    gap: 0.5rem;
  }

  .nav-league {
    padding: 0.5rem 0.75rem;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    column-gap: 0.5rem;
  }

  .league-logo-img {
    width: 24px;
    height: 24px;
    grid-row: 1;
  }

  .league-country {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    padding: 1.5rem;
  }

  .league-header {
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .header-stats {
    width: 100%;
    justify-content: space-between;
  }

  .stat-card {
    flex-grow: 1;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .hidden-tablet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .sidebar {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
  }

  .sidebar-brand {
    width: 100%;
    justify-content: center;
  }

  .sidebar-nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    justify-content: flex-start;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-nav::-webkit-scrollbar {
    height: 4px;
  }
  .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }

  .nav-league {
    flex: 0 0 auto;
    padding: 0.6rem 0.8rem;
    grid-template-columns: auto;
    grid-template-rows: auto;
  }

  .league-name,
  .league-country {
    display: none !important;
  }

  .league-logo-img {
    margin-right: 0;
    width: 28px;
    height: 28px;
  }

  .tabs-nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .styled-select {
    width: 100%;
  }

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

  .hidden-mobile {
    display: none !important;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.35rem;
    font-size: 0.8rem;
  }

  .team-crest {
    width: 18px;
    height: 18px;
  }

  .team-shortname {
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team-tla {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .header-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-card {
    width: 100%;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
}
