:root {
    --deep-purple: #4a266a;
    --mid-purple: #7f4a88;
    --pink: #de95ba;
    --light-pink: #ffd9e8;
    --white: #ffffff;
    --light-bg: #fdf6f9;
    --text-dark: #2c1a3a;
    --text-mid: #4a3a52;
    --text-light: #6b5b72;
    --border: #f0dce6;
    --shadow-sm: 0 2px 8px rgba(74, 38, 106, 0.06);
    --shadow-md: 0 4px 16px rgba(74, 38, 106, 0.10);
    --shadow-lg: 0 8px 30px rgba(74, 38, 106, 0.14);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1400px;
    --nav-height: 60px;
    --subnav-height: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + var(--subnav-height) + 16px); }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background-color: #fdf6f9; color: var(--text-dark); line-height: 1.6; min-height: 100vh;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

.top-nav {
    width: 100%; background: linear-gradient(135deg, #3d1f58 0%, #4a266a 40%, #5c3178 100%);
    position: sticky; top: 0; z-index: 1000; height: var(--nav-height); box-shadow: 0 2px 16px rgba(74, 38, 106, 0.25);
}
.top-nav-inner {
    max-width: var(--max-width); margin: 0 auto; height: 100%; display: flex; align-items: center;
    justify-content: space-between; padding: 0 24px;
}
.nav-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-logo-icon {
    width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #de95ba 0%, #ffd9e8 100%);
    display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; color: #4a266a;
    letter-spacing: -1px; flex-shrink: 0;
}
.nav-left h1 { font-size: 1.35rem; font-weight: 700; color: #ffffff; letter-spacing: 1px; white-space: nowrap; margin: 0; }
.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn-nav {
    padding: 9px 20px; border-radius: 22px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap; letter-spacing: 0.3px; border: none; font-family: inherit;
}
.btn-login { background: transparent; color: #ffd9e8; border: 1.5px solid rgba(255, 217, 232, 0.45); }
.btn-login:hover { background: rgba(255, 217, 232, 0.1); border-color: #ffd9e8; color: #fff; }
.btn-read {
    background: linear-gradient(135deg, #de95ba 0%, #f0b8d0 100%); color: #4a266a; font-weight: 700;
    box-shadow: 0 2px 10px rgba(222, 149, 186, 0.4);
}
.btn-read:hover { box-shadow: 0 4px 18px rgba(222, 149, 186, 0.55); transform: translateY(-1px); }

.sub-nav {
    width: 100%; background: #ffffff; border-bottom: 1px solid var(--border); position: sticky;
    top: var(--nav-height); z-index: 999; height: var(--subnav-height); box-shadow: var(--shadow-sm);
}
.sub-nav-inner {
    max-width: var(--max-width); margin: 0 auto; height: 100%; display: flex; align-items: center;
    gap: 6px; padding: 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sub-nav-inner::-webkit-scrollbar { display: none; }
.sub-nav a {
    display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 18px; font-size: 0.85rem;
    font-weight: 500; color: var(--text-mid); text-decoration: none; white-space: nowrap;
    transition: var(--transition); letter-spacing: 0.2px; flex-shrink: 0;
}
.sub-nav a:hover { background: var(--light-pink); color: #4a266a; font-weight: 600; }

.main-container { max-width: var(--max-width); margin: 0 auto; display: flex; gap: 24px; padding: 24px; }
.content-left { flex: 1; min-width: 0; }
.sidebar-right { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }

.section-title {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 1.25rem; font-weight: 700;
    color: #4a266a; letter-spacing: 0.5px;
}
.section-title::before {
    content: ''; display: inline-block; width: 5px; height: 24px;
    background: linear-gradient(180deg, #de95ba 0%, #7f4a88 100%); border-radius: 3px; flex-shrink: 0;
}

.hot-comics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.comic-card {
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: var(--transition); cursor: pointer; display: flex; flex-direction: column; border: 1px solid transparent;
}
.comic-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #de95ba; }
.comic-card-img-wrap {
    width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #f5eef4; position: relative;
}
.comic-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; 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: linear-gradient(135deg, #de95ba, #c97da6);
    color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 10px; z-index: 2;
}
.comic-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.comic-card-body h3 {
    font-size: 0.9rem; font-weight: 700; color: #3d1f58; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.comic-card-meta { font-size: 0.7rem; color: #7f4a88; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.comic-card-meta span { background: #fdf2f7; padding: 2px 7px; border-radius: 4px; white-space: nowrap; font-weight: 500; }
.comic-card-type { background: #ffd9e8 !important; color: #4a266a !important; font-weight: 600 !important; }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.featured-card {
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: var(--transition); cursor: pointer; border: 1px solid transparent; display: flex;
}
.featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #de95ba; }
.featured-img-wrap { width: 110px; flex-shrink: 0; aspect-ratio: 3 / 4; overflow: hidden; background: #f5eef4; }
.featured-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.featured-card:hover .featured-img-wrap img { transform: scale(1.05); }
.featured-info { padding: 14px 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.featured-info h3 { font-size: 0.95rem; font-weight: 700; color: #3d1f58; }
.featured-info p {
    font-size: 0.78rem; color: #6b5b72; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.detail-card {
    background: #fff; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-md);
    display: flex; gap: 20px; border: 1px solid #f8eaf1;
}
.detail-img-wrap {
    width: 180px; flex-shrink: 0; aspect-ratio: 3 / 4; border-radius: var(--radius);
    overflow: hidden; background: #f5eef4; box-shadow: var(--shadow-sm);
}
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; }
.detail-info h3 { font-size: 1.3rem; font-weight: 700; color: #3d1f58; margin-bottom: 8px; }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; font-size: 0.82rem; color: #7f4a88; font-weight: 500; }
.detail-desc { font-size: 0.88rem; color: #4a3a52; line-height: 1.7; }

.characters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.character-card {
    background: #fff; border-radius: var(--radius); padding: 16px; text-align: center;
    box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid transparent; cursor: pointer;
}
.character-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #de95ba; }
.character-avatar {
    width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px;
    background: #f5eef4; box-shadow: 0 2px 8px rgba(74, 38, 106, 0.1);
}
.character-avatar img { width: 100%; height: 100%; object-fit: cover; }
.character-card h4 { font-size: 0.9rem; font-weight: 700; color: #3d1f58; margin-bottom: 4px; }
.char-role { font-size: 0.72rem; color: #de95ba; font-weight: 600; margin-bottom: 6px; }
.character-card p { font-size: 0.75rem; color: #6b5b72; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
    background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm);
    display: flex; gap: 12px; transition: var(--transition); border-left: 3px solid transparent;
}
.comment-item:hover { border-left-color: #de95ba; box-shadow: var(--shadow-md); }
.comment-content { flex: 1; min-width: 0; }
.comment-user { font-weight: 700; font-size: 0.85rem; color: #3d1f58; margin-bottom: 2px; }
.comment-time { font-size: 0.7rem; color: #a892a8; margin-bottom: 6px; }
.comment-content p { font-size: 0.82rem; color: #4a3a52; line-height: 1.6; }

.platform-intro {
    background: linear-gradient(135deg, #fdf6f9 0%, #fff 50%, #fef9fb 100%);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid #f8eaf1;
}
.platform-intro p { font-size: 0.88rem; color: #4a3a52; line-height: 1.8; margin-bottom: 8px; }
.highlight-nums { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.num-item { text-align: center; background: #ffd9e8; border-radius: var(--radius-sm); padding: 12px 18px; min-width: 90px; }
.num-val { font-size: 1.5rem; font-weight: 800; color: #4a266a; }
.num-label { font-size: 0.72rem; color: #7f4a88; font-weight: 500; }

.sidebar-card {
    background: #fff; border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow-sm);
    border: 1px solid #fdf2f7; transition: var(--transition);
}
.sidebar-card:hover { box-shadow: var(--shadow-md); }
.card-header { font-weight: 700; font-size: 0.95rem; color: #4a266a; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #de95ba; flex-shrink: 0; }
.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: #fefcfd;
}
.rank-list li:hover { background: #ffd9e8; }
.rank-num {
    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; background: #f0e4f2; color: #7f4a88;
}
.rank-list li:nth-child(1) .rank-num { background: #de95ba; color: #fff; }
.rank-list li:nth-child(2) .rank-num { background: #e0aac5; color: #fff; }
.rank-list li:nth-child(3) .rank-num { background: #e8bfd2; color: #fff; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 0.8rem; font-weight: 600; color: #3d1f58; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 0.68rem; color: #a892a8; }
.rank-change { font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.rank-change.up { color: #c94d7a; } .rank-change.down { color: #9b8aaa; }

.total-read-num { font-size: 2.4rem; font-weight: 900; color: #4a266a; text-align: center; margin: 4px 0; }
.total-read-label { font-size: 0.75rem; color: #7f4a88; text-align: center; font-weight: 500; }
.update-time { font-size: 0.7rem; color: #a892a8; text-align: center; margin-top: 4px; }
.stats-row { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-item { flex: 1; min-width: 60px; text-align: center; background: #fdf6f9; border-radius: var(--radius-sm); padding: 12px 8px; }
.stat-val { font-size: 1.2rem; font-weight: 800; color: #4a266a; }
.stat-label { font-size: 0.68rem; color: #7f4a88; font-weight: 500; margin-top: 2px; }

.footer-section { width: 100%; background: #3d1f58; color: #e0d0e8; margin-top: 40px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 32px 24px 20px; }
.footer-download { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 24px; }
.dl-card {
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 217, 232, 0.2);
    border-radius: var(--radius); padding: 14px 18px; text-align: center; transition: var(--transition);
    cursor: pointer; text-decoration: none; color: #ffd9e8; min-width: 100px; display: flex;
    flex-direction: column; align-items: center; gap: 6px;
}
.dl-card:hover { background: rgba(255, 217, 232, 0.13); border-color: #de95ba; transform: translateY(-2px); }
.app-icon { width: 28px; height: 28px; flex-shrink: 0; }
.dl-card span { font-size: 0.78rem; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 16px; font-size: 0.8rem; }
.footer-links a { color: #de95ba; text-decoration: none; transition: var(--transition); font-weight: 500; }
.footer-links a:hover { color: #ffd9e8; text-decoration: underline; }
.footer-bottom {
    text-align: center; font-size: 0.72rem; color: #b8a0c4;
    border-top: 1px solid rgba(255, 217, 232, 0.12); padding-top: 14px;
}

@media (max-width: 1200px) {
    .hot-comics-grid { grid-template-columns: repeat(4, 1fr); }
    .sidebar-right { width: 290px; }
    .characters-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
    .main-container { flex-direction: column; }
    .sidebar-right { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .hot-comics-grid { grid-template-columns: repeat(4, 1fr); }
    .characters-grid { grid-template-columns: repeat(3, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-card { flex-direction: column; align-items: center; }
    .detail-img-wrap { width: 140px; }
}
@media (max-width: 768px) {
    .hot-comics-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .featured-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .characters-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sidebar-right { grid-template-columns: 1fr 1fr; gap: 10px; }
    .detail-img-wrap { width: 120px; }
}
@media (max-width: 480px) {
    .hot-comics-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .featured-grid { grid-template-columns: 1fr; }
    .characters-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .sidebar-right { grid-template-columns: 1fr; }
}
