
:root {
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F5F5F5;
    --gray-200: #E8E8E8;
    --gray-300: #D4D4D4;
    --gray-400: #B0B0B0;
    --gray-500: #888888;
    --gray-600: #666666;
    --gray-700: #444444;
    --gray-800: #333333;
    --gray-900: #1A1A1A;
    --orange-400: #FF8C52;
    --orange-500: #FF6B35;
    --orange-600: #E85D2C;
    --orange-700: #CC4F22;
    --orange-light: #FFF4ED;
    --orange-pale: #FFFAF6;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1240px;
    --nav-height: 68px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 顶部导航栏 ========== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    gap: 20px;
}

/* LOGO */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
}
.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C52 40%, #FFB380 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    font-weight: 900;
    letter-spacing: -1px;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.35);
    position: relative;
    overflow: hidden;
}
.logo-icon::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: 0.5px;
}
.logo-title .accent {
    color: var(--orange-500);
}
.logo-sub {
    font-size: 0.7rem;
    color: var(--gray-500);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 搜索盒子 */
.search-box-wrapper {
    flex: 1;
    max-width: 520px;
    min-width: 280px;
    position: relative;
}
.search-box {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 4px 6px 4px 18px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.search-box:focus-within {
    border-color: var(--orange-400);
    background: var(--white);
    box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.08), var(--shadow-md);
}
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--gray-800);
    padding: 8px 4px;
    min-width: 0;
}
.search-box input::placeholder {
    color: var(--gray-400);
    font-size: 0.9rem;
}
.search-btn {
    background: var(--orange-500);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.search-btn:hover {
    background: var(--orange-600);
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
    transform: translateY(-1px);
}
.search-hot-tags {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    padding-left: 14px;
    flex-wrap: wrap;
}
.search-hot-tags a {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
}
.search-hot-tags a:hover {
    color: var(--orange-500);
}
.search-hot-tags .hot-dot {
    color: var(--orange-500);
    font-weight: 700;
}

/* 分类导航 */
.nav-categories {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-categories a {
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 50px;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.nav-categories a:hover,
.nav-categories a.active {
    background: var(--orange-pale);
    color: var(--orange-600);
    font-weight: 600;
}
.nav-categories a.active {
    background: var(--orange-500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

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

/* 面包屑 */
.breadcrumb {
    padding: 16px 0 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition);
}
.breadcrumb a:hover {
    color: var(--orange-500);
}
.breadcrumb .sep {
    color: var(--gray-400);
    font-size: 0.7rem;
}
.breadcrumb .current {
    color: var(--orange-500);
    font-weight: 600;
}

/* ========== 区块通用样式 ========== */
.section-block {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.section-block:hover {
    box-shadow: var(--shadow-md);
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}
.section-title .icon-bar {
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--orange-500);
    border-radius: 4px;
    flex-shrink: 0;
}
.section-title .icon-emoji {
    font-size: 1.4rem;
}
.section-more {
    font-size: 0.85rem;
    color: var(--orange-500);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.section-more:hover {
    color: var(--orange-700);
    gap: 8px;
}

/* ========== 最新漫画推荐 - 卡片网格 ========== */
.comic-recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}
.comic-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--orange-300);
}
.comic-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0; /* 默认背景，在图片加载前可见 */
}
.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.comic-cover .cover-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--orange-500);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    z-index: 2;
}
.comic-cover .cover-episode {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.3px;
}
.comic-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.comic-info .comic-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.3px;
}
.comic-info .comic-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.comic-info .comic-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.comic-info .comic-tags span {
    font-size: 0.68rem;
    background: var(--orange-pale);
    color: var(--orange-600);
    padding: 3px 8px;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ========== 三栏区域：周榜 + 阅读上升 + 热门标签 ========== */
.three-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 22px;
}
.three-col-grid .panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.three-col-grid .panel:hover {
    box-shadow: var(--shadow-md);
}
.panel h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.4px;
}
.panel h3 .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange-500);
    flex-shrink: 0;
}
.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);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.rank-list li:hover {
    background: var(--orange-pale);
}
.rank-num {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #fff;
    letter-spacing: 0.5px;
}
.rank-num.top1 { background: #FF6B35; }
.rank-num.top2 { background: #FF8C52; }
.rank-num.top3 { background: #FFB380; color: #7a3b1e; }
.rank-num.normal { background: var(--gray-300); color: var(--gray-700); }
.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-info .rank-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}
.rank-change {
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.rank-change.up { color: #e74c3c; }
.rank-change.down { color: #27ae60; }
.rank-change.stay { color: var(--gray-400); }

/* 热门标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag-cloud a {
    text-decoration: none;
    padding: 7px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    letter-spacing: 0.3px;
    border: 1.5px solid var(--gray-200);
    color: var(--gray-700);
    background: var(--white);
    white-space: nowrap;
}
.tag-cloud a:hover {
    background: var(--orange-500);
    color: #fff;
    border-color: var(--orange-500);
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}
.tag-cloud a.tag-lg {
    font-size: 1rem;
    font-weight: 700;
    padding: 9px 18px;
    border-color: var(--orange-300);
    color: var(--orange-600);
    background: var(--orange-pale);
}
.tag-cloud a.tag-md {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ========== 试读介绍 - 一行2条，不带图片 ========== */
.trial-read-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.trial-read-item {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    border-left: 3px solid var(--orange-400);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.trial-read-item:hover {
    background: var(--orange-pale);
    border-left-color: var(--orange-600);
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}
.trial-read-item .trial-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-900);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.trial-read-item .trial-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.trial-read-item .trial-excerpt {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.2px;
}
.trial-read-item .trial-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--orange-500);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ========== 用户评论 - 10条，一行2条 ========== */
.comment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.comment-item {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.comment-item:hover {
    background: #fff;
    border-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.5px;
}
.comment-user-info {
    flex: 1;
    min-width: 0;
}
.comment-user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-800);
    letter-spacing: 0.3px;
}
.comment-time {
    font-size: 0.7rem;
    color: var(--gray-400);
}
.comment-body {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.6;
    letter-spacing: 0.2px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comment-comic {
    font-size: 0.72rem;
    color: var(--orange-500);
    font-weight: 500;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* ========== 底部 ========== */
.site-footer {
    background: var(--gray-900);
    color: #ccc;
    margin-top: auto;
    padding: 40px 0 0;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}
.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-col h4 .footer-icon {
    color: var(--orange-400);
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
    letter-spacing: 0.3px;
}
.footer-col ul li a:hover {
    color: var(--orange-400);
}
.footer-col p {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.7;
    letter-spacing: 0.3px;
}
.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 30px;
    padding: 18px 28px;
    text-align: center;
    font-size: 0.78rem;
    color: #888;
    letter-spacing: 0.4px;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}
.footer-bottom a {
    color: var(--orange-400);
    text-decoration: none;
}
.footer-seo-text {
    max-width: var(--max-width);
    margin: 20px auto 0;
    padding: 0 28px 30px;
    font-size: 0.78rem;
    color: #777;
    line-height: 1.8;
    letter-spacing: 0.3px;
    text-align: center;
}

/* 响应式 */
@media (max-width: 1024px) {
    .three-col-grid {
        grid-template-columns: 1fr 1fr;
    }
    .three-col-grid .panel:last-child {
        grid-column: 1 / -1;
    }
    .comic-recommend-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .header-inner {
        gap: 14px;
        padding: 0 16px;
    }
    .search-box-wrapper {
        max-width: 380px;
        min-width: 200px;
    }
    .nav-categories a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    .main-container {
        padding: 0 16px;
    }
    .section-block {
        padding: 20px 18px;
    }
}
@media (max-width: 768px) {
    .three-col-grid {
        grid-template-columns: 1fr;
    }
    .trial-read-grid,
    .comment-grid {
        grid-template-columns: 1fr;
    }
    .comic-recommend-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 14px;
        gap: 10px;
    }
    .search-box-wrapper {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
    }
    .nav-categories {
        order: 2;
        flex-wrap: wrap;
        gap: 4px;
    }
    .nav-categories a {
        font-size: 0.75rem;
        padding: 5px 9px;
    }
    .logo-area {
        order: 1;
    }
    .main-container {
        padding: 0 10px;
    }
    .section-block {
        padding: 16px 14px;
        margin-bottom: 14px;
        border-radius: var(--radius-md);
    }
    .section-title {
        font-size: 1.1rem;
    }
    .breadcrumb {
        padding: 10px 0 4px;
        font-size: 0.7rem;
    }
}
@media (max-width: 480px) {
    .comic-recommend-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .comic-info .comic-name {
        font-size: 0.8rem;
    }
    .comic-info {
        padding: 8px 10px;
    }
    .search-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .search-box input {
        font-size: 0.85rem;
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}
