
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    color: white;
    font-size: 3.5em;
    font-weight: 300;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stats {
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: 1.2em;
    margin-bottom: 50px;
}

/* 分类卡片样式 - 首页 */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.category-preview {
    height: 200px;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    padding: 25px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.category-info h3 {
    margin: 0 0 10px;
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
}

.category-count {
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 500;
}

/* 图片画廊样式 - 详情页 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.image-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-title {
    padding: 15px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 500;
    color: #495057;
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    padding: 12px 24px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 100;
}

.back-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-2px);
}

/* 图片查看器样式 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-container img {
    position: absolute;
    transition: transform 0.3s;
}

.toolbar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(0,0,0,0.8);
    padding: 15px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.tool-btn, .close-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.close-btn {
    background: rgba(255,69,58,0.8);
}

.close-btn:hover {
    background: rgba(255,69,58,1);
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.8);
    margin-top: 60px;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .categories, .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    h1 { font-size: 2.5em; }
    .back-btn { top: 20px; left: 20px; }
}
