/* ================================================================
   FULBOYA v4.0 – Estilo  profesional
   Mobile-first, skeleton loading, animaciones suaves
   ================================================================ */

/* ── TOKENS ────────────────────────────────────────────────────── */
:root {
  /* VERDE primario estilo premium app */
  --primary: #00994d;
  --primary-dark: #007a3d;
  --primary-glow: rgba(0, 153, 77, 0.2);

  --bg-page: #f2f4f3;
  --bg-header: #0e1210;   /* Header oscuro contrastante */
  --bg-tabs: #111513;
  --bg-card: #ffffff;
  --bg-row-hover: #f7faf8;
  --bg-row-live: #f0fff6;
  --bg-detail: #f7f9f8;
  --bg-sidebar: #ffffff;
  --bg-widget: #ffffff;

  --text-main: #1a1a1a;
  --text-dim: #667069;
  --text-white: #ffffff;
  --text-header: #cbd5ce;

  --border: #e2e8e4;
  --border-strong: #ced6d1;

  --live-green: #00b85c;
  --score-bg: #0e1210;
  --score-live-bg: var(--primary);
  /* Un fondo con degradado suave en modo claro para que no sea un bloque cursi liso */
  --body-bg-full: radial-gradient(circle at 50% 0%, #ffffff 0%, #f2f4f3 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* DARK MODE: Neutro premium tipo "glass dark", sin colores neon cansadores a la vista */
.dark-theme {
  --bg-page: #0f1110;
  --bg-header: #141715;
  --bg-tabs: #161a18;
  --bg-card: #181b19;
  --bg-row-hover: #1e2220;
  --bg-row-live: rgba(0, 153, 77, 0.05);
  --bg-detail: #161917;
  --bg-sidebar: #141715;
  --bg-widget: #181b19;

  --text-main: #dfe6e1;
  --text-dim: #84968a;
  --text-white: #ffffff;
  --text-header: #a4b5aa;

  --border: #222924;
  --border-strong: #2c3630;

  --live-green: #29c78f;  /* Verde pastel/turquesa que no encandila como el neon */
  --score-bg: #0f1110;
  /* Fondo elegante oscuro: Iluminación radial central superior */
  --body-bg-full: radial-gradient(circle at 50% -20%, #17241d 0%, #0f1110 80%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.55);
}

:root {
  --ticker-h: 28px;
  --topbar-h: 32px;
  --header-h: 56px;
  --tabs-h: 40px;
  --mobile-datebar-h: 0px;
  --sticky-top: calc(var(--topbar-h) + var(--header-h) + var(--ticker-h) + var(--tabs-h));

  /* Sidebar más ancho para el menú acordeón estilo Promiedos */
  --sidebar-w: 240px;
  --ads-w: 200px;
  --radius: 4px;
  --shadow-card: 0 1px 4px rgba(0, 0, 0, .08);

  --font-h: 'Oswald', sans-serif;
  --font-b: 'Open Sans', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  --transition: .17s ease;
}

/* ── RESET ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-b);
  color: var(--text-main);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--body-bg-full);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   SPLASH SCREEN — Este CSS es CRÍTICO: sin él la app se queda
   bloqueada mostrando el loader para siempre.
   ══════════════════════════════════════════════════════════════ */
.initial-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #0a0e0c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.initial-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.loader-logo img {
  filter: drop-shadow(0 0 30px rgba(0, 153, 77, 0.6));
  animation: logoFloat 2s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.loader-bar-track {
  width: 260px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, transparent, #00994d, transparent);
  animation: barSweep 1.4s ease-in-out infinite;
  border-radius: 2px;
}
@keyframes barSweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}
.loader-text {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}
.loader-skip-hint {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   MODAL: NOMBRE DE CHAT
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.2s ease;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUpModal 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUpModal {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-title {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-header);
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.5;
}
.empty-state {
  padding: 30px 20px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 10px;
  color: var(--text-dim);
}

.empty-state-ligas {
  padding: 15px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 10px;
  text-align: center;
}

.es-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 2px solid var(--bg-page);
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.es-header .icon { font-size: 1.4rem; }

.es-data-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.es-data-block {
  background: var(--bg-detail);
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.es-data-title {
  background: var(--bg-tabs);
  color: var(--primary);
  font-family: var(--font-h);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 6px 10px;
  text-align: left;
  letter-spacing: 0.5px;
}

.es-scroll-wrap {
  max-height: 400px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .es-data-container { grid-template-columns: 1fr; }
}
.modal-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-detail);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-b);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 8px;
}
.modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.modal-error {
  font-size: 0.75rem;
  color: #e74c3c;
  min-height: 18px;
  margin-bottom: 12px;
}
.modal-btn {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #000;
  font-weight: 800;
  font-family: var(--font-h);
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}
.modal-btn:hover { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════════
   BUSCADOR: DROPDOWN DE SUGERENCIAS
   ══════════════════════════════════════════════════════════════ */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  max-height: 280px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(128,128,128,0.1);
  transition: background 0.15s;
}
.search-result-item:hover,
.search-result-item:focus {
  background: var(--bg-row-hover);
}
.search-result-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}
.search-result-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}
.search-result-country {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.header-search {
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

img {
  display: block;
}

/* ── TOPBAR ────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #0a100d;
  border-bottom: 1px solid rgba(0, 153, 77, 0.25);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1100;
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-h);
  font-size: .68rem;
  color: #aaa;
  letter-spacing: .4px;
}

.topbar-clock {
  color: #888;
  font-size: .65rem;
}

/* LIVE DOT */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--live-green);
  border-radius: 50%;
  animation: blink 1.3s infinite;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--live-green);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .15;
  }
}

.dot-live-small {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--live-green);
  border-radius: 50%;
  animation: blink 1.3s infinite;
}

/* NOTIF BTN */
.notif-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid #333;
  border-radius: 20px;
  font-size: .65rem;
  font-family: var(--font-h);
  color: #999;
  transition: var(--transition);
  letter-spacing: .3px;
}

.notif-btn:hover {
  border-color: var(--primary);
  color: #fff;
}

.notif-btn.active {
  background: var(--live-green);
  color: #000;
  border-color: var(--live-green);
}

.notif-btn.denied {
  border-color: #555;
  color: #555;
  cursor: not-allowed;
}

/* ── HEADER ────────────────────────────────────────────────────── */
.site-header {
  background: var(--bg-header);
  border-bottom: 2px solid var(--primary); /* Glow inferior */
  position: sticky;
  top: var(--topbar-h);
  z-index: 1000;
  height: var(--header-h);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}




.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-radius: 6px;
  padding: 3px 6px;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
}

.logo:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.logo:active {
  opacity: .7;
  transform: scale(.97);
}

/* Logo SVG image */
.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  background: transparent !important;
  mix-blend-mode: normal;
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, .2));
  transition: filter var(--transition);
}

.logo:hover .logo-img {
  filter: drop-shadow(0 0 14px rgba(0, 255, 136, .45));
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px var(--primary));
}

.font-oswald {
  font-family: var(--font-h) !important;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.logo-accent {
  color: var(--primary);
}

.logo-subtext {
  font-family: var(--font-b);
  font-size: 0.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.logo-accent {
  color: var(--primary);
}

.logo-subtext {
  font-family: var(--font-b);
  font-size: 0.55rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: block;
  line-height: 1;
  margin-top: 1px;
}

/* MAIN NAV */
.main-nav {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 1;
  gap: 0;
}

.nav-item {
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  font-family: var(--font-h);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-header);
  letter-spacing: .5px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  user-select: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-item:hover {
  color: #fff;
}

.nav-item.active {
  color: #fff;
  border-bottom-color: var(--primary);
}

/* ─────────────────────────────────────────────────
   UX DEL CALENDARIO (Date Picker Wrap)
   ───────────────────────────────────────────────── */
.date-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 10px;
}

.date-picker-wrap:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.nav-datepicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2; /* Para que al clickear cualquier parte del botón, se abra */
  appearance: none;
  -webkit-appearance: none;
  border: none;
}

.date-picker-icon {
  font-size: 1.15rem;
  color: #fff;
  z-index: 1;
  pointer-events: none; /* Que el click pase completo al input */
  transition: transform var(--transition);
}
.date-picker-wrap:active .date-picker-icon {
  transform: scale(0.9);
}

/* ── HORIZONTAL SCROLL FECHAS (OneFootball style) ───────────────── */
@media (max-width: 768px) {
  .main-nav {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 5px;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
  .main-nav::-webkit-scrollbar { display: none; }
  
  .nav-item {
    font-size: 0.75rem;
    padding: 0 12px;
    white-space: nowrap;
  }
}

/* Mobile btn */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  margin-left: auto;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
  transition: var(--transition);
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ddd;
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, .15);
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── NEWS TICKER ───────────────────────────────────────────────── */
.news-ticker-bar {
  display: flex;
  align-items: stretch;
  background: var(--bg-detail);
  border-bottom: 2px solid var(--primary);
  /* Cambiado a color primario para fundirse con lo de abajo */
  height: var(--ticker-h);
  overflow: hidden;
  position: sticky;
  /* Usa CSS vars para posicionarse correctamente en todos los tamaños */
  top: calc(var(--topbar-h) + var(--header-h));
  z-index: 900;
}

.ticker-label {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 12px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
}

.ticker-content {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: .75rem;
  color: var(--text-main);
  font-weight: 500;
  position: relative;
  white-space: nowrap;
  user-select: none;
}

.ticker-content a {
  color: var(--text-main);
  text-decoration: none;
  margin-right: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-content a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.ticker-scroll {
  display: flex;
  padding-left: 100%;
  /* 55s: velocidad óptima para leer sin mareo (era 90s, demasiado lento) */
  animation: tickerScroll 55s linear infinite;
}

.ticker-scroll:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* ── LEAGUE TABS BAR ───────────────────────────────────────────── */
.league-tabs-bar {
  background: var(--bg-tabs);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  /* Posición calculada con CSS vars – nunca más hardcodeado */
  top: calc(var(--topbar-h) + var(--header-h) + var(--ticker-h));
  z-index: 400;
  /* Reducido para no tapar el datepicker si se solapan en mobile */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.league-tabs-bar::-webkit-scrollbar {
  display: none;
}

.league-tabs-inner {
  display: flex;
  align-items: stretch;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 14px;
  min-width: max-content;
}

.ltab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: var(--tabs-h);
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 600;
  color: #777;
  letter-spacing: .3px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: color .15s ease, border-color .15s ease;
  user-select: none;
}

.ltab:hover {
  color: #ccc;
}

.ltab.active {
  color: #fff;
  border-bottom-color: var(--primary);
}

.ltab:active {
  opacity: .75;
}

.flag-sm {
  width: 16px;
  height: 11px;
  object-fit: cover;
  border-radius: 1px;
}

.league-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ── PAGE LAYOUT ───────────────────────────────────────────────── */
.page-wrapper { min-height: 100vh; position: relative; z-index: 10;
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--ads-w);
  gap: 14px;
  align-items: start;
}

/* ── SIDEBAR ───────────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: var(--sticky-top);
}

.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.sidebar-title {
  background: var(--bg-header);
  color: #bbb;
  font-family: var(--font-h);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .8px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--primary);
  text-transform: uppercase;
}

/* DATE NAV */
.date-nav {
  display: flex;
}

.date-btn {
  flex: 1;
  padding: 10px 4px;
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .4px;
  border-right: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.date-btn:last-child {
  border-right: none;
}

.date-btn:hover {
  background: var(--bg-row-hover);
  color: var(--text-main);
}

.date-btn.active {
  background: var(--primary);
  color: var(--text-white);
}

.date-btn:active {
  opacity: .75;
}

/* FILTER BTN */
.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-align: left;
}
.filter-btn:last-child { border-bottom: none; }
.filter-btn:hover { background: var(--bg-row-hover); color: var(--text-main); }
.filter-btn.active { color: var(--live-green); background: rgba(0, 255, 136, .06); }
.filter-btn:active { opacity: .7; transform: scale(.98); }
.goal-test-btn:hover { color: var(--primary); background: rgba(204, 11, 31, .06); }

/* LEAGUE LIST */
.league-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  user-select: none;
}

.league-list li:last-child {
  border-bottom: none;
}

.league-list li:hover {
  background: var(--bg-row-hover);
  color: var(--text-main);
}

.league-list li.active {
  color: var(--primary);
  background: rgba(204, 11, 31, .07);
  border-left: 3px solid var(--primary);
}

.league-list li:active {
  opacity: .7;
}

/* ── MAIN CONTENT ──────────────────────────────────────────────── */
.main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* SECTION BLOCK */
.section-block {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 4px;
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-header);
  padding: 6px 12px;
  border-bottom: 2px solid var(--primary);
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-family: var(--font-h);
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-h);
  font-size: .75rem;
  font-weight: 600;
  color: var(--live-green);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.match-count {
  font-family: var(--font-h);
  font-size: .66rem;
  color: #aaa;
  background: rgba(255, 255, 255, .09);
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: .2px;
}

.header-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #888;
  border: 1px solid #333;
  border-radius: var(--radius);
  transition: var(--transition);
}

.header-action-btn:hover {
  color: #fff;
  border-color: #666;
}

.header-action-btn:active {
  transform: rotate(180deg);
}

.header-action-btn.spinning {
  animation: spin360 .6s linear;
}

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

/* ── LEAGUE GROUP HEADER ───────────────────────────────────────── */
.league-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Usa variable – compatible con dark mode (era #f3f4f6 hardcodeado) */
  background: var(--bg-detail);
  padding: 4px 10px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.league-group-header:first-child {
  border-top: none;
}

.league-group-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.league-group-name {
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: .2px;
}

.league-round {
  font-size: .62rem;
  color: var(--text-dim);
  margin-left: auto;
  font-family: var(--font-h);
}

/* ── MATCH ROW ─────────────────────────────────────────────────── */
.match-wrapper {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.match-wrapper:last-child {
  border-bottom: none;
}

.match-row {
  display: grid;
  grid-template-columns: 35px 1fr auto 1fr 20px;
  align-items: center;
  padding: 5px 8px;
  min-height: 40px;
  cursor: pointer;
  background: var(--bg-card);
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
  position: relative;
  border-radius: 4px;
  margin: 1px 4px;
}

.match-row:hover {
  background: var(--bg-row-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05), inset 4px 0 0 var(--primary);
  z-index: 2;
  transform: translateY(-2px) scale(1.01);
}

.match-row.is-live:hover {
  background: var(--bg-row-live);
  box-shadow: 0 4px 12px rgba(0, 204, 102, 0.1), inset 4px 0 0 var(--live-green);
}

.match-row.is-live {
  background: var(--bg-row-live);
}

.match-row.expanded {
  background: var(--bg-detail);
}

/* ── LEAGUE GROUPING (PROM-STYLE) ── */
.league-group-header {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: #1a1e1c;
  border-bottom: 2px solid var(--primary);
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.league-group-logo { width: 16px; height: 16px; object-fit: contain; }
.league-group-name { font-family: var(--font-h); font-weight: 700; font-size: 0.8rem; color: #fff; text-transform: uppercase; flex: 1; }
.league-group-actions { display: flex; gap: 5px; }
.league-action-btn { 
  background: rgba(255,255,255,0.1); 
  color: #fff; 
  font-size: 0.6rem; 
  padding: 2px 6px; 
  border-radius: 3px; 
  font-weight: 800;
  transition: all 0.2s;
}
.league-action-btn:hover { background: var(--primary); color: #000; }
.league-pos-container { display: none; background: var(--bg-card); border-bottom: 1px solid var(--border); overflow-x: auto; }
.league-pos-container.open { display: block; animation: slideInRow 0.2s; }
@keyframes slideInRow { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.section-block {
  margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Modo Fan Resaltado */
.match-wrapper.has-favorite {
  background: rgba(255, 170, 0, 0.03);
  border-left: 3px solid #ffaa00;
}

.dark-theme .match-wrapper.has-favorite {
  background: rgba(255, 170, 0, 0.06);
}

/* Hora */
.m-time {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: .65rem;
  color: var(--text-dim);
  text-align: center;
}

.m-time.live {
  color: var(--live-green);
  animation: pulseTxt 1.5s infinite;
}

.m-time.finished {
  color: var(--text-dim);
}





@keyframes pulseTxt {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

/* Teams */
.m-team {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.m-team.home {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.m-team.away {
  flex-direction: row;
}

.team-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
}

.follow-star {
  font-size: 0.65rem;
  opacity: 0.15;
  transition: opacity 0.2s, transform 0.2s;
  filter: grayscale(1);
}

.team-name.following .follow-star {
  opacity: 1;
  filter: grayscale(0);
  transform: scale(1.3);
  color: #ffaa00;
}

.team-name:hover .follow-star {
  opacity: 0.5;
}

.match-row.is-live .team-name {
  color: var(--text-white);
}

.team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Score */
.m-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.score-box {
  background: var(--score-bg);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 45px;
  text-align: center;
  letter-spacing: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.score-box.live {
  background: var(--primary); /* Deep green */
  color: var(--text-white);
  border: 1px solid #00cc66;
  box-shadow: 0 0 10px rgba(0, 204, 102, 0.4);
  animation: scorePulse 2s infinite ease-in-out;
}

@keyframes scorePulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.25);
    box-shadow: 0 4px 18px var(--primary-glow);
  }
}

.score-box.pending {
  background: var(--border);
  color: var(--text-dim);
  font-size: .85rem;
  letter-spacing: 2px;
  padding: 6px 14px;
}

/* Interactive Predictions (Fase 2 Enganche) */
.m-predict-row {
  display: flex;
  gap: 6px;
  padding: 4px 14px 10px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  justify-content: center;
}

.predict-btn {
  flex: 1;
  padding: 6px;
  font-family: var(--font-h);
  font-size: 0.62rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  transition: all 0.2s;
  background: rgba(0, 0, 0, 0.02);
  text-transform: uppercase;
  font-weight: 700;
}

.predict-btn:hover {
  background: var(--bg-row-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.predict-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.predict-btn span {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.m-stream-btn {
  background: #ffaa00;
  color: #111;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-h);
  transition: transform 0.2s, background 0.2s;
}

.m-stream-btn:hover {
  background: #ffcc00;
  transform: scale(1.05);
}

/* Chevron */
.m-chevron {
  font-size: .6rem;
  color: #ccc;
  text-align: center;
  transition: transform .2s ease;
}

.match-row.expanded .m-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

/* ── MATCH DETAIL PANEL ────────────────────────────────────────── */




@keyframes slideDetail {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ad discreto reemplaza banner agresivo de apuestas */
.match-detail-ad {
  padding: 8px 12px;
  background: var(--bg-detail);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* Tabs en Detalle */
.detail-tabs {
  display: flex;
  background: var(--score-bg);
  border-bottom: 1px solid var(--border);
}

.dtab {
  flex: 1;
  padding: 10px;
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 700;
  color: #888;
  letter-spacing: .5px;
  border-bottom: 2px solid transparent;
  text-align: center;
}

.dtab:hover {
  color: #ccc;
  background: rgba(255, 255, 255, .05);
}

.dtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg-detail);
}

.dtab-content {
  display: none;
  padding: 18px 16px;
}

.dtab-content.active {
  display: block;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .68rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 15px 16px;
  border-bottom: 1px dashed var(--border);
  font-family: var(--font-h);
  background: var(--bg-detail);
}

.detail-meta strong {
  color: var(--text-dim);
}

.detail-col-title {
  font-family: var(--font-h);
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 15px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Events */
.event-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: .77rem;
}

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

.event-time {
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--primary);
  width: 30px;
  flex-shrink: 0;
  font-size: .73rem;
}

.event-icon {
  flex-shrink: 0;
  font-size: .88rem;
}

.event-info .event-player {
  font-weight: 700;
  color: var(--text-main);
}

.event-info .event-detail {
  font-size: .68rem;
  color: var(--text-dim);
  margin-top: 1px;
}

/* Stats */
.stat-item {
  margin-bottom: 9px;
}

.stat-labels {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-family: var(--font-h);
}

.stat-labels b {
  font-weight: 500;
  color: var(--text-header);
}

.stat-bar-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}

.stat-bar-home {
  height: 100%;
  background: #1565c0;
  border-radius: 3px 0 0 3px;
  transition: width .5s ease;
}

.stat-bar-away {
  height: 100%;
  background: #f9a825;
  border-radius: 0 3px 3px 0;
  transition: width .5s ease;
}

/* Lineups */
.lineup-team {
  margin-bottom: 20px;
}

.lineup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.lineup-coach {
  font-size: .7rem;
  color: #777;
  margin-bottom: 12px;
  font-style: italic;
}

.lineup-sub-title {
  font-family: var(--font-h);
  font-size: .62rem;
  color: #555;
  letter-spacing: .5px;
  margin: 10px 0 6px;
}

.p-row {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: .78rem;
}

.p-row.p-sub {
  grid-template-columns: 28px 1fr;
  color: #888;
  font-size: .72rem;
}

.p-num {
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 700;
}

.p-name {
  /* Usa variable para dark/light mode – era #ccc hardcodeado */
  color: var(--text-main);
}

.p-pos {
  font-size: .62rem;
  color: #555;
  text-transform: uppercase;
  text-align: right;
}

/* Chat Mock */
.chat-wrapper {
  /* Usa variable – rgba(0,0,0,0.1) era invisible en dark mode */
  background: var(--bg-detail);
  border-radius: 4px;
  border: 1px solid var(--border);
  padding: 10px;
}

.chat-messages {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-right: 5px;
}

.chat-msg {
  font-size: .75rem;
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--primary);
}

.chat-user {
  font-weight: 800;
  color: var(--primary);
  margin-right: 5px;
}

.chat-time {
  display: block;
  font-size: .6rem;
  color: #555;
  margin-top: 2px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--score-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 10px;
  color: #fff;
  font-size: .75rem;
}

.chat-send {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-h);
  font-size: .7rem;
  font-weight: 700;
  padding: 0 15px;
  border-radius: 3px;
}

/* ── SKELETON LOADING ──────────────────────────────────────────── */
.skele.match-wrapper {
  margin-bottom: 2px;
  background: var(--bg-card);
  transition: transform 0.1s ease, background 0.2s ease;
  user-select: none;
  cursor: pointer;
}

.match-wrapper:active {
  transform: scale(0.985); /* Feedback visual al click */
  background: var(--bg-row-hover);
}

.match-row {
  display: grid;
  grid-template-columns: 50px 1fr 80px 1fr 40px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

.match-row.is-live {
  background: var(--bg-row-live);
}

/* Diseño compacto - menos espacios en blanco */
.m-team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.85rem;
}

.skel {
  height: 14px;
  background: var(--bg-detail);
  border-radius: 4px;
  animation: shimmer 1.4s infinite;
  background: linear-gradient(90deg, var(--bg-detail) 25%, var(--bg-row-hover) 50%, var(--bg-detail) 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.skel-time {
  width: 36px;
  height: 13px;
}

.skel-team {
  height: 14px;
  width: 80%;
}

.skel-score {
  width: 58px;
  height: 28px;
  border-radius: var(--radius);
  margin: auto;
}

.skel-chevron {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: auto;
}

/* ── ADS PANEL ─────────────────────────────────────────────────── */
.ads-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: var(--sticky-top);
}

.ad-block {
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── SECCIÓN CONTACTO PROFESIONAL ───────────────────────────── */
.contact-professional {
  background: var(--bg-card);
  padding: 40px 14px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.contact-inner { max-width: 800px; margin: 0 auto; }
.contact-title { font-family: var(--font-h); font-size: 1.8rem; color: var(--primary); margin-bottom: 15px; }
.contact-intro { font-size: 0.95rem; color: var(--text-dim); margin-bottom: 30px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact-card { background: var(--bg-detail); padding: 25px; border-radius: 12px; border: 1px solid var(--border); }
.contact-card h4 { font-family: var(--font-h); margin-bottom: 10px; font-size: 1.1rem; }
.contact-card p { font-size: 0.85rem; color: var(--text-dim); }
.contact-card a { color: var(--primary); font-weight: bold; text-decoration: underline; }

/* Flag news */
.flag-news {
  width: 18px;
  height: auto;
  vertical-align: middle;
  margin-right: 4px;
  border-radius: 2px;
}

/* ── AD PLACEHOLDERS ─────────────────────────────────────────── */
.feed-ad-slot {
  margin: 10px auto;
  max-width: 728px;
  border: 1px dashed var(--border-strong);
  padding: 8px;
  text-align: center;
}
.ad-label { font-size: 0.6rem; color: #888; text-transform: uppercase; margin-bottom: 5px; display: block; }
.ad-content-placeholder { 
  background: rgba(0,0,0,0.03); 
  height: 90px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 0.75rem; 
  color: #999;
  border-radius: 4px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.widget-title {
  background: var(--bg-header);
  color: #bbb;
  font-family: var(--font-h);
  font-size: .68rem;
  padding: 8px 12px;
  letter-spacing: .7px;
  border-bottom: 2px solid var(--primary);
  text-transform: uppercase;
}

.widget-content {
  padding: 10px 12px;
  max-height: 340px;
  overflow-y: auto;
}

.widget-hint {
  font-size: .74rem;
  color: #aaa;
  padding: 8px 0;
  font-family: var(--font-h);
}

/* Widget posiciones */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .7rem;
}

.standings-table th {
  font-family: var(--font-h);
  font-size: .6rem;
  font-weight: 500;
  color: #888;
  text-align: center;
  padding: 4px 2px;
  border-bottom: 1px solid var(--border);
}

.standings-table td {
  padding: 5px 2px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.standings-table td:nth-child(2) {
  text-align: left;
  font-weight: 700;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.s-pos {
  color: var(--text-dim);
  font-family: var(--font-h);
  font-weight: 700;
}

.s-pts {
  font-weight: 700;
  color: var(--primary);
}

/* Scorers */
.scorer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: .73rem;
}

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

.scorer-rank {
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--primary);
  width: 16px;
  flex-shrink: 0;
  font-size: .68rem;
}

.scorer-name {
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorer-goals {
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--primary);
  font-size: .8rem;
}

/* Upcoming */
.upcoming-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.up-date {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-family: var(--font-h);
}

.up-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
}

.up-team {
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up-vs {
  color: var(--primary);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0 4px;
}

/* News Widget */
.widget-content.news-container {
  padding: 4px 12px;
}

.news-row {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  /* Espacio más ajustado */
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s;
  user-select: none;
}

.news-row:hover {
  background: var(--bg-row-hover);
}

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

.news-title {
  font-size: 0.72rem;
  /* Título más compacto */
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 2px;
}

.news-date {
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* Resaltado llamativo para noticias */
.news-highlight {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-h);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ── MONETIZACIÓN (Ad Slots) ─────────────────────────────────────── */
.feed-ad-slot {
  margin: 20px 0;
  padding: 15px;
  background: var(--bg-card);
  border-radius: 12px;
  text-align: center;
  border: 1px dashed var(--border-strong);
}

.ad-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
}

.ad-content-placeholder {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-weight: bold;
}

/* ── FOOTER SEO ────────────────────────────────────────────────── */
.footer-seo-links {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.seo-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.seo-link:hover {
  color: var(--primary);
}

/* ── FOOTER LEGAL ──────────────────────────────────────────────── */
.site-footer {
  margin-top: 40px;
  padding: 25px 15px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-b);
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-legal-text p {
  color: var(--text-dim);
  font-size: .75rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.footer-legal-text strong {
  color: var(--text-main);
}

.footer-links-col {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-links-col a {
  color: var(--primary);
  font-size: .75rem;
  text-decoration: none;
  font-weight: 600;
}

.footer-links-col a:hover {
  text-decoration: underline;
}

.contact-link {
  opacity: 0.9;
}

/* ── TOAST NOTIFICATIONS ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  max-width: 320px;
  animation: toastIn .3s ease;
  cursor: pointer;
}

.toast.toast-goal {
  border-left-color: var(--primary);
}

.toast.toast-info {
  border-left-color: var(--live-green);
}

.toast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-family: var(--font-h);
  font-weight: 600;
  font-size: .85rem;
  /* Usa variable – #111 era invisible en dark mode */
  color: var(--text-main);
  letter-spacing: .2px;
}

.toast-sub {
  font-size: .73rem;
  color: #777;
  margin-top: 2px;
}

.toast.fade-out {
  animation: toastOut .3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateX(24px);
  }
}

/* ── GOAL OVERLAY (modal) ──────────────────────────────────────── */
.goal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  backdrop-filter: blur(14px);
  animation: fadeIn .3s ease;
}

.goal-modal {
  max-width: 460px;
  width: 90%;
  background: #080808;
  border: 2px solid var(--primary);
  border-radius: 18px;
  padding: 38px 22px;
  text-align: center;
  box-shadow: 0 0 80px var(--primary-glow);
  animation: popIn .4s cubic-bezier(.18, .89, .32, 1.28);
}

.goal-label {
  font-family: var(--font-h);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 22px;
  text-shadow: 0 0 40px var(--primary);
  animation: pulseLabel .7s infinite alternate;
}

@keyframes pulseLabel {
  from {
    text-shadow: 0 0 20px var(--primary);
  }

  to {
    text-shadow: 0 0 60px var(--primary), 0 0 100px rgba(204, 11, 31, .4);
  }
}

.goal-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.gt-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.gt-side img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.gt-side span {
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  max-width: 90px;
  text-align: center;
}

.gt-score {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 6px 18px;
  border-radius: 10px;
  line-height: 1;
}

.goal-scorer {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(204, 11, 31, .1);
  border: 1px solid rgba(204, 11, 31, .3);
  padding: 9px 24px;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: .5px;
}

.goal-overlay.fade-out {
  animation: fadeOut .45s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    transform: scale(.6) translateY(40px);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── EMPTY / ERROR STATES ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-dim);
  font-family: var(--font-h);
  font-size: .82rem;
  letter-spacing: .3px;
}

.empty-state .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

/* ── MOBILE OVERLAY ────────────────────────────────────────────── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 500;
  backdrop-filter: blur(2px);
}

.mobile-overlay.open {
  display: block;
}

/* ── UTILITY ───────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ──────────────────────────────────────────────────────────────
   🔥 BADGE CLÁSICO
   ────────────────────────────────────────────────────────────── */
.clasico-badge {
  background: linear-gradient(90deg, #b7410e, #e25822);
  color: #fff;
  font-family: var(--font-h);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  text-align: center;
  text-transform: uppercase;
}
.is-clasico { border-left: 3px solid #e25822; }
.is-clasico .match-row { background: rgba(226, 88, 34, .04); }

/* ──────────────────────────────────────────────────────────────
   ⭐ MI EQUIPO BANNER
   ────────────────────────────────────────────────────────────── */
.fav-banner {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 0 0 1px rgba(0,153,77,.1), 0 2px 12px rgba(0,0,0,.2);
}
.fav-banner-label {
  font-family: var(--font-h);
  font-size: .62rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.fav-banner-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fav-team {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-weight: 700;
  font-size: .82rem;
  color: var(--text-main);
}
.fav-team-away { flex-direction: row-reverse; text-align: right; }
.fav-score-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.fav-score {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}
.fav-live-pill {
  font-family: var(--font-h);
  font-size: .6rem;
  font-weight: 700;
  background: rgba(204,11,31,.85);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: .5px;
}

/* ──────────────────────────────────────────────────────────────
   📋 FORM BADGES (V / E / D)
   ────────────────────────────────────────────────────────────── */
.form-row-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.form-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .78rem;
  flex: 1;
}
.form-team-away { flex-direction: row-reverse; }
.form-badges { display: flex; gap: 3px; }
.form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-h);
}

/* ──────────────────────────────────────────────────────────────
   🆚 H2H — Historial Cara a Cara
   ────────────────────────────────────────────────────────────── */
.h2h-block { border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.h2h-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-header);
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}
.h2h-vs { color: var(--primary); font-size: .68rem; padding: 0 4px; }
.h2h-row {
  display: grid;
  grid-template-columns: 40px 1fr 48px 1fr;
  align-items: center;
  padding: 8px 14px;
  font-size: .75rem;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.h2h-row:last-child { border-bottom: none; }
.h2h-year { font-family: var(--font-h); font-size: .62rem; color: var(--text-dim); font-weight: 600; }
.h2h-team { color: var(--text-dim); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2h-right { text-align: right; }
.h2h-winner { color: var(--primary); font-weight: 700; }
.h2h-loser { color: var(--text-dim); opacity: .6; }
.h2h-score {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
  font-size: .82rem;
  background: var(--score-bg);
  border-radius: 4px;
  padding: 2px 4px;
}

/* ──────────────────────────────────────────────────────────────
   ⭐ RATINGS ESTILO SOFASCORE
   ────────────────────────────────────────────────────────────── */
.ratings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ratings-col { background: var(--bg-card); border-radius: 6px; border: 1px solid var(--border); overflow: hidden; }
.ratings-team-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-header);
  font-family: var(--font-h);
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-header);
  border-bottom: 1px solid var(--border);
}
.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-size: .75rem;
}
.rating-row:last-child { border-bottom: none; }
.rating-name { color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.player-rating {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 800;
  border-radius: 4px;
  padding: 2px 7px;
  color: #fff;
  flex-shrink: 0;
}
.rating-great { background: #1e7e34; }
.rating-good  { background: #2f7a2f; }
.rating-avg   { background: #4a4a25; }


/* ── RESPONSIVE ────────────────────────────────────────────────── */

/* < 1200px: quitar ads */
@media (max-width: 1220px) {
  .ads-panel {
    display: none;
  }

  .page-wrapper {
    grid-template-columns: var(--sidebar-w) 1fr;
  }
}

/* < 900px: sidebar colapsable */
@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    padding: 8px;
    gap: 8px;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: -100%;
    bottom: 0;
    width: 250px;
    z-index: 600;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--bg-card);
    transition: left .28s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 8px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.3);
  }

  .sidebar.open {
    left: 0;
  }

  .main-nav {
    display: flex;
    order: 3;
    width: 100%;
    justify-content: center;
    background: var(--bg-header);
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
  }

  .nav-item[data-view],
  #main-nav .date-picker-wrap {
    display: none !important;
  }

  .header-search {
    flex: 1;
    margin: 4px 0;
    max-width: none;
  }

  .search-input {
    width: 100%;
    font-size: 0.85rem;
    padding-right: 12px;
  }

  .site-header {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .mobile-menu-btn {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .logo {
    order: 1;
  }

  .league-tabs-bar {
    top: calc(var(--topbar-h) + var(--header-h) + var(--ticker-h));
  }
}

/* < 600px: match rows compactos */
@media (max-width: 600px) {
  :root {
    --topbar-h: 28px;
  }

  .topbar-right .notif-btn span {
    display: none;
  }

  .topbar-clock {
    display: none;
  }

  .match-row {
    grid-template-columns: 46px 1fr auto 1fr auto;
    padding: 0 10px;
    min-height: 46px;
  }

  .team-name {
    font-size: .78rem;
    max-width: 90px;
  }

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

  .score-box {
    font-size: .82rem;
    min-width: 50px;
    padding: 4px 6px;
  }

  .m-time {
    font-size: .7rem;
  }

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

  .goal-label {
    font-size: 2rem;
  }

  .gt-score {
    font-size: 2rem;
  }

  .gt-side img {
    width: 40px;
    height: 40px;
  }
}

/* ── INITIAL LOADER (Splash Screen) ─────────────────────────── */
.initial-loader {
  position: fixed;
  inset: 0;
  background: #0a0a15;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  /* Fade de 400ms – antes 600ms (él mismo causaba percepción de lentitud) */
  transition: opacity 0.4s ease, visibility 0.4s;
  cursor: pointer; /* Indica que es clickeable para skip */
  user-select: none;
}

.initial-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 260px;
}

.loader-logo {
  margin-bottom: 25px;
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.1));
  }

  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 25px rgba(0, 255, 136, 0.3));
  }
}

.loader-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.loader-bar-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #00ff88);
  /* Más rápido: 0.9s en lugar de 1.5s */
  animation: barGrow 0.9s infinite ease-in-out;
  border-radius: 10px;
}

@keyframes barGrow {
  0% {
    transform: translateX(-120%);
  }

  50% {
    transform: translateX(200%);
    width: 70%;
  }

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

.loader-text {
  font-family: var(--font-h);
  font-size: 0.72rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  animation: pulseText 1.5s infinite alternate;
}

.loader-skip-hint {
  margin-top: 16px;
  font-family: var(--font-h);
  font-size: 0.6rem;
  color: #333;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR ACORDEÓN ESTILO PROMIEDOS
   ═══════════════════════════════════════════════════════════ */

/* Fila de fecha compacta */
.sb-date-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.sb-date-row .date-btn {
  flex: 1;
  padding: 9px 4px;
  font-family: var(--font-h);
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .5px;
  border-right: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}
.sb-date-row .date-btn:last-child { border-right: none; }
.sb-date-row .date-btn:hover { background: var(--bg-row-hover); color: var(--text-main); }
.sb-date-row .date-btn.active { background: var(--primary); color: #fff; }

/* Botón "Solo en vivo" */
.sb-live-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-h);
  font-size: .68rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.sb-live-btn:hover { background: var(--bg-row-hover); color: var(--text-main); }
.sb-live-btn.active { color: var(--live-green); background: rgba(0, 180, 74, .08); }

/* Contenedor del nav acordeón */
.sb-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Grupo acordeón */
.sb-group { border-bottom: 1px solid var(--border); }

/* Cabecera del grupo */
.sb-group-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--bg-sidebar);
  transition: background var(--transition);
  text-align: left;
  border: none;
  cursor: pointer;
}
.sb-group-hdr:hover { background: var(--bg-row-hover); }
.dark-theme .sb-group-hdr { color: var(--text-header); }
.dark-theme .sb-group-hdr:hover { background: var(--bg-row-hover); }

/* Flecha del acordeón */
.sb-garrow {
  margin-left: auto;
  font-size: .85rem;
  color: var(--text-dim);
  transition: transform .25s ease, color .25s ease;
  flex-shrink: 0;
  opacity: 0.6;
}
.sb-group.open .sb-garrow {
  transform: rotate(180deg);
  color: var(--primary);
  opacity: 1;
  text-shadow: 0 0 6px rgba(0, 153, 77, 0.6);
}

/* Ícono emoji del grupo */
.sb-gicon { font-size: .85rem; flex-shrink: 0; }

/* Texto label del grupo */
.sb-glabel { flex: 1; }

/* Bandera pequeña */
.sb-flag {
  width: 16px;
  height: 11px;
  object-fit: cover;
  border-radius: 1px;
  flex-shrink: 0;
}

/* Ícono de liga */
.sb-licon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Lista de ítems dentro del grupo */
.sb-items {
  display: none;
  flex-direction: column;
  background: var(--bg-detail);
  border-top: 1px solid var(--border);
  list-style: none;
  padding: 0;
  margin: 0;
}
.sb-group.open .sb-items { display: flex; }

/* Ítem de liga individual */
.sb-items li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 22px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  user-select: none;
  line-height: 1.2;
}
.sb-items li:last-child { border-bottom: none; }
.sb-items li:hover {
  background: var(--bg-row-hover);
  color: var(--text-main);
  padding-left: 26px; /* micro-indent al hover */
}
.sb-items li.active {
  color: var(--primary);
  background: rgba(0, 165, 80, .08);
  border-left: 3px solid var(--primary);
  padding-left: 19px;
  font-weight: 700;
}
.dark-theme .sb-items li.active {
  background: rgba(0, 165, 80, .12);
}

/* Highlight del grupo activo (acordeón abierto) */
.sb-group.open > .sb-group-hdr {
  border-left: 3px solid var(--primary);
}

/* ── OVERRIDES para el sidebar nuevo ── */
/* El sidebar recibe los estilos del nuevo acordeón, no del viejo */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  gap: 0; /* el acorde├│n maneja sus propios bordes */
}

/* En mobile, el sidebar vuelve a ser drawer */
@media (max-width: 900px) {
  .sidebar {
    border-radius: 0;
    border: none;
    box-shadow: var(--shadow-md);
  }
}


@keyframes pulseText {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

/* ── FOOTER LEGAL & PROFESIONAL ────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--bg-header);
  border-top: 3px solid var(--primary);
  color: var(--text-header);
  font-family: var(--font-b);
  padding: 0;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-legal-text {
  font-size: .75rem;
  line-height: 1.5;
  color: #888;
  max-width: 500px;
}
.footer-legal-text strong {
  color: #bbb;
}

.footer-links-col {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-links-col a,
.footer-seo-links a {
  font-family: var(--font-h);
  font-size: .75rem;
  color: #bbb;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .3px;
  transition: var(--transition);
}

.footer-links-col a:hover,
.footer-seo-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-seo-links {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  background: rgba(0,0,0,0.2);
}

/* FOOTER CONTACTO PROFESIONAL */
.contact-professional {
  background: var(--bg-detail);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 14px;
}
.dark-theme .contact-professional {
  background: rgba(255,255,255,0.01);
}

.contact-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-family: var(--font-h);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-intro {
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 30px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.contact-card h4 {
  font-family: var(--font-h);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.contact-card p, .contact-card a {
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.contact-card a {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.contact-card a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────
   SEARCH BAR EN HEADER
   ───────────────────────────────────────────────── */
.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0 12px;
  height: 36px;
  transition: all var(--transition);
  margin-left: auto; /* Empujar a la derecha */
}
.header-search:focus-within {
  background: rgba(255,255,255,0.12);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 165, 80, 0.15);
}
.search-icon {
  font-size: .9rem;
  color: #888;
  margin-right: 6px;
}
.search-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: .8rem;
  font-family: var(--font-b);
  width: 160px;
  outline: none;
}
.search-input::placeholder {
  color: #aaa;
}

@media (max-width: 900px) {
  .header-search {
    width: 100%;
    margin: 4px 0;
    max-width: none;
    height: 42px;
    padding: 0 16px;
  }
  .search-input { 
    width: 100%; 
    font-size: 0.9rem;
  }
}

/* ── Mobile Date Bar (Oculta en Escritorio por completo) ── */
.mobile-date-bar { 
  display: none; 
}
@media (max-width: 900px) {
  .mobile-date-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0 !important;
    background: var(--bg-tabs) !important;
    padding: 0 8px !important;
    border-bottom: 2px solid var(--border) !important;
    height: 40px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  .mobile-date-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  .mobile-date-pill {
    /* Minimalista: sin bordes llamativos, solo texto */
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0 16px;
    height: 100%;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-h);
    cursor: pointer;
    letter-spacing: .4px;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
    white-space: nowrap;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-date-pill:hover {
    color: var(--text-main);
  }
  .mobile-date-pill:active {
    opacity: 0.7;
  }
  .mobile-date-pill.active {
    color: #fff;
    border-bottom-color: var(--primary);
  }

}

/* ── CHAT EN VIVO (Twitch/Kick Style) ───────────────────────── */
.chat-widget {
  display: flex;
  flex-direction: column;
  min-height: 350px;
  max-height: 80vh;
}
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 5px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-body);
}
.chat-msg {
  word-break: break-word;
  line-height: 1.4;
  color: var(--text-main);
}
.chat-msg .user {
  font-weight: 700;
  margin-right: 5px;
}
.chat-error {
  color: #ff4a4a;
  font-size: 0.75rem;
  padding: 6px 10px;
  background: rgba(255, 0, 0, 0.1);
  display: none;
  font-weight: bold;
  border-top: 1px solid var(--border);
}
.chat-input-area {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg-detail);
  flex-shrink: 0;
  min-height: 44px;
}
.chat-input-area input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  font-family: var(--font-body);
}
.chat-input-area button {
  background: var(--primary);
  color: #000;
  font-weight: bold;
  border: none;
  padding: 0 15px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-input-area button:hover {
  opacity: 0.8;
}

/* ================================================================
   WIDGETS API-SPORTS (EMBEBIDOS)
   ================================================================ */
.widget-embed-wrap {
  width: 100%;
}

.widget-embed-inner {
  width: 100%;
  min-height: 100px;
  background: var(--bg-card);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  position: relative;
}

/* Forzar que el iframe del widget ocupe el 100% y se vea bien */
.api-football-widget {
  width: 100%;
  background: transparent !important;
}

.api-football-widget iframe {
  width: 100% !important;
  border: none !important;
  background: transparent !important;
  /* El height automático lo maneja su propio script, pero aseguramos ancho */
}

/* Ocultar el fallback cuando está disponible el embed */
.widget-embed-inner:not(:empty) + .widget-content {
  display: none !important;
}

/* ─────────────────────────────────────────────────
   MATCH DETAIL PANEL NEW STYLES
   ───────────────────────────────────────────────── */
.lineups-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 15px;
}
.lineup-team {
  flex: 1;
  width: 50%;
  box-sizing: border-box;
}
.lineup-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0 4px;
}
.p-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(128,128,128,0.1);
  font-size: 0.8rem;
}
.p-num {
  width: 20px;
  font-weight: 700;
  color: var(--text-dim);
}
.p-name {
  flex: 1;
  text-align: left;
  color: var(--text-main);
}
.p-pos {
  width: 25px;
  text-align: right;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.p-sub {
  color: var(--text-dim);
}
.predict-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: bold;
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}
.predict-btn:hover {
  background: var(--bg-row-hover);
  border-color: var(--primary);
}

@media (max-width: 600px) {
  .lineups-layout {
    flex-direction: column;
    gap: 20px;
  }
  .lineup-team {
    width: 100%;
  }
  .lineup-divider {
    display: none;
  }
}

/* ─────────────────────────────────────────────────
   CHAT PANEL COLOR FIXES (Theme-based)
   ───────────────────────────────────────────────── */
/* Force message text color to adapt correctly to the theme, resolving hardcoded #888 issues */
.chat-msg span[style*="color:#888"],
.chat-msg span[style*="color: #888"] {
  color: var(--text-main) !important;
  opacity: 0.8;
}
.chat-msg span[style*="color:#aaa"],
.chat-msg span[style*="color: #aaa"] {
  color: var(--text-main) !important;
  opacity: 0.8;
}
.chat-time {
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE DE EVENTOS — ESTILO PROMIEDOS (Bidireccional)
   ═══════════════════════════════════════════════════════════════ */
.timeline-container {
  padding: 0;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-detail);
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
}
.tl-team-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-header);
}
.tl-team-right {
  flex-direction: row-reverse;
}

.tl-row {
  display: grid;
  grid-template-columns: 1fr 28px 36px 28px 1fr;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(128,128,128,0.1);
  transition: background 0.15s;
  min-height: 38px;
}
.tl-row:hover {
  background: rgba(0,165,80,0.05);
}
/* home/away row classes used for potential future per-side styling */
.tl-side {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tl-side-home {
  text-align: right;
  align-items: flex-end;
}
.tl-side-away {
  text-align: left;
  align-items: flex-start;
}
.tl-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}
.tl-sub {
  font-size: 0.73rem;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.2;
}
.tl-icon {
  font-size: 1rem;
  text-align: center;
  line-height: 1;
}
.tl-min {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  background: rgba(0,165,80,0.12);
  border-radius: 4px;
  padding: 2px 4px;
  min-width: 30px;
  white-space: nowrap;
}

/* ── CHAT DISABLED (partidos finalizados) ──────────────────── */
.chat-disabled-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  gap: 8px;
}
.chat-disabled-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}
.chat-disabled-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-header);
}
.chat-disabled-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 280px;
  line-height: 1.5;
}

/* ── AD-BLOCK: compact, no más huecos gigantes ─────────────── */
.ad-block ins.adsbygoogle[data-ad-status="unfilled"],
.ad-block ins.adsbygoogle[data-ad-status=""],
.ad-block ins.adsbygoogle:empty {
  display: none !important;
}
.ad-block:has(ins[data-ad-status="unfilled"]) {
  display: none !important;
}

/* ── WIDGET: header con liga y temporada ───────────────────── */
.widget-league-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0,165,80,0.1);
  border: 1px solid rgba(0,165,80,0.25);
  border-radius: 20px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

/* ── SCROLLBAR widget elegante ─────────────────────────────── */
.widget-content::-webkit-scrollbar { width: 4px; }
.widget-content::-webkit-scrollbar-track { background: transparent; }
.widget-content::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ── TIMELINE responsive mobile ───────────────────────────── */
@media (max-width: 480px) {
  .tl-row {
    grid-template-columns: 1fr 22px 30px 22px 1fr;
    gap: 2px;
    padding: 5px 4px;
  }
  .tl-name { font-size: 0.75rem; }
  .tl-sub  { font-size: 0.65rem; }
  .tl-min  { font-size: 0.68rem; padding: 2px 2px; }
}

/* ─────────────────────────────────────────────────
   WIDGETS Y ADS REFINADOS (Estilo Profesional)
   ───────────────────────────────────────────────── */
.widget-row {
  display: grid;
  grid-template-columns: 20px 1fr 18px 18px 18px 18px 20px 26px;
  gap: 3px;
  align-items: center;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(128,128,128,0.08);
  font-size: 0.72rem;
  text-align: center;
  transition: background 0.1s;
  min-height: 26px;
}
.widget-row:hover { background: var(--bg-row-hover); }

.widget-header {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border-strong);
  padding: 6px 6px 3px !important;
  background: var(--bg-tabs);
}

.w-team-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  overflow: hidden;
}

.w-team-logo { width: 14px; height: 14px; object-fit: contain; flex-shrink: 0; }

.w-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 650;
  max-width: 85px;
  letter-spacing: -0.2px;
}

.w-pts { font-weight: 800; color: var(--primary); font-size: 0.8rem; }

.w-diff { font-size: 0.65rem; font-weight: 600; opacity: 0.8; }
.w-diff.pos { color: var(--live-green); }
.w-diff.neg { color: #e74c3c; }

/* Ad In-Feed (News) */
.news-ad-item {
  background: #000;
  color: #fff;
  border-radius: 6px;
  margin: 12px 0;
  padding: 15px;
  border: 1px solid var(--primary);
  box-shadow: 0 4px 20px var(--primary-glow);
  text-align: center;
  position: relative;
}
.news-ad-item::after {
  content: 'AD';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.6rem;
  background: #333;
  padding: 1px 4px;
  border-radius: 2px;
}
.news-ad-btn {
  display: block;
  margin-top: 10px;
  background: var(--primary);
  color: #000;
  font-weight: 900;
  padding: 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Sidebar Ads slots */
.sidebar-ad-slot {
  margin-bottom: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  min-height: 50px;
  overflow: hidden;
}
.sidebar-ad-slot .ad-label {
  display: block;
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 1px;
}
.sidebar-ad-slot ins.adsbygoogle:empty {
  display: none !important;
}
.sidebar-ad-slot:has(ins[data-ad-status="unfilled"]) {
  display: none !important;
}

/* ─────────────────────────────────────────────────
   GOLEADORES RÁPIDOS (Resumen de Detalle)
   ───────────────────────────────────────────────── */
.m-detail-scorers {
  display: grid;
  grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr);
  padding: 10px 15px;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  align-items: center;
}
.sc-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sc-home { text-align: right; }
.sc-away { text-align: left; }
.sc-vs { text-align: center; font-size: 1rem; opacity: 0.3; }

/* ── TIMELINE EVENT ICONS ───────────────────────────────────── */
.tl-goal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tl-goal-icon small {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--bg-card);
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0 2px;
  border-radius: 2px;
  border: 1px solid var(--border);
}

.tl-card-icon {
  width: 10px;
  height: 14px;
  border-radius: 1px;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.tl-card-yellow { background: #f1c40f; }
.tl-card-red { background: #e74c3c; }

.tl-sub-icon { color: var(--primary); font-size: 0.9rem; }
.tl-player-in { color: var(--primary); font-weight: 700; }
.tl-player-out { color: var(--text-dim); text-decoration: line-through; opacity: 0.6; font-size: 0.7rem; }

/* Re-ajuste de grid para mayor claridad */
.timeline-container .tl-row {
  grid-template-columns: 1fr 24px 44px 24px 1fr !important;
  border-bottom: 1px solid rgba(128,128,128,0.05) !important;
  padding: 6px 12px !important;
  min-height: 42px !important;
}
.timeline-container .tl-min {
  background: var(--bg-tabs) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-main) !important;
  border-radius: 10px !important;
  font-size: 0.7rem !important;
  padding: 1px 6px !important;
  width: auto !important;
  min-width: 32px !important;
}

/* %% TIMELINE REDESIGN (PROM-STYLE) %% */
.timeline-container { padding: 0; background: var(--bg-card); }
.timeline-header {
  display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: center;
  padding: 8px 15px; background: var(--bg-tabs); border-bottom: 2px solid var(--border-strong);
  color: #fff; font-family: var(--font-h); font-size: 0.75rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.tl-team-right { text-align: right; }
.tl-row {
  display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: center;
  padding: 4px 6px; border-bottom: 1px solid rgba(128,128,128,0.05); min-height: 38px;
}
.tl-side { display: flex; align-items: center; gap: 5px; font-size: 0.77rem; font-weight: 600; min-width: 0; overflow: hidden; }
.tl-side-home { justify-content: flex-end; text-align: right; }
.tl-side-away { justify-content: flex-start; text-align: left; }
.tl-min-wrap { display: flex; justify-content: center; align-items: center; }
.tl-min-pill {
  background: #222; color: #fff; font-family: var(--font-mono); font-size: 0.68rem;
  font-weight: 800; padding: 2px 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
  min-width: 34px; text-align: center;
}
.tl-event-content { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; width: 100%; }
.tl-home .tl-event-content { flex-direction: row; }
.tl-away .tl-event-content { flex-direction: row-reverse; }
.tl-icon-box { width: 24px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.tl-name-stack { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; flex: 1; overflow: hidden; }
.tl-player-main { font-size: 0.75rem; font-weight: 700; color: var(--text-main); line-height: 1.2; word-break: break-word; overflow-wrap: break-word; }
.tl-player-sub { font-size: 0.62rem; color: var(--text-dim); line-height: 1.1; }
.tl-goal-icon { font-size: 1.1rem; position: relative; }
.tl-goal-icon small { 
  position: absolute; bottom: -3px; right: -4px; 
  background: #000; color: #fff; font-size: 0.5rem; 
  padding: 0 2px; border-radius: 2px; border: 1px solid #333; 
}
.tl-card-icon { width: 10px; height: 14px; border-radius: 1px; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.tl-card-yellow { background: #f1c40f; }
.tl-card-red { background: #e74c3c; }
.tl-sub-box { display: flex; flex-direction: column; font-size: 0.72rem; }
.tl-sub-in { color: var(--primary); font-weight: 800; }
.tl-sub-out { color: var(--text-dim); text-decoration: line-through; opacity: 0.7; }

/* ── STREAM BUTTON ─────────────────────────────── */
.m-stream-btn {
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.m-stream-btn:hover { background: #00cc66; }

/* ═══════════════════════════════════════════════════════════════
   MEJORAS UX: Transiciones de contenido suaves
   ═══════════════════════════════════════════════════════════════ */

/* // Transición suave al cambiar de día */
.matches-container {
  animation: fadeInContent 0.25s ease-out;
}
@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* // Indicador visual de carga inline (no bloquea) */
.inline-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: var(--font-h);
}
.inline-loader::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin360 0.6s linear infinite;
}

/* // Mobile: mejorar toque en pills de fecha */
@media (max-width: 900px) {
  .mobile-date-pill {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* // Hacer el mobile-date-bar sticky bajo las tabs */
  .mobile-date-bar {
    position: sticky;
    top: calc(var(--topbar-h) + var(--header-h) + var(--ticker-h) + var(--tabs-h));
    z-index: 399;
  }
}
/* %% TIMELINE REDESIGN (PROM-STYLE) %% */
.timeline-container { padding: 0; background: var(--bg-card); }
.timeline-header {
  display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: center;
  padding: 8px 15px; background: var(--bg-tabs); border-bottom: 2px solid var(--border-strong);
  color: #fff; font-family: var(--font-h); font-size: 0.75rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.tl-team-right { text-align: right; }
.tl-row {
  display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: center;
  padding: 4px 6px; border-bottom: 1px solid rgba(128,128,128,0.05); min-height: 38px;
}
.tl-side { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; }
.tl-side-home { justify-content: flex-end; text-align: right; }
.tl-side-away { justify-content: flex-start; text-align: left; }
.tl-min-wrap { display: flex; justify-content: center; align-items: center; }
.tl-min-pill {
  background: #222; color: #fff; font-family: var(--font-mono); font-size: 0.68rem;
  font-weight: 800; padding: 2px 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
  min-width: 34px; text-align: center;
}
.tl-event-content { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; width: 100%; }
.tl-home .tl-event-content { flex-direction: row; }
.tl-away .tl-event-content { flex-direction: row-reverse; }
.tl-icon-box { width: 24px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.tl-name-stack { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; flex: 1; overflow: hidden; }
.tl-player-main { font-size: 0.75rem; font-weight: 700; color: var(--text-main); line-height: 1.2; word-break: break-word; overflow-wrap: break-word; }
.tl-player-sub { font-size: 0.62rem; color: var(--text-dim); line-height: 1.1; }
.tl-goal-icon { font-size: 1.1rem; position: relative; }
.tl-goal-icon small { 
  position: absolute; bottom: -3px; right: -4px; 
  background: #000; color: #fff; font-size: 0.5rem; 
  padding: 0 2px; border-radius: 2px; border: 1px solid #333; 
}
.tl-card-icon { width: 10px; height: 14px; border-radius: 1px; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.tl-card-yellow { background: #f1c40f; }
.tl-card-red { background: #e74c3c; }
.tl-sub-box { display: flex; flex-direction: column; font-size: 0.72rem; }
.tl-sub-in { color: var(--primary); font-weight: 800; }
.tl-sub-out { color: var(--text-dim); text-decoration: line-through; opacity: 0.7; }


.m-stream-btn {
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.m-stream-btn:hover { background: #00cc66; }


/* ---------------------------------------------------------------
   MEJORAS DE NAVEGACI�N Y PERFORMANCE (UX FINAL)
   Horizontal scrolling suave para barras de navegaci�n en mobile.
   --------------------------------------------------------------- */

.league-tabs-inner {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 8px 15px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.league-tabs-inner::-webkit-scrollbar {
  display: none;
}
.ltab {
  flex-shrink: 0;
  white-space: nowrap;
}

.mobile-date-bar {
  display: none;
  background: var(--bg-tabs);
  border-bottom: 2px solid var(--border-strong);
  padding: 8px 12px;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h) + var(--ticker-h) + var(--tabs-h));
  z-index: 399;
}
.mobile-date-bar::-webkit-scrollbar {
  display: none;
}
.mobile-date-pill {
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  color: var(--text-header);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-h);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s;
}
.mobile-date-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

@media (max-width: 900px) {
  .mobile-date-bar {
    display: flex;
  }
}

.date-picker-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  flex-shrink: 0;
}
.nav-datepicker {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.75rem;
  font-family: var(--font-h);
  outline: none;
  width: 100px;
}
.date-picker-icon {
  font-size: 0.9rem;
  margin-left: 4px;
  opacity: 0.8;
}

.match-row {
  border-left: 2px solid transparent;
}
.match-row.is-live {
  border-left-color: var(--live-green);
}
.match-row.following {
  border-left-color: #ffaa00;
}

/* -------------------------------------------------
   CUADRO DE TORNEO (BRACKETS) - PROMIEDOS STYLE
   ------------------------------------------------- */

/* Outer wrapper - matches the tournament-bracket-container */
#tournament-bracket-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 15px;
}

/* Horizontal scrollable tree */
.bracket-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 20px;
  background: transparent;
  border: none;
}

.bracket-tree {
  display: flex;
  gap: 0;
  min-width: max-content;
  align-items: flex-start;
  position: relative;
}

/* Each round column */
.bracket-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 210px;
  position: relative;
}

.bracket-column-title {
  font-family: var(--font-h);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 8px 10px;
  background: #0c1f14;
  border-bottom: 2px solid #1e5f2e;
  border-right: 1px solid #1e5f2e;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Match card - Promiedos green dark style */
.bracket-match-node {
  background: #13241b;
  border: 1px solid #1e4a2a;
  border-right: 2px solid #2a6b3a;
  margin: 8px 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.bracket-match-node:hover {
  background: #182d20;
  border-color: var(--primary);
}

/* Teams inside bracket card */
.b-team {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  gap: 8px;
  border-bottom: 1px solid #1e3d28;
  min-height: 32px;
}
.b-team:last-of-type.b-team { border-bottom: none; }
.b-name {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b-winner {
  color: #00e676 !important;
  font-weight: 800 !important;
}
.b-score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  min-width: 16px;
  text-align: right;
}
.b-footer {
  font-size: 0.6rem;
  color: #5a8a65;
  text-align: center;
  padding: 3px 8px;
  background: #0a1a10;
  border-top: 1px solid #1a3a22;
}

/* Legacy bracket styles (kept for fallback) */
.bracket-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 10px;
  overflow-x: auto;
  display: flex;
  gap: 20px;
  margin-top: 15px;
  min-height: 400px;
  scrollbar-width: thin;
}
.bracket-round {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.bracket-round-title {
  text-align: center;
  font-family: var(--font-h);
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  font-weight: 800;
}
.bracket-match {
  background: #13241b;
  border: 1px solid #1e4a2a;
  border-radius: 3px;
  margin-bottom: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  transition: border-color 0.2s;
}
.bracket-match:hover { border-color: var(--primary); }
.bracket-match::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  width: 20px;
  height: 1px;
  background: #2a6b3a;
}
.bracket-column:last-child .bracket-match::after { display: none; }
.bracket-team {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 0.75rem;
  color: #ccc;
}
.bracket-team img { width: 16px; height: 16px; object-fit: contain; }
.bracket-team-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bracket-score {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  font-size: 0.8rem;
}
.bracket-winner { color: #00e676 !important; font-weight: 800 !important; }
.bm-team { display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.bm-team.winner { color: var(--primary); font-weight: 800; }
.bm-score {
  font-family: var(--font-mono);
  background: var(--score-bg);
  color: #fff;
  padding: 0 4px;
  border-radius: 2px;
  min-width: 18px;
  text-align: center;
}

/* INDICADOR DE CARGA PARA CUADRO */
.bracket-loader {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-dim);
}


/* -------------------------------------------------
   PREMIUM POLISH - PROMIEDOS STYLE
   ------------------------------------------------- */
.match-row-compact {
  display: grid;
  grid-template-columns: 60px 1fr 60px 1fr 30px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(128,128,128,0.05);
  transition: all 0.2s ease;
  min-height: 44px;
  gap: 10px;
}
.match-row-compact:hover { background: rgba(0, 165, 80, 0.05); }

.m-time-col {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.m-time-col.live { color: #2ecc71; animation: pulseFade 1.5s infinite; }

.m-team-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-team-col img { width: 18px; height: 18px; object-fit: contain; }
.m-team-col.home { justify-content: flex-end; text-align: right; }
.m-score-col {
  background: rgba(0, 165, 80, 0.1);
  color: var(--primary);
  font-weight: 900;
  font-family: var(--font-mono);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 4px 6px;
  min-width: 45px;
}

/* FORM BUBBLES */
.tl-event-content { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-icon-box { flex-shrink: 0; width: 18px; display: flex; justify-content: center; }
.tl-name-stack { min-width: 0; flex: 1; display: flex; flex-direction: column; overflow: visible; }
.tl-player-main { font-size: 0.75rem; font-weight: 700; color: var(--text-main); line-height: 1.2; word-break: break-word; overflow-wrap: break-word; }
.tl-player-sub { font-size: 0.62rem; color: var(--text-dim); line-height: 1.1; }
.form-bubbles {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: center;
}
.f-bubble {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  line-height: 1;
}
.f-W { background: #2ecc71; } /* Victoria */
.f-D { background: #95a5a6; } /* Empate */
.f-L { background: #e74c3c; } /* Derrota */

/* NEWS REFINEMENTS */
.news-card-promiedos {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.news-card-promiedos:hover {
  background: var(--bg-row-hover);
  border-left-color: var(--primary);
}
.news-thumb { display: none; } /* hidden - clean text-only like Promiedos */
.news-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.news-title-compact {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  /* No clamp - show full title */
  display: block;
  overflow: visible;
  white-space: normal;
}
.news-meta { font-size: 0.63rem; color: var(--text-dim); margin-top: 2px; }
.news-highlight {
  display: inline-block;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 3px;
  vertical-align: middle;
}


/* --- INITIAL LOADER PREMIUM (ESTILO IMAGE 3) --- */
.initial-loader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, #1a1a2e 0%, #0d0d1a 100%);
  display: flex; align-items: center; justify-content: center; z-index: 2000000;
  color: #fff; text-align: center; font-family: var(--font-h); opacity: 1; transition: opacity 0.6s ease-out;
}
.loader-content { max-width: 320px; width: 90%; }
.loader-premium-logo { font-size: 3.5rem; font-weight: 800; margin-bottom: 30px; letter-spacing: -2px; display: flex; justify-content: center; align-items: center; }
.p-fulbo { color: #fff; }
.p-ya { background: #00a550; color: #000; padding: 0px 8px; border-radius: 4px; margin-left: 5px; height: 1.1em; display: inline-flex; align-items: center; justify-content: center; transform: translateY(-2px); }
.p-spinner {
  width: 30px; height: 30px; margin: 0 auto;
  border: 2px solid rgba(255,255,255,0.05); border-top-color: #00a550;
  border-radius: 50%; animation: spin360 0.8s linear infinite;
}
.loader-status { font-size: 0.85rem; color: #888; margin-top: 20px; text-transform: uppercase; letter-spacing: 2px; font-weight: 400; }
.loader-hint { font-size: 0.6rem; color: #444; margin-top: 40px; }

/* H2H OUTCOME STYLING */
.h2h-winner { color: #2ecc71 !important; font-weight: bold; }
.h2h-loser { color: #e74c3c !important; font-weight: normal; opacity: 0.6; }
.h2h-draw { color: #95a5a6 !important; font-weight: normal; opacity: 0.8; }


/* --- REFINAMIENTOS DE PUBLICIDAD --- */
.feed-ad-slot {
  max-height: 120px !important;
  padding: 5px !important;
  margin: 10px 0 !important;
  background: rgba(255,255,255,0.02) !important;
  border: 1px dashed rgba(255,255,255,0.1) !important;
}
.ad-label { font-size: 0.6rem !important; opacity: 0.5 !important; }

/* ── BRACKET: FulboYa Original Style ─────────────────────────── */
/* The #tournament-bracket-container ID styles are above (~4218).  */
/* The .tournament-bracket-container CLASS styles here complete it. */
.tournament-bracket-container {
  padding: 0;
  background: transparent;
  border: none;
  margin-bottom: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Compact match card */
.bracket-match {
  background: var(--bg-detail);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 4px;
  width: 185px;
  position: relative;
  margin: 6px 0;
  transition: border-color 0.18s, background 0.18s;
  cursor: pointer;
  overflow: visible !important;
}
.bracket-match:hover {
  border-left-color: var(--primary);
  background: var(--bg-row-hover);
}

/* Round column */
.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 185px;
  margin-right: 32px;
  position: relative;
}
.bracket-round:last-child { margin-right: 0; }
.bracket-round-title {
  font-family: var(--font-h);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

/* Teams */
.bracket-team {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bracket-team:last-child { border-bottom: none; }
.bracket-team img { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.bracket-team-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bracket-score {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  font-size: 0.78rem;
  min-width: 22px;
  text-align: center;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  padding: 1px 4px;
}
.bracket-winner { color: var(--primary) !important; }
.bracket-winner .bracket-score { background: rgba(0,165,80,0.18); color: var(--primary); }

/* Connector lines */
.bracket-round:not(:last-child) .bracket-match::after {
  content: '';
  position: absolute;
  top: 50%; right: -17px;
  width: 17px; height: 1px;
  background: var(--border);
}
.bracket-round:not(:first-child) .bracket-match::before {
  content: '';
  position: absolute;
  top: 50%; left: -17px;
  width: 17px; height: 1px;
  background: var(--border);
}

/* --- CALENDARIO ICONO --- */
.date-picker-icon {
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.date-picker-icon:hover { transform: scale(1.1); }


/* (bracket connector lines moved to FulboYa bracket section above) */


/* Timeline events CSS fix */
.tl-row { display: grid; grid-template-columns: 1fr 50px 1fr; gap: 8px; padding: 10px 12px; background: var(--bg-detail); border-bottom: 1px solid var(--border); width: 100%; box-sizing: border-box; }
.tl-home .tl-event-content { flex-direction: row; justify-content: flex-end; text-align: right; }
.tl-away .tl-event-content { flex-direction: row-reverse; justify-content: flex-start; text-align: left; }
.tl-event-content { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-name-stack { min-width: 0; display: flex; flex-direction: column; overflow: visible; }

/* Fix card colors rendering */
.tl-card-icon { width: 12px; height: 16px; border-radius: 2px; box-shadow: 1px 1px 2px rgba(0,0,0,0.5); flex-shrink: 0; }
.tl-card-yellow { background: #f1c40f; border: 1px solid #d4ac0d; }
.tl-card-red { background: #e74c3c; border: 1px solid #c0392b; }
.tl-player-main { font-size: 0.75rem; font-weight: 700; color: var(--text-main); line-height: 1.2; word-break: break-word; overflow-wrap: break-word; }
.tl-player-sub { font-size: 0.62rem; color: var(--text-dim); line-height: 1.1; }

.date-picker-wrap {
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    padding: 0;
    margin-left: 10px;
    position: relative;
    cursor: pointer;
}
.nav-datepicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; 
    cursor: pointer;
    z-index: 2;
}
.nav-datepicker::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.date-picker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    color: var(--primary);
    transition: transform 0.2s, background 0.2s;
    pointer-events: none;
}

/* ─── STAR FAVORITE BUTTON ─── */
.fav-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.15s ease;
  flex-shrink: 0;
  margin-left: 4px;
}
.fav-star-btn:hover { transform: scale(1.2); background: rgba(241,196,15,0.12); }
.fav-star-btn.following { animation: starPop 0.3s ease; }
@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   MOBILE SCROLL FIX - Touch scrolling improvements
   ═══════════════════════════════════════════════════════ */

/* Ensure the main scrollable content scrolls properly on iOS */
html {
  height: 100%;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

body {
  min-height: 100%;
  /* Prevent bounce/rubber-band on iOS at edges */
  overscroll-behavior-y: none;
  /* Prevent horizontal scroll */
  overflow-x: hidden;
}

/* Fix sidebar scroll on mobile: isolate from body scroll */
.sidebar {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Main content area: allow natural scroll */
.main-content,
.matches-wrapper,
.page-wrapper {
  -webkit-overflow-scrolling: touch;
}

/* League tabs horizontal scroll - smooth on iOS */
.league-tabs-inner,
.mobile-date-bar {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
}

/* Prevent nested scroll fighting */


/* Fix: iOS input focus doesn't cause scroll jump */
.search-input,
input[type="text"],
input[type="date"] {
  touch-action: manipulation;
}

/* Fix: sidebar overlay blocks scroll on mobile */
.sidebar-overlay {
  touch-action: none;
  overscroll-behavior: none;
}

@media (max-width: 900px) {
  /* Ensure content scrolls under fixed header */
  .page-wrapper {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Stop the news ticker from interfering with touch events */
  .news-ticker-wrap {
    touch-action: none;
    pointer-events: none;
  }
  .news-ticker-wrap a {
    pointer-events: auto;
  }
  
  /* Fix league tabs touch response */
  .ltab {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Match rows: improve touch target */
  .match-row-compact {
    -webkit-tap-highlight-color: rgba(0, 165, 80, 0.1);
    touch-action: manipulation;
  }
}

/* ──────────────────────────────────────────────────────────────
   📱 MOBILE REFINEMENT: Fix header height and layouts
   ────────────────────────────────────────────────────────────── */

.mobile-date-bar { display: none; }

@media (max-width: 900px) {
  .site-header { height: auto !important; min-height: unset; padding: 0; }
  .header-inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; padding: 6px 10px; height: auto !important; }
  
  .logo { order: 1; margin: 0; }
  .logo-wrap { margin-bottom: 0; transform: scale(0.9); }
  .logo-text-group { margin-left: 5px; }
  .logo-subtext { display: none; } /* Much better for mobile space */

  .mobile-menu-btn { order: 2; position: relative; top: 0; right: 0; height: 34px; width: 34px; }
  
  /* Search below logo & hamburger */
  .header-search { order: 3; width: 100%; max-width: 100%; margin: 2px 0 4px; }
  .search-input { height: 32px; font-size: 0.9rem; padding-left: 30px; }
  .search-icon { left: 10px; font-size: 0.8rem; }
  
  .main-nav { display: none; } /* We use the mobile-date-bar instead */
  
  .news-ticker-bar { padding: 4px 6px; font-size: 0.72rem; }
  .ticker-label { padding: 2px 8px; font-size: 0.65rem; }
  
  .sidebar { width: 280px; }
  
  
  
  :root { --header-h: 110px; } 
  .league-tabs-bar { position: relative; top: 0 !important; margin-bottom: 5px; }

  /* New mobile date bar styles */
  .mobile-date-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: #0d0d0d;
    padding: 8px 10px;
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .mobile-date-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
  }
  .mobile-date-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }
  .m-date-picker-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    cursor: pointer;
  }
  .m-date-icon { font-size: 1.2rem; margin-left: 6px; }
  
  .nav-item { display: none; } /* hide existing ones if any */
}

/* Improvement: smooth touch scrolling on containers */
.main-content, .sidebar, .league-tabs-inner {
  -webkit-overflow-scrolling: touch;
}

/* Premium: active states */
.ltab.active { transform: scale(1.02); transition: all 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28); }

/* ──────────────────────────────────────────────────────────────
   ⭐ FAVORITOS DASHBOARD
   ────────────────────────────────────────────────────────────── */

/* Section title bars in Mis Equipos */
.fav-section-title {
  background: var(--border);
  color: var(--text-dim);
  padding: 3px 12px;
  font-family: var(--font-h);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0;
}

/* Team name header */
.fav-team-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-detail);
  border-bottom: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  margin-top: 5px;
}
.fav-team-header img { width: 22px; height: 22px; object-fit: contain; }
.fav-team-header span { font-size: 0.85rem !important; }

/* Form badges (G / E / P) */
.fav-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.68rem;
  color: #fff;
}
.fav-win  { background: #27ae60; }
.fav-loss { background: #c0392b; }
.fav-draw { background: #5d6d7e; }

/* ──────────────────────────────────────────────────────────────
   🏆 BRACKET: NEW .bracket-column nodes (from new JS showTournamentBracket)
   ────────────────────────────────────────────────────────────── */

/* .bracket-column is defined at ~4244 (new version). These override the old ones */
.bracket-column {
  min-width: 195px;
  width: 195px;
}

/* new bracket-match-node (used in bracket-column layout) */
.bracket-match-node {
  background: var(--bg-detail);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 4px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin: 5px 0;
}
.bracket-match-node:hover {
  border-left-color: var(--primary);
  background: var(--bg-row-hover);
}

/* Teams inside .bracket-match-node (scoped) */
.bracket-match-node .b-team {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: transparent;
}
.bracket-match-node .b-team:last-of-type { border-bottom: none; }
.bracket-match-node .b-name {
  flex: 1;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bracket-match-node .b-winner { color: var(--primary) !important; font-weight: 800 !important; }
.bracket-match-node .b-score {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  min-width: 20px;
  text-align: right;
}
.bracket-match-node .b-footer {
  font-size: 0.58rem;
  color: var(--text-dim);
  text-align: center;
  padding: 3px 8px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.05);
}


.match-detail-panel { max-height: 0; overflow: hidden; transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1); background: var(--bg-card); border-bottom: 1px solid var(--border); will-change: max-height; }
.match-detail-panel.visible { max-height: 1800px; }