:root {
    --coral-light: #f8b195;
    --coral: #f67280;
    --rose: #c06c84;
    --deep-purple: #6c567b;
    --bg-cream: #fef9f5;
    --bg-white: #ffffff;
    --text-dark: #2c2c2c;
    --text-muted: #5a5a5a;
    --text-light: #7a7a7a;
    --border-soft: #f0e6e0;
    --shadow-sm: 0 2px 8px rgba(108, 86, 123, 0.06);
    --shadow-md: 0 4px 16px rgba(108, 86, 123, 0.10);
    --shadow-lg: 0 8px 28px rgba(108, 86, 123, 0.14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --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', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 320px;
}

/* ========== 顶部导航栏 ========== */
.top-nav {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    flex-wrap: nowrap;
}
.top-nav .nav-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--deep-purple);
}
.top-nav .nav-brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--deep-purple);
    white-space: nowrap;
    margin: 0;
    line-height: 1;
}
.top-nav .nav-brand .brand-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--coral);
    flex-shrink: 0;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.nav-links a:hover,
.nav-links a:focus {
    color: #fff;
    background: var(--coral);
    outline: none;
}
.nav-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    border-radius: 22px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border: 2px solid var(--coral);
    background: #fff;
    color: var(--coral);
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.3px;
}
.btn-login:hover {
    background: var(--coral);
    color: #fff;
    box-shadow: 0 4px 14px rgba(246, 114, 128, 0.35);
}
.btn-login .user-avatar-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    color: var(--deep-purple);
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--deep-purple);
    margin: 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}

/* ========== 主布局 ========== */
.main-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 16px 32px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    align-self: start;
    max-height: calc(100vh - var(--nav-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--rose) transparent;
    padding-right: 4px;
}
.sidebar-right::-webkit-scrollbar {
    width: 5px;
}
.sidebar-right::-webkit-scrollbar-thumb {
    background: var(--rose);
    border-radius: 10px;
}

/* ========== 通用卡片样式 ========== */
.section-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    transition: var(--transition);
}
.section-card:hover {
    box-shadow: var(--shadow-md);
}
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--deep-purple);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--coral-light);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.4px;
}
.section-title .title-accent {
    display: inline-block;
    width: 5px;
    height: 22px;
    background: var(--coral);
    border-radius: 3px;
    flex-shrink: 0;
}
.sidebar-right .section-title {
    font-size: 1.05rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

/* ========== 热门漫画网格 ========== */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.comic-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.comic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--coral-light);
}
.comic-card .comic-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: #f5f0ed;
    flex-shrink: 0;
}
.comic-card .comic-info {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.comic-card .comic-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-card .comic-meta {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.4;
}
.comic-card .comic-meta span {
    display: inline-block;
    margin-right: 4px;
    background: #fef5f3;
    color: var(--rose);
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.68rem;
    margin-top: 2px;
}
.comic-card .comic-type-tag {
    display: inline-block;
    background: var(--coral-light);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    align-self: flex-start;
    letter-spacing: 0.5px;
}

/* ========== 右侧边栏样式 ========== */
.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;
    background: #fefcfb;
    border: 1px solid transparent;
}
.rank-list li:hover {
    background: #fff;
    border-color: var(--coral-light);
    box-shadow: var(--shadow-sm);
}
.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
    color: #fff;
    letter-spacing: 0.5px;
}
.rank-badge.top1 {
    background: #f67280;
}
.rank-badge.top2 {
    background: #c06c84;
}
.rank-badge.top3 {
    background: #6c567b;
}
.rank-badge.normal {
    background: #c9b8d4;
    color: #4a3a55;
}
.rank-thumb {
    width: 42px;
    height: 56px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    background: #f5f0ed;
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-info .rank-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-info .rank-sub {
    font-size: 0.7rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 数据统计卡片 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stat-item {
    text-align: center;
    padding: 14px 8px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #fef9f5 0%, #fdf3ef 100%);
    border: 1px solid var(--border-soft);
    transition: var(--transition);
}
.stat-item:hover {
    border-color: var(--coral-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--coral);
    letter-spacing: 0.5px;
    line-height: 1;
}
.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.3px;
}

/* 总阅读板块 */
.total-read-card {
    background: linear-gradient(135deg, #6c567b 0%, #5a4668 100%);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    text-align: center;
}
.total-read-card .total-number {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #f8b195;
}
.total-read-card .total-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 2px;
}
.total-read-card .update-time {
    font-size: 0.68rem;
    opacity: 0.7;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* 评论列表 */
.comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--rose) transparent;
}
.comment-list::-webkit-scrollbar {
    width: 4px;
}
.comment-list::-webkit-scrollbar-thumb {
    background: var(--rose);
    border-radius: 8px;
}
.comment-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: #fefcfb;
    border: 1px solid #f5eeea;
    transition: var(--transition);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.comment-item:hover {
    background: #fff;
    border-color: var(--coral-light);
    box-shadow: var(--shadow-sm);
}
.comment-item .comment-user {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--deep-purple);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-cloud .tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
    border: 1px solid var(--border-soft);
    background: #fefcfb;
    color: var(--text-muted);
    text-decoration: none;
}
.tag-cloud .tag:hover {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
    box-shadow: 0 3px 10px rgba(246, 114, 128, 0.3);
}

/* ========== 角色介绍 ========== */
.character-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.character-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.character-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--coral-light);
}
.character-card .char-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
    background: #f5f0ed;
}
.character-card .char-info {
    padding: 12px 14px;
}
.character-card .char-name {
    font-weight: 700;
    color: var(--deep-purple);
    font-size: 0.95rem;
}
.character-card .char-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 3px;
    line-height: 1.4;
}

/* ========== 平台优势 ========== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: #fefcfb;
    border: 1px solid var(--border-soft);
    transition: var(--transition);
}
.advantage-item:hover {
    border-color: var(--coral-light);
    box-shadow: var(--shadow-sm);
}
.advantage-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8b195 0%, #f67280 100%);
}
.advantage-icon-wrap img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.advantage-text h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--deep-purple);
    margin-bottom: 2px;
}
.advantage-text p {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ========== 常见问题 ========== */
.faq-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faq-item {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    background: #fefcfb;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--deep-purple);
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.3px;
    transition: var(--transition);
}
.faq-question:hover {
    color: var(--coral);
}
.faq-answer {
    padding: 0 18px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: none;
}
.faq-item.open .faq-answer {
    display: block;
}
.faq-item.open .faq-question {
    color: var(--coral);
}
.faq-arrow {
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
    color: var(--rose);
}
.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

/* ========== APP下载区域 ========== */
.app-download-section {
    background: linear-gradient(160deg, #fef9f5 0%, #fdf3ef 40%, #fce8e3 100%);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}
.app-download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 16px;
}
.app-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.4px;
    border: 2px solid transparent;
    background: #fff;
    color: var(--deep-purple);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}
.app-download-btn:hover {
    border-color: var(--coral);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--coral);
}
.app-download-btn .app-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
}

/* ========== 底部导航 ========== */
.bottom-footer {
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--border-soft);
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(108, 86, 123, 0.04);
}
.bottom-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 8px;
}
.bottom-footer .footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 0.3px;
}
.bottom-footer .footer-links a:hover {
    color: var(--coral);
}
.bottom-footer .footer-brand {
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

/* ========== 平台介绍区域 ========== */
.platform-intro-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.platform-intro-text strong {
    color: var(--deep-purple);
}

/* ========== 漫画详细介绍区域 ========== */
.comic-detail-block {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.comic-detail-cover {
    width: 160px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    background: #f5f0ed;
    box-shadow: var(--shadow-md);
}
.comic-detail-text {
    flex: 1;
    min-width: 240px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.comic-detail-text h3 {
    color: var(--deep-purple);
    font-size: 1.15rem;
    margin-bottom: 6px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .comic-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .main-container {
        grid-template-columns: 1fr 300px;
        gap: 18px;
    }
    .app-download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .character-cards {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sidebar-right {
        position: static;
        max-height: none;
        overflow-y: visible;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    .sidebar-right .section-card {
        break-inside: avoid;
    }
    .comic-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .top-nav {
        padding: 0 12px;
        gap: 8px;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: #fff;
        border-bottom: 2px solid var(--border-soft);
        padding: 12px 16px;
        gap: 4px;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    .nav-links.show {
        display: flex;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .nav-links a {
        display: block;
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        text-align: center;
    }
    .top-nav .nav-brand h1 {
        font-size: 1.15rem;
    }
    .app-download-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .app-download-btn {
        padding: 12px 10px;
        font-size: 0.78rem;
    }
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .stat-value {
        font-size: 1.2rem;
    }
}
@media (max-width: 600px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .comic-card .comic-title {
        font-size: 0.78rem;
    }
    .comic-card .comic-meta {
        font-size: 0.65rem;
    }
    .comic-card .comic-info {
        padding: 7px 7px 9px;
    }
    .section-card {
        padding: 14px 12px;
    }
    .section-title {
        font-size: 1rem;
    }
    .character-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-right {
        grid-template-columns: 1fr;
    }
    .app-download-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .btn-login {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
    .comic-detail-cover {
        width: 120px;
    }
    .stats-row {
        gap: 4px;
    }
    .stat-item {
        padding: 10px 4px;
    }
    .stat-value {
        font-size: 1rem;
    }
    .total-read-card .total-number {
        font-size: 1.4rem;
    }
}
@media (max-width: 380px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .app-download-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .top-nav .nav-brand h1 {
        font-size: 1rem;
    }
}
