/* ==========================================================================
   Football Day: Live Score & Lineup
   Diseño Deportivo UI/UX Senior (FotMob / Sofascore / Flashscore)
   100% Flat, Sin Degradados, Negro Mate Elegante y Gris Sólido
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Paleta Base Mate y Sólida (Sin degradados) */
  --bg-main: #0B0E14;              /* Negro mate puro y elegante */
  --bg-card: #161B22;              /* Gris oscuro sólido estándar GitHub/Sofascore */
  --bg-card-elevated: #1F242C;     /* Gris superficie elevado plano */
  --bg-header: #0B0E14;            /* Cabecera plana */
  --border-color: #2D333B;         /* Borde fino limpio de 1px */
  --border-subtle: #21262D;        /* Separadores sutiles */
  
  /* Colores de Acento Planos */
  --primary-accent: #10B981;       /* Verde esmeralda plano FotMob */
  --secondary-accent: #3B82F6;     /* Azul deportivo plano */
  --warning-accent: #F59E0B;       /* Ámbar plano */
  --danger-accent: #EF4444;        /* Rojo derrota plano */
  --draw-accent: #6B7280;          /* Gris empate plano */
  
  /* Tipografía */
  --text-main: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  /* Dimensiones fijas */
  --bottom-nav-height: 60px;
  --admob-banner-height: 50px;
  --header-height: 58px;
  
  /* Bordes Redondeados Estándar */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset móvil y prevención de zoom accidental */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Bloqueo estricto del ancho móvil para toda la aplicación */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #0A0D12;
  color: var(--text-main);
  font-family: var(--font-family);
  font-feature-settings: "tnum";
  touch-action: manipulation;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor central simulador de app móvil */
#app,
.app-container,
.main-layout,
.mobile-wrapper,
.app-shell {
  width: 100% !important;
  max-width: 440px !important; /* Ancho estricto de smartphone */
  min-height: 100vh;
  margin: 0 auto !important;
  background-color: #0D1117;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.5);
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Top Bar / Cabecera (Sólida, Limpia, Sin Degradados)
   ========================================================================== */
.top-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  min-height: var(--header-height);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  z-index: 50;
  padding-top: max(env(safe-area-inset-top), 16px);
  padding-bottom: 10px;
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.header-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-ball {
  font-size: 1.4rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-badge {
  font-size: 0.62rem;
  color: var(--primary-accent);
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
  width: fit-content;
}

.team-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.team-chip:active {
  background-color: var(--bg-card-elevated);
}

.chip-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
}

.chip-name {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Contenedor Principal Scrollable
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 16px 16px calc(var(--bottom-nav-height) + var(--admob-banner-height) + 24px) 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.tab-view {
  display: none;
  animation: fadeInView 0.2s ease-out;
}

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

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

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-subtext {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* ==========================================================================
   PESTAÑA 1: DÍA DE PARTIDO (MATCHDAY REDISEÑADO)
   ========================================================================== */

/* Badges de Estado */
.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--primary-accent);
  border-radius: 50%;
  animation: pulseDot 1.6s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.competition-badge {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.view-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Insignia de Estado de Alineaciones */
.lineup-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}

.lineup-status-badge.probable {
  background-color: #21262D;
  border: 1px solid #30363D;
  color: #F3F4F6;
}

.lineup-status-badge.probable .lineup-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #F59E0B;
}

.lineup-status-badge.confirmed {
  background-color: #132A22;
  border: 1px solid #10B981;
  color: #10B981;
}

.lineup-status-badge.confirmed .lineup-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  animation: pulseConfirmed 1.4s infinite ease-in-out;
}

.lineup-status-badge.is-clickable {
  cursor: pointer;
  user-select: none;
  outline: none;
  font-family: inherit;
}

.lineup-status-badge.is-clickable:hover {
  filter: brightness(1.12);
  border-color: #3B82F6;
}

.lineup-status-badge.confirmed.is-clickable:hover {
  border-color: #10B981;
}

.lineup-status-badge.is-clickable:active {
  transform: scale(0.97);
}

.lineup-status-badge .lineup-badge-arrow {
  color: #9CA3AF;
  transition: transform 0.15s ease;
  margin-left: 2px;
  flex-shrink: 0;
}

.lineup-status-badge.is-clickable:hover .lineup-badge-arrow {
  color: #F3F4F6;
  transform: translateY(1px);
}

@keyframes pulseConfirmed {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* 1. Tarjeta Principal del Partido */
.match-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.match-teams-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.team-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-logo-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding: 8px;
  overflow: hidden;
}

.match-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.match-team-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3px;
  color: var(--text-main);
}

.team-loc-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.match-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
}

.versus-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.match-score-preview {
  margin-top: 6px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-accent);
}

/* Cuenta Atrás Sólida */
.countdown-section {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  margin-bottom: 4px;
}

.countdown-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.time-unit {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  text-shadow: none; /* Sin sombras */
}

.time-title {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 3px;
  letter-spacing: 0.04em;
}

.time-divider {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Meta de Fecha, Hora y Estadio dentro de la tarjeta de partido */
.match-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.match-meta-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-meta-separator {
  color: var(--text-muted);
  font-weight: 800;
}

.match-meta-weather {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.match-meta-weather .weather-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   2. TARJETA DÓNDE VER EL PARTIDO (DISPOSICIÓN EN 2 NIVELES VERTICALES)
   Fondo sólido #161B22, borde 1px #262C36, esquinas 14px, cabecera + pills wrap
   ========================================================================== */
.tv-broadcast-card {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tv-broadcast-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background-color: #21262D;
  border: 1px solid #2D333B;
  color: #10B981;
  flex-shrink: 0;
}

.tv-icon-badge svg {
  display: block;
}

.tv-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #F3F4F6;
  letter-spacing: 0.01em;
}

.tv-channels-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.channel-pill {
  background-color: #21262D;
  border: 1px solid #2D333B;
  color: #F3F4F6;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* ==========================================================================
   TARJETA DETALLE ARBITRAL Y TARJETAS
   ========================================================================== */
.referee-card {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.referee-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.referee-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: #21262D;
  border: 1px solid #2D333B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.referee-info-text {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.80rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referee-lbl {
  color: #9CA3AF;
  font-weight: 600;
}

.referee-name-val {
  color: #F3F4F6;
  font-weight: 700;
}

.referee-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #9CA3AF;
  flex-shrink: 0;
}

.card-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #F3F4F6;
  font-weight: 700;
}

.card-pill-mini {
  width: 8px;
  height: 11px;
  border-radius: 2px;
  display: inline-block;
}

.card-pill-mini.yellow {
  background-color: #F59E0B;
}

.card-pill-mini.red {
  background-color: #EF4444;
}

.card-stat-divider {
  color: #30363D;
}

.referee-per-match {
  font-size: 0.68rem;
  color: #6B7280;
  font-weight: 500;
}

/* 3. Botón Principal de Acción "Crear mi Once" (Shimmer Táctico) */
.btn-action-shimmer {
  position: relative;
  width: 100%;
  min-height: 50px;
  background-color: #10B981; /* Verde esmeralda sólido mate */
  color: #0B0E14;            /* Texto oscuro de máximo contraste */
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 13px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-action-shimmer:hover {
  background-color: #059669;
}

.btn-action-shimmer:active {
  transform: scale(0.985);
}

/* Pista de barrido de luz suave y pausada (Shimmer Track) */
.btn-shimmer-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-20deg);
  animation: btnShimmerSweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes btnShimmerSweep {
  0% {
    transform: translateX(-160%) skewX(-20deg);
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  28% {
    transform: translateX(320%) skewX(-20deg);
    opacity: 1;
  }
  32% {
    opacity: 0;
  }
  32.1%, 100% {
    transform: translateX(320%) skewX(-20deg);
    opacity: 0;
  }
}

/* Contenido del botón (Icono + Texto + Flecha) */
.btn-action-shimmer .btn-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-action-shimmer .btn-icon {
  width: 20px;
  height: 20px;
  stroke: #0B0E14;
  flex-shrink: 0;
  display: block;
}

.btn-action-shimmer .btn-text {
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #0B0E14;
  white-space: nowrap;
}

.btn-action-shimmer .btn-arrow {
  width: 18px;
  height: 18px;
  stroke: #0B0E14;
  flex-shrink: 0;
  display: block;
  transition: transform 0.2s ease;
}

.btn-action-shimmer:hover .btn-arrow {
  transform: translateX(3px);
}

/* Compatibilidad con selector antiguo */
.match-cta-btn {
  margin-bottom: 16px;
}

/* ==========================================================================
   PRONÓSTICO DEL PARTIDO (MATCH PREDICTION / AI PICK)
   Algoritmo ponderado de clasificación (60%) y enfrentamientos directos H2H (40%)
   ========================================================================== */
.prediction-card {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.prediction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.prediction-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prediction-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: #21262D;
  border: 1px solid #2D333B;
  color: #10B981;
  flex-shrink: 0;
}

.prediction-icon svg {
  display: block;
}

.prediction-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #F3F4F6;
  margin: 0;
}

.confidence-pill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #21262D;
  border: 1px solid #2D333B;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.confidence-label {
  color: #9CA3AF;
  font-weight: 600;
}

.confidence-badge {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.confidence-badge.confidence-high {
  color: #10B981;
}

.confidence-badge.confidence-medium {
  color: #F59E0B;
}

.confidence-badge.confidence-low {
  color: #9CA3AF;
}

.prediction-options-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 12px 0;
}

.prediction-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background-color: #21262D;
  border: 1px solid #30363D;
  border-radius: 10px;
  font-weight: 700;
  color: #9CA3AF;
  transition: border-color 0.2s ease, color 0.2s ease;
  min-height: 80px;
  box-sizing: border-box;
}

.prediction-box .prediction-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #F3F4F6;
}

.prediction-box .prediction-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #9CA3AF;
  margin-top: 2px;
}

.prediction-box .prediction-badge {
  display: none;
}

/* Casilla recomendada: Mismo fondo gris mate, borde verde 2px y texto verde de alto contraste */
.prediction-box.is-picked,
.prediction-box.is-recommended,
.prediction-box.selected,
.prediction-box.active {
  background-color: #21262D;
  border: 2px solid #10B981;
  color: #10B981;
  box-shadow: none;
  transform: none;
}

.prediction-box.is-picked .prediction-value,
.prediction-box.is-recommended .prediction-value,
.prediction-box.selected .prediction-value,
.prediction-box.active .prediction-value {
  color: #10B981;
}

.prediction-box.is-picked .prediction-label,
.prediction-box.is-recommended .prediction-label,
.prediction-box.selected .prediction-label,
.prediction-box.active .prediction-label {
  color: #10B981;
  font-weight: 700;
}

.prediction-box.is-picked .prediction-badge,
.prediction-box.is-recommended .prediction-badge,
.prediction-box.selected .prediction-badge,
.prediction-box.active .prediction-badge {
  display: block;
  font-size: 0.60rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
  color: #10B981;
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
}

.prediction-explanation {
  font-size: 0.82rem;
  color: #9CA3AF;
  line-height: 1.4;
  margin-top: 8px;
  border-top: 1px solid #262C36;
  padding-top: 10px;
}

/* ==========================================================================
   ENCUESTA INTERACTIVA DE LA COMUNIDAD (COMMUNITY POLL)
   ========================================================================== */
.community-poll-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.poll-vote-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.poll-vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background-color: #21262D;
  border: 1px solid #30363D;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  min-height: 60px;
}

.poll-vote-btn:hover {
  background-color: #262D37;
  border-color: #10B981;
}

.poll-vote-btn:active {
  transform: scale(0.98);
}

.poll-btn-symbol {
  font-size: 1.1rem;
  font-weight: 800;
  color: #F3F4F6;
}

.poll-btn-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9CA3AF;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.poll-result-row {
  position: relative;
  background-color: #21262D;
  border: 1px solid #30363D;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.poll-result-row.is-user-pick {
  border: 2px solid #10B981;
  background-color: #1a222c;
}

.poll-result-bar-bg {
  position: absolute;
  inset: 0;
  background-color: transparent;
  pointer-events: none;
}

.poll-result-bar-fill {
  height: 100%;
  opacity: 0.25;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-result-bar-fill.home {
  background-color: #10B981;
}

.poll-result-bar-fill.draw {
  background-color: #6B7280;
}

.poll-result-bar-fill.away {
  background-color: #3B82F6;
}

.poll-result-info {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.poll-team-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #F3F4F6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.poll-user-badge {
  font-size: 0.60rem;
  font-weight: 800;
  color: #10B981;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.poll-pct-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: #F3F4F6;
}

.poll-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #262C36;
}

.poll-voted-notice {
  font-size: 0.72rem;
  font-weight: 700;
  color: #10B981;
}

.poll-total-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6B7280;
  margin-left: auto;
}

/* ==========================================================================
   SECCIÓN DE BAJAS Y SANCIONADOS (INJURIES & SUSPENSIONS)
   ========================================================================== */
.injuries-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.stat-card-icon.red-icon svg {
  stroke: #EF4444;
}

.injuries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.injuries-col {
  background-color: #21262D;
  border: 1px solid #30363D;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.injuries-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #30363D;
}

.injuries-team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 50%;
}

.injuries-team-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #F3F4F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.injuries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.injury-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 8px;
  padding: 6px 8px;
}

.injury-icon-wrap {
  margin-top: 2px;
  flex-shrink: 0;
}

.injury-info-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.injury-player-name {
  font-size: 0.74rem;
  font-weight: 700;
  color: #F3F4F6;
  line-height: 1.2;
}

.injury-dorsal {
  font-size: 0.68rem;
  color: #9CA3AF;
  font-weight: 600;
}

.injury-reason-lbl {
  font-size: 0.66rem;
  color: #9CA3AF;
  margin-top: 2px;
  line-height: 1.2;
}

.injury-empty-item {
  font-size: 0.72rem;
  color: #6B7280;
  font-style: italic;
  padding: 8px 4px;
  text-align: center;
}

/* ==========================================================================
   TARJETAS DE ESTADÍSTICAS MODULARES (STAT-CARD)
   ========================================================================== */
.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.stat-card-icon {
  font-size: 1.1rem;
}

.stat-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* A. Pronósticos y Cuotas */
.odds-bar-container {
  margin-bottom: 12px;
}

.odds-bar {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-card-elevated);
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
}

.odds-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #FFFFFF;
  transition: width 0.4s ease;
}

.odds-segment.home { background-color: var(--primary-accent); color: #042416; }
.odds-segment.draw { background-color: var(--draw-accent); }
.odds-segment.away { background-color: var(--secondary-accent); }

.odds-labels-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.odds-col {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.odds-team-lbl {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.odds-quota-badge {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.over-under-box {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.ou-item {
  display: flex;
  flex-direction: column;
}

.ou-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.ou-val {
  color: var(--text-main);
  font-weight: 700;
  margin-top: 2px;
}

/* B. Duelo de Goleadores */
.scorers-duel-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scorer-side {
  flex: 1;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.scorer-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 8px;
  background-color: var(--bg-card);
}

.scorer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scorer-number-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: var(--radius-full);
}

.scorer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.scorer-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.scorer-club {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.scorer-goals-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}

.goals-count {
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary-accent);
}

.goals-unit {
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--primary-accent);
}

.scorer-meta {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.scorers-duel-vs {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--text-muted);
}

/* C. Racha de Forma */
.form-rows-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.form-team-info {
  display: flex;
  flex-direction: column;
}

.form-team-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.form-points-badge {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-circles {
  display: flex;
  gap: 5px;
}

.form-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #FFFFFF;
}

.form-circle.win  { background-color: var(--primary-accent); color: #042416; }
.form-circle.draw { background-color: var(--draw-accent); }
.form-circle.loss { background-color: var(--danger-accent); }

/* D. Historial Directo (H2H) */
.h2h-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.h2h-stat-box {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.h2h-stat-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.h2h-stat-lbl {
  font-size: 0.62rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.h2h-ratio-bar {
  display: flex;
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--bg-card-elevated);
  margin-bottom: 12px;
}

.h2h-ratio-seg.home { background-color: var(--primary-accent); }
.h2h-ratio-seg.draw { background-color: var(--draw-accent); }
.h2h-ratio-seg.away { background-color: var(--secondary-accent); }

.h2h-matches-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.h2h-match-item {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.h2h-match-meta {
  display: flex;
  flex-direction: column;
}

.h2h-match-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
}

.h2h-match-comp {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.h2h-match-teams {
  display: flex;
  align-items: center;
  gap: 6px;
}

.h2h-t-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.h2h-t-name.winner {
  color: var(--text-main);
  font-weight: 700;
}

.h2h-score-badge {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--primary-accent);
}

/* ==========================================================================
   TABLA DE CLASIFICACIÓN: COMPARATIVA CARA A CARA (STANDINGS SUMMARY)
   2 filas compactas (Local vs Visitante) ordenadas por puesto real y diferencial de puntos
   ========================================================================== */
.standings-summary-card {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.standings-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

.standings-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 10px;
}

.standings-summary-table th {
  color: #6B7280;
  font-weight: 600;
  text-align: center;
  padding: 8px 6px;
  border-bottom: 1px solid #262C36;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.standings-summary-table th.th-pos,
.standings-summary-table td.td-pos {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.standings-summary-table th.th-team,
.standings-summary-table td.td-team {
  text-align: left;
  padding-left: 6px;
}

.standings-summary-table th.th-pj,
.standings-summary-table td.td-pj {
  width: 38px;
  font-size: 0.82rem;
  color: #9CA3AF;
}

.standings-summary-table th.th-dg,
.standings-summary-table td.td-dg {
  width: 44px;
  font-size: 0.82rem;
  color: #9CA3AF;
}

.standings-summary-table th.th-pts,
.standings-summary-table td.td-pts {
  width: 46px;
  font-size: 0.90rem;
  font-weight: 700;
  color: #F3F4F6;
  text-align: right;
  padding-right: 8px;
}

.standings-summary-table td {
  padding: 12px 6px;
  color: #E5E7EB;
  text-align: center;
  border-bottom: 1px solid #1F242D;
  vertical-align: middle;
}

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

.standings-summary-row {
  transition: background-color 0.15s ease;
}

/* Resaltado del equipo favorito */
.standings-summary-row.is-favorite {
  background-color: #132A22;
  border-left: 3px solid #10B981;
}

.standings-summary-row.is-favorite td {
  color: #FFFFFF;
  font-weight: 600;
}

.standings-summary-row.is-favorite .standings-team-name {
  color: #FFFFFF;
  font-weight: 700;
}

.standings-summary-row.is-favorite td.td-pts {
  color: #10B981;
  font-weight: 800;
}

.td-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background-color: #21262D;
  border: 1px solid #30363D;
  font-weight: 700;
  color: #F3F4F6;
  font-size: 0.80rem;
}

.td-pos-badge.top-4 {
  border-color: rgba(59, 130, 246, 0.4);
  color: #60A5FA;
}

.td-pos-badge.relegation {
  border-color: rgba(239, 68, 68, 0.4);
  color: #F87171;
}

.td-team-flex {
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.standings-team-name {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.standings-gap-info {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #262C36;
  font-size: 0.82rem;
  color: #9CA3AF;
  text-align: center;
  font-weight: 500;
}

/* Detalles del Encuentro */
.info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
}

.info-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-icon {
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.info-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.info-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
}

/* ==========================================================================
   BOTONES SÓLIDOS (SIN DEGRADADOS NI SOMBRAS)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-shadow: none;
  box-shadow: none;
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* Botón Verde Esmeralda Plano */
.btn-emerald,
.btn-primary {
  background-color: var(--primary-accent);
  color: #042416;
}

.btn-secondary {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-danger {
  background-color: var(--danger-accent);
  color: #FFFFFF;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid var(--danger-accent);
  color: var(--danger-accent);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 12px 18px;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.mt-3 {
  margin-top: 12px;
}

/* ==========================================================================
   PESTAÑA 2: PIZARRA TÁCTICA
   ========================================================================== */
.tactics-top-bar {
  margin-bottom: 12px;
}

.tactics-name-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tactics-name-input {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  outline: none;
}

.tactics-name-input:focus {
  border-color: var(--primary-accent);
}

.btn-icon-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.btn-icon-secondary:active {
  background-color: var(--bg-card-elevated);
}

.formation-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.formation-selector-wrap::-webkit-scrollbar {
  display: none;
}

.formation-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.formation-pills {
  display: flex;
  gap: 6px;
}

.pill-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pill-btn.active {
  background-color: var(--primary-accent);
  color: #042416;
  border-color: var(--primary-accent);
}

/* ==========================================================================
   CAMPO DE FÚTBOL TÁCTICO VERTICAL (SÓLIDO, LIMPIO)
   ========================================================================== */
.pitch-container-wrapper {
  width: 100%;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #1E3A2B;
}

.tactical-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.48;
  background-color: #143e2a; /* Césped verde estadio */
  background-image: repeating-linear-gradient(
    180deg,
    #184830 0%,
    #184830 10%,
    #133c26 10%,
    #133c26 20%
  );
  overflow: hidden;
  touch-action: pan-y;
}

.pitch-grass-stripes {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06) 0%, transparent 75%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.09'/%3E%3C/svg%3E");
  pointer-events: none;
}

.pitch-lines {
  position: absolute;
  inset: 10px;
  pointer-events: none;
}

.pitch-boundary {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.pitch-half-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%);
}

.pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-center-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-penalty-area.top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 58%;
  height: 18%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-top: none;
}

.pitch-goal-area.top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 7%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-top: none;
}

.pitch-penalty-arc.top {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0% 100%);
}

.pitch-penalty-area.bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 58%;
  height: 18%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-bottom: none;
}

.pitch-goal-area.bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 7%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-bottom: none;
}

.pitch-penalty-arc.bottom {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.pitch-penalty-spot.bottom {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.pitch-watermark {
  position: absolute;
  bottom: 8px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  background-color: rgba(11, 14, 20, 0.85);
  padding: 3px 9px 3px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.pitch-watermark-logo {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}

.pitch-watermark span {
  font-size: 0.62rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.03em;
}

/* Pines de Jugadores */
.players-overlay {
  position: absolute;
  inset: 0;
}

.player-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: top 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), 
              left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.player-slot:active {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-pin-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.player-slot.assigned .player-pin-circle {
  border-color: var(--primary-accent);
}

.player-slot.empty .player-pin-circle {
  background-color: rgba(14, 18, 25, 0.9);
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
}

.player-pin-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-pin-number {
  position: absolute;
  top: -1px;
  right: -1px;
  background-color: var(--secondary-accent);
  color: #FFFFFF;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: var(--radius-full);
  border: 1px solid #FFFFFF;
  line-height: 1;
}

.player-pin-role-empty {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
}

.player-pin-name-badge {
  margin-top: 3px;
  background-color: rgba(11, 14, 20, 0.9);
  border: 1px solid var(--border-color);
  color: #FFFFFF;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  max-width: 60px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.tactics-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==========================================================================
   CAJÓN DESLIZABLE (BOTTOM SHEET)
   ========================================================================== */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet-drawer {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background-color: var(--bg-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.bottom-sheet-backdrop.open .bottom-sheet-drawer {
  transform: translateY(0);
}

.drawer-drag-handle {
  width: 36px;
  height: 4px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  margin: 0 auto 10px auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.drawer-subtitle {
  font-size: 0.75rem;
  color: var(--primary-accent);
  font-weight: 600;
}

.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
}

.drawer-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.pos-tab {
  flex: 1;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pos-tab.active {
  background-color: var(--secondary-accent);
  color: #FFFFFF;
  border-color: var(--secondary-accent);
}

.drawer-search-wrap {
  margin-bottom: 10px;
}

.drawer-search {
  width: 100%;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

.drawer-search:focus {
  border-color: var(--secondary-accent);
}

.drawer-player-list {
  flex: 1;
  overflow-y: auto;
  max-height: 48vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}

.drawer-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
}

.drawer-player-item:active {
  background-color: var(--border-color);
}

.drawer-player-item.is-assigned {
  opacity: 0.5;
  border-left: 3px solid var(--warning-accent);
}

.player-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  object-fit: cover;
}

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

.player-item-name {
  font-size: 0.86rem;
  font-weight: 700;
}

.player-item-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.player-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pos-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pos-tag.POR { background-color: rgba(245, 158, 11, 0.2); color: #F59E0B; }
.pos-tag.DEF { background-color: rgba(59, 130, 246, 0.2); color: #3B82F6; }
.pos-tag.MED { background-color: rgba(16, 185, 129, 0.2); color: #10B981; }
.pos-tag.DEL { background-color: rgba(239, 68, 68, 0.2); color: #EF4444; }

.drawer-footer-actions {
  margin-top: 12px;
}

/* ==========================================================================
   PESTAÑA 3: MIS ONCE (HISTORIAL)
   ========================================================================== */
.count-badge {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.saved-lineups-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-lineup-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.lineup-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.lineup-card-title {
  font-size: 1rem;
  font-weight: 800;
}

.lineup-card-formation {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--primary-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.lineup-card-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.lineup-players-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.player-mini-tag {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.lineup-card-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* ==========================================================================
   PESTAÑA 4: AJUSTES (SETTINGS)
   ========================================================================== */
.settings-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}

.card-subtitle {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.team-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  cursor: pointer;
}

.team-select-item.selected {
  border-color: var(--primary-accent);
  background-color: rgba(16, 185, 129, 0.08);
}

.team-select-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-select-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
}

.team-select-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.team-select-check {
  font-size: 1rem;
  color: var(--primary-accent);
  display: none;
}

.team-select-item.selected .team-select-check {
  display: block;
}

.status-indicator-box {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

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

.status-key {
  color: var(--text-secondary);
}

.status-badge-inline {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.status-badge-inline.mock {
  background-color: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge-inline.live {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--primary-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-val-inline {
  font-weight: 600;
}

.app-info-footer {
  text-align: center;
  padding: 20px 0 10px 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PUBLICIDAD ADMOB Y BARRA INFERIOR FIJA
   ========================================================================== */
.admob-banner-container {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--admob-banner-height);
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admob-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 95%;
  height: 80%;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
}

.admob-label {
  font-size: 0.58rem;
  color: var(--warning-accent);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.admob-placeholder-text {
  font-size: 0.64rem;
  color: var(--text-muted);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: auto;
  min-height: var(--bottom-nav-height);
  background-color: #0E1117;
  border-top: 1px solid #21262D;
  box-shadow: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 4px;
  padding-left: 4px;
  padding-right: 4px;
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  box-sizing: border-box;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: #6B7280;
  cursor: pointer;
  padding: 6px 2px;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: color 0.15s ease;
  min-width: 0;
}

.nav-svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.nav-label {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: inherit;
  transition: color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-item.active {
  color: #10B981;
}

.nav-item.active .nav-svg {
  stroke: #10B981;
}

.nav-item.active .nav-label {
  color: #10B981;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background-color: #10B981;
  border-radius: 9999px;
  box-shadow: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 300;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast-message {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideToast 0.2s ease-out forwards;
}

.toast-message.success { border-left: 3px solid var(--primary-accent); }
.toast-message.error   { border-left: 3px solid var(--danger-accent); }
.toast-message.info    { border-left: 3px solid var(--secondary-accent); }

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

/* ==========================================================================
   FLUJO DE ONBOARDING GUIADO (3 PASOS CONSECUTIVOS)
   100% Flat, Sin Degradados, Negro Mate #0B0E14 y Esmeralda Sólido #10B981
   ========================================================================== */

.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  background-color: #0B0E14;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.onboarding-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.onboarding-overlay.closing {
  opacity: 0;
  transform: scale(0.97);
}

/* Ocultar barra inferior de navegación durante el Onboarding */
body.onboarding-active .bottom-nav,
body.onboarding-active #tab-bar,
body.onboarding-active nav.bottom-nav,
#onboarding-overlay:not(.hidden):not([style*="display: none"]) ~ * .bottom-nav,
#onboarding-overlay:not(.hidden):not([style*="display: none"]) ~ .bottom-nav {
  display: none !important;
}

.onboarding-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Cabecera del Onboarding */
.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px 0;
}

.onboarding-btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  touch-action: manipulation;
  transition: color 0.15s ease;
}

.onboarding-btn-back:hover {
  color: var(--text-main);
}

.onboarding-brand-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.onboarding-brand-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.onboarding-step-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-accent);
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

/* Barra de progreso */
.onboarding-progress-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.onboarding-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background-color: #21262D;
  transition: background-color 0.2s ease;
}

.onboarding-dot.active {
  background-color: var(--primary-accent);
}

.onboarding-dot.completed {
  background-color: #059669;
}

/* Cuerpo y Pasos */
.onboarding-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.onboarding-step {
  display: none;
  animation: fadeInStep 0.22s ease-out forwards;
}

.onboarding-step.active {
  display: block;
}

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

.onboarding-step-hero {
  text-align: center;
  margin-bottom: 20px;
}

.onboarding-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.onboarding-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Paso 1: Idioma */
.onboarding-lang-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.onboarding-lang-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
  text-align: left;
}

.onboarding-lang-btn:hover {
  background-color: var(--bg-card-elevated);
  border-color: #3B4252;
}

.onboarding-lang-btn.selected {
  border-color: var(--primary-accent);
  background-color: #1A1F2C;
}

.lang-flag {
  font-size: 1.8rem;
  line-height: 1;
}

.lang-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
}

.lang-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Paso 2: Competición */
.onboarding-league-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.onboarding-league-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
}

.onboarding-league-card:hover {
  background-color: var(--bg-card-elevated);
}

.onboarding-league-card.selected {
  border-color: var(--primary-accent);
  background-color: #1A1F2C;
}

.league-card-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: #21262D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary-accent);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.league-card-info {
  flex: 1;
}

.league-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.league-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.league-card-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.onboarding-league-card.selected .league-card-arrow {
  color: var(--primary-accent);
}

/* Paso 3: Equipos y Buscador */
.onboarding-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.onboarding-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.onboarding-search-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 38px;
  color: var(--text-main);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s ease;
  font-family: inherit;
}

.onboarding-search-input:focus {
  border-color: var(--primary-accent);
}

.onboarding-teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: calc(100vh - 290px);
  overflow-y: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.onboarding-team-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.onboarding-team-card:hover {
  background-color: var(--bg-card-elevated);
}

.onboarding-team-card.selected {
  border-color: var(--primary-accent);
  background-color: #1A1F2C;
}

.team-card-crest-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-card-crest {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.team-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.team-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card-code {
  font-size: 0.64rem;
  color: var(--text-muted);
  font-weight: 600;
}

.team-card-check {
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s ease;
  color: var(--primary-accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.onboarding-team-card.selected .team-card-check {
  opacity: 1;
  transform: scale(1);
}

/* Pie y Botón de Inicio */
.onboarding-footer {
  position: sticky;
  bottom: 0;
  background-color: #0B0E14;
  padding: 12px 0 4px 0;
  border-top: 1px solid #21262D;
  margin-top: auto;
  z-index: 10;
}

.onboarding-btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  background-color: var(--primary-accent);
  color: #042416;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  box-shadow: none;
}

.onboarding-btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #21262D;
  color: var(--text-muted);
}

.onboarding-loading-box,
.onboarding-empty-box,
.onboarding-error-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Controles extras en Ajustes */
.settings-toggle-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.settings-lang-btn,
.settings-league-btn {
  flex: 1;
  padding: 10px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.settings-lang-btn.active,
.settings-league-btn.active {
  border-color: var(--primary-accent);
  background-color: #1A1F2C;
  color: var(--primary-accent);
}

.settings-loading-hint {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MODAL ANUNCIO RECOMPENSADO OBLIGATORIO (ADMOB REWARDED AD)
   Pantalla completa negra #0B0E14, bloqueo de interacción y cuenta atrás 5s
   ========================================================================== */
.ad-rewarded-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: #0B0E14;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
  box-sizing: border-box;
}

.ad-rewarded-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.ad-rewarded-modal-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.ad-rewarded-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.ad-sponsored-pill {
  background-color: #161B22;
  border: 1px solid #262C36;
  color: #9CA3AF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.ad-countdown-badge {
  font-size: 0.78rem;
  color: #E5E7EB;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ad-countdown-badge strong {
  color: #10B981;
  font-weight: 800;
  font-size: 0.92rem;
  min-width: 28px;
  text-align: right;
}

.ad-rewarded-close-btn {
  background-color: #10B981;
  color: #042416;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  touch-action: manipulation;
}

.ad-rewarded-container {
  width: 100%;
  min-height: 250px;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 14px;
  padding: 24px 18px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-rewarded-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.ad-card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
}

.ad-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #21262D;
  border: 1px solid #2D333B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #F3F4F6;
  margin: 0;
}

.ad-card-desc {
  font-size: 0.82rem;
  color: #9CA3AF;
  line-height: 1.4;
  margin: 0;
}

.ad-rewarded-progress-bar {
  width: 100%;
  height: 4px;
  background-color: #21262D;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}

.ad-rewarded-progress-fill {
  height: 100%;
  width: 0%;
  background-color: #10B981;
}

.ad-rewarded-footer-text {
  font-size: 0.76rem;
  color: #6B7280;
  margin-top: 4px;
}

/* ==========================================================================
   MODAL DE ÉXITO TRAS ANUNCIO (DESCARGAR / COMPARTIR)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 14, 20, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 16px;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-sheet-dialog {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  padding: 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-sheet-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-sheet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: #21262D;
  border: 1px solid #2D333B;
  color: #10B981;
}

.modal-sheet-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #F3F4F6;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.export-preview-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.48;
  max-height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #262C36;
  background-color: #0D1D16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.modal-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* ==========================================================================
   MODAL DE ALINEACIONES PROBABLES / CONFIRMADAS
   ========================================================================== */
.lineups-modal-dialog {
  max-width: 440px;
  max-height: 88vh;
  padding: 16px;
  gap: 12px;
}

/* Duelo de Entrenadores en Cabecera (Coaches Face-off) */
.lineups-coaches-duel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 10px;
  box-sizing: border-box;
}

.lineups-coach-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lineups-coach-card.home {
  text-align: left;
  align-items: flex-start;
}

.lineups-coach-card.away {
  text-align: right;
  align-items: flex-end;
}

.lineups-coach-side-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #10B981;
}

.lineups-coach-info {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.lineups-coach-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #F3F4F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.lineups-coaches-vs {
  font-size: 0.68rem;
  font-weight: 900;
  color: #6B7280;
  padding: 2px 6px;
  background-color: #1F242C;
  border-radius: 6px;
  border: 1px solid #30363D;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.lineups-team-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lineups-team-tab {
  background-color: #21262D;
  border: 1px solid #30363D;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9CA3AF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  outline: none;
  font-family: inherit;
}

.lineups-team-tab:hover {
  filter: brightness(1.1);
  border-color: #484F58;
}

.lineups-team-tab.active {
  background-color: #132A22;
  border-color: #10B981;
  color: #F3F4F6;
}

.lineups-tab-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.lineups-tab-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineups-formation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #11141A;
  border: 1px solid #262C36;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: #9CA3AF;
}

.lineups-formation-val {
  color: #10B981;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.5px;
}

.lineups-modal-body {
  overflow-y: auto;
  max-height: 48vh;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
}

.lineups-section-heading {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9CA3AF;
  margin-bottom: 6px;
}

.lineups-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lineups-player-card {
  background-color: #1E2430;
  border: 1px solid #262C36;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}

.lineups-player-card:hover {
  border-color: #3B82F6;
}

.lineups-player-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lineups-player-dorsal {
  font-size: 0.75rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-variant-numeric: tabular-nums;
  color: #10B981;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #132A22;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  flex-shrink: 0;
}

.lineups-player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #2D333B;
  border: 1px solid #374151;
  flex-shrink: 0;
}

.lineups-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lineups-player-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #F3F4F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineups-player-pos {
  font-size: 0.68rem;
  color: #9CA3AF;
  font-weight: 500;
}

.lineups-player-right {
  flex-shrink: 0;
  margin-left: 6px;
}

.lineups-bench-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.lineups-bench-item {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 8px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lineups-bench-dorsal {
  font-size: 0.70rem;
  font-weight: 800;
  color: #9CA3AF;
  font-variant-numeric: tabular-nums;
  font-family: 'Plus Jakarta Sans', sans-serif;
  flex-shrink: 0;
}

.lineups-bench-name {
  color: #F3F4F6;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.lineups-bench-pos {
  font-size: 0.62rem;
  padding: 1px 4px;
  flex-shrink: 0;
}

.lineups-modal-actions {
  padding-top: 6px;
  border-top: 1px solid #262C36;
}

/* ==========================================================================
   SECCIÓN: PARTIDOS DE HOY (TODAY'S MATCHES)
   ========================================================================== */
.matches-section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

/* Migas de pan Semánticas (Breadcrumbs) */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #9CA3AF;
  margin-bottom: 2px;
}

.breadcrumb-link {
  color: #10B981;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: #34D399;
  text-decoration: underline;
}

.breadcrumb-separator,
.breadcrumb-sep {
  color: #4B5563;
  font-size: 0.70rem;
}

.breadcrumb-current {
  color: #9CA3AF;
  font-weight: 500;
}

/* Fila de Encabezado SEO y Fecha */
.header-titles-row,
.today-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.seo-main-title,
.today-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #F3F4F6;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.seo-sub-title,
.today-subtitle {
  font-size: 0.74rem;
  color: #9CA3AF;
  font-weight: 500;
  margin: 3px 0 0 0;
  line-height: 1.35;
}

.current-date-pill,
.today-date-badge,
#current-date-badge {
  background-color: #1E2532;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #10B981;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  text-align: center;
  align-self: flex-start;
}

/* Pestañas de Filtrado por Intención de Búsqueda SEO (Resultados / Hoy en Directo / Próximos) */
.matches-filter-tabs,
.today-date-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #11141A;
  border: 1px solid #262C36;
  border-radius: 12px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.matches-filter-tabs::-webkit-scrollbar,
.today-date-switcher::-webkit-scrollbar {
  display: none;
}

.tab-pill,
.date-switch-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #9CA3AF;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
  text-align: center;
  outline: none;
}

.tab-pill:hover,
.date-switch-btn:hover {
  color: #F3F4F6;
  background-color: rgba(255, 255, 255, 0.03);
}

.tab-pill:active,
.date-switch-btn:active {
  transform: scale(0.97);
}

.tab-pill.is-active,
.tab-pill.active,
.date-switch-btn.active {
  background-color: #1E2532;
  border-color: #374151;
  color: #F3F4F6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tab-pill.is-active[data-filter="today"],
.tab-pill.active[data-filter="today"] {
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.35);
  background-color: #132A22;
}

/* Punto parpadeante para partidos en directo */
.live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: pulseDot 1.5s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Badge contador de partidos en vivo */
.tab-count-badge {
  background-color: #10B981;
  color: #0B0E14;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 14px;
  text-align: center;
  line-height: 1.2;
}

/* Filtro por Competición */
.today-filter-pills,
#today-league-filters,
.league-chips-container,
#league-filters-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 4px 6px 6px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  cursor: grab;
  user-select: none;
}

.today-filter-pills:active,
#today-league-filters:active,
.today-filter-pills.is-dragging,
#today-league-filters.is-dragging {
  cursor: grabbing;
}

.today-filter-pills::-webkit-scrollbar,
#today-league-filters::-webkit-scrollbar,
.league-chips-container::-webkit-scrollbar,
#league-filters-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.today-filter-pills .filter-pill,
#today-league-filters .filter-pill,
.league-chip {
  flex-shrink: 0; /* Evita que los botones se encojan o aplasten */
  background-color: #21262D;
  border: 1px solid #30363D;
  color: #9CA3AF;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
  font-family: inherit;
  outline: none;
}

.today-filter-pills .filter-pill:hover,
#today-league-filters .filter-pill:hover,
.league-chip:hover {
  border-color: #484F58;
  color: #F3F4F6;
}

.today-filter-pills .filter-pill.active,
#today-league-filters .filter-pill.active,
.league-chip.active {
  background-color: #132A22;
  border-color: #10B981;
  color: #10B981;
}

/* Lista y Tarjetas de Partido */
.today-matches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-today-card,
.today-match-card {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.12s ease;
  user-select: none;
}

.match-today-card:hover,
.today-match-card:hover {
  border-color: #3B82F6;
}

.match-today-card:active,
.today-match-card:active {
  transform: scale(0.985);
}

.match-card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #9CA3AF;
}

.match-league-badge {
  font-weight: 700;
  text-transform: uppercase;
  color: #D1D5DB;
  letter-spacing: 0.03em;
}

.match-tv-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #21262D;
  padding: 3px 8px;
  border-radius: 6px;
  color: #E5E7EB;
}

.match-card-main-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.match-team-col {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0 !important;
  flex: 1 1 0%;
}

.match-team-col.home {
  justify-content: flex-end;
  text-align: right;
}

.match-team-col.away {
  justify-content: flex-start;
  text-align: left;
}

.today-club-badge {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-name-label,
.upcoming-team-name,
.fixture-team-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #F3F4F6;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.match-score,
.match-score-col,
.match-score-container,
.match-timing-badge.score-finished,
.match-timing-badge.score-live,
.score-finished,
.score-live {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  gap: 6px !important;
}

.match-timing-badge.score-finished span,
.match-timing-badge.score-live span {
  white-space: nowrap !important;
  display: inline-block !important;
}

.match-timing-badge {
  background-color: #0D1117;
  border: 1px solid #30363D;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #10B981;
}

.score-live {
  color: #EF4444 !important;
  font-weight: 800 !important;
}

.score-finished {
  color: #E5E7EB !important;
  font-weight: 700 !important;
}

.score-finished {
  color: #9CA3AF;
  font-weight: 700;
}

.match-card-action-bar {
  border-top: 1px solid #21262D;
  padding-top: 8px;
}

.btn-create-lineup {
  width: 100%;
  background-color: #21262D;
  border: 1px solid #30363D;
  color: #D1D5DB;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-create-lineup:hover {
  background-color: #132A22;
  border-color: #10B981;
  color: #10B981;
}

/* Estado cuando no hay encuentros en la pestaña seleccionada */
.empty-state-card {
  background-color: #161B22;
  border: 1px dashed #262C36;
  border-radius: 12px;
  padding: 36px 16px;
  text-align: center;
  margin: 16px 0;
}

.empty-state-text {
  color: #9CA3AF;
  font-size: 0.9rem;
  margin: 0;
}

/* Indicador visual de partido en vivo */
.match-today-card.is-live {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.08);
}

.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #EF4444;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.badge-live-pulse::before {
  content: '';
  width: 7px;
  height: 7px;
  background-color: #EF4444;
  border-radius: 50%;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.today-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.today-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-league-name {
  font-size: 0.70rem;
  font-weight: 800;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.today-header-tv {
  display: flex;
  align-items: center;
  gap: 4px;
}

.today-status-badge {
  font-size: 0.70rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.today-status-badge.is-scheduled {
  background-color: #21262D;
  border: 1px solid #30363D;
  color: #F3F4F6;
}

.today-status-badge.is-live {
  background-color: #132A22;
  border: 1px solid #10B981;
  color: #10B981;
  font-weight: 800;
}

.today-status-badge.is-finished {
  background-color: #21262D;
  border: 1px solid #30363D;
  color: #9CA3AF;
}

.today-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  animation: pulseConfirmed 1.4s infinite ease-in-out;
}

/* Cuerpo Central en 3 Columnas */
.today-matchup-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.today-match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.today-match-team.home {
  justify-content: flex-end;
  text-align: right;
}

.today-match-team.away {
  justify-content: flex-start;
  text-align: left;
}

.today-team-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #F3F4F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-team-logo-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #1E2430;
  border: 1px solid #2D333B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px;
  box-sizing: border-box;
}

.today-club-badge {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.today-match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 58px;
  flex-shrink: 0;
}

.today-vs-circle {
  font-size: 0.70rem;
  font-weight: 800;
  color: #9CA3AF;
  background-color: #21262D;
  border: 1px solid #30363D;
  border-radius: var(--radius-full);
  padding: 2px 7px;
}

.today-time-sub {
  font-size: 0.70rem;
  font-weight: 700;
  color: #10B981;
  font-variant-numeric: tabular-nums;
}

.today-score-pill {
  font-size: 0.88rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  background-color: #21262D;
  border: 1px solid #30363D;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Pie de Tarjeta y Botón de Acción */
.today-card-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid #21262D;
}

.btn-today-action {
  background-color: #21262D;
  border: 1px solid #30363D;
  color: #F3F4F6;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-today-action:hover {
  background-color: #132A22;
  border-color: #10B981;
  color: #10B981;
}

.today-loading-state,
.today-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  gap: 10px;
  color: #9CA3AF;
  font-size: 0.84rem;
  text-align: center;
}

.today-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #262C36;
  border-top-color: #10B981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   16. SISTEMA DE RECORDATORIO PRE-PARTIDO Y ALERTAS LOCALES
   ========================================================================== */
.match-reminder-row {
  display: flex;
  justify-content: center;
  margin: 10px 0 6px 0;
}

/* Botón de recordatorio: estado por defecto (inactivo pero atractivo) */
.btn-reminder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto;
  padding: 8px 18px;
  background-color: #1E2532;
  border: 1px solid #374151;
  border-radius: 20px;
  color: #F3F4F6;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
  user-select: none;
}

.btn-reminder:hover {
  background-color: #263042;
  border-color: #4B5563;
}

.btn-reminder:active {
  transform: scale(0.97);
}

/* Icono de campana en estado inactivo */
.btn-reminder .bell-icon {
  color: #10B981; /* Toque verde esmeralda para llamar la atención del clic */
  transition: transform 0.2s ease;
}

.btn-reminder:hover .bell-icon {
  transform: rotate(12deg);
}

/* Estado activo: cuando el usuario ya ha programado el aviso */
.btn-reminder.is-active {
  background-color: #132A22;
  border-color: #10B981;
  color: #10B981;
}

.btn-reminder.is-active .bell-icon {
  color: #10B981;
  animation: bellRing 0.5s ease-in-out;
}

.btn-reminder.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes bellRing {
  0% { transform: rotate(0); }
  25% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
  75% { transform: rotate(-8deg); }
  100% { transform: rotate(0); }
}

/* ==========================================================================
   17. MODO "EN VIVO" DINÁMICO (LIVE MATCH TRACKING CARD)
   ========================================================================== */
.match-live-section {
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  animation: fadeInLive 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.live-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #10B981;
  letter-spacing: 0.5px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: livePulseDot 1.5s infinite;
}

@keyframes livePulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.live-period-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  background-color: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.live-scoreboard {
  display: none !important;
}

.match-live-min-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  padding: 1px 7px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  margin-top: 3px;
  line-height: 1.2;
}

.live-score-team {
  font-size: 1.1rem;
  font-weight: 800;
  color: #E6EDF3;
  letter-spacing: 1px;
  min-width: 44px;
  text-align: center;
}

.live-score-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #0B0E14;
  padding: 8px 22px;
  border: 1px solid #30363D;
  border-radius: 12px;
  font-size: 1.7rem;
  font-weight: 800;
  color: #10B981;
  font-variant-numeric: tabular-nums;
  min-width: 110px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.live-score-sep {
  color: #6E7681;
  font-size: 1.3rem;
  font-weight: 600;
}

/* Timeline de Eventos en Directo */
.live-events-container {
  border-top: 1px solid #21262D;
  padding-top: 10px;
  margin-top: 6px;
}

.live-events-header {
  margin-bottom: 8px;
}

.live-events-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8B949E;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-events-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-event-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background-color: #11161D;
  border: 1px solid #21262D;
  border-radius: 8px;
  font-size: 0.76rem;
  transition: background-color 0.15s ease;
}

.live-event-item.is-goal {
  border-left: 3px solid #10B981;
}

.live-event-item.is-yellow-card {
  border-left: 3px solid #F59E0B;
}

.live-event-item.is-red-card {
  border-left: 3px solid #EF4444;
}

.live-event-item.is-sub {
  border-left: 3px solid #60A5FA;
}

.live-event-min {
  font-weight: 800;
  color: #10B981;
  font-variant-numeric: tabular-nums;
  min-width: 24px;
}

.live-event-icon {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
}

.live-event-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.live-event-player {
  font-weight: 600;
  color: #E6EDF3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-event-team {
  font-size: 0.68rem;
  color: #8B949E;
}

.live-event-score {
  font-weight: 800;
  color: #10B981;
  font-size: 0.76rem;
  background-color: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.live-events-empty {
  text-align: center;
  padding: 10px;
  font-size: 0.76rem;
  color: #8B949E;
}

/* Badge de Estado Superior */
.badge-live-pulse.is-live {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: #10B981;
  color: #10B981;
}

.badge-live-pulse.is-live .pulse-dot {
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseDot 1.2s infinite;
}

.badge-live-pulse.is-finished {
  background-color: #21262D;
  border-color: #30363D;
  color: #8B949E;
}

.badge-live-pulse.is-finished .pulse-dot {
  background-color: #8B949E;
  box-shadow: none;
  animation: none;
}

/* Toast Container Flotante */
.app-toast-container {
  position: fixed;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.app-toast {
  background-color: #1E2430;
  color: #E6EDF3;
  border: 1px solid #30363D;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.toast-success {
  border-color: #10B981;
  color: #10B981;
  background-color: #132A22;
}

.app-toast.toast-warning {
  border-color: #F59E0B;
  color: #F59E0B;
  background-color: #2A2113;
}

/* ==========================================================================
   18. BANNER DE CONSENTIMIENTO DE COOKIES (RGPD / ePrivacy)
   ========================================================================== */
.cookie-banner-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #161B22;
  border-top: 1px solid #2D3748;
  padding: 14px 18px;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner-container.is-visible {
  transform: translateY(0);
}

.cookie-banner-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #D1D5DB;
  margin: 0;
}

.cookie-banner-link {
  color: #10B981;
  text-decoration: underline;
  cursor: pointer;
  display: inline-block;
  margin-left: 4px;
}

.cookie-banner-link:hover {
  color: #34D399;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background-color: #10B981;
  color: #042F2E;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.btn-cookie-accept:hover {
  background-color: #059669;
}

.btn-cookie-accept:active {
  transform: scale(0.97);
}

.btn-cookie-reject {
  background-color: #21262D;
  color: #9CA3AF;
  border: 1px solid #374151;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.btn-cookie-reject:hover {
  color: #F3F4F6;
  border-color: #4B5563;
}

.btn-cookie-reject:active {
  transform: scale(0.97);
}

/* ==========================================================================
   19. MODAL DE POLÍTICA DE PRIVACIDAD Y COOKIES (RGPD)
   ========================================================================== */
.legal-modal-dialog {
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-body {
  overflow-y: auto;
  max-height: 58vh;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-section h4 {
  font-size: 0.86rem;
  font-weight: 700;
  color: #10B981;
  margin: 0;
}

.legal-section p {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #D1D5DB;
  margin: 0;
}

.legal-section ul {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #D1D5DB;
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-link {
  color: #10B981;
  text-decoration: underline;
}

.legal-link:hover {
  color: #34D399;
}

.legal-consent-status {
  background-color: #11161D;
  border: 1px solid #21262D;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #9CA3AF;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.consent-status-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.consent-status-badge.accepted {
  background-color: #132A22;
  color: #10B981;
  border: 1px solid #10B981;
}

.consent-status-badge.rejected {
  background-color: #21262D;
  color: #9CA3AF;
  border: 1px solid #374151;
}

.consent-status-badge.none {
  background-color: #262113;
  color: #F59E0B;
  border: 1px solid #78350F;
}

/* ==========================================================================
   20. ENLACES INTERNOS CONTEXTUALES Y OPTIMIZACIÓN CLS (CORE WEB VITALS)
   ========================================================================== */
.contextual-internal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px auto 8px auto;
  padding: 10px 16px;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 12px;
  font-size: 0.78rem;
  max-width: 360px;
}

.context-link {
  color: #10B981;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.context-link:hover {
  color: #34D399;
  text-decoration: underline;
}

.context-sep,
.footer-sep {
  color: #4B5563;
  font-size: 0.75rem;
}

.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.footer-nav-link {
  color: #9CA3AF;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-nav-link:hover {
  color: #10B981;
  text-decoration: underline;
}

/* Prevención estricta de CLS (Cumulative Layout Shift) en imágenes y escudos */
.match-logo {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.chip-logo {
  width: 20px;
  height: 20px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

.today-club-badge,
.injuries-team-logo,
.lineups-tab-logo {
  width: 24px;
  height: 24px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.td-team-logo {
  width: 20px;
  height: 20px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.scorer-img {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.lineups-player-avatar,
.player-item-avatar,
.player-pin-avatar {
  width: 32px;
  height: 32px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  flex-shrink: 0;
}

.onboarding-club-badge {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.settings-club-badge {
  width: 36px;
  height: 36px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

/* ==========================================================================
   Pie de Página Oficial (Footer / Créditos de Autoría)
   ========================================================================== */
.app-footer {
  width: 100%;
  padding: 24px 16px 85px 16px; /* 85px inferior para dejar libre la barra fija de navegación en móvil */
  text-align: center;
  background-color: transparent;
  border-top: 1px solid #1E2530;
  margin-top: 30px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.footer-internal-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.footer-nav-link {
  font-size: 0.82rem;
  color: #10B981;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.footer-nav-link:hover {
  color: #34D399;
  text-decoration: underline;
}

.footer-nav-sep {
  color: #4B5563;
  font-size: 0.8rem;
}

.footer-credit {
  font-size: 0.8rem;
  color: #9CA3AF;
  margin: 0;
  letter-spacing: 0.01em;
}

.footer-author-link {
  color: #F3F4F6;
  font-weight: 700;
  text-decoration: none;
  margin-left: 3px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.footer-author-link:hover {
  color: #10B981;
  border-bottom-color: #10B981;
}

.footer-copyright {
  font-size: 0.72rem;
  color: #6B7280;
  margin: 0;
}

/* Pantallas grandes de escritorio */
@media (min-width: 768px) {
  .app-footer {
    padding-bottom: 30px;
  }
}

/* ==========================================================================
   Flujo de Onboarding / Bienvenida & Cuadrícula de Selección de Club
   ========================================================================== */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 14, 20, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.onboarding-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.onboarding-overlay.closing {
  opacity: 0;
}

.onboarding-container {
  width: 100%;
  max-width: 480px;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #21262D;
  background-color: #161B22;
}

.onboarding-btn-back {
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.onboarding-btn-back:hover {
  color: #F3F4F6;
}

.onboarding-brand-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-brand-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: #F3F4F6;
}

.onboarding-step-indicator {
  font-size: 0.78rem;
  color: #10B981;
  font-weight: 700;
  background-color: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 9999px;
}

.onboarding-progress-bar {
  display: flex;
  gap: 6px;
  padding: 8px 18px;
  background-color: #0F1318;
  border-bottom: 1px solid #21262D;
}

.onboarding-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background-color: #262C36;
  transition: background-color 0.25s ease;
}

.onboarding-dot.active {
  background-color: #10B981;
}

.onboarding-dot.completed {
  background-color: #059669;
}

.onboarding-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.onboarding-step-hero {
  margin-bottom: 16px;
  text-align: center;
}

.onboarding-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F3F4F6;
  margin-bottom: 4px;
}

.onboarding-subtitle {
  font-size: 0.82rem;
  color: #9CA3AF;
}

/* Paso 1: Selector de idiomas en vertical */
.onboarding-lang-group,
.language-selector-vertical,
.onboarding-lang-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.onboarding-lang-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 12px;
  color: #F3F4F6;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-lang-btn:hover {
  background-color: #21262D;
  border-color: #374151;
}

.onboarding-lang-btn.is-selected,
.onboarding-lang-btn.selected,
.onboarding-lang-btn.is-active {
  background-color: #132A22;
  border-color: #10B981;
  color: #10B981;
}

.lang-flag {
  font-size: 1.6rem;
  line-height: 1;
}

.lang-label,
.lang-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.lang-sub {
  font-size: 0.72rem;
  color: #9CA3AF;
  margin-left: auto;
}

/* Paso 2: Liga */
.onboarding-league-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.onboarding-league-card {
  background-color: #1F242C;
  border: 2px solid #2D333B;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-league-card:hover {
  border-color: #4B5563;
  background-color: #28303B;
}

.onboarding-league-card.selected,
.onboarding-league-card.is-active {
  border-color: #10B981;
  background-color: #132A22;
}

.league-card-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #2D333B;
  color: #F3F4F6;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.league-card-info {
  flex: 1;
}

.league-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #F3F4F6;
  margin-bottom: 2px;
}

.league-card-desc {
  font-size: 0.75rem;
  color: #9CA3AF;
}

.league-card-arrow {
  color: #9CA3AF;
  font-size: 1.1rem;
  font-weight: bold;
}

/* Paso 3: Buscador y Contenedor sin scroll: vista completa de un solo vistazo */
.onboarding-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.onboarding-search-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.onboarding-search-input {
  width: 100%;
  background-color: #0F1318;
  border: 1px solid #2D333B;
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  color: #F3F4F6;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.onboarding-search-input:focus {
  border-color: #10B981;
}

/* Modales y onboarding contenidos dentro del ancho móvil */
.modal-overlay,
.onboarding-overlay,
.onboarding-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0B0E14;
  z-index: 10000;
  padding: 0;
  box-sizing: border-box;
}

.modal-content,
.onboarding-card,
.onboarding-container,
.modal-onboarding {
  width: 100% !important;
  max-width: 480px !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background-color: #0E1117;
  border: none;
  border-radius: 0;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative;
}

/* Cuadrícula de 2 columnas de clubes respetando el ancho móvil con scroll fluido */
.teams-grid,
#onboarding-teams-grid,
.onboarding-teams-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  max-height: calc(100vh - 120px) !important;
  max-height: calc(100dvh - 120px) !important;
  padding: 4px 0 90px 0 !important;
}

/* Tarjeta de equipo con anulación de scroll horizontal */
.team-select-card,
.onboarding-team-card {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px !important;
  background-color: #161B22;
  border: 1px solid #262C36;
  border-radius: 10px;
  overflow: hidden !important;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 46px !important;
}

.team-select-card:hover,
.onboarding-team-card:hover {
  background-color: #21262D;
  border-color: #374151;
}

.team-select-card.is-selected,
.team-select-card.selected,
.onboarding-team-card.selected,
.onboarding-team-card.is-selected {
  background-color: #132A22 !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 0 1px #10B981;
}

/* Escudo de tamaño fijo 36px */
.team-badge-container,
.team-card-crest-wrap {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.team-select-logo,
.team-card-crest {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.team-select-info,
.team-card-info {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  text-align: left !important;
}

.team-select-name,
.team-card-name {
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #F3F4F6 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  line-height: 1.25;
}

.team-select-code,
.team-card-code {
  font-size: 0.64rem !important;
  color: #9CA3AF !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Indicador de selección lateral */
.team-select-indicator,
.team-card-check {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  border-radius: 50%;
  border: 2px solid #30363D;
  margin-left: auto;
  flex-shrink: 0 !important;
  display: block;
}

.team-select-card.is-selected .team-select-indicator,
.team-select-card.selected .team-select-indicator,
.onboarding-team-card.selected .team-card-check,
.onboarding-team-card.is-selected .team-card-check {
  border-color: #10B981;
  background-color: #10B981;
  box-shadow: inset 0 0 0 2px #132A22;
}

.teams-loading-state,
.onboarding-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 0;
  color: #9CA3AF;
  font-size: 0.85rem;
  grid-column: span 2;
  width: 100%;
}

.teams-error,
.onboarding-error-box {
  color: #EF4444;
  text-align: center;
  padding: 30px 10px;
  font-size: 0.85rem;
  grid-column: 1 / -1;
}

.teams-empty,
.onboarding-empty-box {
  color: #9CA3AF;
  text-align: center;
  padding: 30px 10px;
  font-size: 0.85rem;
  grid-column: 1 / -1;
}

.onboarding-footer {
  position: sticky !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background-color: #0E1117 !important;
  background: #0E1117 !important;
  padding: 12px 16px max(env(safe-area-inset-bottom), 14px) 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-top: auto !important;
  z-index: 10000 !important;
  box-sizing: border-box !important;
  flex-shrink: 0;
}

.onboarding-btn-submit {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  background-color: #10B981;
  color: #042416;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  letter-spacing: 0.2px;
}

.onboarding-btn-submit:disabled,
.onboarding-btn-submit.is-disabled {
  background-color: #21262D !important;
  color: #6B7280 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.onboarding-btn-submit.enabled,
.onboarding-btn-submit:not(:disabled) {
  background-color: #10B981 !important;
  color: #042416 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
}

/* Historial directo y filas limpias sin marcadores rotos */
.h2h-match-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #161B22;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  border: 1px solid #262C36;
}

.h2h-season {
  color: #9CA3AF;
  font-weight: 600;
  font-size: 0.72rem;
}

.h2h-score-badge {
  background-color: #21262D;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  color: #10B981;
}

.h2h-teams {
  color: #D1D5DB;
  font-size: 0.74rem;
  font-weight: 500;
}

/* Indicadores de racha reciente */
.form-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 2px;
}

.form-win { background-color: #10B981; }
.form-draw { background-color: #EAB308; }
.form-loss { background-color: #EF4444; }

.injury-item {
  font-size: 0.74rem;
  color: #9CA3AF;
  line-height: 1.4;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.injury-bullet {
  color: #EF4444;
  font-weight: bold;
}

.injury-player {
  color: #F3F4F6;
  font-weight: 600;
}

.injury-reason {
  color: #9CA3AF;
  font-size: 0.70rem;
}

/* Skeleton loader para la tarjeta principal de partido */
.match-card-skeleton {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.match-card-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-box {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
}

.skeleton-circle {
  border-radius: 50% !important;
}






