/* ===== 跟着史志看潞州 — 全局样式 ===== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Ma+Shan+Zheng&display=swap');

/* --- CSS 变量与主题 --- */
:root {
  --max-width: 480px;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 52px;
  /* 默认主题变量（兜底，确保 #app 外的元素也能取到值）*/
  --primary: #8B6914;
  --primary-dark: #6B4F0E;
  --primary-light: #C4A04A;
  --bg: #F5E6C8;
  --bg-card: #FFF8E7;
  --bg-header: rgba(62, 44, 10, 0.92);
  --text: #3E2C0A;
  --text-light: #7A6238;
  --border: #D4B97A;
  --accent: #C0392B;
}

[data-theme="antique"] {
  --primary: #8B6914;
  --primary-dark: #6B4F0E;
  --primary-light: #C4A04A;
  --bg: #F5E6C8;
  --bg-card: #FFF8E7;
  --bg-header: rgba(62, 44, 10, 0.92);
  --text: #3E2C0A;
  --text-light: #7A6238;
  --border: #D4B97A;
  --accent: #C0392B;
}
[data-theme="nature"] {
  --primary: #2D6A4F;
  --primary-dark: #1B4332;
  --primary-light: #74C69D;
  --bg: #E8F5E9;
  --bg-card: #F1F8F4;
  --bg-header: rgba(27, 67, 50, 0.92);
  --text: #1B3A2A;
  --text-light: #4A6B5A;
  --border: #A5D6A7;
  --accent: #00897B;
}
[data-theme="festive"] {
  --primary: #C0392B;
  --primary-dark: #922B21;
  --primary-light: #E74C3C;
  --bg: #FFF3E0;
  --bg-card: #FFF8E1;
  --bg-header: rgba(146, 43, 33, 0.92);
  --text: #4A1A1A;
  --text-light: #8B4545;
  --border: #FFAB91;
  --accent: #FF8F00;
}
[data-theme="food"] {
  --primary: #E65100;
  --primary-dark: #BF360C;
  --primary-light: #FF9800;
  --bg: #FFF8E1;
  --bg-card: #FFFDE7;
  --bg-header: rgba(191, 54, 12, 0.92);
  --text: #3E2723;
  --text-light: #795548;
  --border: #FFCC80;
  --accent: #D84315;
}
[data-theme="red"] {
  --primary: #8B0000;
  --primary-dark: #660000;
  --primary-light: #C62828;
  --bg: #FFF0F0;
  --bg-card: #FFFAFA;
  --bg-header: rgba(102, 0, 0, 0.92);
  --text: #3D0000;
  --text-light: #7A3030;
  --border: #EF9A9A;
  --accent: #D4AF37;
}
[data-theme="heritage"] {
  --primary: #6A1B9A;
  --primary-dark: #4A148C;
  --primary-light: #AB47BC;
  --bg: #F3E5F5;
  --bg-card: #FAF0FD;
  --bg-header: rgba(74, 20, 140, 0.92);
  --text: #2E1A47;
  --text-light: #6A4580;
  --border: #CE93D8;
  --accent: #D4AF37;
}
[data-theme="history"] {
  --primary: #5D4037;
  --primary-dark: #3E2723;
  --primary-light: #8D6E63;
  --bg: #EFEBE9;
  --bg-card: #F5F0EE;
  --bg-header: rgba(62, 39, 35, 0.92);
  --text: #2E1A0E;
  --text-light: #6D4C41;
  --border: #BCAAA4;
  --accent: #8B6914;
}

/* --- 全局重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

#app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* --- 主题装饰字（半透明背景）--- */
.theme-watermark {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-family: 'Ma Shan Zheng', serif;
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  line-height: 1.8;
  text-align: center;
}

/* --- 页面切换动画 --- */
.page { animation: fadeInUp 0.4s ease; position: relative; z-index: 1; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* ===== 固定顶部栏（滚动时出现）===== */
.fixed-top-bar {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--header-h);
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  z-index: 200;
  opacity: 0;
  transform: translateX(-50%) translateY(-100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.fixed-top-bar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.fixed-top-bar .back-btn,
.fixed-top-bar .home-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  color: #fff;
  font-family: 'Noto Serif SC', serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
  transition: opacity var(--transition);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.fixed-top-bar .back-btn:active,
.fixed-top-bar .home-btn:active { opacity: 0.6; }
.fixed-top-bar .top-title {
  flex: 1;
  text-align: center;
  color: #fff;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.fixed-top-bar .top-subtitle {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05rem;
}

/* ===== 启动页 ===== */
.splash-page {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #3E2C0A;
  position: relative;
  overflow: hidden;
}
body.splash-mode {
  overflow: hidden;
  height: 100vh;
}
body.splash-mode .global-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: transparent;
  border-top: none;
  padding: 0 1rem 1rem;
  z-index: 5;
}
/* 背景字容器：铺满整个启动页 */
.splash-dynamic-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.splash-bg-layer {
  position: relative;
  display: flex;
  flex-direction: row-reverse;  /* 从右到左排列 */
  justify-content: space-evenly; /* 等间距分布 */
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
}
.splash-bg-group {
  position: relative;
  color: #D4B97A;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.3rem;
  white-space: nowrap;
  line-height: 1.4;
}
/* 角落点缀大字 */
.splash-bg-corner-char {
  position: absolute;
  color: #D4B97A;
  text-shadow: 2px 2px 12px rgba(0,0,0,0.5);
  font-weight: 700;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.splash-bg-corner-lu {
  top: -2rem;
  left: -2rem;
}
.splash-bg-corner-an {
  bottom: -2rem;
  right: -2rem;
}
.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 3rem;
  margin-top: -55vh;
}
.splash-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 2.8rem;
  color: #F5E6C8;
  text-shadow: 0 2px 20px rgba(212,175,55,0.6), 0 0 30px rgba(245,230,200,0.3);
  margin-bottom: 1rem;
  letter-spacing: 0.25rem;
  animation: scaleIn 1s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.splash-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C4A04A, transparent);
  margin: 0 auto;
  animation: fadeIn 1.5s ease;
}
.splash-btn {
  position: fixed;
  bottom: 24vh;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  padding: 0.9rem 2.8rem;
  font-size: 1.2rem;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  color: #3E2C0A;
  background: linear-gradient(135deg, #F5E6C8, #D4B97A);
  border: 2px solid #C4A04A;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.3rem;
  z-index: 2;
  transition: all 0.4s ease;
  animation: fadeIn 2s ease;
  box-shadow: 0 4px 20px rgba(212,175,55,0.4);
}
.splash-btn::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}
.splash-btn:active::before { width: 300px; height: 300px; }
.splash-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 12px rgba(139,105,20,0.4);
}

/* ===== 介绍页 ===== */
.intro-page {
  min-height: 100vh;
  padding: 0 1.5rem 5rem;
  background: linear-gradient(180deg, #f5e6c8 0%, #faf0d7 30%, var(--bg) 60%);
  position: relative;
}
.intro-header { text-align: center; padding: 2.5rem 0 1.5rem; }
.intro-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 2rem;
  color: #8B6914;
  text-shadow: 0 2px 8px rgba(212,175,55,0.3);
  margin-bottom: 0.5rem;
}
.intro-subtitle {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 0.9rem;
  color: #C4A04A;
  letter-spacing: 0.3rem;
  margin-bottom: 0.3rem;
}
.intro-theme {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 0.8rem;
  color: rgba(139,105,20,0.5);
  letter-spacing: 0.2rem;
}
.intro-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 2rem;
  margin-top: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  position: relative;
}
.intro-card::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  opacity: 0.5;
  pointer-events: none;
}
.intro-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}
.intro-card-title::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 2px;
  background: var(--accent);
}
.intro-text {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 2;
  text-indent: 2em;
  white-space: pre-line;
}

/* 播报按钮 */
.broadcast-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-family: 'Noto Serif SC', serif;
  color: #fff;
  background: linear-gradient(135deg, #C4A04A, #8B6914);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.1rem;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(139,105,20,0.3);
  white-space: nowrap;
}
.broadcast-btn:active { transform: scale(0.95); }
.broadcast-btn.playing {
  background: linear-gradient(135deg, #C0392B, #922B21);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(192,57,43,0.3); }
  50% { box-shadow: 0 2px 16px rgba(192,57,43,0.6); }
}
.broadcast-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  pointer-events: none; /* 让SVG不拦截点击，由父button响应 */
}
.broadcast-text {
  pointer-events: none;
}

/* 固定底部按钮栏 */
.bottom-fixed-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  padding: 0.8rem 1.5rem;
  background: rgba(255,248,231,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 150;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.intro-next-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  font-size: 1.1rem;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  color: #fff;
  background: linear-gradient(135deg, #C4A04A, #8B6914);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.2rem;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(139,105,20,0.3);
}
.intro-next-btn:active { transform: scale(0.97); }

/* ===== 首页 ===== */
.home-page { min-height: 100vh; padding-bottom: 2rem; }
.home-hero {
  background: linear-gradient(135deg, #f5e6c8 0%, #faf0d7 50%, #fff8e7 100%);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.home-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(212,175,55,0.2) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(192,57,43,0.06) 0%, transparent 60%);
}
.home-hero-content { position: relative; z-index: 1; }
.home-hero-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 2.3rem;
  color: #8B6914;
  text-shadow: 0 2px 12px rgba(212,175,55,0.3);
  margin-bottom: 0.5rem;
  letter-spacing: 0.15rem;
  line-height: 1.4;
}
.home-hero-subtitle {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 1rem;
  color: #8B6914;
  letter-spacing: 0.25rem;
  margin-bottom: 0.2rem;
  line-height: 1.6;
}
.home-hero-divider {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, #8B6914, transparent);
  margin: 0.8rem auto;
}
.home-hero-theme {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 0.85rem;
  color: rgba(139,105,20,0.6);
  letter-spacing: 0.15rem;
  margin-top: 0.5rem;
  line-height: 1.8;
}

/* 首页概览入口模块 */
.home-intro-module {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #FFF8E7, #F5E6C8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(139,105,20,0.15);
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeInUp 0.5s ease;
}
.home-intro-module:active { transform: scale(0.98); }
.home-intro-module-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8B6914, #6B4F0E);
  color: #fff;
  font-family: 'Ma Shan Zheng', serif;
  font-size: 1.6rem;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(139,105,20,0.3);
}
.home-intro-module-text { flex: 1; }
.home-intro-module-title {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
  letter-spacing: 0.1rem;
}
.home-intro-module-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}
.home-intro-module-arrow {
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: bold;
  flex-shrink: 0;
}

/* 瀑布流布局 — 太行山延绵之意 */
.home-masonry {
  padding: 1rem;
  column-count: 2;
  column-gap: 0.8rem;
}
.category-card {
  break-inside: avoid;
  margin-bottom: 0.8rem;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #ccc;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: scaleIn 0.5s ease backwards;
  display: block;
}
/* 交叉分布：不同卡片不同高度 */
.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }

.category-card:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.category-card-bg {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}
/* 交叉高度变化 */
.category-card:nth-child(odd) .category-card-bg { height: 160px; }
.category-card:nth-child(even) .category-card-bg { height: 200px; }
.category-card:nth-child(1) .category-card-bg { height: 180px; }
.category-card:nth-child(4) .category-card-bg { height: 220px; }
.category-card:active .category-card-bg { transform: scale(1.05); }

.category-card-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.9rem;
}
.category-card-icon {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  width: 34px; height: 34px;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Ma Shan Zheng', serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25);
}
.category-card-name {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.category-card-subtitle {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05rem;
}

/* ===== 二级页面（条目列表）===== */
.list-page { min-height: 100vh; padding-bottom: 2rem; }
.list-banner { height: 160px; position: relative; overflow: hidden; }
.list-banner-img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.list-banner-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem;
}
.list-banner-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 0.3rem;
}
.list-banner-subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.2rem;
}
.list-desc {
  padding: 1rem 1.2rem;
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.item-list { padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.item-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  animation: fadeInUp 0.4s ease backwards;
}
.item-card:active { transform: scale(0.98); box-shadow: 0 1px 5px rgba(0,0,0,0.1); }
.item-card-img { width: 100px; height: 100px; object-fit: cover; flex-shrink: 0; }
.item-card-placeholder {
  width: 100px; height: 100px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-family: 'Ma Shan Zheng', serif;
  font-size: 2rem;
}
.item-card-content { flex: 1; padding: 0.8rem 1rem; display: flex; flex-direction: column; justify-content: center; }
.item-card-name { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.item-card-summary {
  font-size: 0.76rem;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-card-arrow { display: flex; align-items: center; padding-right: 0.8rem; color: var(--primary-light); font-size: 1.2rem; }

/* ===== 三级页面（详情）===== */
.detail-page { min-height: 100vh; padding-bottom: 3rem; }
.detail-hero { position: relative; height: 220px; overflow: hidden; }
.detail-hero-img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.detail-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
}
.detail-hero-text { flex: 1; min-width: 0; }
.detail-hero-name {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.detail-hero-summary { font-size: 0.78rem; color: rgba(255,255,255,0.8); margin-top: 0.3rem; }
.detail-broadcast-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-family: 'Noto Serif SC', serif;
  color: #fff;
  background: rgba(196,160,74,0.85);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.1rem;
  transition: all var(--transition);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.detail-broadcast-btn:active { transform: scale(0.95); }
.detail-broadcast-btn.playing {
  background: rgba(192,57,43,0.85);
  animation: pulse 1.5s ease infinite;
}
.detail-content { padding: 1.5rem; }
.detail-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 0.8rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}
.detail-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 2;
  margin-bottom: 1rem;
}
.detail-paragraph {
  text-indent: 2em;
  margin-bottom: 0.8rem;
}
.detail-gallery { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
.detail-img-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  background: var(--bg-card);
}
.detail-img { width: 100%; display: block; transition: transform 0.3s ease; }
.detail-img-wrapper:active .detail-img { transform: scale(1.02); }

.detail-gallery-scroll {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: auto;
}
.detail-gallery-scroll::-webkit-scrollbar { display: none; }
.detail-gallery-scroll .detail-img-wrapper { flex-shrink: 0; width: 200px; }
.detail-gallery-scroll .detail-img { width: 200px; height: 140px; object-fit: cover; }

/* ===== 图片灯箱 ===== */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.active { display: flex; animation: fadeIn 0.3s ease; }
.lightbox-img { max-width: 100%; max-height: 100%; border-radius: 4px; }
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background 0.3s;
}
.lightbox-nav:active { background: rgba(255,255,255,0.4); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ===== TTS 不支持提示框 ===== */
.tts-unsupported-tip {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}
.tts-tip-content {
  background: #FFF8E7;
  color: #3E2C0A;
  padding: 1.5rem 1.2rem 1.2rem;
  border-radius: 12px;
  max-width: 360px;
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
  border: 1px solid #D4B97A;
}
.tts-tip-close {
  display: block;
  margin: 1rem auto 0;
  background: linear-gradient(135deg, #8B6914, #6B4F0E);
  color: #fff;
  border: none;
  padding: 0.55rem 1.5rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tts-tip-close:active { opacity: 0.85; }

/* ===== 底部装饰 ===== */
.footer-decoration {
  text-align: center;
  padding: 2rem 1rem 1rem;
  color: var(--text-light);
  font-size: 0.72rem;
  opacity: 0.6;
}
.footer-theme {
  text-align: center;
  padding: 0.5rem 1rem 2rem;
  font-family: 'Ma Shan Zheng', serif;
  font-size: 0.8rem;
  color: var(--primary);
  opacity: 0.3;
  letter-spacing: 0.15rem;
}

/* ===== 全局底部版权栏（所有页面都显示）===== */
.global-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.global-footer-line1 {
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.05rem;
  line-height: 1.6;
}
.global-footer-line2 {
  font-size: 0.65rem;
  color: var(--text-light);
  opacity: 0.7;
  letter-spacing: 0.05rem;
  line-height: 1.6;
  margin-top: 0.15rem;
}
/* 启动页footer暗色背景 */
body.splash-mode .global-footer {
  background: #3E2C0A;
  border-top: 1px solid #6B4F0E;
}
body.splash-mode .global-footer-line1,
body.splash-mode .global-footer-line2 {
  color: #D4B97A;
  opacity: 0.6;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ===== 图片加载失败占位 ===== */
.img-fallback {
  width: 100%; height: 120px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}
