/* Modal Emergente Carnaval - Versión con Video */
.modal-carnaval {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-carnaval.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-carnaval-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: slideIn 0.4s ease;
}

.modal-carnaval-video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: block;
    object-fit: contain;
}

/* Fallback para el poster (por si el video no carga) */
.modal-carnaval-poster {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: none;
}

.modal-carnaval-video.hidden {
    display: none;
}

.modal-carnaval-poster.visible {
    display: block;
}

.modal-carnaval-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ff4444;
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.modal-carnaval-close:hover {
    background: #cc0000;
    transform: rotate(90deg) scale(1.1);
}

.modal-carnaval-video-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10001;
}

.modal-carnaval-control-btn {
    background: rgba(0, 168, 107, 0.95);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-carnaval-control-btn:hover {
    background: rgba(0, 168, 107, 1);
    transform: scale(1.05);
}

.modal-carnaval-control-btn i {
    font-size: 18px;
}

.modal-carnaval-control-btn.muted {
    background: rgba(200, 50, 50, 0.95);
}

.modal-carnaval-control-btn.muted:hover {
    background: rgba(200, 50, 50, 1);
}

/* Indicador de carga */
.modal-carnaval-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    display: none;
}

.modal-carnaval-loading.visible {
    display: block;
}

.modal-carnaval-loading i {
    animation: spin 1s linear infinite;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-carnaval-content {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .modal-carnaval-close {
        top: -10px;
        right: -10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-carnaval-video-controls {
        bottom: 15px;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-carnaval-control-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-carnaval-content {
        max-width: 98%;
        max-height: 80vh;
    }
    
    .modal-carnaval-close {
        top: -8px;
        right: -8px;
        width: 35px;
        height: 35px;
        font-size: 18px;
        border: 2px solid white;
    }
    
    .modal-carnaval-video-controls {
        bottom: 10px;
    }
    
    .modal-carnaval-control-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Ajustes para video en pantallas pequeñas */
@media (max-height: 600px) {
    .modal-carnaval-content {
        max-height: 95vh;
    }
    
    .modal-carnaval-video-controls {
        bottom: 10px;
    }
}
