
:root {
    --color-deep-purple: #53354a;
    --color-mid-red: #903749;
    --color-bright-red: #e84545;
    --color-dark-blue: #2b2e4a;
    --bg-light: #faf7f8;
    --bg-white: #ffffff;
    --text-dark: #1a1a2e;
    --text-mid: #4a4a5e;
    --text-light: #6b6b7e;
    --border-light: #e8e4e6;
    --shadow-sm: 0 2px 8px rgba(43, 46, 74, 0.06);
    --shadow-md: 0 4px 16px rgba(43, 46, 74, 0.10);
    --shadow-lg: 0 8px 28px rgba(43, 46, 74, 0.14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background-color: #f5f2f4;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 顶部导航 ========== */
.top-nav {
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: 64px;
    display: flex;
    align-items: center;
}
.top-nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-brand h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-dark-blue);
    letter-spacing: -0.5px;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}
.nav-brand h1 span {
    color: var(--color-bright-red);
}
.nav-brand h1:hover {
    transform: scale(1.03);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}
.nav-links li a {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-mid);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-links li a:hover {
    color: var(--color-bright-red);
    background: rgba(232, 69, 69, 0.06);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-login {
    padding: 9px 22px;
    background: transparent;
    border: 2px solid var(--color-dark-blue);
    color: var(--color-dark-blue);
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.btn-login:hover {
    background: var(--color-dark-blue);
    color: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn-cta {
    padding: 10px 24px;
    background: var(--color-bright-red);
    border: none;
    color: #fff;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(232, 69, 69, 0.35);
}
.btn-cta:hover {
    background: #d43a3a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 69, 69, 0.45);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--color-dark-blue);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== 主布局 ========== */
.page-container {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
    flex: 1;
}
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 88px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #d0c8cc; border-radius: 4px; }

/* ========== 区块卡片 ========== */
.section-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.section-card:hover { box-shadow: var(--shadow-md); }
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--color-bright-red);
    display: inline-block;
    letter-spacing: 0.2px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.section-header .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.section-tag {
    font-size: 0.78rem;
    color: var(--color-mid-red);
    font-weight: 600;
    background: rgba(144, 55, 73, 0.08);
    padding: 4px 12px;
    border-radius: 14px;
}

/* ========== 热门漫画网格 6列 ========== */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.comic-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #d0c0c6;
}
.comic-card-img-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f0eaed;
    position: relative;
}
.comic-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.comic-card:hover .comic-card-img-wrap img { transform: scale(1.06); }
.comic-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-bright-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    z-index: 2;
}
.comic-card-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.comic-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-card-info .meta-row {
    font-size: 0.73rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.comic-card-info .meta-row span {
    background: #f5f1f3;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 0.7rem;
}
.comic-card-info .type-tag {
    display: inline-block;
    background: var(--color-mid-red);
    color: #fff;
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 2px;
}

/* ========== 精品推荐 ========== */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.featured-card {
    background: linear-gradient(135deg, #fdfafb 0%, #faf5f7 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
    height: 160px;
}
.featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.featured-card-img { width: 120px; flex-shrink: 0; overflow: hidden; background: #f0eaed; }
.featured-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-card-info { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.featured-card-info h4 { font-size: 1rem; font-weight: 700; color: var(--color-dark-blue); }
.featured-card-info p { font-size: 0.78rem; color: var(--text-mid); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.featured-badge { display: inline-block; background: var(--color-bright-red); color: #fff; font-size: 0.7rem; padding: 3px 10px; border-radius: 10px; font-weight: 700; align-self: flex-start; }

/* ========== 漫画详细介绍 ========== */
.comic-detail-inner { display: flex; gap: 24px; flex-wrap: wrap; }
.comic-detail-poster { width: 200px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 3/4; background: #f0eaed; }
.comic-detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comic-detail-text { flex: 1; min-width: 260px; }
.comic-detail-text h3 { font-size: 1.4rem; font-weight: 700; color: var(--color-dark-blue); margin-bottom: 8px; }
.comic-detail-text .detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.comic-detail-text .detail-meta span { background: #f5f1f3; padding: 5px 12px; border-radius: 14px; font-size: 0.8rem; color: var(--text-mid); font-weight: 500; }
.comic-detail-text .detail-meta span.tag-red { background: var(--color-bright-red); color: #fff; font-weight: 600; }
.comic-detail-text .detail-desc { font-size: 0.9rem; color: var(--text-mid); line-height: 1.7; }

/* ========== 角色介绍 ========== */
.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.character-card { text-align: center; background: var(--bg-white); border-radius: var(--radius-lg); padding: 18px 14px; border: 1px solid var(--border-light); transition: var(--transition); cursor: pointer; }
.character-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.character-avatar { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px; border: 3px solid var(--color-mid-red); background: #f0eaed; flex-shrink: 0; }
.character-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.character-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--color-dark-blue); margin-bottom: 2px; }
.character-card .role-tag { font-size: 0.73rem; color: var(--color-mid-red); font-weight: 600; margin-bottom: 4px; }
.character-card p { font-size: 0.75rem; color: var(--text-light); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== 评论区 ========== */
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { background: #fdfafb; border-radius: var(--radius-md); padding: 16px 18px; border-left: 4px solid var(--color-mid-red); transition: var(--transition); }
.comment-item:hover { background: #fff; box-shadow: var(--shadow-sm); }
.comment-user { font-weight: 700; font-size: 0.9rem; color: var(--color-dark-blue); }
.comment-time { font-size: 0.73rem; color: var(--text-light); margin-bottom: 6px; }
.comment-body { font-size: 0.88rem; color: var(--text-mid); line-height: 1.7; }

/* ========== 平台介绍 & APP下载 ========== */
.platform-intro { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.platform-intro-text { flex: 1; min-width: 260px; font-size: 0.9rem; color: var(--text-mid); line-height: 1.75; }
.platform-intro-visual { width: 180px; height: 180px; border-radius: var(--radius-xl); overflow: hidden; background: #f0eaed; flex-shrink: 0; }
.platform-intro-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-download-inner { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.app-download-qr { width: 140px; height: 140px; border-radius: var(--radius-md); overflow: hidden; background: #f0eaed; flex-shrink: 0; border: 2px solid var(--border-light); }
.app-download-qr img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-download-info { flex: 1; min-width: 200px; }
.app-download-info h4 { font-size: 1.1rem; font-weight: 700; color: var(--color-dark-blue); margin-bottom: 6px; }
.app-download-info p { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 10px; }
.btn-download-app { display: inline-block; padding: 10px 22px; background: var(--color-dark-blue); color: #fff; border-radius: 24px; text-decoration: none; font-weight: 700; font-size: 0.88rem; transition: var(--transition); letter-spacing: 0.3px; }
.btn-download-app:hover { background: #1e2138; box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ========== 侧边栏 ========== */
.sidebar .side-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.sidebar .side-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0eaed;
    letter-spacing: 0.2px;
}
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); transition: var(--transition); cursor: pointer; font-size: 0.85rem; }
.rank-list li:hover { background: #fdf7f8; }
.rank-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; color: #fff; }
.rank-num.top1 { background: #e84545; }
.rank-num.top2 { background: #f08050; }
.rank-num.top3 { background: #f0a040; }
.rank-num.normal { background: #b0a8b4; }
.rank-info { flex: 1; min-width: 0; }
.rank-info .rank-title { font-weight: 600; color: var(--color-dark-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info .rank-sub { font-size: 0.7rem; color: var(--text-light); }
.rank-change { font-weight: 700; font-size: 0.78rem; flex-shrink: 0; }
.rank-change.up { color: #e84545; }
.rank-change.down { color: #888; }
.rise-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f5f1f3; font-size: 0.83rem; }
.rise-item:last-child { border-bottom: none; }
.rise-badge { background: var(--color-bright-red); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
.total-read-info { text-align: center; padding: 10px 0; }
.total-read-num { font-size: 2rem; font-weight: 800; color: var(--color-bright-red); letter-spacing: -1px; }
.total-read-label { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.update-time { font-size: 0.7rem; color: #999; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.stat-item { background: #fdf7f8; border-radius: var(--radius-sm); padding: 14px 8px; }
.stat-value { font-size: 1.3rem; font-weight: 800; color: var(--color-mid-red); }
.stat-label { font-size: 0.7rem; color: var(--text-light); margin-top: 2px; }

/* ========== 底部导航 ========== */
.footer-nav {
    width: 100%;
    background: var(--color-dark-blue);
    color: #c8c8d8;
    padding: 32px 24px 20px;
    margin-top: 16px;
}
.footer-inner { max-width: 1400px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-col h5 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; letter-spacing: 0.3px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-col ul li a { color: #b0b0c0; text-decoration: none; font-size: 0.82rem; transition: var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 20px; margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.75rem; color: #888; max-width: 1400px; margin-left: auto; margin-right: auto; }

/* 响应式（完整保留） */
@media (max-width: 1200px) {
    .comic-grid { grid-template-columns: repeat(4, 1fr); }
    .sidebar { width: 280px; }
    .character-grid { grid-template-columns: repeat(3, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .page-container { flex-direction: column; padding: 0 12px; margin: 16px auto; }
    .sidebar { width: 100%; position: static; max-height: none; order: 10; }
    .comic-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .character-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
    .nav-links.mobile-open {
        display: flex;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 12px;
        gap: 2px;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border-light);
        z-index: 999;
    }
    .comic-detail-inner { flex-direction: column; align-items: center; }
    .comic-detail-poster { width: 160px; }
    .platform-intro { flex-direction: column; align-items: center; }
    .app-download-inner { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 600px) {
    .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .character-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .featured-grid { grid-template-columns: 1fr; }
    .featured-card { height: 130px; }
    .featured-card-img { width: 90px; }
    .sidebar { width: 100%; }
    .top-nav-inner { padding: 0 12px; }
    .nav-brand h1 { font-size: 1.3rem; }
    .btn-cta,
    .btn-login { font-size: 0.75rem; padding: 7px 14px; }
    .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .stat-item { padding: 10px 4px; }
    .stat-value { font-size: 1rem; }
    .comic-card-info h3 { font-size: 0.8rem; }
    .comic-card-info .meta-row span { font-size: 0.65rem; padding: 1px 6px; }
}
