/* ========== 灯箱样式 ========== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 关闭按钮 - 尺寸和图标视觉居中 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}
.lightbox-close svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* 图片容器 + 动画 */
.lightbox-image-wrap {
    position: relative;
    z-index: 5;
    transform: scale(0.8);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.lightbox.active .lightbox-image-wrap {
    transform: scale(1);
}
#lightbox-img {
    display: block;
    max-width: 85vw;
    max-height: 80vh;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
    transition: opacity 0.2s;
}

/* 左右箭头按钮 - 完全居中 */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.2s;
    opacity: 0.8;
}
.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
    opacity: 1;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* 计数器 */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.95rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 18px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }
    .lightbox-nav svg {
        width: 18px;
        height: 18px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close {
        top: 12px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
    .lightbox-close svg {
        width: 16px;
        height: 16px;
    }
    .lightbox-counter {
        bottom: 20px;
        font-size: 0.85rem;
        padding: 4px 14px;
    }
}