:root {
    --primary: #2eb872;
    --primary-light: #a3de83;
    --bg-light: #feffe4;
    --accent: #fa4659;
    --text-dark: #1a1a2e;
    --text-gray: #555;
    --text-light: #777;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 0.25s ease;
    --max-width: 1300px;
    --nav-height: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8faf7;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 顶部导航 100%宽度 ========== */
.top-nav {
    width: 100%;
    background: var(--white);
    border-bottom: 2px solid var(--primary-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}
.top-nav-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.nav-brand h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin: 0;
    line-height: 1;
}
.nav-brand h1 span {
    color: var(--accent);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
    transition: var(--transition);
    position: relative;
}
.nav-links a:hover, .nav-links a:focus { background: #f0faf4; color: var(--primary); }
.nav-links a.active-link { background: var(--primary); color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-nav {
    padding: 9px 18px;
    border-radius: 22px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-login { background: transparent; color: var(--text-dark); border: 1.5px solid #ddd; }
.btn-login:hover { border-color: var(--primary); color: var(--primary); background: #f9fdf9; }
.btn-read { background: var(--accent); color: #fff; border: 1.5px solid var(--accent); }
.btn-read:hover { background: #e0404f; border-color: #e0404f; box-shadow: 0 4px 14px rgba(250,70,89,0.35); }

/* ========== 主布局 ========== */
.main-container { max-width: var(--max-width); margin: 0 auto; padding: 20px 20px 40px; display: flex; gap: 28px; }
.content-area { flex: 1; min-width: 0; }
.sidebar { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }

/* ========== Banner ========== */
.hero-banner {
    background: linear-gradient(135deg, #e8fbe8 0%, #feffe4 40%, #e8f5e9 100%);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    overflow: hidden;
    border: 1px solid #e0f0e0;
    position: relative;
}
.hero-banner::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -40px;
    width: 180px;
    height: 180px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.25;
    pointer-events: none;
}
.hero-text { flex: 1; position: relative; z-index: 1; }
.hero-text h2 { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; line-height: 1.3; }
.hero-text h2 .highlight { color: var(--accent); }
.hero-text p { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 16px; max-width: 480px; }
.hero-text .btn-hero {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 11px 26px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.hero-text .btn-hero:hover { background: #27a363; box-shadow: 0 6px 20px rgba(46,184,114,0.4); transform: translateY(-1px); }
.hero-img-wrapper {
    flex-shrink: 0;
    width: 170px;
    height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    background: #ddd;
}
.hero-img-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ========== 区块标题 ========== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.section-header h2 { font-size: 1.35rem; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.section-header h2::before { content: ''; display: inline-block; width: 5px; height: 24px; background: var(--accent); border-radius: 3px; flex-shrink: 0; }
.section-header .view-more { font-size: 0.88rem; color: var(--primary); text-decoration: none; font-weight: 500; transition: var(--transition); }
.section-header .view-more:hover { color: #27a363; text-decoration: underline; }

/* ========== 热门漫画 6条一行 ========== */
.comic-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 32px; }
.comic-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer; border: 1px solid #f0f0f0; display: flex; flex-direction: column; }
.comic-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.comic-card-img { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #eef5ee; position: relative; flex-shrink: 0; }
.comic-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.comic-card:hover .comic-card-img img { transform: scale(1.06); }
.comic-card-badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 10px; z-index: 2; letter-spacing: 0.5px; }
.comic-card-info { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.comic-card-info h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.comic-card-info .meta-row { font-size: 0.72rem; color: var(--text-light); display: flex; flex-wrap: wrap; gap: 4px 8px; line-height: 1.4; }
.comic-card-info .meta-row span { background: #f5faf5; padding: 2px 7px; border-radius: 4px; white-space: nowrap; font-size: 0.68rem; }
.comic-card-info .type-tag { display: inline-block; background: var(--primary-light); color: #1a5c30; font-size: 0.68rem; padding: 3px 9px; border-radius: 10px; font-weight: 600; align-self: flex-start; margin-top: 2px; }

/* ========== 精品推荐 ========== */
.featured-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.featured-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid #f0f0f0; cursor: pointer; display: flex; flex-direction: column; }
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.featured-card-img { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #eef5ee; position: relative; flex-shrink: 0; }
.featured-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.featured-card:hover .featured-card-img img { transform: scale(1.05); }
.featured-card-img .featured-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; z-index: 2; pointer-events: none; }
.featured-overlay h3 { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.featured-card-info { padding: 10px 14px; flex: 1; }
.featured-card-info .desc { font-size: 0.78rem; color: var(--text-gray); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== 漫画详细介绍 ========== */
.comic-detail-block { background: var(--white); border-radius: var(--radius-lg); padding: 28px 30px; margin-bottom: 28px; box-shadow: var(--shadow-sm); border: 1px solid #f0f0f0; display: flex; gap: 24px; flex-wrap: wrap; }
.comic-detail-cover { width: 180px; height: 240px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); background: #eef5ee; }
.comic-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comic-detail-content { flex: 1; min-width: 250px; }
.comic-detail-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; color: var(--text-dark); }
.comic-detail-content .detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-gray); }
.comic-detail-content .detail-meta span { background: #f8fdf8; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; }
.comic-detail-content .detail-desc { font-size: 0.9rem; color: #444; line-height: 1.7; }

/* ========== 角色详细介绍 ========== */
.characters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.character-card { background: var(--white); border-radius: var(--radius-md); padding: 20px 16px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid #f0f0f0; }
.character-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.character-avatar { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; margin: 0 auto 12px; background: #eef5ee; box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.character-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.character-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: var(--text-dark); }
.character-card .role-tag { font-size: 0.72rem; color: var(--primary); font-weight: 500; margin-bottom: 6px; }
.character-card .char-desc { font-size: 0.76rem; color: var(--text-light); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== 评论区块 ========== */
.comments-section { margin-bottom: 32px; }
.comments-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item { background: var(--white); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); border: 1px solid #f0f0f0; transition: var(--transition); }
.comment-item:hover { border-color: #e0e8e0; box-shadow: var(--shadow-md); }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-user { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.comment-time { font-size: 0.72rem; color: #999; margin-left: auto; flex-shrink: 0; }
.comment-body { font-size: 0.88rem; color: #444; line-height: 1.7; }

/* ========== 平台介绍 ========== */
.platform-intro { background: linear-gradient(135deg, #feffe4 0%, #f9fdf6 60%, #eef9ef 100%); border-radius: var(--radius-lg); padding: 30px 32px; margin-bottom: 28px; border: 1px solid #e8f0e8; }
.platform-intro h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; color: var(--text-dark); }
.platform-intro p { font-size: 0.9rem; color: #444; line-height: 1.8; margin-bottom: 8px; }
.platform-intro .stats-inline { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; }
.platform-intro .stat-item { background: var(--white); padding: 12px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.88rem; color: var(--text-dark); box-shadow: var(--shadow-sm); border: 1px solid #eef5ee; }
.platform-intro .stat-item em { font-style: normal; color: var(--accent); font-size: 1.1rem; }

/* ========== APP下载 ========== */
.app-download-section { background: var(--white); border-radius: var(--radius-lg); padding: 28px 30px; margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid #f0f0f0; }
.app-download-section h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; color: var(--text-dark); }
.download-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.download-card { display: flex; align-items: center; gap: 10px; background: #fafdfa; border: 1.5px solid #e8f0e8; border-radius: var(--radius-md); padding: 14px 16px; text-decoration: none; color: var(--text-dark); transition: var(--transition); cursor: pointer; font-weight: 500; font-size: 0.88rem; }
.download-card:hover { border-color: var(--primary); background: #f5fdf7; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.download-card .app-icon { flex-shrink: 0; width: 36px; height: 36px; }
.download-card .app-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.download-card .dl-info { display: flex; flex-direction: column; gap: 2px; }
.download-card .dl-platform { font-weight: 600; font-size: 0.85rem; }
.download-card .dl-label { font-size: 0.7rem; color: var(--text-light); }

/* ========== 右侧边栏 ========== */
.sidebar-card { background: var(--white); border-radius: var(--radius-md); padding: 18px 16px; box-shadow: var(--shadow-sm); border: 1px solid #f0f0f0; }
.sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: var(--text-dark); display: flex; align-items: center; gap: 6px; }
.sidebar-card h3 .icon-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.85rem; transition: var(--transition); cursor: pointer; }
.rank-list li:last-child { border-bottom: none; }
.rank-list li:hover { color: var(--primary); }
.rank-num { width: 22px; height: 22px; border-radius: 50%; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; background: #ccc; }
.rank-list li:nth-child(1) .rank-num { background: #fa4659; }
.rank-list li:nth-child(2) .rank-num { background: #ff6b6b; }
.rank-list li:nth-child(3) .rank-num { background: #ffa07a; }
.rank-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rank-change { font-size: 0.7rem; font-weight: 600; flex-shrink: 0; }
.rank-change.up { color: #fa4659; } .rank-change.down { color: #999; }

/* 总阅读 */
.total-read-card { text-align: center; }
.total-read-num { font-size: 2.2rem; font-weight: 800; color: var(--primary); letter-spacing: 1px; line-height: 1; margin-bottom: 4px; }
.total-read-label { font-size: 0.8rem; color: var(--text-light); margin-bottom: 2px; }
.total-read-update { font-size: 0.7rem; color: #999; }

/* 数据统计 */
.stats-mini { display: flex; flex-direction: column; gap: 10px; }
.stats-mini .stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; padding: 8px 0; border-bottom: 1px dashed #eee; }
.stats-mini .stat-row:last-child { border-bottom: none; }
.stats-mini .stat-val { font-weight: 700; color: var(--accent); font-size: 0.95rem; }

/* ========== 底部导航 100%宽度 ========== */
.footer-nav { width: 100%; background: #1a1a2e; color: #ccc; padding: 36px 20px 24px; margin-top: 20px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-col h4 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.footer-col a { display: block; color: #aaa; text-decoration: none; font-size: 0.82rem; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom { max-width: var(--max-width); margin: 20px auto 0; padding-top: 16px; border-top: 1px solid #333; text-align: center; font-size: 0.78rem; color: #888; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.footer-bottom a { color: var(--primary-light); text-decoration: none; font-weight: 500; }
.footer-bottom a:hover { text-decoration: underline; }

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) { .comic-grid { grid-template-columns: repeat(4, 1fr); } .sidebar { width: 280px; } .featured-row { grid-template-columns: repeat(3, 1fr); } .characters-grid { grid-template-columns: repeat(3, 1fr); } .download-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 992px) { .main-container { flex-direction: column; gap: 20px; } .sidebar { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; } .comic-grid { grid-template-columns: repeat(3, 1fr); } .featured-row { grid-template-columns: repeat(2, 1fr); } .characters-grid { grid-template-columns: repeat(2, 1fr); } .hero-banner { flex-direction: column; text-align: center; padding: 24px 20px; } .hero-img-wrapper { width: 130px; height: 170px; } .hero-text p { max-width: 100%; } .nav-links { gap: 2px; } .nav-links a { padding: 6px 10px; font-size: 0.78rem; } .nav-brand h1 { font-size: 1.3rem; } .download-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .top-nav-inner { flex-wrap: wrap; gap: 8px; padding: 8px 12px; } .top-nav { height: auto; min-height: 56px; } .nav-links { order: 3; width: 100%; justify-content: flex-start; gap: 4px; padding: 4px 0; } .nav-links a { font-size: 0.74rem; padding: 5px 9px; border-radius: 14px; } .nav-actions { gap: 6px; } .btn-nav { padding: 7px 13px; font-size: 0.78rem; border-radius: 18px; } .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .featured-row { grid-template-columns: repeat(2, 1fr); gap: 10px; } .characters-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .sidebar { grid-template-columns: 1fr; } .comic-detail-block { flex-direction: column; align-items: center; text-align: center; padding: 20px; } .comic-detail-cover { width: 140px; height: 190px; } .download-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .hero-banner { padding: 18px 14px; gap: 14px; } .hero-text h2 { font-size: 1.35rem; } .hero-img-wrapper { width: 100px; height: 135px; } .section-header h2 { font-size: 1.1rem; } .footer-inner { flex-direction: column; gap: 18px; } .platform-intro { padding: 20px 16px; } .app-download-section { padding: 18px 14px; } .comment-item { padding: 14px; } .comic-card-info h3 { font-size: 0.82rem; } }
@media (max-width: 480px) { .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .featured-row { grid-template-columns: 1fr 1fr; gap: 8px; } .characters-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .download-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .download-card { padding: 10px 12px; font-size: 0.76rem; gap: 6px; } .download-card .app-icon { width: 28px; height: 28px; } .hero-text h2 { font-size: 1.15rem; } .hero-text p { font-size: 0.8rem; } .nav-brand h1 { font-size: 1.1rem; } .btn-nav { padding: 6px 10px; font-size: 0.7rem; border-radius: 15px; } .nav-links a { font-size: 0.68rem; padding: 4px 7px; } .comic-card-info { padding: 8px 10px; } .comic-card-info h3 { font-size: 0.75rem; } .character-avatar { width: 65px; height: 65px; } .character-card { padding: 14px 10px; } .character-card h4 { font-size: 0.8rem; } .total-read-num { font-size: 1.6rem; } }
