/* Full-Screen Video Modal - YouTube Style */

/* Video Modal Overlay */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

/* Video Modal Container */
.video-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal.active .video-modal-container {
    transform: scale(1);
}

/* Video Element */
.video-modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Video Controls Overlay */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.video-modal-container:hover .video-controls,
.video-controls.show {
    transform: translateY(0);
}

/* Control Buttons */
.video-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.video-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.video-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-btn.play-pause {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

/* Progress Bar */
.video-progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.video-progress {
    height: 100%;
    background: #ff6b9d;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.video-progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #ff6b9d;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-progress-container:hover .video-progress-handle {
    opacity: 1;
}

/* Volume Control */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.volume-progress {
    height: 100%;
    background: #ff6b9d;
    border-radius: 2px;
    width: 100%;
}

/* Time Display */
.time-display {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

/* Close Button */
.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Fullscreen Button */
.fullscreen-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Video Title */
.video-modal-title {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 60%;
}

/* Loading Spinner */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    display: none;
}

.video-loading.show {
    display: block;
}

.video-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-modal-container {
        width: 95%;
        height: 70%;
    }
    
    .video-controls {
        padding: 15px;
    }
    
    .video-controls-row {
        gap: 10px;
    }
    
    .video-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .video-btn.play-pause {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .video-modal-title {
        font-size: 16px;
        max-width: 70%;
    }
    
    .video-modal-close {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .video-modal-container {
        width: 98%;
        height: 60%;
        border-radius: 8px;
    }
    
    .video-controls {
        padding: 10px;
    }
    
    .video-controls-row {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .volume-container {
        display: none; /* Hide volume on very small screens */
    }
    
    .time-display {
        font-size: 12px;
        min-width: 60px;
    }
}

/* Fullscreen Mode */
.video-modal.fullscreen {
    background: #000;
}

.video-modal.fullscreen .video-modal-container {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
}

/* Hide scrollbar when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Video thumbnail play button enhancement */
.video-container {
    position: relative;
    cursor: pointer;
}

.video-container .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 157, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 107, 157, 1);
}