/* ===========================
   PremierChilito – styles.css
   =========================== */

/* ─── CSS VARIABLES ─── */
:root {
  --bg-primary: #070913; /* Azul muy oscuro */
  --bg-secondary: #0b0f1c;
  --bg-card: #101628;
  --bg-card-glass: rgba(16, 22, 40, 0.5);
  --bg-card-hover: #17203b;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(100,150,255,0.3);
  --text-primary: #f0f0f8;
  --text-secondary: #8888a8;
  --text-muted: #555568;
  --accent-blue: #5b9cf6;
  --accent-red: #e84040;
  --celeste: #4fc3f7;
  --brand-gradient: linear-gradient(120deg, var(--celeste) 0%, var(--accent-red) 100%);
  --navbar-bg: rgba(7, 9, 19, 0.92);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(91,156,246,0.15);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: 0.25s ease;
}

[data-theme="light"] {
  --bg-primary: #e6e8ee; /* Plomito claro */
  --bg-secondary: #dadde6;
  --bg-card: #f2f4f8;
  --bg-card-glass: rgba(242, 244, 248, 0.65);
  --bg-card-hover: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(91,156,246,0.4);
  --text-primary: #0a0a18;      /* más oscuro que antes (#0d0d20) */
  --text-secondary: #2a2a4a;    /* era #44446a – ahora mucho más oscuro */
  --text-muted: #545468;        /* era #888899 – más legible */
  --navbar-bg: rgba(230,232,238,0.92);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 40px rgba(91,156,246,0.2);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* THEME SWITCH (Global) */
.theme-switch {
  position: relative;
  width: 54px;
  height: 28px;
  background-color: var(--card-bg);
  border-radius: 30px;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  outline: none;
}
.theme-switch svg {
  width: 14px;
  height: 14px;
  z-index: 1;
  transition: color 0.3s;
}
.theme-switch .sun-icon { color: #f59e0b; }
.theme-switch .moon-icon { color: #64748b; }

.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 0;
}

[data-theme="light"] .theme-switch {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}
[data-theme="light"] .theme-switch .moon-icon { color: #a1a1aa; }

[data-theme="dark"] .theme-switch-thumb {
  transform: translateX(26px);
  background-color: #1e293b;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
[data-theme="dark"] .theme-switch .sun-icon { color: #64748b; }
[data-theme="dark"] .theme-switch .moon-icon { color: #fbbf24; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* ───────────────── NAVBAR ───────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-icon { font-size: 1.4rem; animation: spin3d 10s linear infinite; }
@keyframes spin3d {
  0%,100% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
}
.brand-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link:hover::after { transform: scaleX(1); }
.navbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--text-primary); box-shadow: 0 0 12px rgba(91,156,246,0.15); }
.toggle-icon { font-size: 1rem; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ───────────────── HERO ───────────────── */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 96px 24px 48px;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.shape-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #4fc3f7, transparent);
  top: -100px; left: -100px;
  animation: float1 8s ease-in-out infinite;
}
.shape-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #e84040, transparent);
  bottom: -50px; right: -50px;
  animation: float2 10s ease-in-out infinite;
}
.shape-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #7b2d8b, transparent);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: float3 12s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(40px,30px) scale(1.1)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,-20px)} }
@keyframes float3 { 0%,100%{transform:translate(-50%,-50%) scale(1)} 50%{transform:translate(-50%,-50%) scale(1.2)} }

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 760px; }
.hero-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(79,195,247,0.12);
  border: 1px solid rgba(79,195,247,0.25);
  color: var(--celeste);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  animation: fadeInUp 0.6s ease both;
}
.hero-title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s 0.1s ease both;
}
.title-gradient {
  display: inline-block;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  transition: background-position 0.4s ease, text-shadow 0.4s ease;
  cursor: default;
  filter: drop-shadow(0 0 30px rgba(79,195,247,0.2));
}
.title-gradient:hover {
  background-position: 100% 0;
  filter: drop-shadow(0 0 40px rgba(79,195,247,0.5));
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 28px;
  animation: fadeInUp 0.6s 0.2s ease both;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: fadeInUp 0.6s 0.3s ease both;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: inline-flex;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 32px;
  gap: 2px;
}
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-lbl { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: fadeIn 1s 1s ease both;
}
.scroll-arrow { animation: bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ───────────────── PAGE LAYOUT ───────────────── */
.page-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ───────────────── SECTIONS ───────────────── */
.section { margin-bottom: 60px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-icon { font-size: 1.2rem; }
.section-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(232,64,64,0.12);
  border: 1px solid rgba(232,64,64,0.25);
  color: var(--accent-red);
  letter-spacing: 0.3px;
}
.section-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; margin-top: -16px; }
.ver-todo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-blue);
  transition: color var(--transition);
}
.ver-todo:hover { color: var(--celeste); }
.tiktok-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #1a1a2e;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
}
[data-theme="light"] .tiktok-btn { background: #1a1a2e; }
.tiktok-btn:hover { background: #252540; box-shadow: 0 0 16px rgba(100,100,255,0.2); }
.tt-icon,.tt-dot { color: #ee1d52; font-size: 0.9rem; }

/* ───────────────── GAMES GRID ───────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}
.game-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  overflow: hidden;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.game-card:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 4px; }
.game-card-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,156,246,0.2), transparent);
  transition: opacity 0.3s ease;
  opacity: 0;
}
.game-card:hover .game-card-glow { opacity: 1; }
.game-card-icon { font-size: 2.2rem; }
.game-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.game-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.game-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(91,156,246,0.1);
  border: 1px solid rgba(91,156,246,0.2);
  color: var(--accent-blue);
  letter-spacing: 0.3px;
}
.game-card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.cta-coming { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.cta-play { font-size: 0.78rem; font-weight: 700; color: #4ade80; }
/* Tarjeta del Wordle – activa y jugable */
.game-card.playable { border-color: rgba(74,222,128,0.2); }
.game-card.playable:hover { border-color: rgba(74,222,128,0.5); box-shadow: 0 8px 40px rgba(74,222,128,0.1); }
.game-card.playable .game-card-glow { background: radial-gradient(circle, rgba(74,222,128,0.2), transparent); }
.game-card.playable:hover .game-card-glow { opacity: 1; }
.cta-arrow {
  font-size: 1.1rem;
  color: var(--accent-blue);
  transition: transform var(--transition);
}
.game-card:hover .cta-arrow { transform: translateX(4px); }

/* ───────────────── NEWS GRID ───────────────── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.news-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-hover); }
.news-card.featured { grid-column: 1 / -1; flex-direction: row; }
.news-img-wrap { flex-shrink: 0; }
.news-card.featured .news-img-wrap { width: 360px; }
.news-img {
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card.featured .news-img { height: 100%; min-height: 200px; }
.news-img-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.2);
}
.news-cat-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  backdrop-filter: blur(4px);
  z-index: 1;
  letter-spacing: 0.3px;
}
.news-img-icon {
  font-size: 3rem;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.3s ease;
}
.news-card:hover .news-img-icon { transform: scale(1.1); }
.news-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-category { font-size: 0.72rem; font-weight: 700; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 0.5px; }
.news-title { font-size: 0.98rem; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.news-card.featured .news-title { font-size: 1.15rem; }
.news-desc { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.news-date,.news-read { font-size: 0.75rem; color: var(--text-muted); }

/* ───────────────── VIDEOS GRID ───────────────── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}
.tiktok-embed {
  margin: 0 !important;
  width: 100% !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.video-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--border-hover); }
.video-thumb {
  position: relative;
  aspect-ratio: 9/14;
  overflow: hidden;
}
.video-thumb-bg { position: absolute; inset: 0; transition: transform 0.4s ease; }
.video-card:hover .video-thumb-bg { transform: scale(1.05); }
.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.play-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  padding-left: 3px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.video-card:hover .play-circle { background: rgba(255,255,255,0.3); transform: scale(1.1); }
.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.7);
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 1;
}
.video-info { padding: 12px; }
.video-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: 8px; }
.video-meta { display: flex; align-items: center; justify-content: space-between; }
.video-views { font-size: 0.75rem; color: var(--text-muted); }
.video-platform { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 3px; }

/* ───────────────── SIDEBAR ───────────────── */
.sidebar { position: relative; }
.sidebar-sticky { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 24px; }

/* ─── WIDGET ─── */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.widget-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.widget-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.widget-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(91,156,246,0.1);
  border: 1px solid rgba(91,156,246,0.2);
  color: var(--accent-blue);
}

/* ─── STANDINGS TABLE ─── */
.table-wrap { overflow-x: auto; }
.standings-table { width: 100%; border-collapse: collapse; }
.standings-table thead tr { border-bottom: 1px solid var(--border); }
.standings-table th {
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
}
.standings-table th:nth-child(3),
.standings-table th:nth-child(4) { text-align: center; }
.standings-table td {
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
}
[data-theme="light"] .standings-table td { border-bottom-color: rgba(0,0,0,0.05); }
.standings-table td:nth-child(3),
.standings-table td:nth-child(4) { text-align: center; }
.standings-table tbody tr { transition: background 0.2s ease; }
.standings-table tbody tr:hover { background: rgba(91,156,246,0.05); }
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-muted);
}
.team-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin-right: 7px;
  flex-shrink: 0;
  vertical-align: middle;
  border-radius: 3px;
}
.zone-champions td { border-left: 3px solid #2563eb; }
.zone-champions .pos-badge { background: rgba(37,99,235,0.15); color: #60a5fa; }
.zone-libertadores td { border-left: 3px solid #16a34a; }
.zone-libertadores .pos-badge { background: rgba(22,163,74,0.15); color: #4ade80; }
.zone-playoff td { border-left: 3px solid #d97706; }
.zone-playoff .pos-badge { background: rgba(217,119,6,0.15); color: #fbbf24; }
.zone-relegation td { border-left: 3px solid #dc2626; }
.zone-relegation .pos-badge { background: rgba(220,38,38,0.15); color: #f87171; }
.standings-table td:nth-child(2) { display: flex; align-items: center; min-width: 130px; gap: 0; }
.table-legend {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
}
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--text-muted); }
.legend-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}
.legend-dot.champions { background: #2563eb; }
.legend-dot.libertadores { background: #16a34a; }
.legend-dot.playoff { background: #d97706; }
.legend-dot.relegation { background: #dc2626; }

/* ─── FIXTURES ─── */
.fixtures-list { padding: 8px 0; }
.fixture {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s ease;
  cursor: pointer;
}
.fixture:last-child { border-bottom: none; }
.fixture:hover { background: rgba(91,156,246,0.04); }
.fixture-date { font-size: 0.7rem; font-weight: 600; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 0.5px; }
.fixture-match { display: flex; align-items: center; gap: 8px; }
.fixture-team { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.fixture-team.home { flex: 1; text-align: right; }
.fixture-team.away { flex: 1; }
.fixture-vs {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
}
.fixture-time { font-size: 0.75rem; color: var(--text-muted); text-align: center; }

/* ───────────────── FOOTER ───────────────── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 6px; }
.brand-text-sm { font-size: 1rem; font-weight: 800; background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-link { font-size: 0.82rem; color: var(--text-muted); transition: color var(--transition); }
.footer-link:hover { color: var(--accent-blue); }

/* ───────────────── API MODAL (Alineaciones) ───────────────── */
.api-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(5px); transition: opacity 0.3s ease; opacity: 1;
}
.api-modal.hidden { opacity: 0; pointer-events: none; }
.api-modal-content {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; width: 100%; max-width: 500px; max-height: 80vh; overflow-y: auto; text-align: center;
  position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.5); font-family: 'Poppins', sans-serif;
}
.api-modal-close {
  position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold;
  color: var(--text-muted); cursor: pointer; transition: color 0.2s;
}
.api-modal-close:hover { color: var(--accent-red); }
.lineups-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }
.team-lineup h4 {
  font-size: 0.85rem; color: var(--text-primary); border-bottom: 2px solid var(--border);
  padding-bottom: 8px; margin-bottom: 10px; display: flex; align-items: center; justify-content: flex-start;
}

/* ───────────────── RESPONSIVE ───────────────── */
@media (max-width: 1100px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .sidebar-sticky { position: static; flex-direction: row; flex-wrap: wrap; }
  .widget { flex: 1 1 300px; }
}

@media (max-width: 820px) {
  .hero-title { font-size: clamp(2.5rem, 8vw, 5rem); }
  .games-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { flex-direction: column; }
  .news-card.featured .news-img-wrap { width: 100%; }
  .navbar-links { display: none; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: var(--navbar-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 16px; gap: 8px; }
  .navbar-links.open { display: flex; }
  .hamburger { display: flex; }
  .toggle-label { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .page-layout { padding: 0 16px 60px; }
  .hero { padding: 90px 16px 60px; min-height: 80vh; }
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-stats { flex-direction: column; gap: 0; width: 100%; border-radius: var(--radius-md); }
  .stat-pill { padding: 12px 20px; width: 100%; }
  .stat-divider { width: 80%; height: 1px; }
  .videos-grid { grid-template-columns: 1fr; }
  .sidebar-sticky { flex-direction: column; }
}
