/* VARIABLES DE DISEÑO RETROCOMPATIBLES (HEX / HSL) */
:root {
    --color-bg-deep: #050507;
    --color-bg-card: rgba(18, 18, 22, 0.9);
    --color-border-glass: rgba(255, 255, 255, 0.1);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0ab;
    --color-text-muted: #63636b;
    
    --color-gold: #d4af37;
    --color-arg-blue: #74acdf;
    
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-title: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --shadow-soft: 0 15px 50px rgba(0, 0, 0, 0.8);
    --shadow-text-gold: 0 0 20px rgba(212, 175, 55, 0.35);
}

/* RESET GENERAL Y COMPATIBILIDAD CON ANDROID VIEJO */
html, body {
    height: 100%;
    margin: 0;
    background: #000000;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

body {
    cursor: none;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    display: flex;
    flex-direction: column;
}

/* 1. BARRA SUPERIOR FIJA PERMANENTE (15% de la altura total) */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 15vh;
    min-height: 110px;
    background: #000000;
    border-bottom: 3px solid var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.9);
}

.header-logo-container {
    width: 32%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo-image {
    max-height: 64px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

.header-countdown-container {
    width: 65%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.countdown-title {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--color-text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 58px;
}

.timer-num {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-gold);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border-glass);
    width: 100%;
    text-align: center;
    padding: 4px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    text-shadow: var(--shadow-text-gold);
}

.timer-label {
    font-size: 0.6rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timer-divider {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-gold);
    padding-bottom: 14px;
    text-shadow: var(--shadow-text-gold);
}

/* 2. AREA PRINCIPAL DE CONTENIDO (85% restante de altura) */
.main-body {
    position: fixed;
    top: 15vh;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: #000000;
    overflow: hidden;
}

/* VIDEO EN BUCLE - AJUSTADO PARA MOSTRARSE COMPLETO SIN CORTE */
video#v {
    width: 100%;
    height: 100%;
    object-fit: contain; /* No recorta, muestra el video completo */
    background: #000000;
}

/* CAPA DE FIXTURE SUPERPUESTA */
.fixture-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 7, 0.94); /* Fondo más denso para total legibilidad */
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    -webkit-transition: opacity 0.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fixture-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* CONTENEDOR INTERNO DEL FIXTURE */
.fixture-content {
    width: 100%;
    height: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 3vh 24px;
}

.fixture-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    margin-bottom: 10px;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

/* TARJETAS DE PARTIDO GIGANTES */
.match-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-glass);
    border-radius: 24px;
    padding: 16px 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, var(--color-arg-blue), #ffffff, var(--color-arg-blue));
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--color-gold);
    background-color: rgba(212, 175, 55, 0.08);
    border: 1.5px solid var(--color-gold);
    padding: 2px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* BANDERAS CIRCULARES GIGANTES */
.flag-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28%;
}

.flag-emoji {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.04);
    border: 4.5px solid var(--color-border-flag, var(--color-border-glass));
    font-size: 3.2rem;
    line-height: 1;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
}

.team-label {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* DETALLES DEL ENCUENTRO */
.match-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44%;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.detail-icon {
    font-size: 1.1rem;
}

.detail-text {
    font-weight: 700;
}

.detail-item.time .detail-text {
    color: #ffffff;
    font-size: 1rem;
}

.detail-item.venue .city {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--color-gold);
    letter-spacing: 1px;
}

/* LÍNEA DE PIE */
.promo-text-line {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border-glass);
    padding-top: 2vh;
    letter-spacing: 0.5px;
}

/* RESPONSIVIDAD: TEXTO E ICONOS ENORMES PARA TÓTEM DE 50" (PANTALLA COMPLETA 9:16) */
@media (max-width: 480px), (max-aspect-ratio: 9/16) {
    html {
        font-size: 26px; /* Aumenta el tamaño base de REM para escalar todo en el tótem */
    }
    
    .fixed-header {
        height: 15vh;
        padding: 0 24px;
    }
    
    .logo-image {
        max-height: 60px;
    }
    
    .countdown-title {
        font-size: 0.8rem;
    }
    
    .timer-num {
        font-size: 1.7rem;
    }
    
    .timer-segment {
        width: 60px;
    }
    
    .fixture-content {
        max-width: none;
        padding: 4vh 30px;
    }
    
    .fixture-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .flag-emoji {
        width: 90px;
        height: 90px;
        font-size: 3.5rem;
    }
    
    .team-label {
        font-size: 0.8rem;
    }
    
    .detail-item {
        font-size: 1rem;
    }
    
    .detail-item.venue .city {
        font-size: 1.25rem;
    }
    
    .promo-text-line {
        font-size: 1rem;
    }
}
