/* Lightbox Core */
.lightbox.overlay {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    background-color: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease-out, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox.overlay.active .lightbox.wrapper {
    opacity: 1;
    transform: scale(1);
}

body.lightbox.open {
    overflow: hidden;
}

/* Lightbox Controls */
.lightbox.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10010;
    line-height: 1;
    transition: color 0.2s;
    user-select: none;
}

.lightbox.close:hover {
    color: #ccc;
}

.lightbox.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10010;
    user-select: none;
    transition: background 0.3s, transform 0.2s;
}

.lightbox.nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox.prev {
    left: 30px;
}

.lightbox.next {
    right: 30px;
}

@media (max-width: 768px) {
    .lightbox.nav {
        padding: 8px 12px;
        font-size: 24px;
    }

    .lightbox.prev {
        left: 10px;
    }

    .lightbox.next {
        right: 10px;
    }

    .lightbox.close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* Media Image */
.lightbox.wrapper.mode-image {
    max-width: 90%;
    max-height: 90%;
}

.lightbox.inner-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Media Audio */
.lightbox.wrapper.mode-audio {
    max-width: 90%;
    max-height: 90%;
}

.lightbox.inner-audio {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 90vw;
    color: #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.lightbox.inner-audio h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.5rem;
}

.lightbox.inner-audio audio {
    width: 100%;
    margin-top: 1rem;
}

/* Media Video */
.lightbox.wrapper.mode-video {
    max-width: 90%;
    max-height: 90%;
}

.lightbox.inner-video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* Media Document */
.lightbox.wrapper.mode-document {
    max-width: 90%;
    max-height: 90%;
}

.lightbox.inner-document {
    background: #fff;
    padding-left: 2%;
    padding-right: 2%;
    border-radius: 12px;
    text-align: center;
    width: 90vw;
    color: #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.lightbox.inner-document h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.5rem;
}

.document.actions {
    margin-top: 2rem;
}

.document.btn {
    background: #f5576c;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}

.document.btn:hover {
    background: #d43f51;
}