
/* ==================== 灯箱组件样式 ==================== */
.media-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgb(15 15 15 / 7%);
    backdrop-filter: blur(77px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 40px 20px;
    box-sizing: border-box;
}

.media-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    position: relative;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 80vh; /* 使用 vh 单位确保高度约束 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media {
    position: relative;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.lightbox-media.loaded {
    transform: scale(1);
    opacity: 1;
}

/* 关键：移除所有约束，让图片自然显示 */
.lightbox-media img,
.lightbox-media video {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 80vh;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}
@media (max-width: 768px) {
    .lightbox-media img,
    .lightbox-media video {
        max-width: 95vw;
        max-height: 85vh;
    }
}
/* 导航按钮 */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10002;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.lightbox-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1);
}

/* SVG 图标样式 */
.lightbox-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.lightbox-nav:hover svg {
    transform: scale(1.1);
}

/* 关闭按钮 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
}

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

.lightbox-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.lightbox-close:hover svg {
    transform: scale(1.1);
}

/* 计数器 */
.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001; /* 计数器也需要正确的 z-index */
}



/* 加载动画 */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 视频控制条样式优化 */
.lightbox-media video::-webkit-media-controls {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.lightbox-media video::-webkit-media-controls-panel {
    background: transparent;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
    }
    
    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .lightbox-close {
        width: 45px;
        height: 45px;
    }
    
    .lightbox-close svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }
    
    .lightbox-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close svg {
        width: 16px;
        height: 16px;
    }
}

/* 视频预览样式 */
.media-item.video-item {
    position: relative;
    cursor: pointer;
}

.video-play-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.media-item.video-item:hover .video-play-icon {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-play-icon svg {
    width: 34px;
    height: 34px;
    fill: white;
    margin-left: 2px; /* 让播放图标稍微向右偏移，看起来更居中 */
}

/* 视频缩略图容器 */
.video-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* 灯箱视频控制优化 */
.lightbox-video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    background: #000;
}

/* 视频加载状态 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

/* 响应式调整视频播放图标 */
@media (max-width: 768px) {
    .video-play-icon {
        width: 50px;
        height: 50px;
    }
    
    .video-play-icon svg {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .video-play-icon {
        width: 44px;
        height: 44px;
    }
    
    .video-play-icon svg {
        width: 28px;
        height: 28px;
    }
}


/* 底部缩略图导航 */
.lightbox-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 90%;
    overflow-x: auto;
    z-index: 10001;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.lightbox-thumbnails::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/*.thumbnail-item {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.thumbnail-item:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.thumbnail-item.active {
    border-color: #0084ff;
    transform: scale(1.05);
}*/
/* 修改缩略图样式，让非激活状态变暗 */
.thumbnail-item {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    filter: brightness(0.7); /* 默认变暗 */
    opacity: 1; /* 默认半透明 */
}

/* 激活状态的缩略图恢复正常 */
.thumbnail-item.active {
    border-color: #0084ff;
    transform: scale(1.07);
    filter: brightness(1); /* 恢复正常亮度 */
    opacity: 1; /* 完全不透明 */
}

/* 悬停时稍微提亮 */
.thumbnail-item:hover {
    border-color: #0084ff;
    transform: scale(1.05);
    filter: brightness(1); /* 恢复正常亮度 */
    opacity: 1; /* 完全不透明 */
}

/* 确保缩略图内的图片也应用滤镜 */
.thumbnail-item img,
.thumbnail-video video {
    filter: inherit; /* 继承父元素的滤镜 */
}

/* 视频缩略图覆盖层在非激活状态下也需要调整 */
.thumbnail-item:not(.active) .thumbnail-video-overlay {
    background: rgba(0, 0, 0, 0.5); /* 非激活状态的视频覆盖层更暗 */
}

/* 视频播放图标在非激活状态下更不明显 */
.thumbnail-item:not(.active) .thumbnail-video-icon {
    background: rgba(0, 0, 0, 0.5);
}


.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频标识 */
.thumbnail-video-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.thumbnail-video-badge svg {
    width: 10px;
    height: 10px;
    fill: white;
}

/* 视频缩略图样式 */
.thumbnail-video {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer; /* 确保容器可点击 */
}

.thumbnail-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    /* 只禁止视频本身的交互 */
    pointer-events: none;
}

/* 视频播放图标覆盖层 */
.thumbnail-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none; /* 覆盖层不可交互 */
}

.thumbnail-item:hover .thumbnail-video-overlay {
    opacity: 1;
}

.thumbnail-video-icon {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.thumbnail-video-icon svg {
    width: 10px;
    height: 10px;
    fill: white;
    margin-left: 1px;
}

.thumbnail-item:hover .thumbnail-video-icon {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lightbox-thumbnails {
        bottom: 15px;
        padding: 6px;
        gap: 6px;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .lightbox-thumbnails {
        bottom: 10px;
        padding: 6px;
        gap: 4px;
    }
    
    .thumbnail-item {
        width: 44px;
        height: 44px;
    }
    
    .thumbnail-video-badge {
        width: 14px;
        height: 14px;
        top: 2px;
        right: 2px;
    }
    
    .thumbnail-video-badge svg {
        width: 8px;
        height: 8px;
    }
}









/* ==================== 灯箱信息区域样式 ==================== */
.lightbox-info {
    position: absolute;
    top: 70px; /* 放在计数器下面，调整顶部距离 */
    left: 20px;
    color: white;
    font-size: 14px;
    background: rgb(111 111 111 / 60%);
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    max-width: 300px;
    min-width: 200px;
    animation: fadeIn 0.3s ease;
    display: none; /* 默认隐藏 */
}

.lightbox-info.show {
    display: block;
}

.lightbox-info-title {
    font-size: 16px;
    font-weight: 500;
    /*margin: 0 0 4px 0;*/
    line-height: 1.2;
    color: white;
    word-break: break-word;
}

.lightbox-info-desc {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    word-break: break-word;
      margin-top: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {

    
    .lightbox-info-title {
        font-size: 14px;
    }
    
    .lightbox-info-desc {
        font-size: 13px;
    }
}

@media (max-width: 480px) {

}
