/* 相册区域 */
.gallery {
    background: #f8f9fa;
    position: relative;
}

/* Canvas背景 */
.canvas-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* 相册头部 */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* 分类选择器 */
.category-selector {
    position: relative;
    z-index: 2;
    margin: 30px 0;
    margin-top: 0;
}

/* 分类滚动容器 */
.category-scroll-container {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
    width: 100%;
}

/* 分类列表 */
.category-list {
    display: inline-flex;
    gap: 10px;
    padding: 0 5px;
}

/* 分类项 */
.category-item {
    display: inline-block;
    padding: 8px 16px;
    color: #333;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-item:hover {
    background-color: #f8f9fa;
    color: #3498db;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

/* 激活状态 */
.category-item.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* 滚动条样式 */
.category-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.category-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.category-scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.category-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.gallery-container {
    position: relative;
    z-index: 2;
}

/* 瀑布流布局 */
.masonry-grid {
    position: relative;
    margin-bottom: 30px;
}

.gallery-item {
    position: absolute;
    width: calc(33.333% - 13.333px);
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
}



.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 15px 10px 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

/* 加载动画 */
.loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
}

.loading.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more {
    padding: 12px 40px;
    font-size: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.load-more:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.load-more:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}