/* ==========================================
   1. VARIABLES GLOBALES Y RESET
   ========================================== */
:root {
    --bg-dark-grid: #05140b;
    --card-surface: #0a1911;
    --inner-surface: #112219;
    --border-glow: #182e22;
    --brand-green: #00ff66;
    --text-pure: #ffffff;
    --text-muted: #85998e;
    --live-amber: #ff7700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark-grid);
    background-image: 
        linear-gradient(rgba(24, 46, 34, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 46, 34, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-pure);
    min-height: 100vh;
    padding-bottom: 40px;
}

/* ==========================================
   2. TOP NAV & HEADER
   ========================================== */
.top-nav {
    background-color: #000000;
    padding: 12px 40px;
    border-bottom: 1px solid rgba(24, 46, 34, 0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1450px;
    margin: 0 auto;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--brand-green);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--brand-green);
    font-size: 20px;
    cursor: pointer;
    padding-right: 10px;
    align-items: center;
}

.header-banner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1450px;
    margin: 25px auto;
    padding: 0 20px;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon { font-size: 26px; }
.logo-title { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }
.accent-text { color: var(--brand-green); }

.top-promo-banner {
    flex: 1;
    max-width: 980px;
    background: linear-gradient(90deg, #0a2416 0%, #06190f 100%);
    border: 1px solid rgba(0, 255, 102, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 12px 20px;
}

.promo-fire { margin-right: 10px; }
.promo-text { font-size: 13px; font-weight: 600; flex: 1; }
.promo-odds-box { display: flex; gap: 10px; }

.odd-btn {
    background-color: #000000;
    border: 1px solid var(--border-glow);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: var(--text-pure);
}

.odd-val { color: var(--brand-green); }

/* ==========================================
   3. LAYOUT PRINCIPAL (COLUMNAS)
   ========================================== */
.main-wrapper-layout {
    display: flex;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 15px;
    align-items: flex-start;
}

.column-ad-left { width: 200px; flex-shrink: 0; }
.column-menu-left { width: 260px; flex-shrink: 0; }
.center-stage-matches { flex: 1; min-width: 0; }
.column-ad-right { width: 220px; flex-shrink: 0; }

.custom-menu-card {
    background-color: var(--card-surface);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 8px;
    user-select: none;
    max-height: 85vh;
    overflow-y: auto;
}

.custom-menu-card::-webkit-scrollbar { width: 5px; }
.custom-menu-card::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 4px; }

/* ==========================================
   4. BANNERS PUBLICITARIOS
   ========================================== */
.ad-banner-vertical {
    height: 450px;
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.7);
}

.bet365-theme { background-color: #091710; border: 1px dashed rgba(24, 46, 34, 0.8); }
.casino-theme { background-color: #0b1511; border: 1px dashed rgba(46, 42, 24, 0.6); height: 550px; }

.ad-brand-title { color: #00ff66; font-size: 20px; font-weight: 900; margin-bottom: 20px; }
.ad-brand-title-gold { color: #ffcc00; font-size: 20px; font-weight: 900; margin-bottom: 20px; }
.ad-subtext { color: var(--text-muted); font-size: 12px; line-height: 1.6; font-weight: bold; }
.ad-subtext-gold { color: #a89a67; font-size: 12px; line-height: 1.6; font-weight: bold; }
.ad-footer-tag { position: absolute; bottom: 12px; font-size: 10px; color: rgba(255,255,255,0.1); }

/* ==========================================
   5. CONTROLES DE INTERFAZ (UI)
   ========================================== */
.date-navigator-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    background-color: rgba(0,0,0,0.3);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-glow);
}

.date-arrow { background: none; border: none; color: var(--brand-green); font-size: 22px; cursor: pointer; }
.date-side-ghost { color: var(--text-muted); font-size: 13px; opacity: 0.3; }
.date-current-focus { font-size: 13px; font-weight: bold; }

.search-filter-wrapper {
    background-color: var(--card-surface);
    border: 1px solid var(--border-glow);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.search-inner-box {
    display: flex;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glow);
    border-radius: 6px;
}

.search-inner-box input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 14px;
    color: var(--text-pure);
    font-size: 13px;
    outline: none;
}

.search-inner-box input::placeholder { color: var(--text-muted); opacity: 0.4; }
.search-trigger-btn { background: none; border: none; padding: 0 15px; cursor: pointer; font-size: 13px; color: var(--text-muted); }

.fallback-loader { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   6. ESTILOS VISUALES DE LOS COMPONENTES DE FÚTBOL (Vuelven al archivo único)
   ========================================================================== */

/* Menú de Fútbol e Íconos */
.menu-card-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-pure);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--brand-green);
}

.menu-items-vertical a, .menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 10px !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    color: var(--text-pure) !important;
    font-size: 0.82rem !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.menu-items-vertical a:hover, .menu-item:hover, .menu-items-vertical a.active {
    background-color: var(--inner-surface) !important;
    color: var(--brand-green) !important;
}

.menu-items-vertical img, .menu-item img {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

/* Acordeones nativos definidos por HTML estructural */
details.accordion {
    margin-bottom: 5px;
}

summary.accordion-header {
    padding: 8px 6px;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--brand-green);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}
summary.accordion-header::-webkit-details-marker { display: none; }

/* Tarjetas de partidos en la sección central */
.league-card-group {
    background-color: var(--card-surface);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    margin-bottom: 22px;
    overflow: hidden;
}

.league-title {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--brand-green);
    border-bottom: 1px solid var(--border-glow);
    text-transform: uppercase;
}

.match-container-wrapper {
    border-bottom: 1px solid rgba(24, 46, 34, 0.3);
}
.match-container-wrapper:last-child { border-bottom: none; }

.match-item-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    transition: background-color 0.2s ease;
    font-size: 13px;
}
.match-item-row:hover { background-color: var(--inner-surface); }

.match-item-row.live-active {
    background-color: rgba(0, 255, 102, 0.05);
    border-left: 3px solid var(--live-amber);
}

.match-status {
    width: 50px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}
.match-status.live-min { color: var(--live-amber); font-weight: bold; }

.teams-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.team-line { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-pure); }

.score-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-pure);
    min-width: 25px;
    text-align: right;
    padding-right: 10px;
}

.fav-star {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding-left: 8px;
    opacity: 0.4;
}

/* ==========================================
   7. FOOTER
   ========================================== */
.sports-footer {
    background-color: #111111;
    color: #a0a0a0;
    font-size: 13px;
    line-height: 1.5;
    padding: 40px 20px 20px 20px;
    width: 100%;
    margin-top: 50px;
}
.footer-container { max-width: 1200px; margin: 0 auto; }

/* ==========================================
   8. RESPONSIVO
   ========================================== */
@media (max-width: 992px) {
    .top-nav { padding: 12px 20px; }
    .hamburger-btn { display: inline-flex; }
    .column-ad-left, .column-ad-right { display: none !important; }
    .main-wrapper-layout { flex-direction: column; padding: 0 10px; }
    .column-menu-left {
        position: fixed; top: 0; left: -280px; width: 270px; height: 100vh; z-index: 9999;
        background-color: var(--card-surface); box-shadow: 5px 0 20px rgba(0, 0, 0, 0.9);
        transition: left 0.3s ease; overflow-y: auto; padding: 20px 10px;
    }
    .column-menu-left.menu-open { left: 0; }
    .header-banner-container { flex-direction: column; align-items: flex-start; padding: 0 15px; }
    .top-promo-banner { max-width: 100%; flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ==========================================================================
   ESTILOS PREMIUM PARA EL MENÚ LATERAL SPA
   ========================================================================== */

/* Ajuste general para los elementos del menú */
.menu-items-vertical .menu-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between; /* Separa bandera, centro y flecha */
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
}

/* Contenedor centralizado para el texto */
.menu-item-text {
    flex-grow: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

/* Formato unificado de las banderas a la izquierda */
.menu-item .menu-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

/* La flechita verde de la derecha */
.menu-item-arrow {
    color: var(--brand-green, #00ff87);
    font-weight: bold;
    font-size: 12px;
    margin-left: 5px;
    flex-shrink: 0;
}
/* ==========================================================================
   AJUSTES PARA SUB-ACORDEONES DE PAÍSES Y TORNEOS
   ========================================================================== */

/* Estilo para la cabecera del país (actúa como el renglón del menú) */
.country-accordion {
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.country-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    cursor: pointer;
    list-style: none; /* Quita la flecha nativa del navegador */
}
.country-header::-webkit-details-marker {
    display: none; /* Quita flecha en Safari/Chrome antiguo */
}

/* Contenedor de los torneos específicos del país */
.country-tournament-list {
    background: rgba(0, 0, 0, 0.2);
    padding-left: 15px; /* Sangría estética para notar la jerarquía */
    border-left: 2px solid var(--brand-green, #00ff87);
}

.country-tournament-list .menu-item {
    padding: 6px 12px 6px 20px;
    opacity: 0.85;
}
.country-tournament-list .menu-item:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.03);
}

/* Rotación del indicador del acordeón de país */
.country-accordion[open] .country-header .menu-item-arrow {
    transform: rotate(90deg);
    color: #fff;
}
.country-header .menu-item-arrow {
    transition: transform 0.2s ease;
}