* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 顶部横幅区域 */
.top-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.banner-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.banner-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* 顶部导航栏 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #00b22d;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #00b22d;
}

.auth-buttons button {
    padding: 8px 20px;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.login {
    background: transparent;
    color: #555;
    margin-right: 10px;
}

.join {
    background-color: #00b22d;
    color: white;
}

.auth-buttons button:hover {
    opacity: 0.9;
}

/* 分类导航 */
.categories {
    background-color: white;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.category-list::-webkit-scrollbar {
    height: 4px;
    background-color: transparent;
}

.category-list::-webkit-scrollbar-track {
    background-color: transparent;
}

.category-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 2px;
}

.category-list {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.category-list li {
    margin-right: 25px;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-list li:last-child {
    margin-right: 0;
}

.category-list a {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    padding: 8px 12px;
    position: relative;
    transition: color 0.2s, background-color 0.2s;
    display: block;
    border-radius: 4px;
}

.category-list a:hover {
    color: #00b22d;
    background-color: rgba(0, 178, 45, 0.05);
}

.category-list a.active {
    color: #00b22d;
    font-weight: 600;
    background-color: rgba(0, 178, 45, 0.1);
}

.category-list a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #00b22d;
    border-radius: 2px;
}

/* 主内容区 */
.main-content {
    padding-bottom: 50px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h2 {
    font-weight: 600;
    color: #333;
    font-size: 1.8rem;
}

.image-count {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
}

/* 图片网格 - 瀑布流布局 */
.image-grid {
    column-count: 4;
    column-gap: 20px;
}

/* 图片链接样式 */
.image-link {
    display: inline-block; /* 重要：瀑布流布局需要inline-block */
    width: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    break-inside: avoid; /* 防止元素被分割到不同列 */
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    vertical-align: top; /* 确保对齐 */
}

.image-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 图片项样式 */
.image-item {
    margin-bottom: 0;
    box-shadow: none;
    transition: none;
    border-radius: 0;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

/* 图片悬停效果 */
.image-link:hover .image-item img {
    transform: scale(1.03);
}

/* 图片信息区域 */
.image-info {
    padding: 12px 15px 15px;
    position: relative;
}

.image-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

/* 图片元信息 */
.image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    flex-direction: row-reverse;
}

/* 分类标签样式 */
.category-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    order: 2;
}

.category-tag.nature {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.category-tag.city {
    background-color: rgba(33, 150, 243, 0.1);
    color: #1565c0;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.category-tag.art {
    background-color: rgba(156, 39, 176, 0.1);
    color: #7b1fa2;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.category-tag.animal {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ef6c00;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.category-tag.food {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.category-tag.travel {
    background-color: rgba(0, 150, 136, 0.1);
    color: #00796b;
    border: 1px solid rgba(0, 150, 136, 0.3);
}

/* 浏览量样式 */
.image-views {
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    order: 1;
}

.image-views i {
    margin-right: 5px;
    color: #888;
}

/* 页脚 */
footer {
    /* background-color: #222;*/
    color: #aaa;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #777;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #00b22d;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 178, 45, 0.3);
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #009924;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 178, 45, 0.4);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .image-grid {
        column-count: 3;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-title {
        font-size: 2.2rem;
    }
    
    .category-list {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .nav-top {
        flex-wrap: wrap;
    }
    
    .logo {
        margin-bottom: 10px;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        margin-top: 15px;
        justify-content: center;
    }
    
    .auth-buttons {
        order: 2;
    }
    
    .image-grid {
        column-count: 2;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .banner-title {
        font-size: 1.8rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .category-list li {
        margin-right: 15px;
    }
    
    .back-to-top {
        bottom: 70px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .image-info {
        padding: 10px 12px 12px;
    }
    
    .image-title {
        font-size: 14px;
    }
    
    .image-views {
        font-size: 11px;
    }
    
    .category-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
}

@media (max-width: 576px) {
    .image-grid {
        column-count: 1;
    }
    
    .top-banner {
        height: 200px;
    }
    
    .category-list {
        justify-content: flex-start;
    }
}