/* Modal de Vídeo - Design Moderno */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 80vw;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: scale(0.8) translateY(30px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

@keyframes modalSlideIn {
    0% {
        transform: scale(0.8) translateY(30px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    stroke: white;
    stroke-width: 2;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
}

#modalVideo {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* Responsividade - Mantendo proporção 16:9 */
@media (max-width: 1200px) {
    .modal-content {
        width: 90vw;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        border-radius: 20px;
    }
    
    .modal-close {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .modal-close svg {
        width: 20px;
        height: 20px;
    }
    
    .video-container {
        border-radius: 20px;
    }
    
    #modalVideo {
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98vw;
        border-radius: 16px;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
    
    .modal-close svg {
        width: 18px;
        height: 18px;
    }
    
    .video-container {
        border-radius: 16px;
    }
    
    #modalVideo {
        border-radius: 16px;
    }
}

/* Para telas muito pequenas */
@media (max-height: 600px) {
    .modal-content {
        height: 85vh;
        width: calc(85vh * 16 / 9);
        max-width: 95vw;
    }
}

/* Animação de entrada suave */
.modal-overlay {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Efeito de brilho no botão de fechar */
@keyframes glow {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 0 0 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 0 0 8px rgba(255, 255, 255, 0.05);
    }
}

.modal-close {
    animation: glow 3s ease-in-out infinite;
}

/* Efeito de hover no modal */
.modal-content:hover {
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Transição suave para o vídeo */
#modalVideo {
    transition: all 0.3s ease;
}

/* Efeito de loading sutil */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 2s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Overlay de reprodução */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.5s ease-out;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    text-align: center;
    color: white;
}

.play-button svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.play-button p {
    font-size: 18px;
    margin: 0;
    font-weight: 300;
    opacity: 0.9;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsividade - Mantendo proporção 16:9 */
@media (max-width: 768px) {
    .modal-content {
        width: 90vw;
        height: calc(90vw * 9 / 16); /* Mantém proporção 16:9 */
        max-height: 80vh;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    .modal-close svg {
        width: 18px;
        height: 18px;
    }
    
    .play-button svg {
        width: 60px;
        height: 60px;
    }
    
    .play-button p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95vw;
        height: calc(95vw * 9 / 16); /* Mantém proporção 16:9 */
        max-height: 85vh;
    }
    
    .modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
    
    .modal-close svg {
        width: 16px;
        height: 16px;
    }
    
    .play-button svg {
        width: 50px;
        height: 50px;
    }
    
    .play-button p {
        font-size: 14px;
    }
}

/* Para telas muito pequenas, usar altura como referência */
@media (max-height: 600px) {
    .modal-content {
        height: 80vh;
        width: calc(80vh * 16 / 9); /* Mantém proporção 16:9 */
        max-width: 95vw;
    }
}

/* Animação de entrada suave */
.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

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

/* Efeito de pulso no botão de fechar */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 8px rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.modal-close {
    animation: pulse 2s infinite;
} 