
:root {
    --white: #ffffff;
    --light-gray: #f5f6f8;
    --mid-gray: #e0e3e7;
    --gray: #9ca3af;
    --dark-gray: #4b5563;
    --text: #2d3436;
    --text-light: #636e72;
    --red: #e63946;
    --red-dark: #c0392b;
    --red-light: #fef2f2;
    --green: #2ecc71;
    --green-dark: #27ae60;
    --green-light: #f0fdf4;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --max-width: 1200px;
    --transition: 0.25s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: #f0f2f5;
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 顶部导航栏 ========== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--mid-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 60px;
}
.header-logo {
    flex-shrink: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: var(--transition);
    cursor: default;
}
.header-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 900;
    flex-shrink: 0;
}
.search-box-wrapper {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}
.search-box {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 30px;
    padding: 6px 6px 6px 18px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.search-box:focus-within {
    border-color: var(--red);
    background: var(--white);
    box-shadow: 0 0 0 5px rgba(230, 57, 70, 0.07);
}
.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--text);
    padding: 6px 0;
    min-width: 0;
}
.search-box input::placeholder {
    color: var(--gray);
}
.search-box button {
    flex-shrink: 0;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 22px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--transition);
    white-space: nowrap;
}
.search-box button:hover {
    background: var(--red-dark);
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
}
.header-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.header-nav a, .header-nav span.nav-item {
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
    cursor: default;
}
.header-nav a:hover, .header-nav span.nav-item:hover,
.header-nav a.active, .header-nav span.nav-item.active {
    background: var(--red-light);
    color: var(--red);
    font-weight: 600;
}
.header-nav .nav-hot {
    position: relative;
}
.header-nav .nav-hot::after {
    content: 'HOT';
    position: absolute;
    top: -4px;
    right: -2px;
    background: var(--red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

/* ========== 主容器 ========== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a, .breadcrumb span.link-text {
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
    cursor: default;
}
.breadcrumb a:hover, .breadcrumb span.link-text:hover {
    color: var(--red);
}
.breadcrumb span {
    color: var(--gray);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}
.section-title::before {
    content: '';
    width: 5px;
    height: 26px;
    background: var(--red);
    border-radius: 3px;
    flex-shrink: 0;
}
.section-title .sub {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray);
    margin-left: 4px;
}

.triple-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
@media (max-width: 900px) {
    .triple-panel {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .triple-panel {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }
    .search-box-wrapper {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
    }
}
.panel-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--mid-gray);
    transition: var(--transition);
}
.panel-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.panel-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 7px;
}
.icon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.icon-dot.red { background: var(--red); }
.icon-dot.green { background: var(--green); }

.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}
.rank-list li:hover {
    background: var(--light-gray);
}
.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;
    background: var(--mid-gray);
    color: var(--dark-gray);
}
.rank-list li.top1 .rank-num,
.rank-list li.top2 .rank-num,
.rank-list li.top3 .rank-num {
    background: var(--red);
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}
.rank-list li.top1 .rank-num {
    font-size: 0.9rem;
    box-shadow: 0 3px 12px rgba(230, 57, 70, 0.45);
}
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-info .title {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-info .meta {
    font-size: 0.75rem;
    color: var(--text-light);
}
.rank-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.rank-badge.hot {
    background: var(--red-light);
    color: var(--red);
}
.rank-badge.rise {
    background: var(--green-light);
    color: var(--green-dark);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-cloud .tag, .tag-cloud span.tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: default;
    transition: var(--transition);
    text-decoration: none;
    border: 1.5px solid transparent;
}
.tag.tag-red {
    background: var(--red-light);
    color: var(--red);
    border-color: rgba(230, 57, 70, 0.2);
}
.tag.tag-red:hover {
    background: var(--red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}
.tag.tag-green {
    background: var(--green-light);
    color: var(--green-dark);
    border-color: rgba(46, 204, 113, 0.25);
}
.tag.tag-green:hover {
    background: var(--green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}
.tag.tag-gray {
    background: var(--light-gray);
    color: var(--dark-gray);
    border-color: var(--mid-gray);
}
.tag.tag-gray:hover {
    background: var(--dark-gray);
    color: #fff;
}
.tag-lg {
    font-size: 1rem !important;
    padding: 8px 18px !important;
    font-weight: 700 !important;
}
.tag-md {
    font-size: 0.88rem !important;
    padding: 7px 15px !important;
    font-weight: 600 !important;
}

.latest-comics { margin-bottom: 28px; }
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}
.comic-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--mid-gray);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--red);
}
.comic-cover {
    height: 200px;
    position: relative;
    background: #eee;
    overflow: hidden;
}
.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comic-info {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.comic-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.3;
}
.comic-desc {
    font-size: 0.78rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.comic-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.ctag {
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: 600;
}
.ctag.serial { background: var(--red-light); color: var(--red); }
.ctag.done { background: var(--green-light); color: var(--green-dark); }
.ctag.free { background: var(--light-gray); color: var(--dark-gray); }

.trial-read-section { margin-bottom: 28px; }
.trial-read-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 650px) {
    .trial-read-grid { grid-template-columns: 1fr; }
}
.trial-read-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 20px;
    border-left: 4px solid var(--red);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--mid-gray);
    border-left: 4px solid var(--red);
}
.trial-read-item:nth-child(even) { border-left-color: var(--green); }
.trial-read-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.trial-comic-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    background: var(--red-light);
    color: var(--red);
}
.trial-read-item:nth-child(even) .badge {
    background: var(--green-light);
    color: var(--green-dark);
}
.trial-text {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.trial-more {
    display: inline-block;
    margin-top: 8px;
    color: var(--red);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: default;
    text-decoration: none;
}
.trial-read-item:nth-child(even) .trial-more { color: var(--green-dark); }

.comments-section { margin-bottom: 28px; }
.comments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 650px) {
    .comments-grid { grid-template-columns: 1fr; }
}
.comment-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--mid-gray);
    transition: var(--transition);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.comment-item:hover {
    box-shadow: var(--shadow);
    border-color: #d0d5da;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}
.avatar-red { background: var(--red); }
.avatar-green { background: var(--green); }
.avatar-gray { background: var(--dark-gray); }
.comment-body { flex: 1; min-width: 0; }
.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.comment-time {
    font-size: 0.72rem;
    color: var(--gray);
    margin-left: 6px;
}
.comment-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.5;
}

.comment-form-section { margin-bottom: 28px; }
.comment-form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    border: 2px solid var(--mid-gray);
    transition: var(--transition);
}
.comment-form-card:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 6px rgba(230, 57, 70, 0.05);
}
.comment-form-card h3 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.form-row input,
.form-row textarea {
    font-family: inherit;
    padding: 10px 16px;
    border: 2px solid var(--mid-gray);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--light-gray);
    color: var(--text);
    outline: none;
}
.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--red);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.06);
}
.form-row input {
    flex: 1;
    min-width: 150px;
}
.form-row textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    flex-basis: 100%;
}
.btn-submit {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 11px 32px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(230, 57, 70, 0.3);
}
.btn-submit:hover {
    background: var(--red-dark);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
    transform: translateY(-1px);
}
.form-success-msg {
    display: none;
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 8px;
    align-items: center;
    gap: 6px;
}
.form-success-msg.show {
    display: flex;
    animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.comment-new {
    animation: slideIn 0.45s ease;
    border-left: 3px solid var(--green) !important;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); max-height: 0; }
    to { opacity: 1; transform: translateX(0); max-height: 200px; }
}

.site-footer {
    background: var(--white);
    border-top: 2px solid var(--mid-gray);
    padding: 32px 24px 20px;
    margin-top: 8px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}
.footer-col h4 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--text);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.footer-col ul li span, .footer-col ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: default;
}
.footer-col ul li span:hover, .footer-col ul li a:hover { color: var(--red); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--mid-gray);
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.footer-bottom strong { color: var(--text); }
.footer-bottom span.domain-text { color: var(--red); font-weight: 500; }

@media (max-width: 768px) {
    .header-nav { gap: 2px; }
    .header-nav a, .header-nav span.nav-item { padding: 5px 8px; font-size: 0.78rem; }
    .comic-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .comic-cover { height: 150px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
