
:root {
    --mint: #95e1d3;
    --light-green: #eaffd0;
    --warm-yellow: #fce38a;
    --coral: #f38181;
    --white: #ffffff;
    --dark: #2c3e50;
    --gray: #6b7280;
    --light-gray: #f5f5f5;
    --border: #e8e8e8;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.10);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #fafaf8;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.top-nav {
    width: 100%;
    background: var(--white);
    border-bottom: 3px solid var(--mint);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.96);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.site-name h1 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f38181 0%, #e07b7b 40%, #f38181 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.site-name h1:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}
.nav-links li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 24px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.nav-links li a:hover {
    background-color: var(--light-green);
    color: #f38181;
}
.nav-links li a.active {
    background-color: var(--mint);
    color: #fff;
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 24px;
    background: var(--light-green);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    border: 1.5px solid transparent;
}
.user-status:hover {
    border-color: var(--mint);
    background: #f5ffdc;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--mint);
    flex-shrink: 0;
}
.user-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
    }
}

.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 28px;
    padding: 28px 32px;
    flex: 1;
    width: 100%;
}

.content-area {
    flex: 1 1 68%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 88px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 4px;
}
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.section-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.section-card:hover {
    box-shadow: var(--shadow-md);
}
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    color: var(--dark);
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 24px;
    border-radius: 3px;
    background: var(--coral);
    flex-shrink: 0;
}
.section-title .title-accent {
    color: var(--coral);
}

.hot-comics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.comic-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--mint);
}
.comic-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f0;
}
.comic-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.comic-card:hover .comic-card-img-wrap img {
    transform: scale(1.08);
}
.comic-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--coral);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    letter-spacing: 0.5px;
    z-index: 2;
}
.comic-hot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--warm-yellow);
    color: #7c5e10;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 2;
    letter-spacing: 0.5px;
}
.comic-card-info {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.comic-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark);
}
.comic-card-meta {
    font-size: 0.73rem;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.comic-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.comic-card-meta .meta-label {
    font-weight: 600;
    color: #555;
    font-size: 0.7rem;
    min-width: 36px;
    flex-shrink: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}
.detail-cover {
    width: 220px;
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--mint);
    background: #f0f0f0;
}
.detail-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--dark);
}
.detail-info .subtitle {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 14px;
}
.detail-info .detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.detail-tag {
    background: var(--light-green);
    color: #4a6b3a;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.detail-tag.highlight {
    background: var(--warm-yellow);
    color: #6b4f10;
    font-weight: 600;
}
.detail-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.character-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    border: 1.5px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.character-card:hover {
    border-color: var(--warm-yellow);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.character-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
    border-bottom: 2px solid var(--mint);
}
.character-card .char-name {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 8px 2px;
    color: var(--dark);
}
.character-card .char-role {
    font-size: 0.75rem;
    color: var(--coral);
    font-weight: 600;
    padding: 0 8px 4px;
}
.character-card .char-desc {
    font-size: 0.73rem;
    color: var(--gray);
    padding: 0 10px 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.comment-item {
    padding: 16px;
    background: #fdfdfd;
    border-radius: var(--radius);
    border: 1px solid #eee;
    transition: var(--transition);
}
.comment-item:hover {
    background: #fff;
    border-color: #d1d5db;
}
.comment-user {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
}
.comment-time {
    font-size: 0.73rem;
    color: #aaa;
    margin-left: 8px;
}
.comment-text {
    font-size: 0.85rem;
    color: #555;
    margin-top: 4px;
    line-height: 1.5;
}
.comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #aaa;
}
.comment-actions span {
    cursor: pointer;
    transition: var(--transition);
}
.comment-actions span:hover {
    color: var(--coral);
}

.sidebar .section-card {
    padding: 20px;
}
.sidebar .section-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
}
.sidebar .section-title::before {
    height: 20px;
    width: 4px;
}

.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);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.rank-list li:hover {
    background: #fdfded;
    border-color: #f0e8c8;
}
.rank-num {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #fff;
}
.rank-num.top1 {
    background: #f38181;
}
.rank-num.top2 {
    background: #f59e6b;
}
.rank-num.top3 {
    background: #fbbf5a;
}
.rank-num.normal {
    background: #c5c9cc;
    color: #555;
}
.rank-cover {
    width: 40px;
    height: 54px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-info .rank-title {
    font-weight: 600;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark);
}
.rank-info .rank-sub {
    font-size: 0.7rem;
    color: var(--gray);
}
.rank-change {
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.rank-change.up {
    color: #e53e3e;
}
.rank-change.down {
    color: #38a169;
}

.total-read-card {
    background: linear-gradient(135deg, #fef9e7 0%, #fefce8 50%, #fffdf0 100%);
    border: 2px solid var(--warm-yellow);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}
.total-read-number {
    font-size: 2.4rem;
    font-weight: 900;
    color: #c47f17;
    letter-spacing: 1px;
}
.total-read-label {
    font-size: 0.85rem;
    color: #8b6914;
    font-weight: 500;
    margin-top: 2px;
}
.total-read-sub {
    font-size: 0.7rem;
    color: #a0853c;
    margin-top: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    text-align: center;
}
.stat-item {
    background: #fdfded;
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    border: 1px solid #f0e8c8;
    transition: var(--transition);
}
.stat-item:hover {
    background: #fffef5;
    border-color: var(--warm-yellow);
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--coral);
    letter-spacing: 0.5px;
}
.stat-label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 500;
    margin-top: 2px;
}

.bottom-nav {
    width: 100%;
    background: #2c3e50;
    color: #ccc;
    margin-top: auto;
}
.bottom-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.bottom-nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    flex-wrap: wrap;
}
.bottom-nav-links li a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.bottom-nav-links li a:hover {
    color: var(--warm-yellow);
}
.bottom-copyright {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .hot-comics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .characters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sidebar {
        flex: 0 0 300px;
    }
    .detail-grid {
        grid-template-columns: 180px 1fr;
    }
    .detail-cover {
        width: 180px;
    }
}
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        padding: 16px;
    }
    .sidebar {
        flex: 0 0 auto;
        position: static;
        max-height: none;
        overflow-y: visible;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
    }
    .sidebar .section-card {
        flex: 1 1 45%;
        min-width: 250px;
    }
    .hot-comics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .detail-cover {
        width: 160px;
        margin: 0 auto;
    }
    .nav-links {
        display: none;
    }
}
@media (max-width: 560px) {
    .hot-comics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .characters-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sidebar .section-card {
        flex: 1 1 100%;
        min-width: auto;
    }
    .top-nav-inner {
        padding: 0 12px;
    }
    .site-name h1 {
        font-size: 1.3rem;
    }
}

img[loading="lazy"] {
    background: #e8e8e8;
    transition: background 0.3s;
}
img[loading="lazy"]:not([src]) {
    background: linear-gradient(90deg, #e8e8e8 25%, #f0f0f0 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
