/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #8a2be2, #4b0082);
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #ff6b6b;
}

nav ul {
    display: flex;
    gap: 1.5rem;
}

nav a {
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 5px 10px;
    margin-left: 20px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 5px 10px;
    width: 200px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
}

/* 横幅样式 */
.banner {
    height: 500px;
    background: url('https://source.unsplash.com/random/1600x900/?anime') no-repeat center center/cover;
    position: relative;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.banner h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* 分类过滤器样式 */
.category-filter {
    text-align: center;
    padding: 2rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-btn {
    background: #f0f2f5;
    border: none;
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: #8a2be2;
    color: white;
}

/* 图库样式 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 2rem 5%;
}

.image-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.image-info {
    padding: 15px;
}

.image-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.image-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.image-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.image-actions button:hover {
    color: #8a2be2;
}

.image-actions .likes i {
    color: #ff6b6b;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    padding: 2rem 0;
}

#load-more-btn {
    background: #8a2be2;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#load-more-btn:hover {
    background: #7126c0;
}

#load-more-btn i {
    display: none;
}

#load-more-btn.loading i {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页脚样式 */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 5% 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #ff6b6b;
}

.footer-section p {
    margin-bottom: 1rem;
}

.social {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.social a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social a:hover {
    background: #ff6b6b;
    transform: translateY(-3px);
}

.footer-section.links ul li {
    margin-bottom: 10px;
}

.footer-section.links ul li a {
    transition: all 0.3s ease;
}

.footer-section.links ul li a:hover {
    color: #ff6b6b;
    padding-left: 5px;
}

.footer-section.contact p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 992px) {
    header {
        padding: 1rem 3%;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .search-box {
        margin-left: 10px;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .banner h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-box {
        margin: 0;
        width: 100%;
        max-width: 400px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner h2 {
        font-size: 2rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 2rem 3%;
    }
}

@media (max-width: 576px) {
    .banner {
        height: 350px;
    }
    
    .banner h2 {
        font-size: 1.8rem;
    }
    
    .category-filter {
        padding: 1.5rem 0;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        padding: 6px 15px;
        margin-bottom: 5px;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        padding: 1.5rem 5%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}