
:root {
    --color-deep-purple: #6a2c70;
    --color-rose: #b83b5e;
    --color-warm-orange: #f08a5d;
    --color-bright-yellow: #f9ed69;
    --color-dark-bg: #1a1a2e;
    --color-card-bg: #fefefe;
    --color-text: #2c2c2c;
    --color-text-light: #6b6b6b;
    --color-text-muted: #999;
    --color-border: #eee;
    --color-bg: #f5f3f7;
    --color-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.14);
    --shadow-card: 0 2px 10px rgba(106, 44, 112, 0.07);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --transition-fast: 0.18s ease;
    --transition-smooth: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-body: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(ellipse at 15% 10%, rgba(106, 44, 112, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 90%, rgba(240, 138, 93, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(184, 59, 94, 0.02) 0%, transparent 70%);
    background-attachment: fixed;
}

/* ============ 顶部导航栏 ============ */
.top-nav {
    width: 100%;
    background: linear-gradient(135deg, #5a255e 0%, #6a2c70 30%, #5c2263 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 20px rgba(106, 44, 112, 0.30);
    border-bottom: 2px solid rgba(249, 237, 105, 0.18);
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 60px;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
}

.site-name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #f9ed69 0%, #fccf5c 40%, #f08a5d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform var(--transition-fast);
    white-space: nowrap;
}
.site-name:hover {
    transform: scale(1.04);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-links li a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
}
.nav-links li a:hover,
.nav-links li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 0 16px rgba(249, 237, 105, 0.18);
}
.nav-links li a.active {
    background: rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.10);
    padding: 7px 16px 7px 7px;
    border-radius: 25px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.user-status:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(249, 237, 105, 0.4);
    box-shadow: 0 0 14px rgba(249, 237, 105, 0.12);
}
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(249, 237, 105, 0.55);
    flex-shrink: 0;
    background: #4a1a50;
}
.user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #fff;
}
.user-badge {
    font-size: 0.7rem;
    background: #f08a5d;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
}
.login-btn {
    background: #f08a5d;
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(240, 138, 93, 0.30);
}
.login-btn:hover {
    background: #e07a4d;
    box-shadow: 0 5px 20px rgba(240, 138, 93, 0.45);
    transform: translateY(-1px);
}

/* ============ 主布局 ============ */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 24px 28px;
    flex: 1;
}

.content-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-right {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============ 区块标题 ============ */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #3d1a42;
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(180deg, #6a2c70 0%, #b83b5e 60%, #f08a5d 100%);
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-more {
    font-size: 0.85rem;
    color: #b83b5e;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}
.section-more:hover {
    color: #6a2c70;
    text-decoration: underline;
}

/* ============ 卡片通用 ============ */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid #f0edf2;
    transition: box-shadow var(--transition-smooth);
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* ============ 热门漫画 ============ */
.hot-comics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.comic-card {
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f0f5;
}
.comic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #e8dcef;
}
.comic-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #e8e0ec;
}
.comic-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-smooth);
    background: #e8e0ec;
}
.comic-card:hover .comic-card-img-wrap img {
    transform: scale(1.06);
}
.comic-card-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #b83b5e;
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(184, 59, 94, 0.35);
}
.comic-card-info {
    padding: 10px 12px 12px;
}
.comic-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c2c2c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.comic-card-meta {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.comic-card-hot {
    color: #f08a5d;
    font-weight: 600;
}

/* ============ 漫画详细介绍 ============ */
.comic-detail-card {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.comic-detail-cover {
    width: 200px;
    height: 280px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #e8e0ec;
}
.comic-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #e8e0ec;
}
.comic-detail-info {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comic-detail-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #3d1a42;
}
.comic-detail-author {
    font-size: 0.9rem;
    color: #6b6b6b;
}
.comic-detail-author span {
    color: #b83b5e;
    font-weight: 500;
}
.comic-detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.comic-detail-tag {
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 14px;
    background: #fdf3e8;
    color: #f08a5d;
    font-weight: 500;
    border: 1px solid #fce4d2;
}
.comic-detail-status {
    font-size: 0.85rem;
    color: #6a2c70;
    font-weight: 600;
    background: #f5eff8;
    display: inline-block;
    padding: 4px 14px;
    border-radius: 14px;
    width: fit-content;
}
.comic-detail-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}
.comic-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.btn-primary {
    background: linear-gradient(135deg, #b83b5e 0%, #6a2c70 100%);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
    transition: all var(--transition-fast);
    box-shadow: 0 3px 14px rgba(184, 59, 94, 0.30);
    white-space: nowrap;
}
.btn-primary:hover {
    box-shadow: 0 6px 22px rgba(184, 59, 94, 0.45);
    transform: translateY(-2px);
}
.btn-outline {
    background: #fff;
    color: #b83b5e;
    border: 2px solid #b83b5e;
    padding: 9px 20px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.btn-outline:hover {
    background: #fef5f7;
    border-color: #6a2c70;
    color: #6a2c70;
}

/* ============ 角色区域 ============ */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.character-card {
    text-align: center;
    padding: 16px 10px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f0f5;
    transition: all var(--transition-smooth);
    cursor: pointer;
}
.character-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: #e0d4e8;
}
.character-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    border: 3px solid #f0e6f3;
    transition: border-color var(--transition-fast);
    background: #e8e0ec;
}
.character-card:hover .character-avatar {
    border-color: #b83b5e;
}
.character-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #3d1a42;
    margin-bottom: 3px;
}
.character-role-tag {
    font-size: 0.7rem;
    background: #f9ed69;
    color: #5c3000;
    padding: 2px 10px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.character-desc {
    font-size: 0.78rem;
    color: #888;
    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: 14px;
}
.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid #f2edf4;
    transition: background var(--transition-fast);
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: #3d1a42;
}
.comment-time {
    font-size: 0.75rem;
    color: #bbb;
    margin-left: 8px;
}
.comment-text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    margin-top: 3px;
}
.comment-likes {
    font-size: 0.78rem;
    color: #f08a5d;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition-fast);
    display: inline-block;
    margin-top: 6px;
}
.comment-likes:hover {
    color: #b83b5e;
}
.comment-pagination {
    text-align: center;
    margin-top: 8px;
}
.comment-pagination span {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 3px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #6b6b6b;
    transition: all var(--transition-fast);
    font-weight: 500;
}
.comment-pagination span.active-page {
    background: #6a2c70;
    color: #fff;
    font-weight: 600;
}
.comment-pagination span:hover:not(.active-page) {
    background: #f5eff8;
    color: #6a2c70;
}

/* ============ 右侧边栏卡片 ============ */
.sidebar-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid #f0edf2;
}
.sidebar-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #3d1a42;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5eff8;
    letter-spacing: 0.4px;
}
.stats-row {
    display: flex;
    gap: 10px;
    text-align: center;
}
.stat-item {
    flex: 1;
    background: linear-gradient(180deg, #fdf8fc 0%, #faf5fb 100%);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    border: 1px solid #f3ebf5;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6a2c70 0%, #b83b5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.rank-item:hover {
    background: #fdf8fc;
    box-shadow: var(--shadow-sm);
}
.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;
    background: #e8e0ec;
    color: #6b6b6b;
}
.rank-item.top1 .rank-num {
    background: #f08a5d;
    color: #fff;
    box-shadow: 0 2px 8px rgba(240, 138, 93, 0.35);
}
.rank-item.top2 .rank-num {
    background: #d4956b;
    color: #fff;
    box-shadow: 0 2px 6px rgba(180, 120, 80, 0.30);
}
.rank-item.top3 .rank-num {
    background: #e0b07e;
    color: #fff;
    box-shadow: 0 2px 6px rgba(200, 150, 100, 0.28);
}
.rank-cover {
    width: 48px;
    height: 64px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e8e0ec;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #2c2c2c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-sub {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 1px;
}
.rank-change {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.rank-up {
    color: #e05a3a;
}
.rank-down {
    color: #6a2c70;
}
.rank-stable {
    color: #aaa;
}

.total-read-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.84rem;
    border-bottom: 1px dotted #f3edf5;
}
.total-read-item:last-child {
    border-bottom: none;
}
.total-read-rank {
    font-weight: 700;
    color: #b83b5e;
    width: 20px;
    flex-shrink: 0;
}
.total-read-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #444;
}
.total-read-count {
    font-size: 0.75rem;
    color: #f08a5d;
    font-weight: 500;
    white-space: nowrap;
}

/* ============ 底部 ============ */
.bottom-nav {
    width: 100%;
    background: linear-gradient(135deg, #4a1a50 0%, #6a2c70 40%, #4a1a50 100%);
    color: #ddd;
    padding: 30px 28px 20px;
    margin-top: auto;
    border-top: 3px solid rgba(249, 237, 105, 0.25);
}
.bottom-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}
.bottom-col h4 {
    color: #f9ed69;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}
.bottom-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bottom-col ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color var(--transition-fast);
}
.bottom-col ul li a:hover {
    color: #f9ed69;
}
.bottom-copyright {
    text-align: center;
    width: 100%;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    color: #aaa;
}

/* 响应式保持原样 */
@media (max-width: 1300px) {
    .hot-comics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .characters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sidebar-right {
        width: 290px;
    }
}
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 16px;
    }
    .sidebar-right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .hot-comics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .comic-detail-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .comic-detail-info {
        align-items: center;
    }
    .comic-detail-cover {
        width: 160px;
        height: 224px;
    }
    .top-nav-inner {
        padding: 0 14px;
        gap: 10px;
    }
    .nav-links {
        gap: 2px;
    }
    .nav-links li a {
        padding: 6px 10px;
        font-size: 0.82rem;
    }
    .site-name {
        font-size: 1.3rem;
    }
}
@media (max-width: 640px) {
    .hot-comics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .sidebar-right {
        grid-template-columns: 1fr;
    }
    .nav-links {
        display: none;
    }
    .top-nav-inner {
        justify-content: space-between;
    }
    .stats-row {
        flex-direction: column;
        gap: 6px;
    }
    .comment-item {
        flex-wrap: wrap;
    }
    .bottom-nav-inner {
        flex-direction: column;
        gap: 16px;
    }
}
