:root {
    --gold: #ffc300;
    --orange: #ec610a;
    --crimson: #a40a3c;
    --plum: #6b0848;
    --bg: #faf8f6;
    --surface: #ffffff;
    --text: #2c2c2c;
    --text-secondary: #5a5a5a;
    --text-muted: #7a7a7a;
    --border: #e8e4e0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1320px;
    --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);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.top-nav {
    width: 100%;
    height: var(--nav-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 0;
}

.top-nav-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--plum);
    letter-spacing: -0.5px;
    white-space: nowrap;
    margin: 0;
    background: linear-gradient(135deg, var(--crimson), var(--plum));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--crimson);
    background: rgba(164, 10, 60, 0.06);
}

.nav-links a.active-link {
    color: var(--crimson);
    background: rgba(164, 10, 60, 0.08);
    font-weight: 600;
}

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

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: linear-gradient(135deg, var(--orange), var(--crimson));
    color: #fff;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(236, 97, 10, 0.3);
}

.btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 97, 10, 0.4);
    background: linear-gradient(135deg, #f5691a, #b80b44);
}

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

.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px 40px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
}

.content-left {
    min-width: 0;
}
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    align-self: flex-start;
    max-height: calc(100vh - var(--nav-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.section-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    scroll-margin-top: calc(var(--nav-height) + 16px);
}
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--plum);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.comic-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.comic-card-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: #e0dcd8;
}
.comic-card-body {
    padding: 10px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comic-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.3;
}
.comic-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}
.comic-card-type {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 195, 0, 0.2);
    color: var(--orange);
    font-weight: 600;
    margin-top: 2px;
    align-self: flex-start;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.featured-card {
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, #fdf8f3, #fef9f5);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    align-items: center;
}
.featured-card img {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #e0dcd8;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.character-card {
    text-align: center;
    padding: 20px 14px;
    background: #fdfaf7;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.character-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
    background: #e0dcd8;
    border: 3px solid var(--gold);
}

.sidebar-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.sidebar-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--plum);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}
.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: var(--gold); }
.rank-num.top2 { background: var(--orange); }
.rank-num.top3 { background: var(--crimson); }
.rank-num.normal { background: #b0a8a0; }
.rank-item img {
    width: 50px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #e0dcd8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stat-box {
    text-align: center;
    padding: 14px 8px;
    border-radius: var(--radius-sm);
    background: #fdf8f3;
    border: 1px solid var(--border);
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--crimson);
}
.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}
.comment-item {
    padding: 14px 16px;
    background: #fdfaf7;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.comment-user {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--plum);
    margin-bottom: 6px;
}
.comment-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.comment-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.footer-nav {
    width: 100%;
    background: #1a1a2e;
    color: #ccc;
    padding: 32px 20px 20px;
    margin-top: 20px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-col h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}
.footer-col a {
    display: block;
    color: #aaa;
    text-decoration: none;
    font-size: 0.82rem;
    padding: 4px 0;
}
.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #888;
}
.footer-bottom a {
    color: var(--gold);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(255, 195, 0, 0.3);
    border-radius: 14px;
    font-size: 0.78rem;
}
