.jlb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.92); /* #111827 */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

.jlb-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.jlb-figure {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jlb-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.6);
    background: #111827;
    opacity: 0;
    transform: scale(.96);
    transition: opacity .25s ease, transform .25s ease;
    object-fit: contain;
}

.jlb-img.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.jlb-caption {
    color: #E5E7EB;
    font-family: 'Inter', sans-serif;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    max-width: 80vw;
}

.jlb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(6px);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}

.jlb-btn:hover {
    background: #2563EB;
    transform: translateY(-50%) scale(1.05);
}

.jlb-prev { left: 16px; }
.jlb-next { right: 16px; }

.rtl .jlb-prev { 
    right: 16px;
    left: auto;
 }

.rtl .jlb-next { 
    left: 16px; 
    right: auto;
}

.jlb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,.08);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: background .2s ease;
}

.jlb-close:hover {
    background: #14B8A6;
}

.jlb-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: #9CA3AF;
    font-size: 13px;
    font-family: 'Manrope', sans-serif;
}

@media (max-width: 640px) {
    .jlb-btn { width: 36px; height: 36px; font-size: 18px; }
    .jlb-prev { left: 8px; }
    .jlb-next { right: 8px; }
}
