
:root {
    --bg-dark: #29252c;
    --bg-mid: #33425b;
    --bg-light: #d8e9f0;
    --accent: #f33535;
    --text-light: #f0f0f0;
    --text-muted: #b0b8c1;
    --text-dark: #1a1a1a;
    --card-bg: #1e1b21;
    --card-border: #3a3540;
    --sidebar-bg: #1f1c23;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.3s ease;
    --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', 'Helvetica Neue', sans-serif;
    background-color: #1a171d;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.top-nav {
    width: 100%;
    height: var(--nav-height);
    background-color: var(--bg-dark);
    border-bottom: 2px solid #3a3540;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

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

.top-nav .nav-left .logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--accent);
    flex-shrink: 0;
}

.top-nav .nav-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    white-space: nowrap;
    margin: 0;
}

.top-nav .nav-left h1 span {
    color: var(--accent);
}

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

.nav-links li a {
    display: block;
    padding: 8px 14px;
    color: #c8cdd4;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.nav-links li a:hover {
    background-color: rgba(243, 53, 53, 0.15);
    color: #ffffff;
}

.nav-links li a.nav-cta {
    background-color: var(--accent);
    color: #fff;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 22px;
    animation: pulse-cta 2.5s ease-in-out infinite;
}

@keyframes pulse-cta {
    0%, 100% { box-shadow: 0 0 0 0 rgba(243, 53, 53, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(243, 53, 53, 0); }
}

.nav-links li a.nav-cta:hover {
    background-color: #d42a2a;
    transform: translateY(-1px);
}

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

.btn-login {
    padding: 8px 16px;
    background: transparent;
    border: 1.5px solid #5a5560;
    color: #d0d0d0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-login:hover {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-read-now {
    padding: 8px 20px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-read-now:hover {
    background-color: #d42a2a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(243, 53, 53, 0.4);
}

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

.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 16px 30px;
    display: flex;
    gap: 24px;
    position: relative;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    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: #4a4550 transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #4a4550; border-radius: 10px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.section-block {
    background-color: #1e1b21;
    border-radius: var(--radius);
    padding: 22px 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3a3540;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background-color: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.comic-card {
    background: #1e1b21;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #2e2a33;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(243, 53, 53, 0.2);
}
.comic-card .card-img-wrap {
    width: 100%;
    aspect-ratio: 200 / 280;
    overflow: hidden;
    background: #2a252f;
    flex-shrink: 0;
    position: relative;
}
.comic-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.comic-card:hover .card-img-wrap img { transform: scale(1.06); }
.comic-card .card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.comic-card .card-badge.hot { background: #f33535; }
.comic-card .card-badge.new { background: #e8890c; }
.comic-card .card-info {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.comic-card .card-info .comic-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-card .card-info .comic-meta {
    font-size: 0.7rem;
    color: #a0a5ad;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    line-height: 1.5;
}
.comic-card .card-info .comic-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.comic-card .card-info .comic-type {
    display: inline-block;
    background: rgba(51, 66, 91, 0.6);
    color: #d8e9f0;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}
.site-badge {
    display: inline-block;
    background: #f33535;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    margin-left: 4px;
}

.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.featured-card {
    background: linear-gradient(180deg, #25212a 0%, #1e1b21 100%);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #3a3540;
    transition: var(--transition);
    cursor: pointer;
}
.featured-card:hover { border-color: #d8e9f0; box-shadow: 0 8px 24px rgba(216,233,240,0.12); transform: translateY(-3px); }
.featured-card .fc-img-wrap { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #2a252f; }
.featured-card .fc-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.featured-card:hover .fc-img-wrap img { transform: scale(1.05); }
.featured-card .fc-info { padding: 10px 12px 12px; }
.featured-card .fc-info .fc-title { font-weight: 700; color: #fff; font-size: 0.9rem; margin-bottom: 4px; }
.featured-card .fc-info .fc-desc { font-size: 0.72rem; color: #a0a5ad; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.comic-detail-card {
    display: flex; gap: 20px; flex-wrap: wrap;
    background: #1e1b21; border-radius: var(--radius); padding: 20px; border: 1px solid var(--card-border);
}
.comic-detail-card .detail-cover { width: 180px; flex-shrink: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 200/280; background: #2a252f; }
.comic-detail-card .detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.comic-detail-card .detail-content { flex: 1; min-width: 240px; }
.comic-detail-card .detail-content h3 { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.comic-detail-card .detail-content .detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.comic-detail-card .detail-content .detail-tags span { background: rgba(51,66,91,0.7); color: #d8e9f0; font-size: 0.72rem; padding: 4px 10px; border-radius: 12px; }
.comic-detail-card .detail-content p { font-size: 0.88rem; color: #c0c5cc; line-height: 1.7; margin-bottom: 6px; }

.characters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.character-card { background: #1e1b21; border-radius: var(--radius); padding: 14px 10px; text-align: center; border: 1px solid #2e2a33; transition: var(--transition); cursor: pointer; }
.character-card:hover { border-color: #d8e9f0; transform: translateY(-2px); }
.character-card .char-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 8px; background: #2a252f; border: 2px solid #4a4550; }
.character-card .char-avatar img { width: 100%; height: 100%; object-fit: cover; }
.character-card .char-name { font-weight: 700; color: #fff; font-size: 0.85rem; }
.character-card .char-role { font-size: 0.7rem; color: #a0a5ad; }

.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item { background: #1e1b21; border-radius: var(--radius); padding: 14px 16px; border: 1px solid #2e2a33; }
.comment-item .comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-item .comment-user { font-weight: 600; color: #e0e0e0; font-size: 0.85rem; }
.comment-item .comment-time { font-size: 0.7rem; color: #888; margin-left: auto; }
.comment-item .comment-body { font-size: 0.84rem; color: #b8bec5; line-height: 1.65; }

.platform-intro { background: #1e1b21; border-radius: var(--radius); padding: 22px 20px; border: 1px solid var(--card-border); }
.platform-intro p { font-size: 0.9rem; color: #c0c5cc; line-height: 1.8; }
.intro-highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.hl-item { flex: 1; min-width: 120px; background: rgba(51,66,91,0.5); border-radius: 8px; padding: 14px 12px; text-align: center; border: 1px solid #3a4555; }
.hl-item .hl-num { font-size: 1.5rem; font-weight: 700; color: #d8e9f0; }
.hl-item .hl-label { font-size: 0.72rem; color: #a0a5ad; }

.download-section { background: linear-gradient(135deg, #1e1b21 0%, #25212c 100%); border-radius: var(--radius); padding: 24px 20px; border: 1px solid var(--card-border); text-align: center; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.download-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 24px; font-weight: 600; font-size: 0.82rem; cursor: pointer; transition: var(--transition); text-decoration: none; border: 1.5px solid transparent; }
.download-btn.android { background: #3ddc84; color: #1a1a1a; border-color: #3ddc84; }
.download-btn.android:hover { background: #2cc573; }
.download-btn.ios { background: #1a1a1a; color: #fff; border-color: #555; }
.download-btn.ios:hover { background: #2a2a2a; }
.download-btn.pc { background: #52616b; color: #fff; border-color: #52616b; }
.download-btn.pc:hover { background: #3d4a53; }
.download-btn.mac { background: #1a1a1a; color: #fff; border-color: #555; }
.download-btn.mac:hover { background: #2a2a2a; }

.sidebar-card { background: #1f1c23; border-radius: var(--radius); padding: 16px 14px; border: 1px solid #2e2a33; }
.sidebar-card h4 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1.5px solid #3a3540; }
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #2a252f; cursor: pointer; }
.rank-list li:last-child { border-bottom: none; }
.rank-list .rank-num { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; background: #33425b; color: #d8e9f0; }
.rank-list li:nth-child(1) .rank-num { background: #f33535; color: #fff; }
.rank-list li:nth-child(2) .rank-num { background: #e8890c; color: #fff; }
.rank-list li:nth-child(3) .rank-num { background: #c7922f; color: #fff; }
.rank-list .rank-info { flex: 1; min-width: 0; }
.rank-list .rank-name { font-weight: 600; font-size: 0.82rem; color: #d0d0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-list .rank-sub { font-size: 0.68rem; color: #888; }
.rank-list .rank-change { font-size: 0.72rem; font-weight: 600; }
.rank-change.up { color: #3ddc84; } .rank-change.down { color: #f33535; }

.total-read-card { background: linear-gradient(135deg, #1f1c23 0%, #25212c 100%); border-radius: var(--radius); padding: 18px 14px; border: 1px solid #2e2a33; text-align: center; }
.total-read-card .big-number { font-size: 2rem; font-weight: 800; color: #d8e9f0; }
.total-read-card .big-label { font-size: 0.75rem; color: #a0a5ad; }
.total-read-card .update-time { font-size: 0.68rem; color: #777; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stat-item { background: #25212c; border-radius: 8px; padding: 12px 8px; text-align: center; border: 1px solid #2e2a33; }
.stat-item .stat-val { font-size: 1.1rem; font-weight: 700; color: #d8e9f0; }
.stat-item .stat-lbl { font-size: 0.65rem; color: #888; }

.bottom-nav { width: 100%; background-color: var(--bg-dark); border-top: 2px solid #3a3540; padding: 28px 20px 20px; margin-top: 30px; }
.bottom-inner { max-width: 1400px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.bottom-col h5 { font-size: 0.9rem; font-weight: 700; color: #fff; }
.bottom-col a { display: block; color: #a0a5ad; text-decoration: none; font-size: 0.78rem; padding: 3px 0; }
.bottom-col a:hover { color: #d8e9f0; }
.bottom-copyright { width: 100%; text-align: center; color: #666; font-size: 0.7rem; margin-top: 16px; padding-top: 12px; border-top: 1px solid #2a252f; }
.brand-links-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.brand-links-row a { color: #d8e9f0; text-decoration: none; font-size: 0.78rem; padding: 4px 10px; border-radius: 14px; background: rgba(216,233,240,0.08); }
.brand-links-row a:hover { background: rgba(216,233,240,0.18); color: #fff; }

@media (max-width: 1200px) {
    .comic-grid { grid-template-columns: repeat(4, 1fr); }
    .featured-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar { width: 280px; }
}
@media (max-width: 992px) {
    .comic-grid { grid-template-columns: repeat(3, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .main-wrapper { flex-direction: column; }
    .sidebar { width: 100%; position: static; max-height: none; overflow-y: visible; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-links.mobile-open { display: flex; position: absolute; top: var(--nav-height); left: 0; width: 100%; background: var(--bg-dark); flex-direction: column; padding: 12px 20px; border-bottom: 2px solid #3a3540; z-index: 999; }
}
@media (max-width: 768px) {
    .comic-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { grid-template-columns: 1fr; }
    .comic-detail-card { flex-direction: column; align-items: center; }
    .comic-detail-card .detail-cover { width: 140px; }
    .characters-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .characters-grid { grid-template-columns: repeat(2, 1fr); }
    .top-nav .nav-left h1 { font-size: 1rem; }
}
