/* 图库页面样式 */
.gallery-header {
    text-align: center;
    padding: 40px 0;
    background-color: #f2f7ff;
    border-radius: 10px;
    margin-bottom: 30px;
}

.gallery-header h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.gallery-header p {
    font-size: 18px;
    color: #666;
}

/* 图库分类按钮 */
.gallery-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-btn {
    padding: 10px 20px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.gallery-btn:hover {
    background-color: #f5f5f5;
}

.gallery-btn.active {
    background-color: #4e7cff;
    color: #fff;
    border-color: #4e7cff;
}

/* 图库网格 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.gallery-overlay p {
    font-size: 14px;
    line-height: 1.4;
}

/* 图片查看器样式 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-viewer.active {
    opacity: 1;
    visibility: visible;
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.viewer-content img {
    max-width: 100%;
    max-height: 80vh;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.image-info {
    color: white;
    text-align: center;
    margin-top: 1rem;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    width: 100%;
}

.image-info h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.image-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1010;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prev-btn {
    left: -60px;
}

.next-btn {
    right: -60px;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-bottom: 50px;
}

.load-more-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
}

/* 加载指示器 */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.loading-indicator.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(78, 124, 255, 0.2);
    border-radius: 50%;
    border-top-color: #4e7cff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator p {
    color: #666;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .prev-btn {
        left: -40px;
    }
    
    .next-btn {
        right: -40px;
    }
    
    .close-btn {
        top: -30px;
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .gallery-categories {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .gallery-btn {
        margin-bottom: 10px;
    }
    
    .nav-btn {
        top: auto;
        bottom: -50px;
        transform: none;
    }
    
    .prev-btn {
        left: 30%;
    }
    
    .next-btn {
        right: 30%;
    }
}

/* 图片加载状态 */
.viewer-content img.loading {
    min-height: 200px;
    min-width: 200px;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBzdHJva2U9IiNmZmYiPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLXdpZHRoPSIyIj48Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIxIj48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJyIiBiZWdpbj0iMHMiIGR1cj0iMS44cyIgdmFsdWVzPSIxOyAyMCIgY2FsY01vZGU9InNwbGluZSIga2V5VGltZXM9IjA7IDEiIGtleVNwbGluZXM9IjAuMTY1LCAwLjg0LCAwLjQ0LCAxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZS1vcGFjaXR5IiBiZWdpbj0iMHMiIGR1cj0iMS44cyIgdmFsdWVzPSIxOyAwIiBjYWxjTW9kZT0ic3BsaW5lIiBrZXlUaW1lcz0iMDsgMSIga2V5U3BsaW5lcz0iMC4zLCAwLjYxLCAwLjM1NSwgMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L2NpcmNsZT48Y2lyY2xlIGN4PSIyMiIgY3k9IjIyIiByPSIxIj48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJyIiBiZWdpbj0iLTAuOXMiIGR1cj0iMS44cyIgdmFsdWVzPSIxOyAyMCIgY2FsY01vZGU9InNwbGluZSIga2V5VGltZXM9IjA7IDEiIGtleVNwbGluZXM9IjAuMTY1LCAwLjg0LCAwLjQ0LCAxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZS1vcGFjaXR5IiBiZWdpbj0iLTAuOXMiIGR1cj0iMS44cyIgdmFsdWVzPSIxOyAwIiBjYWxjTW9kZT0ic3BsaW5lIiBrZXlUaW1lcz0iMDsgMSIga2V5U3BsaW5lcz0iMC4zLCAwLjYxLCAwLjM1NSwgMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L2NpcmNsZT48L2c+PC9zdmc+') no-repeat center center;
}

/* 图片查看器动画 */
.viewer-content {
    transition: transform 0.3s ease-out;
}

.viewer-content.slide-left {
    transform: translateX(-30px);
    opacity: 0.5;
}

.viewer-content.slide-right {
    transform: translateX(30px);
    opacity: 0.5;
} 