/* ===================================
   VIDEO MODAL STYLES
   ================================== */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.video-modal-content {
    position: relative;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 95vh;
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.video-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.video-container video {
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    border-radius: 16px;
}

/* Portrait video optimization */
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
    .video-container video {
        max-width: 85vw;
        max-height: 85vh;
    }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (min-aspect-ratio: 1/1) {
    .video-container video {
        max-width: 60vw;
        max-height: 90vh;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-modal-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 32px;
        background: rgba(0, 0, 0, 0.7);
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
    
    .video-container {
        border-radius: 12px;
    }
    
    .video-container video {
        border-radius: 12px;
        max-width: 95vw;
        max-height: 90vh;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .video-modal-close {
        top: 5px;
        right: 5px;
    }
    
    .video-container video {
        max-width: 100vw;
        max-height: 85vh;
        border-radius: 0;
    }
    
    .video-container {
        border-radius: 0;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom video controls styling */
.video-container video::-webkit-media-controls-panel {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
}

.video-container video::-webkit-media-controls-play-button,
.video-container video::-webkit-media-controls-pause-button {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

/* Loading state for video */
.video-container video:not([poster]) {
    background: #000 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%23fff" stroke-width="3" opacity="0.3"/></svg>') center/50px no-repeat;
}
