/* =================================================================
 *  戈壁问道文集 · 共享样式
 *  适用页面：list.html / reader.html / pdf-viewer.html
 *  设计语言：敦煌美学 — 绛红 赭石 金箔 沙色 奶油底
 * ================================================================= */

/* ———————————————————————————————
 *  1. 设计变量
 * ——————————————————————————————— */
:root {
  --c-primary: #9b2a2a;
  --c-secondary: #c97b2a;
  --c-accent: #e6b422;
  --c-cream: #fcf7f0;
  --c-ebony: #361611;
  --c-border: #e8ddd2;
  --c-text: #2c2c2c;
  --c-text-light: #5a5a5a;
  --c-bg-white: #fff;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 50px;
  --shadow-glass: 0 8px 28px rgba(0, 0, 0, 0.08);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================================================================
 *  字体：思源宋体 / Noto Serif SC（Google Fonts WOFF2，微信兼容）
 *  weight: 400 / 500 / 700 / 900
 * ================================================================= */
/* 回退：本地字体优先 */
@font-face {
  font-family: 'Source Han Serif CN';
  src: local('Source Han Serif CN'), local('思源宋体');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--c-cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ———————————————————————————————
 *  2. 顶部导航
 * ——————————————————————————————— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(252, 247, 240, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.05) 0%, rgba(201, 123, 42, 0.03) 100%);
  border: 1px solid rgba(155, 42, 42, 0.12);
}
.back-btn:hover {
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.1) 0%, rgba(201, 123, 42, 0.06) 100%);
  border-color: rgba(155, 42, 42, 0.25);
  transform: translateX(-2px);
}
.topbar-title {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--c-primary);
  letter-spacing: 2px;
}

/* ———————————————————————————————
 *  3. 主布局
 * ——————————————————————————————— */
.main-area {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ———————————————————————————————
 *  4. 书籍展示区（粒子背景 + 光效动画）
 * ——————————————————————————————— */
.book-stage {
  position: relative;
  padding: 28px 20px 32px;
  margin: 0 0 16px 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(178, 139, 94, 0.18);
  box-shadow:
    0 2px 16px rgba(155, 42, 42, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.book-stage::before {
  content: '';
  position: absolute;
  inset: -20px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(230, 180, 34, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(201, 123, 42, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(155, 42, 42, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 40% 20%, rgba(230, 180, 34, 0.15) 0%, transparent 40%);
  background-size: 200% 200%;
  animation: bookGlow 5s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
  filter: blur(20px);
}
@keyframes bookGlow {
  0%, 100% { background-position: 0% 0%; opacity: 0.8; }
  33%      { background-position: 100% 50%; opacity: 1; }
  66%      { background-position: 50% 100%; opacity: 0.9; }
}
.stage-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-150px) translateX(40px) scale(1); opacity: 0; }
}
.book-stage::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(178, 139, 94, 0.5) 15%, rgba(178, 139, 94, 0.7) 50%, rgba(178, 139, 94, 0.5) 85%, transparent);
  animation: lineShimmer 3s ease-in-out infinite;
}
@keyframes lineShimmer {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* ———————————————————————————————
 *  5. 3D 立体书
 * ——————————————————————————————— */
.book-wrap {
  perspective: 1200px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.book-info { position: relative; z-index: 1; }
.book-3d {
  position: relative;
  width: 280px;
  transform: rotateY(-22deg) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
  cursor: pointer;
  filter: drop-shadow(8px 12px 16px rgba(0,0,0,0.35));
}
.book-3d:hover {
  transform: rotateY(-8deg) rotateX(1deg) translateY(-6px) translateX(4px);
  filter: drop-shadow(14px 18px 28px rgba(0,0,0,0.5)) brightness(1.05);
}
.book-cover-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: block;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.book-inner {
  position: relative;
  border-radius: 3px 10px 10px 3px;
  overflow: hidden;
  box-shadow: 10px 8px 24px rgba(0, 0, 0, 0.25), -2px 0 8px rgba(0, 0, 0, 0.08);
}
.book-cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-cover-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 40%, rgba(0, 0, 0, 0.12) 100%);
  pointer-events: none;
}

/* Breathing dot */
.book-dot{position:absolute;bottom:12px;right:12px;z-index:5;display:flex;align-items:center;gap:6px;pointer-events:none}
.book-dot .dot{width:10px;height:10px;background:rgba(255,255,255,.9);border-radius:50%;animation:breathe 2s ease-in-out infinite;box-shadow:0 0 8px rgba(255,255,255,.6),0 0 20px rgba(230,180,34,.4)}
@keyframes breathe{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.8);opacity:1}}
.book-dot .dot-label{font-size:10px;color:rgba(255,255,255,.85);letter-spacing:1px;font-weight:600;text-shadow:0 1px 4px rgba(0,0,0,.5);opacity:0;transition:opacity .3s}
.book-3d:hover .book-dot .dot-label,.book-cover-img:hover .book-dot .dot-label{opacity:1}

/* Subtle light sweep across book cover */
.book-cover-img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0) 55%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: lightSweep 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lightSweep {
  0%, 100% { background-position: -100% 0; }
  50%      { background-position: 200% 0; }
}

.book-pages {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(90deg,
    rgba(210,195,170,.5) 0%,
    rgba(190,170,145,.3) 40%,
    rgba(170,150,125,.1) 100%
  );
  z-index: 0;
  border-radius: 0 6px 6px 0;
}
.book-info { text-align: center; margin-top: 16px; }
.book-info h2 {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--c-primary);
  letter-spacing: 3px;
  margin-bottom: 4px;
}
.book-info p {
  font-size: 12px;
  color: var(--c-text-light);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.book-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  transition: all var(--transition-smooth);
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(155, 42, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.book-start:hover {
  background: linear-gradient(135deg, #7a1f1f 0%, #a8621f 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(155, 42, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ———————————————————————————————
 *  6. 目录
 * ——————————————————————————————— */
.toc-section {
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(252, 247, 240, 0.95) 0%, rgba(248, 240, 228, 0.8) 40%, rgba(252, 247, 240, 0.5) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 16px 14px;
  border: 1px solid rgba(178, 139, 94, 0.12);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.toc-section h3 {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--c-primary);
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-section h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  border-radius: 2px;
}
.last-read {
  font-size: 12px;
  color: var(--c-secondary);
  background: linear-gradient(135deg, rgba(201, 123, 42, 0.1) 0%, rgba(230, 180, 34, 0.08) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: none;
  font-weight: 400;
  border: 1px solid rgba(201, 123, 42, 0.15);
  transition: all var(--transition-fast);
}
.last-read.show { display: inline-flex; align-items: center; gap: 4px; }
.last-read:hover {
  background: linear-gradient(135deg, rgba(201, 123, 42, 0.18) 0%, rgba(230, 180, 34, 0.14) 100%);
}
.toc-volume { margin-bottom: 20px; }
.toc-volume-title {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 900;
  font-size: 15px;
  color: var(--c-primary);
  padding: 12px 16px;
  margin-bottom: 6px;
  letter-spacing: 2px;
  border-left: 3px solid var(--c-accent);
  background: linear-gradient(90deg, rgba(230, 180, 34, 0.15) 0%, rgba(230, 180, 34, 0.06) 35%, rgba(252, 247, 240, 0.7) 65%, rgba(230, 180, 34, 0.04) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.toc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  margin: 3px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.toc-row:hover {
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.04) 0%, rgba(201, 123, 42, 0.02) 100%);
  transform: translateX(2px);
}
.toc-row.read { opacity: 0.65; }
.toc-row.read .toc-row-title::after {
  content: ' \2713';
  color: var(--c-secondary);
  font-size: 11px;
}
.toc-row-title {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--c-text);
  flex: 1;
  line-height: 1.4;
}
.toc-author {
  font-size: 11px;
  color: var(--c-text-light);
  margin-left: 12px;
  white-space: nowrap;
}
.toc-arrow {
  color: var(--c-border);
  margin-left: 8px;
  font-size: 11px;
  transition: all 0.25s;
}
.toc-row:hover .toc-arrow {
  color: var(--c-secondary);
  transform: translateX(3px);
}

/* ———————————————————————————————
 *  7. 文章阅读器
 * ——————————————————————————————— */
.article-card {
  background:
    linear-gradient(135deg, rgba(250, 247, 240, 0.95) 0%, rgba(245, 238, 225, 0.88) 50%, rgba(250, 247, 240, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 36px 28px;
  border-radius: 3px var(--radius-lg) var(--radius-lg) 3px;
  box-shadow:
    8px 8px 32px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(180, 140, 100, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 2px 0 0 0 #b28b5e,
    inset 0 -1px 0 rgba(178, 139, 94, 0.08);
  position: relative;
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", "SimSun", "Songti SC", serif;
  color: #3e2e21;
  line-height: 1.9;
  letter-spacing: 0.02em;
}
.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at 0% 50%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}
.article-card::after {
  content: '';
  position: absolute;
  top: 16px; bottom: 16px; left: 3px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, #b28b5e 20%, #b28b5e 80%, transparent 100%);
  opacity: 0.35;
}
.art-head {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(178, 139, 94, 0.2);
  position: relative;
}
.art-head::after {
  content: '\25C6';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: #b28b5e;
}
.art-volume {
  font-size: 11px;
  color: #b28b5e;
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.art-title {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--c-primary);
  letter-spacing: 3px;
  margin-bottom: 8px;
  line-height: 1.3;
}
.art-author {
  font-size: 14px;
  color: var(--c-text-light);
  letter-spacing: 2px;
}
.art-body { font-size: 16px; line-height: 2; font-weight: 500; }
.art-body p {
  font-weight: 500;
  margin-bottom: 1.2em;
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 2em;
}
.art-body .section-title {
  font-weight: 900;
  font-size: 18px;
  color: var(--c-primary);
  text-align: center;
  margin: 2em 0 1em;
  text-indent: 0;
  letter-spacing: 2px;
}
.art-body .section-title::before { content: '\2014 '; color: var(--c-accent); }
.art-body .section-title::after  { content: ' \2014'; color: var(--c-accent); }
.art-body .gebi-quotes { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 12px 0; }
.art-body .quote-item {
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(155, 42, 42, 0.03) 0%, transparent 100%);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--c-accent);
  font-size: 14px;
  line-height: 1.6;
  text-indent: 0;
}
.art-body .quote-item .quote-name {
  display: block;
  font-weight: 700;
  color: var(--c-primary);
  font-size: 13px;
  margin-bottom: 3px;
  letter-spacing: 1px;
}

/* — 7b. 原文版面配图 */
.page-img {
  margin: 1.5em 0;
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.03) 0%, rgba(201, 123, 42, 0.02) 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(155, 42, 42, 0.1);
}
.page-img .img-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  color: #fff;
  font-size: 11px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(155, 42, 42, 0.2);
}
.page-img .img-label:hover {
  background: linear-gradient(135deg, #7a1f1f 0%, #a8621f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(155, 42, 42, 0.3);
}
.page-img img {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: all 0.3s;
  touch-action: pinch-zoom pan-x pan-y;
}
.page-img img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.page-img .img-cap {
  display: block;
  font-size: 11px;
  color: var(--c-text-light);
  margin-top: 8px;
  letter-spacing: 1px;
}

/* — 7a. 上下篇导航 */
.art-nav { margin-top: 28px; }
.nav-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.04) 0%, rgba(201, 123, 42, 0.03) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(155, 42, 42, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.nav-card:hover {
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.08) 0%, rgba(201, 123, 42, 0.06) 100%);
  border-color: var(--c-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155, 42, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.nav-card.disabled { opacity: 0.25; pointer-events: none; }
.nav-card .nav-icon { font-size: 18px; color: var(--c-primary); flex-shrink: 0; opacity: 0.7; }
.nav-card .nav-info { flex: 1; min-width: 0; }
.nav-card .nav-label { font-size: 10px; color: var(--c-text-light); letter-spacing: 1px; margin-bottom: 3px; text-transform: uppercase; }
.nav-card .nav-title {
  font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-card .nav-author { font-size: 11px; color: var(--c-text-light); margin-top: 2px; }
.nav-center { text-align: center; }
.nav-center a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.25s;
  background: linear-gradient(135deg, rgba(155, 42, 42, 0.04) 0%, rgba(201, 123, 42, 0.02) 100%);
  border: 1px solid rgba(155, 42, 42, 0.12);
  backdrop-filter: blur(4px);
}
.nav-center a:hover { background: linear-gradient(135deg, rgba(155, 42, 42, 0.08) 0%, rgba(201, 123, 42, 0.05) 100%); border-color: var(--c-secondary); }

/* — 7c. 图片灯箱 */
.lb-close-btn { display: none; position: fixed; top: 16px; right: 16px; z-index: 10001; width: 44px; height: 44px; background: rgba(255,255,255,.15); backdrop-filter: blur(12px); border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 24px; cursor: pointer; border: 1px solid rgba(255,255,255,.2); transition: all .25s; }
.lb-close-btn:hover { background: rgba(255,255,255,.25); }
.lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.96); contain: layout style; }
.lightbox.active { display: flex; align-items: center; justify-content: center; }
.lb-img-wrap { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-img-wrap img { max-width: 90vw; max-height: 90vh; object-fit: contain; touch-action: none; }

/* — 7d. 弹窗对话框 */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-dialog {
  background: linear-gradient(145deg, #faf7f0 0%, #fcf7f0 100%);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 380px; width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(178, 139, 94, 0.2);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-icon { font-size: 48px; margin-bottom: 16px; display: block; color: var(--c-accent); }
.modal-title { font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif; font-weight: 900; font-size: 20px; color: var(--c-primary); letter-spacing: 2px; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: var(--c-text-light); line-height: 1.6; margin-bottom: 24px; letter-spacing: 1px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.modal-btn { padding: 10px 28px; border-radius: var(--radius-full); font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.25s; font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif; letter-spacing: 1px; border: none; }
.modal-btn-confirm { background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%); color: #fff; box-shadow: 0 4px 16px rgba(155, 42, 42, 0.3); }
.modal-btn-confirm:hover { background: linear-gradient(135deg, #7a1f1f 0%, #a8621f 100%); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(155, 42, 42, 0.4); }
.modal-btn-cancel { background: rgba(155, 42, 42, 0.06); color: var(--c-primary); border: 1px solid rgba(155, 42, 42, 0.15); }
.modal-btn-cancel:hover { background: rgba(155, 42, 42, 0.12); }

/* ———————————————————————————————
 *  8. PDF/图片横屏浏览器
 * ——————————————————————————————— */
.pdf-close-btn {
  position: fixed; top: 14px; right: 14px; z-index: 200;
  display: flex; align-items: center; gap: 6px;
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 10px 20px; border-radius: 50px; cursor: pointer; text-decoration: none;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.25s; letter-spacing: 1px;
}
.pdf-close-btn:hover { background: rgba(200, 30, 30, 0.8); transform: scale(1.05); }
.pdf-counter { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 200; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(12px); color: #fff; padding: 6px 18px; border-radius: 50px; font-size: 13px; letter-spacing: 2px; border: 1px solid rgba(255, 255, 255, 0.15); font-weight: 700; }
.scroll-container { width: 100vw; height: 100vh; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; display: flex; -webkit-overflow-scrolling: touch; }
.scroll-container::-webkit-scrollbar { height: 3px; }
.scroll-container::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
.page-cell { flex: 0 0 100vw; height: 100vh; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; padding: 12px; }
.page-cell img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.nav-arrow { position: fixed; top: 50%; transform: translateY(-50%); z-index: 150; width: 44px; height: 44px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; cursor: pointer; transition: all 0.25s; border: 1px solid rgba(255, 255, 255, 0.15); }
.nav-arrow:hover { background: rgba(0, 0, 0, 0.7); transform: translateY(-50%) scale(1.1); }
.nav-left { left: 12px; } .nav-right { right: 12px; }
.rotate-prompt { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, 0.95); flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 2rem; }
.rotate-prompt .rotate-icon { font-size: 60px; animation: rotateHint 2s ease-in-out infinite; margin-bottom: 18px; display: block; }
@keyframes rotateHint { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(90deg); } }
.rotate-prompt h2 { font-family: 'Noto Serif SC', 'Source Han Serif CN', "宋体", serif; font-weight: 900; font-size: 22px; letter-spacing: 3px; margin-bottom: 8px; color: var(--c-accent); }
.rotate-prompt p { font-size: 14px; color: rgba(255, 255, 255, 0.6); letter-spacing: 1px; }
.rotate-prompt .skip-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 28px; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; letter-spacing: 1px; transition: all 0.25s; background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); }
.rotate-prompt .skip-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* ———————————————————————————————
 *  8b. 返回顶部按钮
 * ——————————————————————————————— */
.btt {
  position: fixed; bottom: 28px; right: 20px; z-index: 500;
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 4px 16px rgba(155,42,42,.35);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: all .3s ease;
}
.btt.show { opacity: 1; visibility: visible; transform: translateY(0); }
.btt:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 24px rgba(155,42,42,.5); }
.btt:active { transform: scale(0.95); }

/* ———————————————————————————————
 *  9. 移动端响应式
 * ——————————————————————————————— */
@media (max-width: 768px) {
  .main-area { padding: 16px; }
  .book-3d { width: 220px; }
  .toc-row-title { font-size: 16px; }
  .toc-volume-title { font-size: 16px; }
  .topbar-title { font-size: 17px; }
  .book-info h2 { font-size: 20px; }
  .toc-author { font-size: 12px; }
  .article-card { padding: 22px 16px; border-radius: 3px 12px 12px 3px; }
  .art-title { font-size: 24px; }
  .art-body { font-size: 17px; }
  .nav-cards { grid-template-columns: 1fr; }
  .nav-arrow { width: 34px; height: 34px; font-size: 14px; }
  .nav-left { left: 6px; } .nav-right { right: 6px; }
}
