.lightbox{
    position:fixed;
    inset:0;
    z-index:9999;
    background:rgba(3,7,18,.92);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    opacity:0;
    visibility:hidden;
    transition:all .35s ease;
}

.lightbox.open{
    opacity:1;
    visibility:visible;
}

.lightbox-inner{
    position:relative;
    max-width:1200px;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.lightbox img{
    max-width:92vw;
    max-height:85vh;
    object-fit:contain;
    border-radius:24px;
    box-shadow:0 20px 80px rgba(0,0,0,.45);
    transform:scale(.92);
    transition:all .35s ease;
    background:#0f172a;
}

.lightbox.open img{
    transform:scale(1);
}

.lightbox-close{
    position:absolute;
    top:24px;
    right:24px;
    width:52px;
    height:52px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    backdrop-filter:blur(12px);
    color:#fff;
    font-size:1.2rem;
    cursor:pointer;
    transition:.25s ease;
    z-index:20;
}

.lightbox-close:hover{
    background:rgba(255,255,255,.16);
    transform:rotate(90deg);
}

.lightbox-nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:58px;
    height:58px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    backdrop-filter:blur(12px);
    color:#fff;
    font-size:1.1rem;
    cursor:pointer;
    transition:.25s ease;
    z-index:20;
}

.lightbox-nav:hover{
    background:var(--gradient);
    transform:translateY(-50%) scale(1.08);
}

.lightbox-prev{
    left:24px;
}

.lightbox-next{
    right:24px;
}

.lightbox-caption{
    position:absolute;
    left:50%;
    bottom:28px;
    transform:translateX(-50%);
    background:rgba(15,23,42,.72);
    backdrop-filter:blur(10px);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
    padding:12px 22px;
    border-radius:999px;
    font-size:.92rem;
    font-weight:500;
    max-width:90%;
    text-align:center;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.lightbox-counter{
    position:absolute;
    top:24px;
    left:24px;
    padding:10px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    backdrop-filter:blur(10px);
    color:#fff;
    font-size:.88rem;
    font-weight:600;
    border:1px solid rgba(255,255,255,.08);
}

@media(max-width:768px){

    .lightbox{
        padding:18px;
    }

    .lightbox img{
        max-width:100%;
        max-height:78vh;
        border-radius:18px;
    }

    .lightbox-nav{
        width:46px;
        height:46px;
        font-size:.95rem;
    }

    .lightbox-prev{
        left:10px;
    }

    .lightbox-next{
        right:10px;
    }

    .lightbox-close{
        top:12px;
        right:12px;
        width:46px;
        height:46px;
    }

    .lightbox-caption{
        bottom:18px;
        font-size:.82rem;
        padding:10px 16px;
        max-width:95%;
    }

    .lightbox-counter{
        top:12px;
        left:12px;
        font-size:.8rem;
    }
}
.lightbox img{
    animation:lightboxFade .35s ease;
}

@keyframes lightboxFade{
    from{
        opacity:0;
        transform:scale(.96);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}