/* ============================================================
   修罗场纯净小说阁 - 全局样式表
   包含 3D 拟真实体书架、双模态切换与纯净阅读器排版系统
   ============================================================ */

:root {
  --font-size: 18px;
  --line-height: 1.85;
  --max-width: 800px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --wood-color-top: #c79a68;
  --wood-color-front: #a07345;
  --wood-color-dark: #6e4c27;
}

/* 主题色彩变量体系 */
html[data-theme="white"] {
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --surface-bg: #ffffff;
  --surface-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-text: #ffffff;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --nav-bg: rgba(255, 255, 255, 0.94);
  --wood-color-top: #d8b18a;
  --wood-color-front: #b2865b;
  --wood-color-dark: #825c38;
}

html[data-theme="parchment"] {
  --bg-color: #f6f0e4;
  --text-color: #30261f;
  --text-muted: #796c5f;
  --surface-bg: #ede3d1;
  --surface-hover: #e4d7c0;
  --border-color: #decfa8;
  --primary-color: #8c5b36;
  --primary-hover: #724727;
  --primary-text: #ffffff;
  --card-shadow: 0 10px 25px -5px rgba(74, 52, 33, 0.12);
  --nav-bg: rgba(246, 240, 228, 0.94);
  --wood-color-top: #c79a68;
  --wood-color-front: #a07345;
  --wood-color-dark: #6e4c27;
}

html[data-theme="green"] {
  --bg-color: #e3ede2;
  --text-color: #1f3325;
  --text-muted: #57735e;
  --surface-bg: #d4e4d2;
  --surface-hover: #c6dac3;
  --border-color: #bdd2ba;
  --primary-color: #276b42;
  --primary-hover: #1f5634;
  --primary-text: #ffffff;
  --card-shadow: 0 10px 25px -5px rgba(28, 59, 36, 0.12);
  --nav-bg: rgba(227, 237, 226, 0.94);
  --wood-color-top: #8da488;
  --wood-color-front: #6c8467;
  --wood-color-dark: #4b6147;
}

html[data-theme="night"] {
  --bg-color: #151722;
  --text-color: #cbd5e1;
  --text-muted: #818cf8;
  --surface-bg: #1e2233;
  --surface-hover: #282e45;
  --border-color: #333a56;
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --primary-text: #0f172a;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(21, 23, 34, 0.94);
  --wood-color-top: #2a2c3d;
  --wood-color-front: #1c1d29;
  --wood-color-dark: #12131c;
}

html[data-theme="black"] {
  --bg-color: #090a0f;
  --text-color: #94a3b8;
  --text-muted: #64748b;
  --surface-bg: #13151f;
  --surface-hover: #1e2130;
  --border-color: #252a3d;
  --primary-color: #60a5fa;
  --primary-hover: #3b82f6;
  --primary-text: #000000;
  --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.85);
  --nav-bg: rgba(9, 10, 15, 0.96);
  --wood-color-top: #20222e;
  --wood-color-front: #14151e;
  --wood-color-dark: #0a0b10;
}

/* 字体族系 */
html[data-font="sans"] {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html[data-font="serif"] {
  --font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
}

html[data-font="kaiti"] {
  --font-family: "STKaiti", "KaiTi", "BiauKai", "楷体", serif;
}

/* 页面宽度控制 */
html[data-width="narrow"] { --max-width: 680px; }
html[data-width="medium"] { --max-width: 800px; }
html[data-width="wide"] { --max-width: 960px; }

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: var(--line-height);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

/* 顶部阅读进度条 */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary-color);
  z-index: 1100;
  transition: width 0.15s ease-out;
}

/* 顶部全局导航栏 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-btn {
  background: var(--primary-color) !important;
  color: var(--primary-text) !important;
  border-color: var(--primary-color) !important;
  font-weight: 600;
  padding: 0.45rem 0.85rem !important;
}

.highlight-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.shelf-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.shelf-brand svg {
  color: var(--primary-color);
}

.book-title-nav {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background var(--transition-fast);
}

.book-title-nav:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}

.current-chapter-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-color);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-color);
}

/* ============================================================
   书架大厅视图 (Bookshelf View)
   ============================================================ */

.bookshelf-view {
  max-width: 1440px;
  margin: 0 auto;
  padding: 85px 1.5rem 80px;
  min-height: 100vh;
}

/* 顶部横幅 */
.shelf-hero {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  font-family: "Noto Serif SC", serif;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.hero-stats-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stat-pill {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 真实书架陈列柜 */
.bookshelf-cabinet {
  margin-top: 1rem;
  perspective: 1200px;
}

.shelf-row {
  position: relative;
  margin-bottom: 3.5rem;
}

.books-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 240px));
  justify-content: center;
  gap: 1.6rem;
  align-items: end;
  padding: 0 1rem 0;
  z-index: 10;
  position: relative;
}

/* 拟真 3D 实体图书项 */
.shelf-book-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
  width: 100%;
  max-width: 320px;
}

/* 3D 书本封套主体 */
.book-3d-wrapper {
  position: relative;
  width: 100%;
  max-width: 230px;
  height: 310px;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  perspective: 1000px;
  margin-bottom: 1.25rem;
}

/* 悬停抽书 3D 动作效果 */
.shelf-book-item:hover .book-3d-wrapper {
  transform: translateY(-20px) rotateY(-10deg) scale(1.04);
}

.book-3d-cover {
  position: absolute;
  inset: 0;
  border-radius: 4px 10px 10px 4px;
  padding: 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 
    inset 8px 0 12px rgba(0, 0, 0, 0.35),
    inset -3px 0 6px rgba(255, 255, 255, 0.25),
    4px 1px 0 #fff,
    7px 2px 0 #ede4d2,
    10px 3px 0 #dfd2b9,
    14px 8px 24px rgba(0, 0, 0, 0.32);
}

/* 书脊立体折痕线 */
.book-spine-crease {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 1px 0 2px rgba(255, 255, 255, 0.2);
}

/* 封面上方缎带书签 */
.book-ribbon {
  position: absolute;
  top: 0;
  right: 20px;
  width: 14px;
  height: 48px;
  background: rgba(255, 255, 255, 0.88);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.book-cover-top {
  z-index: 2;
}

.book-cover-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.book-cover-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  font-family: "Noto Serif SC", serif;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.book-cover-author {
  font-size: 0.8rem;
  opacity: 0.9;
  letter-spacing: 0.05em;
}

.book-cover-bottom {
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.75rem;
  opacity: 0.85;
}

/* 书本下方详细信息与操作卡片 */
.shelf-book-meta {
  width: 100%;
  max-width: 240px;
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.shelf-meta-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-meta-genre {
  font-size: 0.75rem;
  color: var(--primary-color);
  background: var(--surface-hover);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.shelf-meta-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 阅读进度卡片 */
.shelf-progress-box {
  background: var(--surface-hover);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin-top: 0.2rem;
}

.shelf-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.shelf-progress-bar-bg {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.shelf-progress-bar-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* 操作按钮 */
.shelf-action-btn {
  width: 100%;
  padding: 0.6rem 0;
  border-radius: 8px;
  background: var(--primary-color);
  color: var(--primary-text);
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
  margin-top: 0.3rem;
}

.shelf-action-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 拟真木纹书架层板 */
.wooden-shelf-ledge {
  position: relative;
  width: 100%;
  margin-top: 0.5rem;
}

.shelf-wood-top {
  height: 18px;
  background: var(--wood-color-top);
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.shelf-wood-front {
  height: 22px;
  background: var(--wood-color-front);
  border-bottom: 2px solid var(--wood-color-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.shelf-wood-shadow {
  height: 28px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}

/* ============================================================
   阅读器主体 (Reader View)
   ============================================================ */

.reader-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 85px 1.5rem 60px;
  transition: max-width var(--transition-normal);
}

.article-content {
  margin: 0 auto;
}

.chapter-header {
  padding: 2rem 0 2rem;
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 2.5rem;
  text-align: center;
}

.chapter-title {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.chapter-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.meta-dot {
  opacity: 0.6;
}

.chapter-body {
  font-size: var(--font-size);
  line-height: var(--line-height);
  letter-spacing: 0.015em;
  color: var(--text-color);
}

.chapter-body p {
  text-indent: 2em;
  margin-bottom: 1.25em;
  text-align: justify;
  text-justify: inter-ideograph;
  word-break: break-word;
}

.chapter-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-page-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface-bg);
  color: var(--text-color);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.nav-page-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.nav-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-page-btn.primary {
  background: var(--primary-color);
  color: var(--primary-text);
  border-color: var(--primary-color);
}

.nav-page-btn.primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-text);
}

/* 目录抽屉 */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.catalog-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 380px;
  max-width: 86vw;
  background: var(--bg-color);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  z-index: 1250;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.catalog-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.drawer-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.drawer-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-color);
}

.drawer-search {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.drawer-search input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.drawer-search input:focus {
  border-color: var(--primary-color);
}

.catalog-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0.5rem 0;
}

.catalog-item {
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-color);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
}

.catalog-item:hover {
  background: var(--surface-hover);
}

.catalog-item.active {
  background: var(--surface-bg);
  color: var(--primary-color);
  font-weight: 600;
  border-left-color: var(--primary-color);
}

.catalog-item-words {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 阅读设置浮层弹窗 */
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.settings-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 440px;
  max-width: 92vw;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  z-index: 1250;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.settings-panel.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
}

.settings-group {
  margin-bottom: 1.25rem;
}

.settings-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.settings-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.settings-val {
  font-size: 0.82rem;
  color: var(--primary-color);
  font-weight: 600;
}

.theme-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.theme-chip {
  flex: 1;
  min-width: 65px;
  padding: 0.55rem 0.25rem;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.theme-chip.theme-white { background: #ffffff; color: #111827; }
.theme-chip.theme-parchment { background: #f7f1e5; color: #30261f; }
.theme-chip.theme-green { background: #e5ede3; color: #213326; }
.theme-chip.theme-night { background: #1a1b26; color: #c0caf5; }
.theme-chip.theme-black { background: #000000; color: #9499a6; }

.theme-chip.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.font-options {
  display: flex;
  gap: 0.5rem;
}

.choice-btn {
  flex: 1;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--border-color);
  background: var(--surface-bg);
  color: var(--text-color);
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.choice-btn:hover {
  background: var(--surface-hover);
}

.choice-btn.active {
  border-color: var(--primary-color);
  background: var(--surface-hover);
  color: var(--primary-color);
  font-weight: 600;
}

.range-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-btn {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast);
}

.step-btn:hover {
  background: var(--surface-hover);
}

.range-control input[type="range"] {
  flex: 1;
  accent-color: var(--primary-color);
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
}

.settings-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  text-align: right;
}

.reset-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition-fast);
}

.reset-btn:hover {
  color: var(--text-color);
  text-decoration: underline;
}

.bottom-tips {
  margin: 2.5rem auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.6rem 1.25rem;
  background: var(--surface-bg);
  border: 1px dashed var(--border-color);
  border-radius: 20px;
  width: fit-content;
  max-width: 90%;
  letter-spacing: 0.02em;
}

/* ============================================================
   移动端与响应式适配
   ============================================================ */
@media (max-width: 992px) {
  .books-display-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1.5rem;
  }
}

@media (max-width: 640px) {
  .top-nav {
    padding: 0 0.75rem;
    height: 50px;
  }

  .btn-label {
    display: none;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .books-display-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .book-3d-wrapper {
    max-width: 240px;
    height: 310px;
  }

  .shelf-book-meta {
    max-width: 260px;
  }

  .current-chapter-indicator {
    max-width: 140px;
    font-size: 0.78rem;
  }

  .reader-container {
    padding: 65px 1rem 40px;
  }

  .chapter-header {
    padding: 1rem 0 1.5rem;
    margin-bottom: 1.75rem;
  }

  .chapter-title {
    font-size: 1.4rem;
  }

  .chapter-footer {
    margin-top: 2.5rem;
    gap: 0.4rem;
  }

  .nav-page-btn {
    padding: 0.65rem 0.4rem;
    font-size: 0.85rem;
  }
}
