/* Lightbox */
.lb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;

    /* Cinematic Transitions */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(0px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.4s,
        backdrop-filter 0.4s ease;
}

.lb-backdrop[open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.lb-content {
    position: relative;
    max-width: 92vw;
    max-height: 90svh;
}

.lb-content img {
    max-width: 92vw;
    max-height: 90svh;
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lb-backdrop[open] .lb-content img {
    transform: scale(1);
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 1.5rem;
    transition: background 0.3s, transform 0.3s;
    z-index: 10;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lb-prev {
    top: 50%;
    left: -60px;
    transform: translateY(-50%);
}

.lb-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lb-next {
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
}

.lb-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lb-close {
        top: 10px;
        right: 10px;
        position: fixed;
    }

    .lb-prev,
    .lb-next {
        display: none;
        /* Use swipe on mobile */
    }
}