/* --bxyz-sektion: cinematic lightbox för desktop video "movie mode" */

.cinematic-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cinematic-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.cinematic-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: backdrop-filter 0.4s ease;
}

.cinematic-lightbox.active .cinematic-backdrop {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* --bxyz-notis: 80% viewport, centrerad */
.cinematic-video-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 80vw;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

.cinematic-lightbox.active .cinematic-video-container {
    transform: translate(-50%, -50%) scale(1);
}

.cinematic-video-container video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(182, 75, 174, 0.15);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.cinematic-video-container video:hover {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 120px rgba(182, 75, 174, 0.25);
}

.cinematic-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

/* --bxyz-notis: dölj på mobil/tablet, använd native fullscreen istället */
@media (max-width: 1024px) {
    .cinematic-lightbox {
        display: none !important;
    }
}

.cinematic-lightbox.active::before {
    content: 'Click backdrop or press ESC to close';
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-family: 'Karrik', sans-serif;
    letter-spacing: 0.05em;
    z-index: 10001;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}
