.arx-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    overflow: hidden;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.arx-lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.arx-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.arx-lightbox-image {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.arx-lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    z-index: 10001;
    font-family: inherit;
    padding: 0;
}

.arx-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.arx-lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 10001;
    font-family: inherit;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

.arx-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.arx-lightbox-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.arx-lightbox-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.arx-lightbox-counter {
    position: fixed;
    top: 24px;
    left: 24px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    z-index: 10001;
    pointer-events: none;
}

.arx-lightbox-caption {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-align: center;
    max-width: 70vw;
    line-height: 1.5;
    z-index: 10001;
    pointer-events: none;
}

.arx-lightbox-caption:empty {
    display: none;
}

.arx-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

.arx-lightbox-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.arx-lightbox-error-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 77, 94, 0.5);
    border-radius: 50%;
    color: rgba(255, 77, 94, 0.8);
    font-size: 24px;
    font-weight: 700;
    font-family: inherit;
}

.arx-lightbox-error-text {
    color: rgba(255, 255, 255, 0.45);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
}

.arx-lightbox-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: arx-lightbox-spin 0.7s linear infinite;
}

@keyframes arx-lightbox-spin {
    to { transform: rotate(360deg); }
}

[id] {
    scroll-margin-top: calc(var(--arx-navbar-height) + 0.5rem);
}

@media (max-width: 640px) {
    .arx-lightbox-arrow {
        width: 40px;
        height: 60px;
        font-size: 28px;
    }

    .arx-lightbox-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .arx-lightbox-counter {
        top: 16px;
        left: 16px;
        font-size: 11px;
    }

    .arx-lightbox-caption {
        bottom: 18px;
        font-size: 11px;
    }

    .arx-lightbox-image {
        max-width: 94vw;
        max-height: 80vh;
    }
}
