/* Gallery Modal Animations */
#galleryModal, #videoModal {
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

#galleryModal.show, #videoModal.show {
    display: flex;
    opacity: 1;
}

#galleryModal.hiding, #videoModal.hiding {
    opacity: 0;
}

#modalImage {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Disable body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Video player styles */
.video-container {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-overlay:hover {
    opacity: 0.8;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 1rem;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.time-display {
    color: white;
    font-size: 0.875rem;
    font-family: monospace;
    margin: 0 0.5rem;
}

.control-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.control-button svg {
    width: 1rem;
    height: 1rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .video-controls {
        padding: 0.75rem;
    }

    .controls-row {
        flex-wrap: wrap;
    }

    .time-display {
        font-size: 0.75rem;
        margin: 0 0.25rem;
    }

    .control-button {
        padding: 0.375rem;
    }

    .control-button svg {
        width: 0.875rem;
        height: 0.875rem;
    }
}
