/*
 *  lightbox.css — 全局图片灯箱样式
 *  .global-lightbox 系列（仅桌面端 ≥769px 启用）
 */

.global-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    justify-content: center;
    align-items: center;
}

/* 仅桌面端（≥769px）启用 .global-lightbox，移动端使用各页面的 #image-modal */
@media (min-width: 769px) {
    .global-lightbox.glb-open {
        display: flex;
    }
}

.glb-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.glb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.glb-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: var(--z-lightbox);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color var(--dur-fast) var(--ease);
}
.glb-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.glb-prev,
.glb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: var(--z-lightbox);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color var(--dur-fast) var(--ease);
}
.glb-prev:hover,
.glb-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
.glb-prev { left: 15px; }
.glb-next { right: 15px; }

.glb-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: var(--z-lightbox);
}
.glb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--dur-fast) var(--ease);
}
.glb-dot.active {
    background-color: var(--surface-page);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .glb-prev,
    .glb-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .glb-prev { left: 10px; }
    .glb-next { right: 10px; }
    .glb-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 12px;
        right: 12px;
    }
}
