/* 基本样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: '楷体', 'KaiTi', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    margin-bottom: 20px;
    color: #333;
}
/* 筛选按钮容器（保持原结构） */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px; /* 微调间距匹配椭圆造型 */
}
/* 统一按钮基础样式 */
.filter-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* 控制按钮间距 */
    margin-bottom: 25px;
}

/* 核心按钮样式统一 */
.manage-button {
    /* 尺寸系统 */
    min-width: 96px; /* 保证最小点击区域 */
    height: 40px; /* 固定高度 */
    padding: 0 24px; /* 水平内边距 */
    
    /* 字体系统 */
    font: 500 14px/40px 'Microsoft YaHei'; /* 行高等于高度实现垂直居中 */
    letter-spacing: 0.5px;
    
    /* 视觉系统 */
    border-radius: 24px;
    background: linear-gradient(135deg, #6c5ce7 0%, #1890ff 100%);
    color: white !important;
    
    /* 交互系统 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(28, 144, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 悬停状态优化 */
.filter-btn:hover,
.manage-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(28, 144, 255, 0.3);
}

/* 激活状态统一 */
.filter-btn.active,
.manage-button.active {
    background: linear-gradient(135deg, #1890ff 0%, #6c5ce7 100%);
    animation: button-glow 1.5s ease-in-out infinite;
}

/* 泛光动画增强 */
@keyframes button-glow {
    0%, 100% {
        box-shadow: 0 0 12px rgba(28, 144, 255, 0.4),
                    0 0 24px rgba(28, 144, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 24px rgba(28, 144, 255, 0.6),
                    0 0 36px rgba(28, 144, 255, 0.4);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }
    .manage-button {
        min-width: 80px;
        height: 36px;
        font-size: 13px;
        line-height: 36px;
        padding: 0 18px;
    }
}
/* 核心样式改造 */
.filter-btn {
    /* 基础形态 */
    position: relative;
    padding: 12px 24px;
    border: none;
    border-radius: 25px; /* 椭圆形造型 */
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    
    /* 亚克力质感实现 */
    background: linear-gradient(145deg, 
        rgba(168,230,206,0.9) 0%,    /* #a8e6ce 90%透明度 */
        rgba(255,175,189,0.9) 100%); /* #ffafbd 90%透明度 */
    backdrop-filter: blur(4px);      /* 毛玻璃效果 */
    
    /* 光影系统 */
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.3), /* 内发光 */
        0 4px 15px rgba(137,207,240,0.3);     /* 外投影 */
    
    /* 文字与过渡 */
    color: #3366cc;                  /* 匹配图像中蓝色文字 */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 亚克力材质增强 */
.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.4) 30%, 
        transparent 100%);
    border-radius: 25px;
    mix-blend-mode: overlay; /* 混合模式增强质感 */
}

/* 交互状态 */
.filter-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        inset 0 2px 8px rgba(255,255,255,0.5),
        0 6px 20px rgba(137,207,240,0.5);
}

.filter-btn.active {
    background: linear-gradient(145deg, 
        rgba(168,230,206,1) 0%,    /* 提高不透明度 */
        rgba(255,175,189,1) 100%);
    animation: acrylic-glow 1.5s ease-in-out infinite;
}

/* 动态光效 */
@keyframes acrylic-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(137,207,240,0.6));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(137,207,240,0.9));
    }
}
/* Fancybox 自定义宽度 */
.fancybox-custom-width .fancybox__content {
    max-width: 80% !important;
    margin-left: auto;
    margin-right: auto;
}

/* 让FancyBox弹窗内的视频自适应比例显示 */
.fancybox__content video {
    width: 100% !important;
    /* 移除height: 100%，让高度自适应 */
    object-fit: contain !important;
    background: #000;
    display: block;
    max-width: 100%;
    /* 移除max-height: 80vh，避免强制高度 */
    margin: 0 auto;
    border-radius: 8px;
}

/* 瀑布流布局 - 响应式调整 */
.gallery {
    column-count: 5; /* 默认在1400px宽度显示5个 */
    column-gap: 15px;
}

@media (max-width: 1200px) {
    .gallery {
        column-count: 4; /* 在1020px-1400px之间显示4个 */
    }
}

@media (max-width: 1020px) {
    .gallery {
        column-count: 3; /* 在768px-1020px之间显示3个 */
    }
}

@media (max-width: 768px) {
    .gallery {
        column-count: 2; /* 在480px-768px之间显示2个 */
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1; /* 在小于480px时显示1个 */
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    display: block;
    border-radius: 5px;
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* 视频缩略图占位符 */
.video-placeholder {
    width: 100%;
    height: 180px;
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 5px;
}

.play-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.video-name {
    font-size: 14px;
    text-align: center;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.loader {
    display: none;
}

/* 视频缩略图样式优化 */
.video-thumbnail-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* 加载动画 */
.loader {
    text-align: center;
    padding: 20px;
    display: none;
}

.loader:after {
    content: " ";
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #4CAF50;
    border-color: #4CAF50 transparent #4CAF50 transparent;
    animation: loader 1.2s linear infinite;
}

@keyframes loader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.fancybox__content {
    padding: 0;
    background: #000;
    box-shadow: 0 2px 16px rgba(0,0,0,0.25);
    border-radius: 10px;
    max-width: 96vw;
    max-height: 96vh;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.fancybox__content video {
    display: block;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

/* 瀑布流布局 - 响应式调整 */
.gallery {
    column-count: 5; /* 默认在1400px宽度显示5个 */
    column-gap: 15px;
}

@media (max-width: 1200px) {
    .gallery {
        column-count: 4; /* 在1020px-1400px之间显示4个 */
    }
}

@media (max-width: 1020px) {
    .gallery {
        column-count: 3; /* 在768px-1020px之间显示3个 */
    }
}

@media (max-width: 768px) {
    .gallery {
        column-count: 2; /* 在480px-768px之间显示2个 */
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1; /* 在小于480px时显示1个 */
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    display: block;
    border-radius: 5px;
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* 视频缩略图占位符 */
.video-placeholder {
    width: 100%;
    height: 180px;
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 5px;
}

.play-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.video-name {
    font-size: 14px;
    text-align: center;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.loader {
    display: none;
}

/* 视频缩略图样式优化 */
.video-thumbnail-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* 加载动画 */
.loader {
    text-align: center;
    padding: 20px;
    display: none;
}

.loader:after {
    content: " ";
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #4CAF50;
    border-color: #4CAF50 transparent #4CAF50 transparent;
    animation: loader 1.2s linear infinite;
}

@keyframes loader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}