/* 图片灯箱样式 */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: lightboxZoomIn 0.3s ease;
    border-radius: 4px;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close:hover,
.lightbox-close:focus {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px 24px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 12px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-caption {
        bottom: 20px;
        font-size: 14px;
        padding: 10px 20px;
        max-width: 90%;
    }
}

/* 暗色模式适配 */
.dark .lightbox {
    background-color: rgba(0, 0, 0, 0.98);
}

/* 加载动画 */
.lightbox-content.loading {
    opacity: 0.5;
}

