/* {模板路径}/static/css/style.css */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #5f27cd;
    --accent-color: #ff9f43;
    --text-color: #333;
    --light-text: #777;
    --bg-color: #fff;
    --alt-bg-color: #f9f9f9;
    --border-color: #eee;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

/* Header */
#header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--border-radius);
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Banner */
.banner {
    padding: 60px 0;
    background-color: var(--alt-bg-color);
}

.banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-content {
    flex: 1;
    padding-right: 40px;
}

.banner-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.banner-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--light-text);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.banner-image {
    flex: 1;
    text-align: center;
}

.banner-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.bg-alt {
    background-color: var(--alt-bg-color);
}

/* Manga Grid */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.manga-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.manga-cover {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.manga-card:hover .manga-cover img {
    transform: scale(1.05);
}

.manga-info {
    padding: 15px;
}

.manga-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.manga-info p {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.featured .manga-cover {
    height: 350px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    text-align: center;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.category-card p {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Ranking Section */
.ranking-tabs {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-header {
    display: flex;
    background-color: var(--secondary-color);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: var(--primary-color);
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius);
    background-color: var(--alt-bg-color);
    transition: var(--transition);
}

.ranking-item:hover {
    background-color: #f0f0f0;
}

.rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.ranking-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 0 15px;
}

.ranking-info {
    flex: 1;
}

.ranking-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.ranking-info p {
    font-size: 0.9rem;
    color: var(--light-text);
}

.views {
    color: var(--accent-color);
    font-weight: bold;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.news-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.news-meta {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 10px;
}

.news-excerpt {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.feature {
    text-align: center;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.feature p {
    font-size: 0.9rem;
    color: var(--light-text);
}

/* Articles Section */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.article-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.article-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.article-card p {
    line-height: 1.7;
    color: var(--text-color);
}

/* Footer */
#footer {
    background-color: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.footer-logo p {
    color: #aaa;
}

.footer-links {
    display: flex;
    gap: 40px;
}

.footer-link-group h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

.footer-link-group ul li {
    margin-bottom: 8px;
}

.footer-link-group ul li a {
    color: #aaa;
    transition: var(--transition);
}

.footer-link-group ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .banner .container {
        flex-direction: column;
    }
    
    .banner-content {
        padding-right: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .manga-grid, .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .manga-grid, .category-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}