:root { --bg:#f1f5f9; --surface:#fff; --surface-soft:#f8fafc; --text:#0f172a; --text-sec:#475569; --muted:#64748b; --primary:#4f46e5; --primary-hover:#4338ca; --primary-soft:#eef2ff; --amber:#b45309; --amber-soft:#fffbeb; --border:#e2e8f0; --shadow-sm:0 1px 3px rgba(15,23,42,.05); --shadow-md:0 10px 25px -5px rgba(15,23,42,.08); --radius:12px; }
* { box-sizing:border-box; }
html { scrollbar-gutter:stable; }
body { margin:0; font-family:'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--bg); color:var(--text); line-height:1.65; -webkit-font-smoothing:antialiased; }
a { color:var(--primary); text-decoration:none; }
a:hover { color:var(--primary-hover); }
.container { max-width:1200px; margin:0 auto; padding:0 18px; }
.reading-progress-bar { position:fixed; top:0; left:0; height:3px; width:0%; background:linear-gradient(90deg,#4f46e5,#06b6d4); z-index:9999; }

.site-header { position:sticky; top:0; z-index:100; background:var(--surface); border-bottom:1px solid var(--border); box-shadow:var(--shadow-sm); margin-bottom:24px; }
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:64px; }
.header-left { display:flex; align-items:center; gap:28px; }
.site-logo { display:inline-flex; align-items:center; gap:8px; font-size:1.2rem; font-weight:800; color:var(--text); letter-spacing:-.02em; }
.nav-list { list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:4px; }
.nav-list>li { position:relative; }
.nav-list>li>a { display:block; padding:8px 12px; color:var(--text-sec); font-weight:600; font-size:.9rem; border-radius:8px; }
.nav-list>li>a:hover { background:var(--primary-soft); color:var(--primary); }
.has-dropdown .dropdown-menu { display:none; position:absolute; top:100%; left:0; min-width:190px; background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:var(--shadow-md); padding:6px; list-style:none; z-index:200; }
.has-dropdown:hover .dropdown-menu { display:block; }
.dropdown-menu li a { display:block; padding:8px 12px; border-radius:6px; color:var(--text); font-size:.88rem; font-weight:500; }
.dropdown-menu li a:hover { background:var(--primary-soft); color:var(--primary); }
.header-right { display:flex; align-items:center; gap:10px; }
.header-search { display:flex; align-items:center; background:var(--surface-soft); border:1px solid var(--border); border-radius:99px; padding:3px 5px 3px 14px; }
.header-search input { border:none; background:transparent; outline:none; font-family:inherit; font-size:.86rem; width:180px; color:var(--text); }
.header-search button { border:none; background:var(--primary); color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; }
.mobile-menu-btn { display:none; border:1px solid var(--border); background:var(--surface); padding:6px 10px; border-radius:8px; font-size:1.2rem; cursor:pointer; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:10px 18px; border-radius:8px; font-weight:600; font-size:.9rem; border:1px solid transparent; cursor:pointer; }
.btn-sm { padding:6px 14px; font-size:.83rem; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-hover); color:#fff; }
.btn-secondary { background:#0d9488; color:#fff; }
.btn-secondary:hover { background:#0f766e; color:#fff; }
.btn-outline { background:var(--surface); border-color:var(--border); color:var(--text); }
.btn-outline:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-soft); }

.panel-box { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-sm); margin-bottom:24px; }
.section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; gap:12px; flex-wrap:wrap; }
.section-header h2 { margin:0; font-size:1.15rem; font-weight:700; color:var(--text); }
.link-more { font-size:.86rem; font-weight:600; }

.home-spotlight { display:grid; grid-template-columns:1.6fr 1fr; background:var(--surface); border:1px solid var(--border); border-radius:14px; overflow:hidden; margin-bottom:24px; box-shadow:var(--shadow-sm); }
.home-spotlight.spotlight-single { grid-template-columns:1fr; }
.spotlight-main { display:grid; grid-template-columns:120px 1fr; gap:20px; padding:20px 24px; align-items:center; background:radial-gradient(circle at top left,#eef2ff 0%,#ffffff 60%); }
.spotlight-cover { display:block; width:120px; height:160px; border-radius:8px; overflow:hidden; box-shadow:0 10px 20px -6px rgba(15,23,42,.22); flex-shrink:0; }
.spotlight-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.spotlight-badges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.badge-featured { background:var(--primary-soft); color:var(--primary); font-size:.72rem; font-weight:700; padding:3px 10px; border-radius:99px; text-transform:uppercase; letter-spacing:.03em; }
.badge-series { background:var(--amber-soft); border:1px solid #fde68a; color:var(--amber); font-size:.74rem; font-weight:600; padding:3px 10px; border-radius:99px; display:inline-block; }
.spotlight-title { margin:0 0 4px; font-size:1.35rem; font-weight:800; line-height:1.28; letter-spacing:-.015em; }
.spotlight-title a { color:var(--text); }
.spotlight-meta { font-size:.8rem; color:var(--muted); margin-bottom:8px; font-weight:500; }
.spotlight-excerpt { color:var(--text-sec); margin:0 0 12px; font-size:.86rem; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.spotlight-actions { display:flex; gap:8px; flex-wrap:wrap; }

.spotlight-picks { border-left:1px solid var(--border); background:var(--surface-soft); padding:16px 18px; display:flex; flex-direction:column; justify-content:center; }
.picks-heading { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:10px; }
.picks-list { display:flex; flex-direction:column; gap:8px; }
.pick-item { display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:8px; background:var(--surface); border:1px solid var(--border); }
.pick-item:hover { border-color:var(--primary); }
.pick-thumb { width:38px; height:50px; border-radius:4px; overflow:hidden; flex-shrink:0; background:#e2e8f0; }
.pick-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.no-cover-mini { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:.9rem; }
.pick-title { font-size:.84rem; font-weight:700; color:var(--text); line-height:1.3; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.pick-sub { font-size:.73rem; color:var(--muted); margin-top:2px; }

.home-layout { display:grid; grid-template-columns:1fr 310px; gap:24px; align-items:start; }
.novel-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.novel-grid-wide { grid-template-columns:repeat(5,1fr); }
.novel-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; overflow:hidden; display:flex; flex-direction:column; transition:transform .18s ease,box-shadow .18s ease; }
.novel-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.novel-cover { position:relative; display:block; aspect-ratio:3/4; background:#e2e8f0; overflow:hidden; }
.novel-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.no-cover { width:100%; height:100%; display:flex; align-items:center; justify-content:center; text-align:center; padding:12px; background:linear-gradient(135deg,#e2e8f0,#cbd5e1); color:#334155; font-weight:700; font-size:.85rem; }
.cover-badge-chapters { position:absolute; top:8px; right:8px; background:rgba(15,23,42,.78); color:#fff; font-size:.7rem; font-weight:700; padding:2px 7px; border-radius:6px; }
.cover-badge-series { position:absolute; top:8px; left:8px; background:#d97706; color:#fff; font-size:.68rem; font-weight:700; padding:2px 7px; border-radius:6px; }
.novel-card-body { padding:12px; display:flex; flex-direction:column; gap:5px; flex:1; }
.novel-card-title { margin:0; font-size:.93rem; font-weight:700; line-height:1.38; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.novel-card-title a { color:var(--text); }
.novel-card-title a:hover { color:var(--primary); }
.novel-card-author { font-size:.76rem; color:var(--muted); }
.novel-card-genres { display:flex; flex-wrap:wrap; gap:4px; margin-top:auto; padding-top:4px; }
.genre-pill { font-size:.72rem; background:var(--primary-soft); color:var(--primary); padding:2px 8px; border-radius:99px; font-weight:600; }

.recent-chapters-table { display:flex; flex-direction:column; }
.recent-chap-row { display:grid; grid-template-columns:1.3fr 1.5fr auto; gap:12px; align-items:center; padding:11px 8px; border-bottom:1px dashed var(--border); font-size:.88rem; }
.recent-chap-row:last-child { border-bottom:none; }
.recent-chap-row:hover { background:var(--surface-soft); }
.rc-novel a { font-weight:700; color:var(--text); display:block; }
.rc-genre { font-size:.75rem; color:var(--muted); }
.rc-chapter a { color:var(--text-sec); }
.rc-time { font-size:.78rem; color:var(--muted); white-space:nowrap; }

.sidebar-widget h3 { margin:0 0 14px; font-size:1rem; font-weight:700; border-left:3px solid var(--primary); padding-left:10px; }
.sidebar-list { list-style:none; padding:0; margin:0; }
.sidebar-list li a { display:flex; justify-content:space-between; align-items:center; padding:9px 6px; border-bottom:1px dashed var(--border); color:var(--text-sec); font-size:.86rem; font-weight:500; }
.sidebar-list li:last-child a { border-bottom:none; }
.sidebar-list li a:hover { color:var(--primary); }
.count-pill { background:var(--surface-soft); border:1px solid var(--border); color:var(--muted); font-size:.74rem; padding:1px 8px; border-radius:99px; }
.tag-cloud-wrap { display:flex; flex-wrap:wrap; gap:7px; }
.tax-chip { background:var(--surface-soft); border:1px solid var(--border); color:var(--text-sec); padding:4px 10px; border-radius:99px; font-size:.78rem; font-weight:500; }
.tax-chip:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-soft); }
.tag-hash { border-radius:6px; }

.page-banner { background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:var(--radius); padding:20px 24px; margin-bottom:20px; box-shadow:var(--shadow-sm); }
.banner-eyebrow { font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; color:var(--primary); font-weight:700; }
.page-banner h1 { margin:4px 0; font-size:1.55rem; color:var(--text); letter-spacing:-.015em; }
.page-banner p { margin:0; color:var(--muted); font-size:.88rem; }
.filter-bar { display:flex; flex-wrap:wrap; align-items:center; gap:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px 20px; margin-bottom:24px; box-shadow:var(--shadow-sm); }
.filter-group { display:flex; align-items:center; gap:8px; }
.filter-group label { font-size:.85rem; font-weight:600; color:var(--text-sec); }
.filter-group select { padding:7px 12px; border:1px solid var(--border); border-radius:8px; font-family:inherit; font-size:.85rem; background:var(--surface-soft); }
.filter-actions { margin-left:auto; display:flex; gap:8px; }

.novel-detail { max-width:1040px; margin:0 auto; }
.novel-hero-card { background:radial-gradient(circle at top right,#eef2ff 0%,#ffffff 55%); border:1px solid var(--border); border-radius:14px; margin-bottom:24px; box-shadow:var(--shadow-sm); }
.novel-hero-inner { display:grid; grid-template-columns:180px 1fr; gap:24px; padding:24px; align-items:start; }
.novel-hero-cover { width:180px; height:240px; border-radius:10px; overflow:hidden; box-shadow:0 14px 28px -8px rgba(15,23,42,.26),0 0 0 1px rgba(15,23,42,.06); flex-shrink:0; }
.novel-hero-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.hero-series-row { margin-bottom:6px; }
.novel-title { margin:0 0 10px; font-size:1.75rem; font-weight:800; line-height:1.25; color:var(--text); letter-spacing:-.02em; }
.novel-stats-row { display:flex; flex-wrap:wrap; gap:16px; font-size:.88rem; color:var(--text-sec); margin-bottom:12px; padding-bottom:12px; border-bottom:1px dashed var(--border); }
.novel-tax-rows { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.tax-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.tax-label { font-size:.82rem; color:var(--muted); font-weight:600; margin-right:4px; }
.novel-actions { display:flex; flex-wrap:wrap; gap:10px; }
.series-showcase { border-top:3px solid #f59e0b; }

.toc-tools { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.toc-search-input { padding:7px 12px; border:1px solid var(--border); border-radius:8px; font-family:inherit; font-size:.86rem; width:220px; }
.chapter-list { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(2,1fr); gap:8px 20px; }
.chapter-list li a { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; border:1px solid var(--border); background:var(--surface-soft); color:var(--text); font-size:.9rem; }
.chapter-list li a:hover { border-color:var(--primary); background:var(--primary-soft); color:var(--primary); }
.chap-badge { background:var(--surface); border:1px solid var(--border); color:var(--muted); font-size:.76rem; font-weight:700; padding:2px 8px; border-radius:6px; white-space:nowrap; }

.chapter-reader-wrap { max-width:1040px; margin:0 auto 40px; background:var(--surface); padding:28px 36px; border-radius:14px; border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.reader-breadcrumb { display:flex; flex-wrap:wrap; gap:6px; font-size:.82rem; color:var(--muted); margin-bottom:16px; }
.chapter-header { text-align:center; margin-bottom:20px; }
.chapter-parent-name a { font-size:.95rem; font-weight:600; color:var(--muted); }
.chapter-title { margin:6px 0 0; font-size:1.65rem; line-height:1.3; }
.reader-settings-bar { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:16px; padding:12px 16px; background:var(--surface-soft); border:1px solid var(--border); border-radius:10px; margin-bottom:20px; }
.setting-group { display:flex; align-items:center; gap:6px; }
.setting-label { font-size:.8rem; font-weight:600; color:var(--muted); }
.swatch-btn { width:24px; height:24px; border-radius:50%; border:2px solid #cbd5e1; cursor:pointer; }
.swatch-btn.active { border-color:var(--primary); transform:scale(1.15); }
.swatch-light { background:#fff; } .swatch-sepia { background:#f4ecd8; } .swatch-mint { background:#e3f2e8; } .swatch-dark { background:#1e293b; }
.tool-btn { padding:4px 10px; border:1px solid var(--border); background:var(--surface); border-radius:6px; font-size:.8rem; font-weight:600; cursor:pointer; font-family:inherit; }
.tool-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.font-size-val { font-size:.82rem; font-weight:700; min-width:36px; text-align:center; }
.chapter-nav { max-width:740px; margin:20px auto; display:grid; grid-template-columns:1fr 1.4fr 1fr; gap:10px; }
.nav-btn { display:flex; align-items:center; justify-content:center; padding:10px 14px; background:var(--primary); color:#fff; border-radius:8px; font-weight:600; font-size:.9rem; text-align:center; }
.nav-btn:hover { background:var(--primary-hover); color:#fff; }
.nav-btn.nav-toc { background:var(--surface-soft); color:var(--text); border:1px solid var(--border); }
.nav-btn.disabled { background:#e2e8f0; color:#94a3b8; pointer-events:none; }
.chapter-jump-select { width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-soft); font-family:inherit; font-size:.88rem; font-weight:600; color:var(--text); }

.chapter-content { max-width:740px; margin:0 auto; font-size:var(--reader-fs,19px); line-height:1.85; padding:18px 0; font-family:'Lora',Georgia,serif; }
html.reader-width-narrow .chapter-content { max-width:600px; }
html.reader-width-medium .chapter-content { max-width:740px; }
html.reader-width-wide .chapter-content { max-width:940px; }
html.reader-font-sans .chapter-content { font-family:'Be Vietnam Pro',sans-serif; }
.chapter-content p { margin-bottom:1.25em; }
.reader-shortcut-hint { text-align:center; font-size:.8rem; color:var(--muted); margin:10px 0; }
.reader-comments { max-width:740px; margin:28px auto 0; }

html.reader-sepia, html.reader-sepia body { background:#e6dcc3; color:#433422; }
html.reader-sepia .chapter-reader-wrap { background:#f4ecd8; border-color:#d6c8a9; }
html.reader-mint, html.reader-mint body { background:#d5e6db; color:#1b3326; }
html.reader-mint .chapter-reader-wrap { background:#e8f3ec; border-color:#bdd6c6; }
html.reader-dark, html.reader-dark body { background:#0b1120; color:#cbd5e1; }
html.reader-dark .site-header { background:#0f172a; border-color:#1e293b; }
html.reader-dark .site-logo, html.reader-dark .nav-list>li>a { color:#e2e8f0; }
html.reader-dark .chapter-reader-wrap, html.reader-dark .panel-box { background:#1e293b; border-color:#334155; color:#e2e8f0; }
html.reader-dark .reader-settings-bar, html.reader-dark .chapter-jump-select, html.reader-dark .tool-btn, html.reader-dark .nav-btn.nav-toc { background:#0f172a; border-color:#334155; color:#cbd5e1; }
html.reader-dark a { color:#818cf8; }

.comment-list { list-style:none; padding:0; }
.comment-body { padding:14px; background:var(--surface-soft); border:1px solid var(--border); border-radius:10px; margin-bottom:12px; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"] { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px; font-family:inherit; margin-top:4px; }
.comment-form .submit { background:var(--primary); color:#fff; border:none; padding:10px 20px; border-radius:8px; font-weight:600; cursor:pointer; }
.pagination-wrap { margin-top:26px; text-align:center; }
.pagination-wrap .page-numbers { display:inline-block; padding:7px 13px; margin:0 3px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font-weight:600; font-size:.88rem; }
.pagination-wrap .current { background:var(--primary); color:#fff; border-color:var(--primary); }

.site-footer { background:#0f172a; color:#cbd5e1; margin-top:56px; padding-top:40px; }
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:32px; padding-bottom:32px; }
.footer-brand { font-size:1.25rem; font-weight:800; color:#fff; margin-bottom:10px; }
.footer-desc { color:#94a3b8; font-size:.88rem; margin:0; }
.footer-col h4 { color:#fff; margin:0 0 12px; font-size:.95rem; }
.footer-links { display:flex; flex-wrap:wrap; gap:8px 14px; }
.footer-links a { color:#94a3b8; font-size:.86rem; }
.footer-links a:hover { color:#fff; }
.footer-bottom { border-top:1px solid #1e293b; padding:16px 0; text-align:center; font-size:.84rem; color:#64748b; }
.empty-state { text-align:center; padding:40px 20px; color:var(--muted); }
.empty-note { color:var(--muted); font-size:.9rem; }

@media (max-width:1024px) {
    .home-spotlight { grid-template-columns:1fr; }
    .spotlight-picks { border-left:none; border-top:1px solid var(--border); }
    .home-layout { grid-template-columns:1fr; }
    .novel-grid { grid-template-columns:repeat(3,1fr); }
    .novel-grid-wide { grid-template-columns:repeat(4,1fr); }
}
@media (max-width:768px) {
    .mobile-menu-btn { display:inline-block; }
    .site-nav { display:none; position:absolute; top:64px; left:0; right:0; background:var(--surface); border-bottom:1px solid var(--border); padding:12px 18px; box-shadow:var(--shadow-md); }
    .site-nav.open { display:block; }
    .nav-list { flex-direction:column; align-items:stretch; }
    .has-dropdown .dropdown-menu { position:static; box-shadow:none; border:none; padding-left:16px; display:block; }
    .header-search input { width:130px; }
    .spotlight-main, .novel-hero-inner { grid-template-columns:1fr; text-align:center; padding:18px; }
    .spotlight-cover, .novel-hero-cover { margin:0 auto; }
    .spotlight-badges, .spotlight-actions, .novel-stats-row, .tax-row, .novel-actions { justify-content:center; }
    .novel-grid, .novel-grid-wide { grid-template-columns:repeat(2,1fr); gap:12px; }
    .chapter-list { grid-template-columns:1fr; }
    .recent-chap-row { grid-template-columns:1fr; gap:4px; }
    .chapter-reader-wrap { padding:20px 16px; }
    .chapter-nav { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; }
}