.lightbox-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    /* Flex 布局实现内容完全居中 */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    user-select: none; /* 防止频繁点击选中文字 */
}

/* 顶部计数器 */
.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

/* 关闭按钮 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: #ddd;
}

/* 图片容器与图片本身 */
.lightbox-img-wrapper {
    max-width: 80%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh; /* 视口高度的80% */
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

/* 左右切换箭头 */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* 简单的淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 移动端适配：箭头改小一点 */
@media (max-width: 768px) {
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
        padding: 10px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}
