/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6C5CE7;
    --secondary-color: #A29BFE;
    --accent-color: #FD79A8;
    --text-dark: #2D3436;
    --text-light: #636E72;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E9ECEF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 16px;
}

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

/* 头部导航 */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.logo h1 a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

/* 面包屑导航 */
.breadcrumb {
    background: var(--bg-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.breadcrumb span {
    color: var(--text-light);
}

/* 主要内容区 */
.main {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* 英雄横幅 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
}

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

.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 121, 168, 0.4);
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 页面标题 */
.page-header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* 区块标题 */
.section-title {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

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

/* 漫画卡片网格 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.comic-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.comic-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.comic-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.comic-card h3 {
    font-size: 18px;
    padding: 15px 15px 5px;
    color: var(--text-dark);
    margin: 0;
}

.comic-info {
    padding: 0 15px 15px;
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* 分类列表 */
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-item {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

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

.category-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.category-item span {
    font-weight: 600;
    font-size: 16px;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.category-box {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.category-box a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-box h3 {
    font-size: 20px;
    padding: 20px;
    margin: 0;
    color: var(--text-dark);
}

.category-box p {
    padding: 0 20px 20px;
    color: var(--text-light);
    margin: 0;
}

/* 更新列表 */
.update-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.update-item {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.update-item:hover {
    box-shadow: var(--shadow-hover);
}

.update-item a {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

.update-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.update-info {
    padding: 20px;
}

.update-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.update-desc {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* 内容介绍 */
.intro, .category-intro, .free-intro {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.intro h2, .category-intro h2, .free-intro h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.intro-content, .intro-text {
    line-height: 1.8;
    color: var(--text-light);
    font-size: 16px;
}

.intro-content p, .intro-text p {
    margin-bottom: 20px;
}

.intro-content strong, .intro-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 免费作品列表 */
.comic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.comic-item {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.comic-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.comic-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.comic-details {
    padding: 20px;
}

.comic-details h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.comic-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.comic-tag {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 阅读指南 */
.reading-guide {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.guide-item {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.guide-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.guide-item p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* 推荐列表 */
.recommend-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.recommend-item {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.recommend-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recommend-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recommend-item h3 {
    font-size: 18px;
    padding: 15px;
    margin: 0;
    color: var(--text-dark);
}

.recommend-item p {
    padding: 0 15px 15px;
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* 相关链接 */
.related-links {
    margin-bottom: 40px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.link-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: block;
}

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

.link-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.link-card h3 {
    font-size: 18px;
    padding: 15px;
    margin: 0;
    color: var(--text-dark);
}

.link-card p {
    padding: 0 15px 15px;
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin: 0;
}

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

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

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* 移动端适配 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .nav ul {
        gap: 20px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .comic-grid,
    .category-grid,
    .comic-list,
    .recommend-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .update-item a {
        grid-template-columns: 150px 1fr;
        gap: 15px;
    }

    .update-info h3 {
        font-size: 18px;
    }

    .update-desc {
        font-size: 14px;
    }

    .intro,
    .category-intro,
    .free-intro,
    .reading-guide {
        padding: 25px 20px;
    }

    .intro h2,
    .category-intro h2,
    .free-intro h2 {
        font-size: 24px;
    }

    .guide-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-content h2 {
        font-size: 24px;
    }

    .comic-grid,
    .category-grid,
    .comic-list,
    .recommend-list,
    .category-list {
        grid-template-columns: 1fr;
    }

    .update-item a {
        grid-template-columns: 1fr;
    }

    .update-item img {
        height: 200px;
    }
}

/* 性能优化 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 焦点样式 */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

