
:root {
    --bg-body: #f4f4f4;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --accent: #b71c1c;
    --border: #e0e0e0;
    --font-size: 18px;
}
[data-theme="sepia"] { --bg-body: #f4ecd8; --bg-card: #fdf6e3; --text-main: #5b4636; --text-muted: #8a7b6f; --accent: #8d6e63; --border: #e0d6c6; }
[data-theme="green"] { --bg-body: #e3edcd; --bg-card: #f0f9eb; --text-main: #334433; --text-muted: #556655; --accent: #2e7d32; --border: #cddcc3; }
[data-theme="dark"] { --bg-body: #121212; --bg-card: #1e1e1e; --text-main: #d0d0d0; --text-muted: #888888; --accent: #cf6679; --border: #333333; }

body { margin: 0; background-color: var(--bg-body); color: var(--text-main); font-family: "PingFang SC", "Microsoft YaHei", "Songti SC", sans-serif; transition: background 0.3s, color 0.3s; padding-bottom: 60px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 15px; height: 50px; background-color: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.topbar a { text-decoration: none; color: var(--text-main); font-weight: bold; }
.chapter-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; color: var(--text-muted); }
#setting-toggle { background: none; border: 1px solid var(--border); border-radius: 4px; color: var(--text-main); padding: 4px 8px; cursor: pointer; }

.settings-panel { position: fixed; top: 51px; right: 10px; background: var(--bg-card); border: 1px solid var(--border); padding: 15px; border-radius: 0 0 5px 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 99; width: 200px; }
.hidden { display: none; }
.setting-group { margin-bottom: 15px; }
.setting-group label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.theme-btns { display: flex; gap: 8px; }
.theme-btn { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ddd; cursor: pointer; }
.theme-btn.light { background: #fff; }
.theme-btn.sepia { background: #fdf6e3; }
.theme-btn.green { background: #e3edcd; }
.theme-btn.dark { background: #333; border-color: #666; }
.font-btns { display: flex; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.05); border-radius: 4px; padding: 5px; }
.font-btns button { border: none; background: none; color: var(--text-main); font-weight: bold; font-size: 16px; cursor: pointer; width: 40px; }

.content { max-width: 800px; margin: 20px auto; padding: 20px 20px 0 20px; background-color: var(--bg-card); border-radius: 8px; min-height: 60vh; font-size: var(--font-size); line-height: 1.8; }
.content h2 { font-size: 1.2em; text-align: center; color: var(--text-muted); border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 20px; font-weight: normal;}
.content p { margin-bottom: 1em; text-indent: 2em; text-align: justify; }

.nav-footer { max-width: 800px; margin: 30px auto; display: flex; justify-content: space-between; padding: 0 10px; }
.nav-btn { flex: 1; text-align: center; background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border); padding: 12px 0; margin: 0 5px; border-radius: 6px; text-decoration: none; font-size: 15px; }
.nav-btn:hover { background-color: rgba(0,0,0,0.03); color: var(--accent); }
.nav-btn.disabled { opacity: 0.5; pointer-events: none; background: transparent; }

@media (max-width: 600px) {
    .content { margin: 10px; border-radius: 4px; padding: 15px; }
    .nav-footer { margin: 20px 10px; }
}
    