/* 全局样式 */
:root {
    --primary-color: #ff6b81;
    --secondary-color: #7d5fff;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #fff;
    --light-bg: #f8f9fa;
    --border-color: #eaeaea;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

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

ul {
    list-style: none;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--primary-color);
    position: relative;
}

.more-link {
    color: var(--light-text);
    font-size: 14px;
}

.more-link:hover {
    color: var(--primary-color);
}

/* 头部样式 */
.site-header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.site-header h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--radius);
}

.main-nav a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Banner样式 */
.banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.banner .container {
    display: flex;
    align-items: center;
}

.banner-content {
    flex: 1;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-box {
    display: flex;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 16px;
}

.search-box button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #6a4ddb;
}

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

.banner-image img {
    max-width: 80%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-left: auto;
}

/* 热门漫画样式 */
.popular-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    margin-bottom: 40px;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

.manga-card:hover {
    transform: translateY(-5px);
}

.manga-cover {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.manga-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.manga-info {
    padding: 15px;
}

.manga-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author, .tags {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.stars {
    color: #ffc107;
    letter-spacing: 2px;
}

.score {
    font-weight: bold;
    color: var(--primary-color);
}

/* 最新更新样式 */
.latest-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    margin-bottom: 40px;
}

.manga-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.manga-item {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.manga-item:hover {
    transform: translateY(-5px);
}

.manga-item .manga-cover {
    padding-top: 140%;
}

.manga-item .manga-info {
    padding: 10px;
}

.manga-item h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.update, .time {
    font-size: 12px;
    color: var(--light-text);
}

.time {
    color: var(--primary-color);
}

/* 分类浏览样式 */
.category-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    margin-bottom: 40px;
}

.category-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 0.3s ease;
}

.category-item:hover img {
    filter: brightness(0.9);
}

.category-item h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    text-align: center;
}

/* 排行榜样式 */
.ranking-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    margin-bottom: 40px;
}

.ranking-tabs {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 20px;
}

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

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.ranking-item:last-child {
    border-bottom: none;
}

.rank {
    width: 30px;
    height: 30px;
    background-color: var(--light-bg);
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
}

.ranking-item:nth-child(1) .rank {
    background-color: gold;
    color: white;
}

.ranking-item:nth-child(2) .rank {
    background-color: silver;
    color: white;
}

.ranking-item:nth-child(3) .rank {
    background-color: #cd7f32;
    color: white;
}

.ranking-item .manga-cover {
    width: 60px;
    height: 80px;
    padding-top: 0;
    margin-right: 15px;
}

.ranking-item .manga-cover img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-item .manga-info {
    flex: 1;
    padding: 0;
}

.views {
    font-size: 12px;
    color: var(--light-text);
}

/* 推荐阅读样式 */
.recommend-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    margin-bottom: 40px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.article-card {
    display: flex;
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-card img {
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.article-content {
    padding: 15px;
    flex: 1;
}

.article-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.article-content p {
    font-size: 14px;
    color: var(--light-text);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 关于我们样式 */
.about-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    margin-bottom: 40px;
}

.about-content {
    display: flex;
    gap: 30px;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: var(--radius);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    flex: 2;
}

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

/* 页脚样式 */
.site-footer {
    background-color: #333;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.footer-logo h3 {
    font-size: 18px;
    margin: 0;
}

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

.link-group h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

.link-group ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.link-group ul li a:hover {
    color: white;
}

.footer-contact h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-contact p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.copyright p {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .manga-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .manga-list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
    }
    
    .main-nav {
        margin-top: 15px;
    }
    
    .banner .container {
        flex-direction: column;
    }
    
    .banner-content {
        margin-bottom: 30px;
    }
    
    .manga-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .manga-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 5px;
    }
    
    .manga-grid {
        grid-template-columns: 1fr;
    }
    
    .manga-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-card img {
        width: 100%;
        height: 200px;
    }
}
