/* 图片灯箱样式 */

/* 灯箱容器 */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease-in-out;
}

/* 遮罩层 */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

/* 内容容器 */
.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10000;
    animation: lightboxZoomIn 0.3s ease-in-out;
}

/* 图片 */
.lightbox-image {
    max-width: 100%;
    max-height: calc(95vh - 60px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* 图片说明 */
.lightbox-caption {
    margin-top: 16px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border-radius: 6px;
    font-size: 14px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 关闭按钮 */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.lightbox-close:hover {
    background-color: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* 可放大的图片hover效果 */
.lightbox-zoomable {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-zoomable:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* 动画 */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lightboxZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 100vw;
        max-height: 100vh;
    }

    .lightbox-image {
        max-height: calc(100vh - 80px);
        border-radius: 0;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .lightbox-caption {
        font-size: 13px;
        margin-top: 12px;
    }
}
