
:root {
    --teal: #61c0bf;
    --light-teal: #bbded6;
    --soft-pink: #fae3d9;
    --rose: #ffb6b9;
    --white: #ffffff;
    --dark: #2c3e50;
    --gray: #6b7280;
    --light-gray: #f5f5f5;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.14);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.25s ease;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: #fdf6f3;
    color: #333;
    line-height: 1.6;
    min-width: 320px;
}

/* ========== 顶部导航栏 ========== */
.top-nav {
    width: 100%;
    background-color: var(--teal);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(97, 192, 191, 0.35);
}
.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
}
.top-nav-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}
.top-nav-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
    margin: 0;
}
.top-nav-left h1 .icon-placeholder {
    display: inline-block;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    line-height: 28px;
    text-align: center;
    font-size: 14px;
}
.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
}
.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 7px 14px;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.nav-links li a:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.top-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.btn-nav {
    padding: 8px 20px;
    border-radius: 22px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-block;
}
.btn-login {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.7);
}
.btn-login:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}
.btn-read-now {
    background: #fff;
    color: var(--teal);
    border: 2px solid #fff;
    font-weight: 700;
}
.btn-read-now:hover {
    background: #e8faf9;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

/* ========== 主体布局 ========== */
.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 24px 20px;
    min-height: 100vh;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== 通用区块 ========== */
.section-block {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--teal);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.4px;
}
.section-title .title-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rose);
    display: inline-block;
    flex-shrink: 0;
}

/* ========== 热门漫画网格 6条一行 ========== */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.comic-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--teal);
}
.comic-card-img-wrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f0f0f0;
    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(--rose);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.3px;
}
.comic-card-info {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.comic-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    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(--gray);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    line-height: 1.4;
}
.comic-card-info .meta-row span {
    background: var(--soft-pink);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 0.7rem;
    color: #8b5e5e;
}
.comic-card-info .tag-type {
    display: inline-block;
    background: var(--light-teal);
    color: #3a7d7b;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    align-self: flex-start;
}

/* ========== 精品推荐 ========== */
.recommend-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.recommend-scroll::-webkit-scrollbar {
    height: 5px;
}
.recommend-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}
.recommend-scroll::-webkit-scrollbar-thumb {
    background: var(--teal);
    border-radius: 10px;
}
.recommend-item {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.recommend-item:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--teal);
}
.recommend-item img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}
.recommend-item .rec-info {
    padding: 10px 12px;
}
.recommend-item .rec-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
}
.recommend-item .rec-info p {
    font-size: 0.73rem;
    color: var(--gray);
    margin-top: 3px;
}

/* ========== 角色介绍 ========== */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.character-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.character-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--rose);
    transform: translateY(-3px);
}
.character-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid var(--light-teal);
}
.character-card .char-info {
    padding: 12px 10px;
}
.character-card .char-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
}
.character-card .char-info .role-tag {
    font-size: 0.7rem;
    color: var(--teal);
    font-weight: 600;
    margin-top: 2px;
}
.character-card .char-info p {
    font-size: 0.72rem;
    color: var(--gray);
    margin-top: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 评论区域 ========== */
.comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    background: #fdfcfb;
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    border-left: 4px solid var(--teal);
    transition: var(--transition);
    border: 1px solid #eee;
    border-left: 4px solid var(--teal);
}
.comment-item:hover {
    background: #f9fdfc;
    border-left-color: var(--rose);
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
    flex-shrink: 0;
}
.comment-user {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--dark);
}
.comment-time {
    font-size: 0.7rem;
    color: #aaa;
    margin-left: auto;
}
.comment-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.7;
    word-break: break-word;
}

/* ========== 平台介绍 & APP下载 ========== */
.platform-intro {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.platform-intro-text {
    flex: 1;
    min-width: 260px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
}
.platform-intro-text strong {
    color: var(--teal);
}
.app-download-box {
    background: linear-gradient(135deg, #fffdf8, #fef5f0);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    border: 2px dashed var(--rose);
}
.app-download-box .qr-img {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.app-download-info h4 {
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 4px;
}
.app-download-info p {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.5;
}
.btn-download-app {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 22px;
    background: var(--teal);
    color: #fff;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-download-app:hover {
    background: #4da8a6;
    box-shadow: 0 4px 16px rgba(97, 192, 191, 0.4);
}

/* ========== 右侧边栏 ========== */
.sidebar .section-block {
    margin-bottom: 0;
    padding: 18px 16px;
}
.sidebar .section-title {
    font-size: 1.05rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
}
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    background: #fefefe;
    border: 1px solid transparent;
}
.rank-list li:hover {
    background: #fef9f7;
    border-color: var(--rose);
}
.rank-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--light-teal);
    color: #3a7d7b;
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rank-list li:nth-child(1) .rank-num {
    background: #ffb6b9;
    color: #fff;
}
.rank-list li:nth-child(2) .rank-num {
    background: #f9c9b8;
    color: #fff;
}
.rank-list li:nth-child(3) .rank-num {
    background: #fdd9a7;
    color: #fff;
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-info .rank-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-info .rank-sub {
    font-size: 0.68rem;
    color: #999;
}
.rank-change {
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.rank-change.up {
    color: #e74c3c;
}
.rank-change.stable {
    color: #888;
}

.total-read-box {
    background: linear-gradient(135deg, #fefefe, #fdf8f6);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    border: 1px solid #eee;
}
.total-read-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--teal);
    letter-spacing: 1px;
}
.total-read-label {
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
}
.total-read-time {
    font-size: 0.68rem;
    color: #bbb;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
}
.stat-item {
    background: #fefefe;
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    border: 1px solid #eee;
}
.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}
.stat-label {
    font-size: 0.68rem;
    color: #999;
    margin-top: 2px;
}

/* ========== 底部导航 ========== */
.bottom-nav {
    width: 100%;
    background-color: #2c3e50;
    color: #ccc;
    padding: 32px 20px 20px;
    margin-top: 20px;
}
.bottom-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}
.bottom-col h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 600;
}
.bottom-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bottom-col ul li a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}
.bottom-col ul li a:hover {
    color: var(--teal);
}
.bottom-copyright {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #444;
    font-size: 0.73rem;
    color: #888;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .comic-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .sidebar {
        width: 280px;
    }
    .top-nav-inner {
        padding: 0 14px;
    }
    .nav-links li a {
        font-size: 0.78rem;
        padding: 5px 10px;
    }
}
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        padding: 16px 10px;
        gap: 16px;
    }
    .sidebar {
        width: 100%;
        flex-direction: column;
        gap: 16px;
    }
    .comic-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .top-nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 12px;
        gap: 8px;
    }
    .top-nav-left {
        gap: 12px;
    }
    .top-nav-left h1 {
        font-size: 1.2rem;
    }
    .nav-links {
        gap: 3px;
    }
    .nav-links li a {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    .btn-nav {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    .section-block {
        padding: 16px 12px;
    }
}
@media (max-width: 560px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .comic-card-info {
        padding: 8px 10px;
    }
    .comic-card-info h3 {
        font-size: 0.8rem;
    }
    .comic-card-info .meta-row {
        font-size: 0.65rem;
    }
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    .stat-value {
        font-size: 0.95rem;
    }
    .top-nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .top-nav-right {
        justify-content: flex-end;
    }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    .section-title {
        font-size: 1rem;
    }
}
