
 :root {
 --bg: #0a0a0c; --bg2: #111116; --bg3: #18181f; --card: #14141a;
 --border: #2a2a38; --accent: #c0392b; --accent2: #e74c3c;
 --gold: #d4af37; --text: #e8e6e0; --muted: #7a7888; --dim: #3a3848;
 --reader-bg: #0e0e12;
 --font-size: 1.15rem;
 --line-height: 1.9;
 }
 * { margin: 0; padding: 0; box-sizing: border-box; }
 body { background: var(--reader-bg); color: var(--text); font-family: 'Crimson Pro', Georgia, serif; min-height: 100vh; }
 /* PROGRESS */
 .progress{
 position: sticky;
 top: 56px;
 z-index: 99;
 height: 3px;
 background: rgba(255,255,255,0.06);
 border-bottom: 1px solid rgba(255,255,255,0.06);
 }
 #progressBar{
 height: 100%;
 width: 0%;
 background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%);
 box-shadow: 0 0 18px rgba(192,57,43,0.35);
 }
 /* TOP BAR */
 .topbar {
 position: sticky;
 top: 0;
 z-index: 100;
 background: rgba(10,10,12,0.95);
 backdrop-filter: blur(20px);
 border-bottom: 1px solid var(--border);
 padding: 0 2rem;
 height: 56px;
 display: flex;
 align-items: center;
 gap: 1.5rem;
 }
 .topbar-back {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 color: var(--muted);
 text-decoration: none;
 font-size: 0.9rem;
 transition: color 0.2s;
 }
 .topbar-back:hover { color: var(--text); }
 .topbar-title {
 font-family: 'Cinzel', serif;
 font-size: 0.9rem;
 font-weight: 700;
 color: var(--muted);
 flex: 1;
 text-align: center;
 }
 .topbar-settings {
 display: flex;
 gap: 0.5rem;
 }
 .settings-btn {
 background: var(--bg3);
 border: 1px solid var(--border);
 color: var(--muted);
 padding: 0.3rem 0.7rem;
 border-radius: 6px;
 font-size: 0.8rem;
 cursor: pointer;
 font-family: 'Crimson Pro', serif;
 transition: all 0.2s;
 }
 .settings-btn:hover { color: var(--text); border-color: var(--dim); }
 /* CHAPTER HEADER */
 .chapter-header {
 max-width: 760px;
 margin: 3rem auto 2rem;
 padding: 0 2rem;
 text-align: center;
 animation: fadeUp 0.5s ease both;
 }
 .ch-novel-link {
 font-size: 0.85rem;
 color: var(--accent2);
 text-decoration: none;
 font-family: 'Cinzel', serif;
 letter-spacing: 0.05em;
 }
 .ch-novel-link:hover { color: var(--accent); }
 .ch-title {
 font-family: 'Cinzel', serif;
 font-size: 1.8rem;
 font-weight: 900;
 margin: 0.75rem 0;
 line-height: 1.3;
 color: var(--text);
 }
 .ch-divider {
 display: flex;
 align-items: center;
 gap: 1rem;
 color: var(--dim);
 margin: 1.5rem 0;
 font-size: 1rem;
 }
 .ch-divider::before, .ch-divider::after {
 content: '';
 flex: 1;
 border-top: 1px solid var(--border);
 }
 /* CONTENT */
 .chapter-content {
 max-width: 760px;
 margin: 0 auto 4rem;
 padding: 0 2rem;
 animation: fadeUp 0.6s ease 0.1s both;
 }
 .chapter-content p {
 font-size: var(--font-size);
 line-height: var(--line-height);
 color: #d0cec8;
 margin-bottom: 1.4em;
 text-align: justify;
 hyphens: auto;
 }
 .chapter-content p.separator {
 text-align: center;
 color: var(--dim);
 letter-spacing: 0.3em;
 margin: 2em 0;
 }
 /* NAVIGATION */
 .chapter-nav {
 max-width: 760px;
 margin: 0 auto 4rem;
 padding: 0 2rem;
 display: flex;
 gap: 1rem;
 animation: fadeUp 0.6s ease 0.2s both;
 }
 .nav-btn {
 flex: 1;
 padding: 1rem;
 border-radius: 10px;
 text-decoration: none;
 font-family: 'Cinzel', serif;
 font-size: 0.85rem;
 font-weight: 700;
 letter-spacing: 0.05em;
 text-align: center;
 transition: all 0.2s;
 border: 1px solid var(--border);
 color: var(--muted);
 background: var(--card);
 cursor: pointer;
 }
 .nav-btn:hover {
 color: var(--text);
 border-color: var(--dim);
 background: var(--bg3);
 }
 .nav-btn.primary {
 background: var(--accent);
 border-color: var(--accent);
 color: white;
 }
 .nav-btn.primary:hover {
 background: var(--accent2);
 border-color: var(--accent2);
 box-shadow: 0 4px 20px rgba(192,57,43,0.3);
 }
 .nav-btn.disabled {
 opacity: 0.3;
 pointer-events: none;
 }
 .nav-btn small {
 display: block;
 font-size: 0.7rem;
 font-weight: 400;
 opacity: 0.7;
 margin-top: 0.2rem;
 font-family: 'Crimson Pro', serif;
 font-style: italic;
 }
 /* SETTINGS PANEL */
 .settings-panel {
 position: fixed;
 bottom: 2rem;
 right: 2rem;
 background: var(--card);
 border: 1px solid var(--border);
 border-radius: 12px;
 padding: 1.5rem;
 width: 260px;
 z-index: 200;
 box-shadow: 0 20px 60px rgba(0,0,0,0.5);
 display: none;
 }
 .settings-panel.open { display: block; animation: fadeUp 0.2s ease; }
 .settings-panel h3 { font-family: 'Cinzel', serif; font-size: 0.9rem; margin-bottom: 1rem; }
 .setting-row { margin-bottom: 1rem; }
 .setting-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; display: block; }
 .setting-options { display: flex; gap: 0.5rem; }
 .setting-opt { flex: 1; padding: 0.4rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); font-size: 0.8rem; cursor: pointer; text-align: center; transition: all 0.2s; font-family: 'Crimson Pro', serif; }
 .setting-opt.active { background: var(--accent); border-color: var(--accent); color: white; }
 /* PROGRESS */
 .reading-progress {
 position: fixed;
 top: 56px;
 left: 0;
 right: 0;
 height: 2px;
 background: var(--border);
 z-index: 99;
 }
 .reading-progress-bar {
 height: 100%;
 background: var(--accent);
 width: 0%;
 transition: width 0.1s;
 }
 /* SCROLL TO TOP */
 .scroll-top {
 position: fixed;
 bottom: 2rem;
 right: 2rem;
 width: 44px;
 height: 44px;
 background: var(--card);
 border: 1px solid var(--border);
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 color: var(--muted);
 font-size: 1.2rem;
 transition: all 0.2s;
 opacity: 0;
 pointer-events: none;
 }
 .scroll-top.visible { opacity: 1; pointer-events: all; }
 .scroll-top:hover { color: var(--text); border-color: var(--dim); }
 footer { max-width: 760px; margin: 0 auto; padding: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; text-align: center; }
 @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
 /* FONT SIZE VARIATIONS */
 body.font-small { --font-size: 1rem; --line-height: 1.7; }
 body.font-large { --font-size: 1.3rem; --line-height: 2; }
 /* THEME VARIATIONS */
 body.theme-sepia { --reader-bg: #1a1510; --text: #e8dfc8; }
 body.theme-light { --reader-bg: #f5f3ee; --text: #2a2825; --card: #eeeae2; --border: #d5d0c5; --muted: #8a8570; --bg3: #e8e3d8; }
