
:root {
    --bg-light: #eaeaea;
    --accent: #ff2e63;
    --dark: #252a34;
    --teal: #08d9d6;
    --white: #ffffff;
    --text-primary: #1a1d23;
    --text-secondary: #5a5f6b;
    --text-muted: #8b8f98;
    --border: #dcdde0;
    --card-shadow: 0 2px 12px rgba(37, 42, 52, 0.08);
    --card-hover-shadow: 0 6px 24px rgba(37, 42, 52, 0.15);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: #f3f4f6;
    color: var(--text-primary);
    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%;
    height: 60px;
    background-color: var(--dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
    gap: 20px;
}

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

.top-nav .site-name h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1.2px;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition);
    margin: 0;
}
.top-nav .site-name h1:hover {
    color: var(--teal);
}

.top-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: nowrap;
}
.top-nav .nav-links li a {
    display: block;
    padding: 8px 16px;
    color: #c5c8cf;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.top-nav .nav-links li a:hover,
.top-nav .nav-links li a.active {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.08);
}
.top-nav .nav-links li a.active {
    color: var(--teal);
    background-color: rgba(8, 217, 214, 0.1);
}

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

.top-nav .user-status {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    padding: 6px 14px 6px 6px;
    border-radius: 22px;
    transition: all var(--transition);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.top-nav .user-status:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}
.top-nav .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--teal);
    flex-shrink: 0;
}
.top-nav .user-name {
    color: #e8eaed;
    font-size: 0.88rem;
    font-weight: 500;
}
.top-nav .login-btn {
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.4px;
    transition: all var(--transition);
    white-space: nowrap;
}
.top-nav .login-btn:hover {
    background: #e01d4f;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 46, 99, 0.4);
}

.main-wrapper {
    flex: 1;
    display: flex;
    gap: 22px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 22px 24px;
}

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

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

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    transition: box-shadow var(--transition);
}
.card:hover {
    box-shadow: var(--card-hover-shadow);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f1f3;
}
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.title-bar {
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}
.more-link {
    font-size: 0.82rem;
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
    white-space: nowrap;
}
.more-link:hover {
    color: #06b8b5;
}

.hot-comics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.comic-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: #c8cacf;
}
.comic-cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e8e9ec;
    flex-shrink: 0;
}
.comic-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.comic-card:hover .comic-cover {
    transform: scale(1.06);
}
.comic-type-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    z-index: 2;
}
.comic-info {
    padding: 12px 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.comic-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-meta {
    font-size: 0.73rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.comic-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comic-meta .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.detail-cover-wrap {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.detail-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-content {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.detail-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
}
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.detail-tag {
    padding: 5px 13px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.tag-accent {
    background: #fff0f3;
    color: var(--accent);
    border: 1px solid #ffccd5;
}
.tag-teal {
    background: #f0fdfd;
    color: #059b98;
    border: 1px solid #b8f0ee;
}
.detail-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
}
.detail-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.extra-item strong {
    color: var(--text-primary);
    font-weight: 600;
}
.btn-read {
    align-self: flex-start;
    padding: 10px 26px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all var(--transition);
    margin-top: 4px;
}
.btn-read:hover {
    background: #d91a4a;
    box-shadow: 0 6px 18px rgba(255, 46, 99, 0.35);
    transform: translateY(-2px);
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.character-card {
    background: #fafbfc;
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
}
.character-card:hover {
    border-color: var(--teal);
    box-shadow: 0 4px 14px rgba(8, 217, 214, 0.12);
    transform: translateY(-2px);
}
.char-avatar-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #e8e9ec;
    transition: border-color var(--transition);
    flex-shrink: 0;
}
.character-card:hover .char-avatar-wrap {
    border-color: var(--teal);
}
.char-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.char-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 3px;
}
.char-role {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.3px;
}
.char-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    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: 14px;
}
.comment-item {
    display: flex;
    gap: 13px;
    padding: 14px 16px;
    background: #fafbfc;
    border-radius: var(--radius);
    border: 1px solid #eef0f2;
    transition: all var(--transition);
}
.comment-item:hover {
    background: #fff;
    border-color: #dde0e3;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-author {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--dark);
}
.comment-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 8px;
}
.comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.55;
    word-break: break-word;
}
.comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 7px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.comment-actions span {
    cursor: pointer;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 3px;
}
.comment-actions span:hover {
    color: var(--accent);
}

.side-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}
.side-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f1f3;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.4px;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.rank-list li:hover {
    background: #f9fafb;
    border-color: #e8eaed;
}
.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;
}
.top-1 {
    background: #ff2e63;
}
.top-2 {
    background: #ff6b8a;
}
.top-3 {
    background: #ff9db5;
}
.top-other {
    background: #c5c9cf;
    color: #fff;
}
.rank-cover-wrap {
    width: 44px;
    height: 58px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e8e9ec;
}
.rank-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.rank-change {
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.up {
    color: #ff2e63;
}
.down {
    color: #8b8f98;
}
.stay {
    color: #08d9d6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stat-item {
    text-align: center;
    padding: 12px 8px;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    border: 1px solid #eef0f2;
    transition: all var(--transition);
}
.stat-item:hover {
    background: #fff;
    border-color: #dde0e3;
}
.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.3px;
}
.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 0.3px;
}

.total-read-card {
    background: linear-gradient(135deg, #252a34 0%, #383f4d 100%);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(37, 42, 52, 0.3);
}
.total-label {
    font-size: 0.8rem;
    color: #b0b5be;
    letter-spacing: 1px;
}
.total-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    margin: 4px 0;
}
.total-sub {
    font-size: 0.72rem;
    color: #8b909a;
    display: flex;
    align-items: center;
    gap: 5px;
}
.indicator-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(8, 217, 214, 0.6);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(8, 217, 214, 0);
    }
}

.bottom-nav {
    width: 100%;
    background-color: var(--dark);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    color: #b0b5be;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
}
.bottom-links a {
    color: #b0b5be;
    text-decoration: none;
    transition: color var(--transition);
    font-size: 0.8rem;
}
.bottom-links a:hover {
    color: var(--teal);
}
.copyright {
    color: #6e737d;
    font-size: 0.78rem;
}

@media (max-width: 1400px) {
    .hot-comics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .characters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sidebar {
        width: 300px;
    }
}
@media (max-width: 1100px) {
    .hot-comics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    .sidebar .side-card,
    .sidebar .total-read-card {
        flex: 1;
        min-width: 220px;
    }
    .top-nav .nav-links {
        display: none;
    }
    .detail-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-content .btn-read {
        align-self: center;
    }
}
@media (max-width: 680px) {
    .hot-comics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .top-nav {
        padding: 0 14px;
    }
    .detail-cover-wrap {
        width: 150px;
    }
    .stats-grid {
        gap: 6px;
    }
    .stat-value {
        font-size: 1.1rem;
    }
    .main-wrapper {
        padding: 12px 10px;
        gap: 14px;
    }
    .sidebar {
        flex-direction: column;
    }
    .bottom-nav {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .bottom-links {
        justify-content: center;
        gap: 14px;
    }
}
