/* Importar fuentes modernas y elegantes (VIP & APEX) */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Hanken+Grotesk:wght@300;400;600;700&family=JetBrains+Mono:wght@600&family=Cinzel:wght@400;500;600;700;800;900&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Variables de Diseño Premium - Light Theme APEX */
:root {
    --bg-main: #f9f9fb;        /* Fondo claro del sitio (Background) */
    --bg-card: #ffffff;        /* Fondo blanco para tarjetas y paneles */
    --bg-card-light: #f3f3f5;  /* Fondo sólido secundario para inputs y celdas */
    --bg-card-glass: rgba(255, 255, 255, 0.85); /* Vidrio navbar con blur */
    --border-color: #eeeef0;   /* Borde gris claro sutil */
    --border-glow: rgba(188, 0, 31, 0.15); /* Brillo Sport Red */
    
    --primary: #bc001f;        /* Sport Red */
    --primary-glow: rgba(188, 0, 31, 0.12);
    --primary-hover: #e6192e;  
    
    --accent-emerald: #0051d6; /* Sport Blue para stats y enlaces */
    --accent-emerald-glow: rgba(0, 81, 214, 0.12);
    
    --accent-rose: #ba1a1a;    /* Rojo de error */
    --accent-amber: #d97706;   /* Ámbar de advertencia / Copa */
    
    --text-primary: #1a1c1d;   /* Texto oscuro de alto contraste */
    --text-secondary: #5f5e5e; /* Gris frío intermedio */
    --text-muted: #926e6c;     /* Gris frío apagado */
    
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Hanken Grotesk', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 4px 20px -5px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
}

/* Reset de Estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Encabezados y Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400; /* Anton es pesada por defecto */
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-hover);
}

/* Contenedores */
.container {
    max-width: 1280px; /* Alineado a DESIGN.md */
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar Premium */
.navbar {
    background: var(--bg-card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.navbar .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--accent-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    font-family: var(--font-body);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--bg-card-light);
}
/* Badges de Roles */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px; /* Soft shapes rounded-sm / rounded-md */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-super_admin {
    background: rgba(188, 0, 31, 0.08);
    color: var(--primary);
    border: 1px solid rgba(188, 0, 31, 0.15);
}

.badge-agente_cobros {
    background: rgba(0, 81, 214, 0.08);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 81, 214, 0.15);
}

.badge-organizador {
    background: rgba(217, 119, 6, 0.08);
    color: var(--accent-amber);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.badge-publico {
    background: rgba(146, 110, 108, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(146, 110, 108, 0.15);
}

/* Badges de Clasificación / Ránking Premium */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-right: 0.5rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
    vertical-align: middle;
}

.rank-badge-1 {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #ffffff;
    border: 1px solid #f59e0b;
}

.rank-badge-2 {
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.rank-badge-3 {
    background: linear-gradient(135deg, #ffedd5, #c2410c);
    color: #7c2d12;
    border: 1px solid #f97316;
}

/* Hero Section */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% -20%, rgba(220, 38, 38, 0.07), transparent 70%);
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Stats Counter Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    min-width: 150px;
    box-shadow: var(--shadow-premium);
}

.stat-val {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
}

.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filtros de Deportes */
.deportes-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(15, 23, 42, 0.03);
}

.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Buscador */
.search-container {
    max-width: 500px;
    margin: 0 auto 2.5rem;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 30px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
    padding-right: 3rem;
    box-shadow: var(--shadow-premium);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-glow);
}

/* Tarjetas (Cards) Premium */
.grid-torneos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card-torneo {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.card-torneo:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06), 0 0 15px rgba(37, 99, 235, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.sport-icon-badge {
    background: rgba(15, 23, 42, 0.03);
    padding: 0.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.card-info-row {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: auto;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse 1.5s infinite;
}

.status-dot.pending {
    background-color: var(--accent-amber);
    box-shadow: 0 0 8px var(--accent-amber);
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* Skeletons de Carga */
.skeleton-card {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 20px;
    height: 250px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
}

.btn-success {
    background: var(--accent-emerald);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px var(--accent-emerald-glow);
}

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

.btn-danger:hover {
    background: #c0123c;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Estructura de Columnas para Torneo y Paneles */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Card General de Panel */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    margin-bottom: 2rem;
}

.panel-card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Formularios Premium */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-glow);
}

select.form-control option {
    background-color: var(--bg-card-light);
    color: var(--text-primary);
}

/* Tablas Premium */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-light);
    box-shadow: var(--shadow-premium);
}

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

.table-premium th {
    background: rgba(255, 255, 255, 0.01);
    padding: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.table-premium td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table-premium tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Estilos de Tabla Posiciones específicos */
.table-posiciones td:first-child {
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary);
    width: 50px;
    text-align: center;
}

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

.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.text-center {
    text-align: center !important;
}

.highlight-row {
    background: rgba(0, 240, 255, 0.05); /* Cian traslúcido para destaque */
}

/* Pantalla de login simplificada */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    max-width: 450px;
    width: 100%;
}

.role-switcher-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Interfaz de Toques Rápidos (Marcadores) */
.score-entry-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.matchup-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    background: var(--bg-card-light);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.matchup-team {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.matchup-team .team-logo-lg {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.matchup-score-input {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    width: 80px;
    text-align: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.matchup-score-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-glow);
}

.vs-divider {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* Panel de Jugadores y Toques Rápidos */
.players-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .players-stats-grid {
        grid-template-columns: 1fr;
    }
}

.team-players-panel {
    background: var(--bg-card-light);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
}

.player-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.player-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-dorsal {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.8rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.stat-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-light);
    color: var(--text-primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.stat-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.stat-value-display {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Alertas y Notificaciones */
.alert-box {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(225, 29, 72, 0.06);
    color: var(--accent-rose);
    border: 1px solid rgba(225, 29, 72, 0.15);
}

.alert-success {
    background: rgba(16, 185, 129, 0.06);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Modal Emergente */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-rose);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   Estilos Adicionales Landing Premium (B2B Slate Light)
   ========================================================================== */

/* Hero Container Grid */
.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    text-align: left;
    padding: 3rem 0;
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 0 3rem;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-container .stats-row {
        justify-content: center;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Interactive Widget Simulator */
.live-widget-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.live-widget-card:hover {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    border-color: rgba(37, 99, 235, 0.2);
}

.live-widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--accent-emerald));
}

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

.widget-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.widget-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
}

.widget-team span {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.widget-score-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-score-display {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
    line-height: 1;
}

.widget-btn-plus {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card-light);
    color: var(--text-primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    user-select: none;
}

.widget-btn-plus:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

.widget-standings {
    margin-top: 1.5rem;
}

.widget-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.widget-standings-table th {
    text-align: left;
    color: var(--text-secondary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.widget-standings-table td {
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-primary);
}

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

/* Features Section */
.features-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.02));
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0.5rem auto 3.5rem;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
}

.feature-icon-wrapper {
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

/* ROI Calculator Section */
.calculator-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.calculator-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.calc-inputs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
}

.calc-results-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    position: sticky;
    top: 100px;
}

.calc-slider-group {
    margin-bottom: 1.75rem;
}

.calc-slider-group:last-child {
    margin-bottom: 0;
}

.calc-slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.calc-slider-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.calc-slider-value {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

.calc-slider-input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
}

.calc-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.15s ease;
    box-shadow: 0 0 8px var(--primary-glow);
    border: none;
}

.calc-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-results-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.calc-result-item {
    padding: 1.15rem;
    border-radius: 16px;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-result-item.highlight {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.15);
}

.calc-result-item.highlight .calc-result-value {
    color: var(--accent-emerald);
}

.calc-result-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.calc-result-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ==========================================================================
   Estilos de Zona de Fanáticos (MVP Spotlight)
   ========================================================================== */
/* ==========================================================================
   Estilos de Zona de Fanáticos (MVP Spotlight - VIP Dark Carousel)
   ========================================================================== */
.mvp-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 1.5rem 0.5rem;
}

.mvp-carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.mvp-card {
    background: linear-gradient(135deg, rgba(19, 25, 43, 0.7) 0%, rgba(7, 9, 15, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 270px;
    flex-shrink: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mvp-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.15);
}

.mvp-photo-wrapper {
    position: relative;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    padding: 3.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-emerald) 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-glow);
}

.mvp-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #07090f;
    transition: var(--transition-smooth);
}

.mvp-card:hover .mvp-photo {
    transform: scale(1.05);
}

.mvp-dorsal {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-emerald) 100%);
    color: #111318;
    font-size: 0.8rem;
    font-weight: 700;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3.5px solid #07090f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-family: var(--font-heading);
}

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

.mvp-sport-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 0.28rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.mvp-tournament-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition-smooth);
}

.mvp-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.45rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.mvp-team {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-style: italic;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.mvp-stat-box {
    background: rgba(7, 9, 15, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.75rem 1.25rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    transition: var(--transition-smooth);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mvp-card:hover .mvp-stat-box {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px var(--primary-glow);
}

.mvp-stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-emerald);
    line-height: 1;
    text-shadow: 0 0 12px var(--accent-emerald-glow);
}

.mvp-stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Tipografía de Sección VIP */
.fan-zone-section h2 {
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 2px 20px var(--primary-glow) !important;
}

.fan-zone-section .section-subtitle {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.25rem !important;
    font-style: italic !important;
    letter-spacing: 0.01em !important;
    color: #cbd5e1 !important;
    max-width: 650px;
}


.mvp-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.mvp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mvp-dot.active {
    width: 20px;
    border-radius: 4px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   Estilos de Pestañas e Interfaz de Torneo (Copa y Bracket)
   ========================================================================== */

/* Sistema de Pestañas */
.tab-container {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-premium);
    width: max-content;
    flex-wrap: wrap;
}

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

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.03);
}

.tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.4s ease;
}

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

/* Contenedor del Bracket Eliminatorio */
.bracket-container {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    overflow-x: auto;
    padding: 3.5rem 1rem 2rem 1rem;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 520px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.02), transparent 70%);
    border-radius: 16px;
    position: relative;
}

/* Scrollbar para el contenedor del bracket */
.bracket-container::-webkit-scrollbar {
    height: 8px;
}
.bracket-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.02);
    border-radius: 8px;
}
.bracket-container::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 8px;
}
.bracket-container::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.2);
}

/* Columnas de Rondas */
.bracket-column {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: stretch;
    min-width: 250px;
    flex: 1;
    position: relative;
}

.bracket-column-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
    padding-bottom: 0.5rem;
    position: absolute;
    top: -2.5rem;
    left: 0;
    right: 0;
}

/* Tarjetas de Partidos del Bracket */
.bracket-match {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-glow);
}

.bracket-match:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.bracket-match.placeholder {
    border-left: 4px dashed var(--border-color);
    opacity: 0.6;
    background: rgba(15, 23, 42, 0.01);
}

/* Filas de Equipos */
.bracket-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.bracket-team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 0.5rem;
    border-radius: 3px;
}

.bracket-team-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bracket-team-score {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-secondary);
    min-width: 20px;
    text-align: center;
}

/* Ganadores y Perdedores */
.bracket-team-row.winner {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--accent-emerald);
}

.bracket-team-row.winner .bracket-team-name {
    font-weight: 700;
    color: var(--text-primary);
}

.bracket-team-row.winner .bracket-team-score {
    color: var(--accent-emerald);
    font-weight: 900;
}

.bracket-team-row.loser {
    opacity: 0.5;
}

.bracket-team-row.loser .bracket-team-name {
    font-weight: 500;
}

.bracket-team-row.tie {
    background: rgba(71, 85, 105, 0.05);
}

/* Información del Partido */
.bracket-match-info {
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.4rem;
    margin-top: 0.25rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tarjeta de Campeón */
.champion-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    width: 100%;
}

.champion-card.pending {
    border: 2px dashed var(--border-color);
    background: rgba(15, 23, 42, 0.02);
    opacity: 0.6;
}

.champion-card.active {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 2px solid #fbbf24;
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.15), var(--shadow-premium);
    animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.1), var(--shadow-premium);
        border-color: #fbbf24;
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.25), var(--shadow-premium);
        border-color: #f59e0b;
    }
    100% {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.1), var(--shadow-premium);
        border-color: #fbbf24;
    }
}

@keyframes floatTrophy {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

/* Estilos para partidos en vivo (En Curso) */
.pulse-live-badge {
    background: rgba(220, 38, 38, 0.07);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.16);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-indicator-dot {
    width: 6px;
    height: 6px;
    background-color: #dc2626;
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 1.8s infinite ease-in-out;
}

@keyframes dotPulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(220, 38, 38, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}


/* ======================================================
   TARJETAS EN VIVO — Estilo Google Sports Card
   ====================================================== */
.live-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

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

/* ── Tarjeta principal ── */
.live-match-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-premium), 0 0 15px rgba(0, 240, 255, 0.03);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    animation: liveCardEntrance 0.35s ease both;
    position: relative;
}

.live-match-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
}

.live-match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.25);
}

/* ── Cabecera: badge EN VIVO + ubicación ── */
.live-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem 0.55rem;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
}

.live-card-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

/* ── Cuerpo: equipo + score + equipo ── */
.live-card-body {
    display: flex;
    align-items: center;
    padding: 1.25rem 0.75rem 1rem;
    gap: 0;
}

.live-card-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

/* Logo real */
.live-card-team-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    padding: 6px;
}

/* Iniciales cuando no hay logo */
.live-card-team-initials {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* Usamos colores alternos para el visitante */
.live-card-team.visitor .live-card-team-initials {
    background: linear-gradient(135deg, var(--accent-emerald), var(--primary-hover));
}

.live-card-team-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    text-align: center;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

/* ── Scoreboard central ── */
.live-card-score-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0 0.5rem;
    flex-shrink: 0;
}

.live-card-score-board {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.live-card-score-num {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    line-height: 1;
    min-width: 2.2rem;
    text-align: center;
}

.live-card-score-dash {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1;
    margin: 0 0.1rem;
}

.live-card-score-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

/* ── Pie: incidencias ── */
.live-card-incidents {
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
}

.live-card-incidents-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
}

.live-card-incidents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.live-card-incidents-col {
    padding: 0.5rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 32px;
}

.live-card-incidents-col.col-local {
    border-right: 1px solid var(--border-color);
}

.live-card-incidents-col.col-visitor {
    text-align: right;
}

.live-incident-item {
    font-size: 0.73rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

.live-incident-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.live-incident-item .incident-stat {
    color: #dc2626;
    font-weight: 700;
    font-size: 0.68rem;
}

/* ── Animación dot del badge ── */
.live-indicator-dot {
    width: 7px;
    height: 7px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: dotBlink 1.2s ease-in-out infinite;
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* legacy compatibility */
.live-match-header { display: none; }
.live-match-body   { display: none; }
.live-match-time   { display: none; }
.live-team-col     { display: none; }
.live-score-col    { display: none; }
.live-scorers-container { display: none; }
.live-scorers-title     { display: none; }
.live-scorers-grid      { display: none; }
.live-scorers-list      { display: none; }
.live-scorer-item       { display: none; }

/* ==========================================================================
   DISEÑO ADAPTABLE A CELULAR Y MÓVILES (MEDIA QUERIES)
   ========================================================================== */

/* Breakpoint para Tabletas y Móviles Grandes */
@media (max-width: 768px) {
    html {
        font-size: 13px !important; /* Reducción global de escala tipográfica (rem) */
    }

    /* Contenedor principal */
    .container {
        padding: 0 1rem !important;
    }
    
    .container[style*="margin-top"] {
        margin-top: 1.5rem !important; /* Corrige márgenes superiores excesivos inline */
    }

    /* Navbar Responsivo */
    .navbar {
        padding: 0.65rem 0 !important;
    }
    
    .navbar .nav-container {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: center !important;
        text-align: center !important;
    }

    .nav-links {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .nav-link {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.6rem !important;
    }

    .nav-links li[style*="display: flex"] {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        align-items: center !important;
        width: 100% !important;
    }

    .navbar .badge {
        max-width: 160px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }

    /* Ajustes generales de Cards */
    .panel-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        margin-bottom: 1.25rem !important;
    }

    .panel-card-title {
        font-size: 1.25rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    /* Secciones del Dashboard - Se fuerza el apilamiento y se anula inline grid columns */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        margin-top: 1rem !important;
        margin-bottom: 2rem !important;
    }

    /* Tablas Premium Densas y Desplazamiento */
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 1.5rem !important;
    }

    .table-premium th, 
    .table-premium td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important; /* Evita que el texto de las celdas se rompa feamente */
    }

    .team-cell {
        gap: 0.5rem !important;
    }

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

    /* Ajuste de contadores y tarjetas estadísticas (Anula inline de superadmin.php) */
    .stats-row {
        gap: 1rem !important;
        justify-content: center !important;
        margin-bottom: 2rem !important;
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    .stats-row .stat-item {
        min-width: 140px !important;
        flex: 1 1 calc(50% - 1rem) !important;
        padding: 1rem !important;
    }

    /* Estadísticas de Jugadores y Toques */
    .players-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .player-stat-row {
        padding: 0.6rem 0 !important;
    }
}

/* Breakpoint para Teléfonos Móviles y Pantallas Pequeñas */
@media (max-width: 576px) {
    html {
        font-size: 11.5px !important; /* Escala global más pequeña para pantallas de móvil */
    }

    /* Reducción Explícita de Tipografías en Móvil */
    h1, .hero h1, .container h1, h1[style*="font-size: 2.5rem"], h1[style*="font-size: 2.75rem"] {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }

    h2, .container h2, h2[style*="font-size: 2.25rem"], h2[style*="font-size: 2.5rem"], .fan-zone-section h2 {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        margin-bottom: 0.75rem !important;
    }

    h3, .panel-card-title, .modal-header {
        font-size: 1.15rem !important;
    }

    h4 {
        font-size: 1.05rem !important;
    }

    p, .hero p, .container p, .section-subtitle, .fan-zone-section .section-subtitle {
        font-size: 0.9rem !important;
        text-align: center !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.5 !important;
    }

    /* Botones Adaptados a Móvil */
    .btn {
        font-size: 0.85rem !important;
        padding: 0.55rem 1.15rem !important;
        border-radius: 10px !important;
    }

    .hero-buttons {
        justify-content: center !important;
        width: 100% !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-buttons .btn {
        width: 100% !important;
    }

    /* Fila de Estadísticas Centrada y Fluida */
    .stats-row {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .stat-item {
        padding: 0.75rem 0.5rem !important;
        min-width: 90px !important;
        flex: 1 1 100px !important;
        border-radius: 12px !important;
        text-align: center !important;
    }

    .stat-val {
        font-size: 1.35rem !important;
    }

    .stat-lbl {
        font-size: 0.65rem !important;
        letter-spacing: 0.02em !important;
    }

    /* Filtros de Deportes con Desplazamiento Horizontal */
    .deportes-filter {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 2rem !important;
        gap: 0.5rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
        width: 100% !important;
        max-width: 100% !important;
    }

    .deportes-filter::-webkit-scrollbar {
        display: none !important; /* Safari y Chrome */
    }

    .filter-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
        border-radius: 20px !important;
    }

    /* Cuadrículas de Torneo */
    .grid-torneos {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .card-torneo {
        padding: 1.25rem !important;
    }

    .card-title {
        font-size: 1.15rem !important;
    }

    .card-info-row {
        gap: 0.5rem !important;
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
    }

    /* Simulador de ROI (Landing) */
    .calculator-container {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .calc-inputs-card,
    .calc-results-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    .calc-results-card {
        position: static !important;
    }

    /* Marcadores e Inputs del Partido (Matchup Entry) */
    .matchup-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
        justify-items: center !important;
        border-radius: 12px !important;
    }

    .matchup-team {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .matchup-team .logo-placeholder,
    .matchup-team .team-logo-lg {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.25rem !important;
    }

    .matchup-team h3 {
        font-size: 1.05rem !important;
        margin: 0 !important;
    }

    .matchup-score-input {
        font-size: 1.65rem !important;
        width: 55px !important;
        height: 44px !important;
        padding: 0.2rem !important;
        border-radius: 8px !important;
    }

    .vs-divider {
        font-size: 1.1rem !important;
        margin: 0.15rem 0 !important;
    }

    /* Pestañas de Navegación del Torneo */
    .tab-container {
        display: flex !important;
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
        padding: 0.3rem !important;
        border-radius: 10px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .tab-container::-webkit-scrollbar {
        display: none !important;
    }

    .tab-btn {
        white-space: nowrap !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.8rem !important;
    }

    /* Brackets Eliminatorios */
    .bracket-container {
        min-height: auto !important;
        padding: 2.5rem 0.5rem 1rem 0.5rem !important;
        gap: 1.5rem !important;
    }

    .bracket-column {
        min-width: 200px !important;
    }

    .bracket-column-title {
        font-size: 0.75rem !important;
        top: -2rem !important;
        margin-bottom: 0.75rem !important;
    }

    .bracket-match {
        padding: 0.5rem !important;
        margin: 1rem 0 !important;
        border-radius: 12px !important;
    }

    .bracket-team-name {
        font-size: 0.8rem !important;
    }

    .bracket-team-score {
        font-size: 0.9rem !important;
    }

    /* Modales Rediseñados para Celular */
    .modal-content {
        width: 94% !important;
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    .modal-body {
        font-size: 0.88rem !important;
        margin-bottom: 1.25rem !important;
    }

    /* Inputs de Formulario más Compactos en Móvil */
    .form-control {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.88rem !important;
        border-radius: 10px !important;
    }

    .form-label {
        font-size: 0.75rem !important;
        margin-bottom: 0.35rem !important;
    }

    .form-group {
        margin-bottom: 1rem !important;
    }

    /* Login Wrapper */
    .login-wrapper {
        min-height: 60vh !important;
        padding: 1rem !important;
    }

    .login-card {
        padding: 1.5rem !important;
    }

    .role-switcher-grid {
        grid-template-columns: 1fr !important;
        gap: 0.35rem !important;
    }

    /* Tablas Premium Densas */
    .table-premium th, 
    .table-premium td {
        padding: 0.5rem 0.35rem !important;
        font-size: 0.8rem !important;
    }

    .rank-badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.68rem !important;
    }

    /* Panel del Organizador: Ajustes de Jugadores */
    .team-players-panel {
        padding: 0.75rem !important;
    }

    .player-stat-row {
        padding: 0.45rem 0 !important;
    }

    .player-info {
        font-size: 0.85rem !important;
    }

    .player-dorsal {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.75rem !important;
    }

    .stat-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.85rem !important;
    }

    /* Partidos en vivo compactos (Fuerza overriding en torneo.php) */
    html body .live-card-body {
        padding: 1rem 0.5rem 0.75rem !important;
    }

    html body .live-card-team-logo,
    html body .live-card-team-initials {
        width: 44px !important;
        height: 44px !important;
        font-size: 0.9rem !important;
    }

    html body .live-card-score-num {
        font-size: 2rem !important;
        min-width: 1.8rem !important;
    }

    html body .live-card-score-dash {
        font-size: 1.4rem !important;
    }

    html body .live-card-team-name {
        font-size: 0.75rem !important;
        max-width: 80px !important;
    }

    html body .live-card-incidents-header {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.6rem !important;
    }

    html body .live-card-incidents-col {
        padding: 0.4rem 0.75rem !important;
    }

    html body .live-incident-item {
        font-size: 0.7rem !important;
    }
}

/* Breakpoint para Teléfonos Ultra Pequeños (Ancho <= 400px) */
@media (max-width: 400px) {
    html {
        font-size: 9.5px !important; /* Letras y espaciado aún más pequeños para pantallas compactas (320px) */
    }

    h1, .hero h1, .container h1, h1[style*="font-size: 2.5rem"], h1[style*="font-size: 2.75rem"] {
        font-size: 1.35rem !important;
    }

    h2, .container h2, h2[style*="font-size: 2.25rem"], h2[style*="font-size: 2.5rem"] {
        font-size: 1.15rem !important;
    }

    h3, .panel-card-title {
        font-size: 1.05rem !important;
    }

    /* Navbar ultra compacta */
    .nav-links {
        gap: 0.35rem !important;
    }
    
    .nav-link {
        font-size: 0.8rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    /* MVP Carousel - Reducción del tamaño de tarjetas para caber en 320px */
    .mvp-card {
        width: 235px !important;
        padding: 1.25rem 1rem !important;
    }

    .mvp-photo-wrapper {
        width: 76px !important;
        height: 76px !important;
        margin-bottom: 1rem !important;
    }

    .mvp-dorsal {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }

    .mvp-name {
        font-size: 1.2rem !important;
    }

    .mvp-team {
        font-size: 0.9rem !important;
        margin-bottom: 0.75rem !important;
    }

    .mvp-stat-box {
        padding: 0.5rem 0.75rem !important;
    }

    .mvp-stat-value {
        font-size: 1.3rem !important;
    }

    /* Partidos en vivo compactos a 320px */
    html body .live-card-body {
        padding: 0.75rem 0.35rem !important;
    }

    html body .live-card-team-logo,
    html body .live-card-team-initials {
        width: 36px !important;
        height: 36px !important;
    }

    html body .live-card-team-initials {
        font-size: 0.85rem !important;
    }

    html body .live-card-team-name {
        font-size: 0.7rem !important;
        max-width: 65px !important;
    }

    html body .live-card-score-num {
        font-size: 1.75rem !important;
        min-width: 1.4rem !important;
    }

    html body .live-card-score-dash {
        font-size: 1.2rem !important;
    }
    
    html body .live-card-incidents-grid {
        grid-template-columns: 1fr !important;
    }
    
    html body .live-card-incidents-col.col-local {
        border-right: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    html body .live-card-incidents-col.col-visitor {
        text-align: left !important;
    }

    /* Marcadores e Inputs del Partido (Matchup Entry) a 320px */
    .matchup-team .logo-placeholder,
    .matchup-team .team-logo-lg {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.15rem !important;
    }

    .matchup-score-input {
        font-size: 1.45rem !important;
        width: 50px !important;
        height: 38px !important;
    }
}

/* ==========================================================================
   MEJORAS ESPECÍFICAS DE RESPONSIVIDAD Y ESTÉTICA PARA EL ORGANIZADOR (BACKOFFICE)
   ========================================================================== */

/* ─── DESKTOP OPTIMIZATIONS ─── */
@media (min-width: 993px) {
    /* Hacer el sidebar de equipos sticky en escritorio */
    .dashboard-grid > div:last-child {
        position: sticky;
        top: 100px;
        align-self: start;
    }
}

/* ─── ROSTER CONTAINER SCROLL ─── */
/* Limitar la altura de los paneles de jugadores en el editor de marcador */
.team-players-panel {
    background: var(--bg-card-light);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
}
.team-players-panel-list {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 0.5rem;
}
/* Scrollbar estético para el roster */
.team-players-panel-list::-webkit-scrollbar {
    width: 6px;
}
.team-players-panel-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
}
.team-players-panel-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
.team-players-panel-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ─── SCOREBOARD PREMIUM EDITOR ─── */
.score-entry-container {
    background: var(--bg-card-light);
    border-radius: 20px;
    padding: 1.5rem;
}
.matchup-row {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    border-radius: 16px;
    transition: var(--transition-smooth);
}
.matchup-row:hover {
    border-color: var(--primary);
}
.logo-placeholder {
    transition: var(--transition-smooth);
    background: linear-gradient(135deg, var(--bg-main), var(--bg-card-light)) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.matchup-score-input {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 2.75rem;
    transition: var(--transition-smooth);
}
.matchup-score-input:focus {
    border-color: var(--primary);
    background: var(--bg-main);
    box-shadow: 0 0 0 4px var(--border-glow);
}

/* ─── MOBILE ROSTER TABS (Celular) ─── */
/* Oculto en escritorio */
.roster-tabs-mobile {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    background: var(--bg-card-light);
    padding: 0.35rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}
.roster-tab-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}
.roster-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px var(--primary-glow);
}

/* ─── MOBILE MATCH CARDS (Celular) ─── */
.mobile-matches-list {
    display: none;
    flex-direction: column;
    gap: 1rem;
}
.match-card-mobile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
}
.match-card-mobile:hover {
    border-color: var(--primary);
}
.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.75rem;
}
.match-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.match-card-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.match-card-location {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.match-card-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0;
}
.match-card-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.match-card-team.local {
    justify-content: flex-end;
    text-align: right;
}
.match-card-team.visitor {
    justify-content: flex-start;
    text-align: left;
}
.match-card-score {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    min-width: 65px;
    text-align: center;
}
.match-card-vs {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}
.match-card-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

/* ─── RESPONSIVE OVERRIDES FOR MOBILE (<= 768px) ─── */
@media (max-width: 768px) {
    /* Ocultar tabla premium en móviles y mostrar las tarjetas */
    .table-responsive.hide-on-mobile {
        display: none !important;
    }
    .mobile-matches-list {
        display: flex !important;
    }
    
    /* Mostrar pestañas de roster móvil */
    .roster-tabs-mobile {
        display: grid !important;
    }
    
    /* Lógica de ocultar/mostrar paneles según pestaña activa en celular */
    .players-stats-grid {
        grid-template-columns: 1fr !important;
    }
    .players-stats-grid.show-visitor .team-players-panel:first-child {
        display: none !important;
    }
    .players-stats-grid.show-local .team-players-panel:last-child {
        display: none !important;
    }
    .players-stats-grid.show-local .team-players-panel:first-child {
        display: block !important;
    }
    .players-stats-grid.show-visitor .team-players-panel:last-child {
        display: block !important;
    }
    
    /* Ajustes generales del Scoreboard en Celular */
    .matchup-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1.25rem !important;
    }
    .matchup-team {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0.75rem !important;
    }
    .matchup-team .logo-placeholder {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }
    .matchup-team h3 {
        font-size: 1.1rem !important;
    }
    .matchup-score-input {
        font-size: 2.25rem !important;
        width: 65px !important;
        height: 50px !important;
    }
}

/* ─── TOURNAMENT SELECTOR POLISH ─── */
.tournament-selector-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(15, 23, 42, 0.01) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    padding: 1.25rem 2rem !important;
    margin-bottom: 2rem;
    border-radius: 16px;
}
.tournament-selector-form {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.tournament-selector-label {
    margin: 0 !important;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.tournament-selector-select {
    width: auto;
    flex: 1;
    min-width: 250px;
    background: var(--bg-card-light);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.tournament-selector-badge {
    font-size: 0.8rem !important;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
}

@media (max-width: 768px) {
    .tournament-selector-card {
        padding: 1rem !important;
    }
    .tournament-selector-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    .tournament-selector-label {
        text-align: center !important;
    }
    .tournament-selector-select {
        width: 100% !important;
        min-width: 100% !important;
    }
    .tournament-selector-badge {
        align-self: center !important;
        width: max-content !important;
    }
}

/* ─── NATIVE APP SHELL & MOBILE APP INTERFACE (<= 992px) ─── */
@media (max-width: 992px) {
    /* Fixed Top App Bar */
    .navbar {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        height: 56px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        z-index: 1000 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    .navbar .nav-container {
        width: 100% !important;
        height: 100% !important;
        padding: 0 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Hide desktop nav elements */
    .navbar .nav-links {
        display: none !important;
    }

    /* Compact Logo */
    .logo {
        font-size: 1.3rem !important;
    }
    .logo svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* Mobile Profile Button */
    .mobile-profile-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .mobile-profile-btn a {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--bg-card-light);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border-color);
        transition: var(--transition-smooth);
        color: var(--text-secondary);
    }
    .mobile-profile-btn a:hover {
        background: var(--border-color);
    }

    /* Body offsets for fixed top/bottom bars */
    body {
        padding-top: 56px !important;
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }

    /* Mobile Fixed Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: calc(60px + env(safe-area-inset-bottom)) !important;
        background: rgba(255, 255, 255, 0.88) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid var(--border-color) !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        z-index: 1000 !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04) !important;
    }

    .mobile-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--text-secondary) !important;
        text-decoration: none !important;
        flex: 1 !important;
        height: 100% !important;
        gap: 3px !important;
        transition: var(--transition-smooth) !important;
        padding: 4px 0 !important;
        position: relative !important;
    }

    .mobile-nav-item .material-symbols-outlined {
        font-size: 24px !important;
        transition: transform 0.2s ease, font-variation-settings 0.2s ease !important;
        color: var(--text-secondary) !important;
    }

    .mobile-nav-label {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        font-family: var(--font-body) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        transition: var(--transition-smooth) !important;
    }

    /* Active State Highlights */
    .mobile-nav-item.active {
        color: var(--primary) !important;
    }
    
    .mobile-nav-item.active .material-symbols-outlined {
        color: var(--primary) !important;
        font-variation-settings: 'FILL' 1, 'wght' 500 !important;
        transform: scale(1.1) !important;
    }

    .mobile-nav-item.active .mobile-nav-label {
        color: var(--primary) !important;
        font-weight: 800 !important;
    }

    /* Decorative indicator dot */
    .mobile-nav-item.active::after {
        content: '' !important;
        position: absolute !important;
        bottom: 4px !important;
        width: 4px !important;
        height: 4px !important;
        background-color: var(--primary) !important;
        border-radius: 50% !important;
    }
    
    /* Touch Glimmer Gimmick */
    .mobile-nav-item::before {
        content: '' !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.8) !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        background: rgba(188, 0, 31, 0.04) !important;
        opacity: 0 !important;
        transition: var(--transition-smooth) !important;
        z-index: -1 !important;
    }
    .mobile-nav-item:active::before {
        opacity: 1 !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    /* RESPONSIVE LAYOUT FOR LEAGUE PAGE (torneo.php) */
    .tournament-header-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        margin-bottom: 1.5rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        gap: 1rem !important;
    }
    .tournament-header-card > div {
        text-align: center !important;
    }
    .tournament-header-card h1 {
        font-size: 1.85rem !important;
    }

    /* Scrollable horizontal tab bar */
    .tab-container {
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0.4rem !important;
        gap: 0.5rem !important;
        border-radius: 14px !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: var(--shadow-premium) !important;
    }
    
    .tab-btn {
        flex: 1 0 auto !important;
        white-space: nowrap !important;
        padding: 0.6rem 1.25rem !important;
        font-size: 0.85rem !important;
    }

    /* PREVENIR SCROLL HORIZONTAL DE LA PÁGINA */
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Forzar contención de contenedores y paneles */
    .container, 
    .nav-container, 
    .dashboard-grid, 
    .panel-card, 
    .score-entry-container, 
    .grid-torneos {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Asegurar que las tablas responsivas no desborden y tengan scroll táctil aislado */
    .table-responsive {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* ESCALADO CÓMODO DE LETRAS E ICONOS (Estilo Web App) */
    p, span, td, th, a, button, input, select {
        font-size: 0.95rem !important; /* Mínimo legible de 15px aprox. */
    }

    .material-symbols-outlined {
        font-size: 26px !important; /* Iconos más grandes y fáciles de presionar */
    }

    .badge {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.75rem !important;
    }

    /* Botones más grandes como blancos de toque */
    .btn {
        font-size: 0.95rem !important;
        padding: 0.75rem 1.5rem !important;
        min-height: 44px !important; /* Estándar W3C de usabilidad táctil */
    }

    /* Inputs que no hacen auto-zoom en iOS */
    .form-control {
        font-size: 16px !important; /* 16px evita el zoom automático de Safari en iOS */
        padding: 0.75rem 1.25rem !important;
        min-height: 44px !important;
    }

    /* Deportes Filter deslizable horizontal en index.php */
    .deportes-filter {
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0.5rem 0 !important;
        gap: 0.6rem !important;
        margin-bottom: 2rem !important;
    }
    
    .deportes-filter::-webkit-scrollbar {
        display: none !important; /* Ocultar barra en móviles para diseño limpio */
    }

    .deportes-filter .filter-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 0.6rem 1.25rem !important;
        font-size: 0.9rem !important;
    }

    /* Ajustes del Hero del Landing */
    .hero h1 {
        font-size: 2.25rem !important;
    }
    .hero p {
        font-size: 1.05rem !important;
    }

    /* ─── BRACKET DE COPA EN MÓVIL ─── */
    .bracket-container {
        gap: 1rem !important;
        padding: 2.5rem 0.5rem 1.5rem !important;
        min-height: 400px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .bracket-column {
        min-width: 180px !important;
        flex: 0 0 180px !important;
    }

    .bracket-column-title {
        font-size: 0.7rem !important;
        top: -2rem !important;
    }

    .bracket-match {
        padding: 0.6rem !important;
        margin: 1rem 0 !important;
    }

    .bracket-team-name {
        font-size: 0.75rem !important;
        max-width: 90px !important;
    }

    .bracket-team-score {
        font-size: 0.9rem !important;
    }

    .bracket-match-info {
        font-size: 0.62rem !important;
    }

    .champion-card {
        min-height: 140px !important;
        padding: 1rem !important;
    }

    /* Próxima fase badge (generado automáticamente) */
    .next-phase-alert {
        font-size: 0.8rem !important;
        padding: 0.65rem 1rem !important;
    }
}

/* Hide by default on desktop */
.mobile-bottom-nav {
    display: none;
}
.mobile-profile-btn {
    display: none;
}

/* ─── VISUAL DESIGN UPGRADES (PREMIER LEAGUE STYLE) ─── */
/* Tournament Header Accent Card */
.tournament-header-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-left: 6px solid var(--primary) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-premium) !important;
    padding: 2rem !important;
    margin-bottom: 3rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
}

/* Tab Container Pill Navigation for Desktop */
.tab-container {
    display: flex !important;
    gap: 0.75rem !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 2rem !important;
    box-shadow: none !important;
    width: max-content !important;
    flex-wrap: wrap !important;
    border: none !important;
}

.tab-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    font-family: var(--font-body) !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    transition: var(--transition-smooth) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02) !important;
}

.tab-btn:hover {
    color: var(--text-primary) !important;
    border-color: rgba(188, 0, 31, 0.3) !important;
    background: rgba(15, 23, 42, 0.01) !important;
}

.tab-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

/* Premium Standings & Tables */
.table-premium tr {
    transition: var(--transition-smooth) !important;
}

.table-premium tr:hover td {
    background: rgba(15, 23, 42, 0.01) !important;
}

/* Leader highlight (Rank 1) */
.table-premium tr.leader-row td {
    background: rgba(188, 0, 31, 0.03) !important;
}

.table-premium tr.leader-row:hover td {
    background: rgba(188, 0, 31, 0.05) !important;
}

.rank-cell {
    font-family: var(--font-heading) !important;
    font-weight: 400 !important;
    font-size: 1.1rem !important;
    color: var(--text-muted) !important;
    text-align: center !important;
    width: 50px !important;
}

tr.leader-row .rank-cell {
    color: var(--primary) !important;
    font-weight: bold !important;
}

.team-cell {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-weight: 700 !important;
    font-family: var(--font-body) !important;
    color: var(--text-primary) !important;
}

/* ─── ALERTA DE PRÓXIMA FASE (Auto-generada) ─── */
.next-phase-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(0, 81, 214, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-left: 4px solid var(--accent-emerald);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-emerald);
    animation: alertSlideIn 0.4s ease both;
}

.next-phase-alert .alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.next-phase-alert strong {
    color: var(--text-primary);
}

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

/* ─── BRACKET: mejora visual de las columnas en tableta ─── */
@media (max-width: 768px) {
    .bracket-container {
        gap: 0.75rem !important;
        padding: 2.5rem 0.25rem 1rem !important;
        min-height: 350px !important;
    }
    .bracket-column {
        min-width: 160px !important;
        flex: 0 0 160px !important;
    }
    .bracket-team-name {
        max-width: 80px !important;
        font-size: 0.72rem !important;
    }
}

