/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #6c5ce7;
    --accent-color: #fdcb6e;
    --text-color: #2d3436;
    --light-text: #636e72;
    --bg-color: #ffffff;
    --light-bg: #f9f9f9;
    --border-color: #dfe6e9;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* 头部样式 */
header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 5px;
}

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

nav ul {
    display: flex;
    gap: 25px;
}

nav ul li a {
    font-weight: 500;
    position: relative;
}

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

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 200px;
}

.search-box button {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

/* 横幅区域 */
.banner {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
}

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

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

/* 特色区域 */
.features {
    padding: 60px 0;
    background-color: var(--light-bg);
}

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

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* 章节标题样式 */
.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    position: relative;
    color: var(--secondary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 漫画网格样式 */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

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

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

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.update-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 12px;
}

.manga-info {
    padding: 15px;
}

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

.manga-tags {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 8px;
}

.manga-desc, .manga-update {
    font-size: 14px;
    color: var(--light-text);
}

.manga-update {
    color: var(--primary-color);
    font-weight: 500;
}

/* 热门漫画和最新更新区域 */
.popular-manga, .latest-updates {
    padding: 60px 0;
}

.latest-updates {
    background-color: var(--light-bg);
}

/* 分类区域 */
.categories {
    padding: 60px 0;
}

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

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
    color: white;
}

.category-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

.category-item h3 {
    font-size: 16px;
}

/* 排行榜区域 */
.ranking {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.ranking-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    margin: 0 5px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
}

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

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.ranking-item:hover {
    transform: translateX(5px);
    box-shadow: var(--hover-shadow);
}

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

.ranking-item .manga-cover {
    width: 80px;
    height: 120px;
    margin: 0 20px;
}

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

.manga-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--light-text);
}

/* 阅读器介绍区域 */
.reader-intro {
    padding: 60px 0;
}

.reader-features {
    display: flex;
    align-items: center;
    gap: 50px;
}

.reader-preview {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.reader-info {
    flex: 1;
}

.reader-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.reader-features-list {
    margin-bottom: 30px;
}

.reader-features-list li {
    margin-bottom: 10px;
    font-size: 16px;
}

/* APP下载区域 */
.app-download {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
}

.app-download .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.download-content {
    flex: 1;
}

.download-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

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

.qr-codes {
    display: flex;
    gap: 30px;
}

.qr-item {
    text-align: center;
}

.qr-item img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: white;
    padding: 10px;
}

.app-preview {
    flex: 1;
    text-align: center;
}

.app-preview img {
    max-height: 400px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 页脚区域 */
footer {
    background-color: #2d3436;
    color: white;
    padding: 60px 0 30px;
}

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

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.footer-logo p {
    opacity: 0.8;
}

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

.footer-links-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

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

.footer-links-column ul li a {
    opacity: 0.8;
}

.footer-links-column ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

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

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

    .features .container {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
    }

    .manga-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features .container {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reader-features,
    .app-download .container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .manga-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}