* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    color: white;
    overflow-x: hidden; /* Solo bloquear horizontal */
    overflow-y: auto; /* Permitir scroll vertical */
}

/* SCROLLBAR PERSONALIZADO - Como tu web */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(0deg, rgba(255,208,50,1) 0%, rgba(255,116,40,1) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(0deg, rgba(255,218,60,1) 0%, rgba(255,126,50,1) 100%);
}

#iframe{width: 100% !important;
    height: calc(10vw + 1px) !important;
    min-height: 180px !important;
    border: none !important;
    overflow: hidden !important;
    display: block !important;}

.epg-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.epg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #2a2a2a;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.epg-date-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.epg-current-date {
    font-size: 16px;
    font-weight: bold;
}

.epg-view-dropdown {
    background: #333;
    border: 1px solid #555;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.epg-view-dropdown:hover {
    background: #444;
}

.epg-navigation {
    display: flex;
    gap: 10px;
    align-items: center;
}

.epg-prev, .epg-next {
    background: #444;
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background 0.2s ease;
}

.epg-prev:hover, .epg-next:hover {
    background: #555;
}

.epg-prev:disabled, .epg-next:disabled {
    opacity: 0.5;
}

/* Timeline wrapper - SIN margin fijo */
.epg-timeline-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    padding-left: 150px; /* Padding en lugar de margin */
}

.epg-timeline {
    position: relative;
    overflow: hidden;
}

/* Horas - ANCHO DINÁMICO */
.epg-hours {
    display: flex;
    background: #333;
    border-bottom: 1px solid #444;
    height: 40px;
    min-width: 5040px; /* Mínimo para 24 horas de color*/
    position: relative;
}

.epg-hour {
    min-width: 210px;
    width: 210px;
    padding: 10px;
    text-align: center;
    border-right: 1px solid #444;
    font-size: 12px;
    flex-shrink: 0;
    color: #ccc;
}

/* Contenedor de días */
.epg-days-container {
    flex: 1;
   /* overflow-x: auto;*/
    overflow-y: auto;
    overflow-x: hidden;
}

/* Cada día como fila */
.epg-day-row {
    display: flex;
    border-bottom: 1px solid #444;
    min-height: 61px;
    position: relative;
}

/* Labels STICKY - Se mantienen fijos */
.epg-day-label {
    width: 150px;
    padding: 10px;
    background: #2a2a2a;
    border-right: 1px solid #444;
    display: flex;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 10;
}

/* Programas - ANCHO DINÁMICO */
.epg-programs {
    position: relative;
    height: 61px;
    background: #1a1a1a;
    min-width: 1920px; /* Mínimo para scroll completo */
    flex-shrink: 0;
}




/* PROGRAMAS CON TEXTO MEJORADO */
.epg-program {
    position: absolute;
    height: 60px;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    border: 1px solid #004499;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px; /* Más grande */
    font-weight: 500; /* Un poco más bold */
    display: flex;
    align-items: center; /* Centrado vertical */
  /*  justify-content: center; */
    text-align: center; /* Texto centrado */
    white-space: normal; /* Permitir múltiples líneas */
    word-wrap: break-word; /* Romper palabras largas */
    line-height: 1.2; /* Espaciado entre líneas */
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden; /* Mantener dentro del contenedor */
    /*min-width: 100px !important;*/
}

.epg-program:hover {
    background: linear-gradient(135deg, #0077dd, #0066cc);
   z-index: 5;
   
}

.epg-program.live {
    background: linear-gradient(135deg, #cc0066, #a30052);
    border-color: #990044;
    box-shadow: 0 0 10px rgba(204, 0, 102, 0.5);
    z-index: 9999;
}

.epg-program.live:hover {
    background: linear-gradient(135deg, #dd0077, #cc0066);
}

.epg-no-programs {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Responsivo */
@media (max-width: 768px) {
    .epg-header {
        padding: 8px 10px;
        flex-direction: column;
        gap: 8px;
    }
    
        .epg-container {
        height: auto; /* En lugar de 100vh */
        min-height: 400px;
    }
    
    .epg-days-container {
        max-height: 350px; /* Altura fija para scroll */
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        overflow-x: visible;
    }
    .epg-date-section {
        width: 100%;
        justify-content: space-between;
    }
    
    .epg-day-label {
        width: 100px;
        font-size: 10px;
    }
    
    .epg-timeline-wrapper {
        padding-left: 100px;
    }
    
    .epg-hour {
        font-size: 10px;
        padding: 6px;
    }
    
    /* Programas más pequeños en móvil */
    .epg-program {
        font-size: 12px; /* Más pequeño en móvil */
        padding: 6px;
        line-height: 1.1;
    }
}