/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #000428, #004e92);
    color: white;
    overflow: hidden;
    height: 100vh;
}

/* Estilos para el indicador de estado */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

/* Estado: Próximo (gris) */
.status-indicator.upcoming {
    background-color: #888;
}

/* Estado: En vivo (verde con resplandor) */
.status-indicator.live {
    background-color: #00FF00;
    box-shadow: 0 0 10px 2px rgba(0, 255, 0, 0.7);
    animation: pulse 2s infinite;
}

/* Estado: Finalizado (rojo) */
.status-indicator.ended {
    background-color: #831d1d;
}

/* Animación de pulso para eventos en vivo */
@keyframes pulse {
    0% {
        box-shadow: 0 0 5px 0px rgba(0, 255, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 15px 3px rgba(0, 255, 0, 0.9);
    }
    100% {
        box-shadow: 0 0 5px 0px rgba(0, 255, 0, 0.7);
    }
}

/* Estilos para eventos basados en estado */
.event-item.live .event-title {
    color: #00FF00;
    font-weight: bold;
}

.event-item.ended .event-title {
    color: #FF6666;
}

/* Contenido inicial del reproductor */
.initial-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 20px;
}

.initial-content img {
    width: 150px;
    margin-bottom: 20px;
}

.initial-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.initial-content p {
    opacity: 0.8;
    font-size: 16px;
}

/* Leyenda de estados */
.status-legend {
    display: flex;
    justify-content: space-around;
    padding: 8px 10px;
    background-color: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.status-text {
    margin-left: 4px;
}


/* Contenedor principal */
.main-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Cabecera superior */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.header-logo img {
    height: 30px;
    margin-right: 10px;
}

.header-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.current-time {
    font-size: 24px;
    font-weight: bold;
}

.current-date {
    font-size: 14px;
    opacity: 0.8;
}

/* Contenedor del reproductor */
.player-container {
    flex: 3;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
}

.player-container iframe {
    width: 100%;
    height: calc(100% - 60px);
    border: none;
}

/* Contenedor de la agenda */
.events-container {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.7);
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.category-header {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-title {
    font-size: 18px;
    font-weight: bold;
}

.navigation-buttons {
    display: flex;
}

.nav-button {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    border-radius: 50%;
    cursor: pointer;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Barra de búsqueda */
.search-container {
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
}

#search-bar {
    width: 100%;
    padding: 8px 10px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 4px;
}

#search-bar::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Lista de eventos */
.events-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
}

.event-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.event-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.event-item.active {
    background-color: rgba(0, 120, 255, 0.3);
}

.event-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: white;
}

.event-number {
    display: inline-block;
    width: 40px;
    font-size: 16px;
    font-weight: bold;
}

/* Estilo base para el logo */
.event-logo {
    width: 25px;
    height: 25px;
    margin-right: 10px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Este es el selector que permite que los logos se muestren */
.event-item .event-link .event-logo:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Estilos para los logos específicos - Estos se cargarán desde un archivo CSS externo */

.event-details {
    flex: 1;
}

.event-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.event-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sublista de transmisiones */
.stream-list {
    background-color: rgba(0, 0, 0, 0.3);
    list-style: none;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.stream-list.open {
    max-height: 200px;
}

.stream-item {
    padding: 0;
}

.stream-link {
    padding: 10px 15px 10px 65px;
    display: block;
    text-decoration: none;
    color: white;
    font-size: 13px;
    transition: background-color 0.2s;
}

.stream-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Play icon */
.play-icon {
    color: #FF6900;
    margin-right: 5px;
}

/* Barras de desplazamiento */
::-webkit-scrollbar {
    width: 8px;
    background-color: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(0, 183, 255, 0.7), rgba(0, 60, 120, 0.7));
    border-radius: 4px;
}

/* Pie de página */
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
}

.footer-info {
    font-size: 14px;
    opacity: 0.7;
}

/* Responsivo */
@media (max-width: 1050px) {
    .main-container {
        flex-direction: column;
    }
    
    .player-container {
        flex: none;
        height: 50vh;
        padding-top: 60px;
    }
    
    .events-container {
        flex: none;
        height: 50vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .header-logo span {
        display: none;
    }
    
    .current-date {
        display: none;
    }
    
    .event-number {
        width: 30px;
    }
}