/* 相册页面样式 */
.gallery-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

/* 相册分类导航 */
.gallery-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-nav button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-nav button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.gallery-nav button.active {
    background-color: #00a8ff;
    color: #fff;
}

/* 相册网格 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.gallery-overlay p {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.view-full {
    padding: 0.5rem 1rem;
    border: 2px solid #fff;
    border-radius: 20px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-full:hover {
    background: #fff;
    color: #000;
}

/* 图片查看器 */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.image-viewer img {
    max-width: 90%;
    max-height: 80vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-viewer {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.image-info {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
}

.prev-image,
.next-image {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: all 0.3s ease;
}

.prev-image {
    left: 20px;
}

.next-image {
    right: 20px;
}

.prev-image:hover,
.next-image:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 相册统计 */
.gallery-stats {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.gallery-stats h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stats-item {
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.stats-item:hover {
    transform: translateY(-5px);
}

.stats-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00a8ff;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #666;
    font-size: 1rem;
}

/* 动画效果 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .gallery-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-nav button {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-number {
        font-size: 2rem;
    }

    .stats-label {
        font-size: 0.9rem;
    }

    .image-viewer img {
        max-width: 95%;
    }

    .prev-image,
    .next-image {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
}

/* 加载动画 */
.gallery-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image img.loaded {
    opacity: 1;
}

/* 图片查看器过渡效果 */
.image-viewer {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-viewer.active {
    opacity: 1;
}

/* 图片加载中状态 */
.gallery-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00a8ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.gallery-image.loaded::before {
    display: none;
} 