/* ========== 灯箱样式 ========== */

/* 遮罩层 */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 图片容器 */
.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
}

/* 灯箱图片 */
.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* 进度条容器 */
.lightbox-progress {
    position: absolute;
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    display: none;
}

/* 进度条填充 */
.lightbox-progress-bar {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.05s linear;
}

/* 关闭按钮 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-family: monospace;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 上一张/下一张按钮 */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: all 0.2s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* 图片说明 */
.lightbox-caption {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ddd;
    font-size: 14px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    max-width: 80%;
    margin: 0 auto;
    border-radius: 30px;
    pointer-events: none;
    z-index: 10001;
}

/* 图片计数 */
.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 12px;
    border-radius: 20px;
    font-family: monospace;
    z-index: 10001;
}

/* 响应式 */
@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        font-size: 35px;
        padding: 10px;
    }
    .lightbox-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
    .lightbox-caption {
        font-size: 12px;
        bottom: 15px;
    }
    .lightbox-progress {
        width: 150px;
    }
}