
:root {
    --primary: #ffa06f;
    --primary-light: #ffd6a0;
    --accent: #acbd86;
    --dark: #28544b;
    --white: #ffffff;
    --bg: #fef9f3;
    --bg-warm: #fff7ef;
    --text: #2c3e50;
    --text-light: #5a6c7d;
    --text-muted: #8a9aa8;
    --border: #e8dfd4;
    --border-light: #f0e8dc;
    --shadow-sm: 0 1px 3px rgba(40, 84, 75, 0.06);
    --shadow: 0 2px 8px rgba(40, 84, 75, 0.08);
    --shadow-md: 0 4px 18px rgba(40, 84, 75, 0.10);
    --shadow-lg: 0 6px 24px rgba(40, 84, 75, 0.13);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    --font-heading: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-body: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    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: linear-gradient(135deg, #1e3f38 0%, #28544b 30%, #2d5c52 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(40, 84, 75, 0.35);
    min-height: 62px;
}
.top-nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    min-height: 62px;
    gap: 20px;
}
.top-nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}
.top-nav-left h1 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: #ffd6a0;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    position: relative;
}
.top-nav-left h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffa06f;
    border-radius: 2px;
    transition: width 0.35s ease;
}
.top-nav-left h1:hover::after {
    width: 100%;
}
.top-nav-left h1:hover {
    color: #ffc895;
    transform: translateY(-1px);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    flex-wrap: wrap;
}
.nav-links li a {
    display: inline-block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.93rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(255, 160, 111, 0.20);
    color: #ffd6a0;
}
.nav-links li a.active {
    background: rgba(255, 160, 111, 0.28);
    font-weight: 600;
    color: #fff;
}
.top-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 7px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.10);
    transition: var(--transition);
    border: 1px solid rgba(255, 214, 160, 0.25);
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.91rem;
}
.user-status:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 160, 111, 0.5);
    box-shadow: 0 0 14px rgba(255, 160, 111, 0.15);
}
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 214, 160, 0.6);
    flex-shrink: 0;
    background: #5a8a80;
}
.user-status-text {
    color: #fff;
    font-size: 0.88rem;
}
.login-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #acbd86;
    box-shadow: 0 0 7px rgba(172, 189, 134, 0.7);
    flex-shrink: 0;
    animation: pulse-dot 2.2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.7); }
}

.main-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 26px;
    padding: 26px 28px;
    flex: 1;
}
.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.sidebar {
    width: 345px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    transition: var(--transition-slow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffa06f 0%, #ffd6a0 60%, #acbd86 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 14px 14px 0 0;
}
.section-card:hover::before {
    opacity: 1;
}
.section-card:hover {
    box-shadow: var(--shadow);
}
.section-title {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffa06f;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.4px;
    position: relative;
    z-index: 1;
}
.section-title .title-bar {
    display: inline-block;
    width: 5px;
    height: 22px;
    background: #ffa06f;
    border-radius: 3px;
    flex-shrink: 0;
}
.section-title .title-accent-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #acbd86;
    flex-shrink: 0;
    animation: pulse-dot 2.5s infinite;
}

.hot-comics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.comic-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-slow);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
}
.comic-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-color: #ffa06f;
}
.comic-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f0e8dc;
    flex-shrink: 0;
}
.comic-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.comic-card:hover .comic-card-img-wrapper img {
    transform: scale(1.07);
}
.comic-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffa06f;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 160, 111, 0.4);
}
.comic-card-badge.new-release {
    background: #acbd86;
    box-shadow: 0 2px 8px rgba(172, 189, 134, 0.4);
}
.comic-card-badge.top-rated {
    background: #28544b;
    box-shadow: 0 2px 8px rgba(40, 84, 75, 0.4);
}
.comic-card-info {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comic-card-info h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    letter-spacing: 0.2px;
}
.comic-card-info .comic-tags {
    font-size: 0.7rem;
    color: #ffa06f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.comic-card-info .comic-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.comic-card-info .comic-meta .score {
    color: #ffa06f;
    font-weight: 600;
}

.comic-detail-block {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}
.comic-detail-cover {
    width: 210px;
    height: 290px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #f0e8dc;
    border: 3px solid #ffd6a0;
}
.comic-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comic-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.comic-detail-info h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}
.comic-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--text-light);
}
.comic-detail-meta-row span {
    background: #fff7ef;
    padding: 5px 12px;
    border-radius: 14px;
    font-weight: 500;
    font-size: 0.78rem;
    color: #28544b;
    border: 1px solid #ffd6a0;
}
.comic-detail-desc {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.7;
}
.comic-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.comic-detail-tags .tag {
    display: inline-block;
    padding: 5px 14px;
    background: #fef9f3;
    color: #28544b;
    border-radius: 16px;
    font-size: 0.76rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #ffd6a0;
}
.comic-detail-tags .tag:hover {
    background: #ffd6a0;
    border-color: #ffa06f;
    color: #28544b;
}
.btn-read-now {
    display: inline-block;
    padding: 10px 26px;
    background: #ffa06f;
    color: #fff;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    align-self: flex-start;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 160, 111, 0.35);
}
.btn-read-now:hover {
    background: #e88a5a;
    box-shadow: 0 6px 22px rgba(255, 160, 111, 0.5);
    transform: translateY(-2px);
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.character-card {
    text-align: center;
    background: #fefcf8;
    border-radius: var(--radius);
    padding: 18px 10px 14px;
    transition: var(--transition-slow);
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
}
.character-card:hover {
    border-color: #ffa06f;
    box-shadow: var(--shadow);
    background: #fff;
    transform: translateY(-4px);
}
.character-card .char-img-wrap {
    width: 95px;
    height: 115px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    background: #f0e8dc;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    border: 3px solid #ffd6a0;
    transition: var(--transition);
}
.character-card:hover .char-img-wrap {
    border-color: #ffa06f;
    box-shadow: 0 0 0 6px rgba(255, 160, 111, 0.10);
}
.character-card .char-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.character-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 2px;
}
.character-card .char-role {
    font-size: 0.7rem;
    color: #ffa06f;
    font-weight: 500;
    margin: 0 0 5px;
}
.character-card .char-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    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: 13px;
}
.comment-item {
    display: flex;
    gap: 13px;
    padding: 14px 16px;
    background: #fefcf8;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}
.comment-item:hover {
    border-color: #ffd6a0;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.comment-avatar-wrap {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e8dfd4;
    border: 2px solid #ffd6a0;
}
.comment-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comment-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comment-body .comment-user {
    font-weight: 600;
    font-size: 0.87rem;
    color: var(--dark);
}
.comment-body .comment-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 6px;
    font-weight: 400;
}
.comment-body .comment-text {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.5;
}
.comment-body .comment-actions {
    display: flex;
    gap: 16px;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.comment-body .comment-actions span {
    cursor: pointer;
    transition: var(--transition);
}
.comment-body .comment-actions span:hover {
    color: #ffa06f;
}

.sidebar .section-card {
    padding: 16px 18px;
}
.sidebar .section-title {
    font-size: 1.04rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom-width: 2px;
}
.stats-row {
    display: flex;
    gap: 10px;
}
.stat-item {
    flex: 1;
    text-align: center;
    background: linear-gradient(180deg, #fffdf9 0%, #fff7ef 100%);
    border-radius: var(--radius-sm);
    padding: 15px 8px;
    border: 1px solid #ffd6a0;
    transition: var(--transition);
    cursor: default;
}
.stat-item:hover {
    border-color: #ffa06f;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.stat-number {
    font-size: 1.45rem;
    font-weight: 700;
    color: #28544b;
    display: block;
    letter-spacing: 0.5px;
}
.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    background: #fefcf8;
}
.rank-list li:hover {
    background: #fff;
    border-color: #ffd6a0;
    box-shadow: var(--shadow-sm);
}
.rank-num {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
    color: #fff;
    background: #bcc5ca;
}
.rank-list li:nth-child(1) .rank-num {
    background: #ffa06f;
    box-shadow: 0 2px 10px rgba(255, 160, 111, 0.4);
}
.rank-list li:nth-child(2) .rank-num {
    background: #e89860;
    box-shadow: 0 2px 10px rgba(232, 152, 96, 0.35);
}
.rank-list li:nth-child(3) .rank-num {
    background: #d48850;
    box-shadow: 0 2px 8px rgba(212, 136, 80, 0.3);
}
.rank-thumb {
    width: 46px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0e8dc;
    border: 1px solid #ffd6a0;
}
.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-info .rank-title {
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-info .rank-sub {
    font-size: 0.69rem;
    color: var(--text-muted);
}
.rank-change {
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}
.rank-change.up { color: #ffa06f; }
.rank-change.stable { color: #acbd86; }
.rank-change.down { color: #c0a080; }

.bottom-nav {
    width: 100%;
    background: #28544b;
    color: rgba(255, 255, 255, 0.78);
    padding: 30px 0 22px;
    margin-top: auto;
    border-top: 4px solid #ffa06f;
}
.bottom-nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 26px;
}
.bottom-col h4 {
    color: #ffd6a0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.bottom-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bottom-col ul li a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 0.84rem;
    transition: var(--transition);
}
.bottom-col ul li a:hover {
    color: #ffd6a0;
}
.bottom-copyright {
    width: 100%;
    text-align: center;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 214, 160, 0.15);
}

@media (max-width: 1300px) {
    .hot-comics-grid { grid-template-columns: repeat(4, 1fr); }
    .characters-grid { grid-template-columns: repeat(4, 1fr); }
    .sidebar { width: 300px; }
}
@media (max-width: 1024px) {
    .main-wrapper { flex-direction: column; padding: 16px; }
    .sidebar { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .hot-comics-grid { grid-template-columns: repeat(3, 1fr); }
    .characters-grid { grid-template-columns: repeat(3, 1fr); }
    .comic-detail-block { flex-direction: column; align-items: center; text-align: center; }
    .btn-read-now { align-self: center; }
    .top-nav-inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
    .nav-links { order: 3; width: 100%; justify-content: center; }
}
@media (max-width: 640px) {
    .hot-comics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .characters-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { grid-template-columns: 1fr; }
    .stats-row { flex-wrap: wrap; }
    .stat-item { min-width: 80px; }
    .bottom-nav-inner { flex-direction: column; text-align: center; gap: 16px; }
}
@media (max-width: 400px) {
    .hot-comics-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .comic-card-info h3 { font-size: 0.74rem; }
}
