
:root {
    --primary: #ff5e3a;
    --primary-dark: #e04a2a;
    --primary-light: #fff0ec;
    --accent: #ff8c42;
    --bg: #f5f3f0;
    --bg-card: #ffffff;
    --text: #2c2420;
    --text-secondary: #6b5e56;
    --text-light: #9a8c84;
    --border: #e8e2dc;
    --shadow-sm: 0 2px 8px rgba(44, 36, 32, 0.06);
    --shadow: 0 4px 20px rgba(44, 36, 32, 0.10);
    --shadow-lg: 0 8px 40px rgba(44, 36, 32, 0.15);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --gold: #f5a623;
    --gold-light: #fff7e6;
    --silver: #a0a8b0;
    --bronze: #c8986e;
    --green: #4caf84;
    --red: #e85545;
    --blue: #5b9bd5;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    --font-body: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
    width: 42px; height: 42px; background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; font-weight: bold;
}
.logo-text { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; color: var(--text); }
.nav-search { flex: 1; max-width: 440px; position: relative; }
.nav-search input {
    width: 100%; padding: 10px 44px 10px 18px; border-radius: 24px;
    border: 2px solid var(--border); background: var(--bg); font-size: 0.95rem; outline: none;
}
.nav-search .search-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
    border: none; cursor: pointer; color: #fff; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}

.main-container { max-width: 1320px; margin: 0 auto; padding: 20px 24px 60px; }

/* Hero Banner */
.hero-banner {
    position: relative; border-radius: var(--radius-xl); overflow: hidden;
    margin-bottom: 32px; height: 380px;
    background: linear-gradient(135deg, #2c2420 0%, #3d3028 30%, #1a1a1a 100%);
    display: flex; align-items: center; box-shadow: var(--shadow-lg); cursor: pointer;
}
.hero-bg-pattern {
    position: absolute; inset: 0; opacity: 0.15;
    background: radial-gradient(circle at 70% 30%, #ff8c42 0%, transparent 50%),
                radial-gradient(circle at 20% 70%, #ff5e3a 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, #f5a623 0%, transparent 35%);
}
.hero-content { position: relative; z-index: 2; display: flex; align-items: center; gap: 40px; padding: 40px 48px; width: 100%; }
.hero-cover { width: 180px; height: 250px; border-radius: var(--radius); object-fit: cover; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.hero-info { color: #fff; flex: 1; }
.hero-badge { display: inline-block; background: var(--primary); color: #fff; padding: 5px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 12px; }
.hero-info h1 { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; }
.hero-author { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin-bottom: 8px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-tags span { background: rgba(255,255,255,0.15); color: #fff; padding: 4px 12px; border-radius: 16px; font-size: 0.8rem; }
.hero-desc { color: rgba(255,255,255,0.75); font-size: 0.9rem; line-height: 1.7; max-width: 500px; margin-bottom: 16px; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .stat-num { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.hero-stat .stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.55); }

/* 区块标题 */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.title-icon { width: 6px; height: 26px; border-radius: 3px; display: inline-block; background: var(--primary); }

/* 排行榜 */
.rank-tabs { display: flex; gap: 4px; background: var(--border); border-radius: 24px; padding: 4px; }
.rank-tab { padding: 8px 20px; border-radius: 20px; border: none; cursor: pointer; font-weight: 600; font-size: 0.9rem; background: transparent; color: var(--text-secondary); }
.rank-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.rank-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.rank-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); cursor: pointer; transition: all var(--transition); text-decoration: none; color: inherit; background: var(--bg-card); }
.rank-card:hover { background: var(--bg); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.rank-num { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: #fff; background: #b0b8c0; }
.rank-num.top1 { background: linear-gradient(135deg, #f7b731, #f5a623); }
.rank-num.top2 { background: linear-gradient(135deg, #b8c5d0, #8a9aa8); }
.rank-num.top3 { background: linear-gradient(135deg, #d4a882, #c8986e); }
.rank-cover { width: 50px; height: 68px; border-radius: 6px; object-fit: cover; }
.rank-info .rank-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-change { font-size: 0.75rem; font-weight: 600; }
.rank-change.up { color: var(--green); }
.rank-change.down { color: var(--red); }

/* ========== 快速上升（新增hover描述） ========== */
.rising-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.rising-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; text-align: center; cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm); position: relative; text-decoration: none; color: inherit; display: block; }
.rising-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.rising-cover-wrapper { position: relative; display: inline-block; line-height: 0; }
.rising-cover { width: 100px; height: 136px; border-radius: var(--radius-sm); object-fit: cover; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.rising-hover-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff; padding: 8px; font-size: 0.72rem; line-height: 1.4;
    opacity: 0; transition: opacity 0.3s ease;
    display: flex; align-items: flex-end; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    pointer-events: none;
}
.rising-card:hover .rising-hover-overlay { opacity: 1; }
.rising-badge { position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; z-index: 2; }
.rising-title { font-weight: 600; font-size: 0.9rem; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rising-change-info { font-size: 0.78rem; color: var(--green); font-weight: 600; }

/* ========== 最近更新（新增hover描述） ========== */
.update-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.update-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; display: block; }
.update-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.update-cover-wrap { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #e8e2dc; }
.update-cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.update-card:hover .update-cover-wrap img { transform: scale(1.06); }
.update-hover-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff; padding: 10px; font-size: 0.72rem; line-height: 1.4;
    opacity: 0; transition: opacity 0.3s ease;
    display: flex; align-items: flex-end;
    pointer-events: none;
}
.update-card:hover .update-hover-overlay { opacity: 1; }
.update-time-badge { position: absolute; top: 8px; right: 8px; background: var(--primary); color: #fff; font-size: 0.68rem; padding: 3px 10px; border-radius: 12px; font-weight: 600; z-index: 2; }
.update-chapter-badge { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,0.75); color: #fff; font-size: 0.7rem; padding: 3px 10px; border-radius: 12px; z-index: 2; }
.update-info { padding: 12px 14px; }
.update-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-meta { font-size: 0.75rem; color: var(--text-light); }

/* 编辑精选 */
.featured-section { background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 32px; }
.featured-layout { display: flex; gap: 28px; flex-wrap: wrap; }
.featured-cover-col { flex-shrink: 0; text-align: center; }
.featured-cover-col img { width: 200px; height: 275px; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.featured-score { display: inline-block; margin-top: 10px; background: var(--gold-light); color: #b8780a; font-weight: 700; padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; }
.featured-detail-col { flex: 1; min-width: 280px; }
.featured-detail-col h3 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.featured-author { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 10px; }
.featured-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.featured-tags span { background: var(--bg); padding: 5px 14px; border-radius: 16px; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.featured-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; margin-bottom: 16px; }
.featured-meta-row { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-light); }
.featured-meta-row strong { color: var(--text); }

/* 评论 */
.comments-section { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.comments-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.comments-header h4 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; }
.comment-count { color: var(--primary); font-weight: 600; }
.comment-sort { display: flex; gap: 4px; }
.comment-sort button { padding: 6px 14px; border-radius: 16px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 0.8rem; font-weight: 500; transition: all var(--transition); color: var(--text-secondary); }
.comment-sort button.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.comment-list { display: flex; flex-direction: column; gap: 16px; max-height: 500px; overflow-y: auto; padding-right: 8px; }
.comment-item { background: var(--bg); border-radius: var(--radius); padding: 16px 18px; }
.comment-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.comment-user { font-weight: 600; font-size: 0.9rem; }
.comment-time { font-size: 0.75rem; color: var(--text-light); margin-left: auto; }
.comment-stars { color: var(--gold); font-size: 0.8rem; letter-spacing: 1px; }
.comment-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.comment-actions { display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-light); }
.comment-form { display: flex; gap: 10px; margin-top: 16px; align-items: flex-start; }
.comment-form textarea { flex: 1; border-radius: var(--radius); border: 2px solid var(--border); padding: 12px 16px; font-size: 0.9rem; resize: vertical; min-height: 60px; font-family: inherit; outline: none; }
.comment-submit { padding: 12px 22px; background: var(--primary); color: #fff; border: none; border-radius: 24px; cursor: pointer; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.footer { background: #2c2420; color: rgba(255,255,255,0.6); text-align: center; padding: 28px 20px; margin-top: 20px; }

@media (max-width: 900px) {
    .rank-list, .rising-grid { grid-template-columns: repeat(2, 1fr); }
    .update-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-content { flex-direction: column; text-align: center; }
}
