/* Main Gallery Grid */
.vod-urbex-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.vod-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex: 1 1 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    box-sizing: border-box;
}

/* Aspect Ratios */
.vod-grid-horizontal .vod-item {
    aspect-ratio: 16 / 9;
}

.vod-grid-vertical .vod-item {
    aspect-ratio: 9 / 16;
}

/* Responsive Columns */
@media (max-width: 768px) {
    .vod-item {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .vod-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.vod-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.vod-thumb-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.vod-poster {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 !important;
    max-width: none !important;
}

.vod-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    color: #fff;
    opacity: 1;
    pointer-events: none;
    z-index: 5;
}

.vod-info h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.vod-desc-preview {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

/* Lightbox */
.vod-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic height fix */
    background-color: #000;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.vod-lightbox-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.vod-slider-track {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vod-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    overflow: hidden;
}

.vod-current {
    top: 0;
    z-index: 10;
}

.vod-prev {
    top: -100%;
    z-index: 9;
}

.vod-next {
    top: 100%;
    z-index: 9;
}

.vod-slide-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
}

/* Close Button */
.vod-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 1000005;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.vod-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Pause Overlay */
.vod-pause-overlay {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 60px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000002;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.vod-pause-overlay.visible {
    opacity: 1;
}

.vod-overlay-title {
    color: #fff;
    font-size: 1.4rem;
    margin: 0 0 8px;
    font-weight: 700;
}

.vod-overlay-desc {
    color: #eee;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tap Icon Animation */
.vod-tap-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    opacity: 0;
    pointer-events: none;
    z-index: 1000003;
}

.vod-tap-icon.animate {
    animation: popFade 0.6s ease-out forwards;
}

@keyframes popFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* Nav Hint */
.vod-nav-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    width: 200px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 1000001;
    animation: bounceHint 2s infinite;
    text-align: center;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

@keyframes bounceHint {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(5px);
    }
}

/* Click Layer: Transparent, covers video but sits below controls */
.vod-click-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cover video area */
    height: calc(100% - 30px);
    /* Leave space for progress bar */
    z-index: 1000000;
    /* Above video, below interactions */
    cursor: pointer;
    background: transparent;
    pointer-events: auto;
    /* Ensure it catches clicks */
}

/* Custom Progress Bar */
.vod-progress-container {
    position: absolute;
    bottom: 0;
    bottom: max(0px, env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    height: 30px;
    cursor: pointer;
    z-index: 2000000;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
    touch-action: none;
}

.vod-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    position: relative;
    transition: height 0.1s;
}

.vod-progress-container:hover .vod-progress-bar {
    height: 6px;
}

.vod-progress-filled {
    height: 100%;
    background: #ff0000;
    width: 0;
    position: relative;
}

/* Time Bubble - Fixed Centered */
.vod-time-bubble {
    position: fixed;
    /* Fixed relative to viewport */
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    font-variant-numeric: tabular-nums;
    z-index: 2100000;
    font-weight: 600;
}

.vod-progress-container.scrubbing .vod-time-bubble {
    opacity: 1;
}