.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 17, 31, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 76px 32px;
    animation: albumFadeIn 0.22s ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-figure {
    max-width: min(1140px, 84vw);
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-photo {
    width: 100%;
    max-height: 76vh;
    max-height: 76dvh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.lightbox-img {
    max-width: 100%;
    max-height: 76vh;
    max-height: 76dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    background: rgba(15, 31, 54, 0.65);
    user-select: none;
}

.lightbox-caption {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 14px 4px 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.4;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.86rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lightbox-close,
.lightbox-arrow {
    position: fixed;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
}

.lightbox-close:hover,
.lightbox-arrow:hover {
    background: var(--blue);
    border-color: var(--blue);
}

.lightbox-close {
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
    line-height: 1;
}

.lightbox-arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.06);
}

.lightbox-arrow svg {
    width: 22px;
    height: 22px;
}

.lightbox-arrow--prev {
    left: 22px;
}

.lightbox-arrow--next {
    right: 22px;
}

body.lightbox-open {
    overflow: hidden;
}
