﻿/* 宗族页面国奖级视觉规范 */
:root {
  /* 徽派水墨古风专属色板 */
  --primary-redwood: #8B4513; /* 赭石色（红木） */
  --primary-text: #333333; /* 黛瓦色（文字） */
  --primary-bg: #F8F5F0; /* 宣纸白（背景） */
  --secondary-blue: #4A6F8C; /* 石青（点缀） */
  --secondary-yellow: #D4B16A; /* 藤黄（高亮） */
  --secondary-gray: #707070; /* 墨灰（次要文字） */
  --border-ink: #8B451333; /* 水墨描边 */
  --shadow-inner: 0 2px 8px #33333310; /* 内阴影 */
  
  /* 字体系统 */
  --font-title: "Ma Shan Zheng", "方正楷体_GB2312", "楷体", serif;
  --font-body: "Noto Serif SC", "微软雅黑", sans-serif;
  --font-note: "ZCOOL XiaoWei", "方正仿宋_GB2312", "仿宋", serif;
  
  /* 间距规范 */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 80px;
  
  /* 圆角规范 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: rgba(30, 24, 14, 0.18);
  color: var(--primary-text);
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content:'';
  position:fixed;
  inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events:none;
  z-index:0;
  opacity:0.05;
}

body::after {
  content:'';
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: radial-gradient(ellipse 300px 200px at 0% 0%,rgba(26,20,16,.03) 0%,transparent 70%),
              radial-gradient(ellipse 300px 200px at 100% 0%,rgba(26,20,16,.02) 0%,transparent 70%),
              radial-gradient(ellipse 300px 200px at 0% 100%,rgba(26,20,16,.02) 0%,transparent 70%),
              radial-gradient(ellipse 300px 200px at 100% 100%,rgba(26,20,16,.03) 0%,transparent 70%);
  pointer-events:none;
  z-index:0;
}

/* 英雄头部 */
.hero-header {
  position: relative;
  padding: 44px 56px 40px;
  overflow: hidden;
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
  background: rgba(255, 252, 247, 0.25);
  backdrop-filter: blur(8px);
}

/* 右侧水墨晕渲效果 */
.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(ellipse 70% 90% at 85% 50%, rgba(184, 134, 11, 0.07) 0%, transparent 70%),
              radial-gradient(ellipse 40% 60% at 100% 30%, rgba(26, 20, 16, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* 竖向水墨大字装饰 */
.hero-header::after {
  content: '宗族文化';
  position: absolute;
  top: -4px;
  right: 310px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 9rem;
  color: rgba(26, 20, 16, 0.028);
  letter-spacing: 0.05em;
  pointer-events: none;
  writing-mode: vertical-rl;
  line-height: 1;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-right {
  padding-top: 54px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  padding: 5px 14px;
  border-radius: 2px;
  margin-bottom: 20px;
}

.hero-badge span {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--primary-redwood);
  font-weight: 500;
}

.hero-badge::before,
.hero-badge::after {
  content: '◆';
  font-size: 0.5rem;
  color: var(--primary-redwood);
  opacity: 0.6;
}

.hero-title-zh {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 4rem;
  color: var(--primary-text);
  line-height: 1;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-shadow: 2px 3px 8px rgba(26, 20, 16, 0.1);
}

.hero-title-en {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--secondary-gray);
  font-weight: 300;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--primary-text);
  font-weight: 300;
  border-left: 2px solid var(--primary-redwood);
  padding-left: 14px;
  margin-bottom: 24px;
}

.history-section {
  padding-top: 4px;
}

.history-section-label {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  color: var(--primary-redwood);
  opacity: 0.85;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-section-label::before {
  content: '◆';
  font-size: 0.44rem;
  color: var(--primary-redwood);
  opacity: 0.6;
}

.history-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(184, 134, 11, 0.3), transparent);
}

.history-lines-wrap {
  overflow: hidden;
}

.history-line {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.84rem;
  line-height: 1.9;
  color: var(--primary-text);
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.history-line.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 页面容器 */
.clan-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: var(--spacing-xl) 0;
  background: rgba(252, 250, 245, 0.25);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 10;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-redwood) transparent;
}

/* 滚动条样式 */
.clan-container::-webkit-scrollbar {
  height: 8px;
}

.clan-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.clan-container::-webkit-scrollbar-thumb {
  background: var(--primary-redwood);
  border-radius: 4px;
}

.clan-container::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-blue);
}

/* 模块容器 */
.modules-wrapper {
  display: inline-flex;
  gap: 0;
  padding: 0;
  min-height: 600px;
  align-items: flex-start;
}

/* 通用模块样式 */
.clan-module {
  background: rgba(255, 253, 250, 0.50);
  border: 1px solid var(--border-ink);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inner);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background-image: 
    radial-gradient(circle at top left, rgba(139, 69, 19, 0.03) 0%, transparent 50%),
    radial-gradient(circle at bottom right, rgba(139, 69, 19, 0.03) 0%, transparent 50%);
  width: 100vw;
  min-width: 100vw;
  white-space: normal;
  transform: translateY(50px);
  opacity: 0;
}

.clan-module.visible {
  transform: translateY(0);
  opacity: 1;
}

.clan-module:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.15);
  z-index: 20;
  border-color: var(--primary-redwood);
}

.clan-module::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.03) 29px, rgba(212, 177, 106, 0.03) 30px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.clan-module:hover::before {
  background-image: repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.08) 29px, rgba(212, 177, 106, 0.08) 30px);
}

/* 模块点击效果 */
.clan-module:active {
  transform: translateY(-5px) scale(0.98);
  transition: transform 0.1s ease;
}

/* 模块标题 */
.module-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  border-bottom: 2px solid var(--border-ink);
  padding-bottom: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
  letter-spacing: 2px;
  position: relative;
}

.module-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--primary-redwood);
}

.module-title::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--primary-redwood);
  transition: left 0.5s ease;
}

.clan-module:hover .module-title::before {
  left: 0;
}

/* 紧凑布局样式 */
.compact-layout-section {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 顶部主图片 */
.compact-main-image {
  text-align: center;
  margin-bottom: 10px;
}

.compact-main-img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.1);
  transition: all 0.3s ease;
}

.compact-main-img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.15);
}

/* 网格布局 */
.compact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  align-items: start;
}

/* 左侧小图片网格 */
.compact-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.compact-image-item {
  position: relative;
  text-align: center;
  transition: all 0.3s ease;
}

.compact-image-item:hover {
  transform: translateY(-3px);
}

.compact-image-item img {
  width: 100%;
  height: 120px;
  min-height: 120px;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f0e8 0%, #e8e0d5 100%);
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.compact-image-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.compact-image-item span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 0.7rem;
  font-weight: 500;
}

/* 右侧文字说明 */
.compact-description {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.compact-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 0.9rem;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-ink);
  padding-bottom: 3px;
}

.compact-text {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--primary-text);
  margin-bottom: 8px;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .compact-grid {
    grid-template-columns: 1fr;
  }
  
  .compact-images {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .compact-image-item img {
    height: 80px;
  }
}

@media (max-width: 768px) {
  .compact-images {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .compact-image-item img {
    height: 70px;
  }
  
  .compact-main-img {
    max-width: 100%;
  }
  
  .compact-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .compact-images {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .compact-image-item img {
    height: 60px;
  }
}

/* 贾而好儒与枕山环水模块 */
.merchant-fengshui-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: start;
  margin-top: 20px;
}

.merchant-section,
.fengshui-section {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  min-height: 600px;
}

/* 宗族文化符号模块 */
.symbols-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 10px;
}

.symbol-item {
  text-align: center;
  transition: all 0.3s ease;
}

.symbol-item:hover {
  transform: translateY(-3px);
}

.symbol-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.symbol-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.symbol-item:hover .symbol-image {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.symbol-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 0.75rem;
  font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .merchant-fengshui-grid {
    grid-template-columns: 1fr;
  }
  
  .symbols-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .symbol-image {
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .symbols-grid {
    grid-template-columns: 1fr;
  }
  
  .symbol-image {
    max-width: 150px;
  }
}

/* 徽派瓦当造型导航栏 */
#circleNav {
  position: fixed;
  top: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  z-index: 100;
}

.circle-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(184, 134, 11, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--primary-text);
  box-shadow: 0 4px 16px rgba(26, 20, 16, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.circle-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: all 0.3s;
}

.circle-btn span {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-family: 'Noto Serif SC', serif;
}

.circle-btn:hover {
  background: rgba(245, 240, 232, 0.98);
  border-color: rgba(192, 57, 43, 0.4);
  color: var(--primary-redwood);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.15);
}

.circle-btn.active {
  background: var(--primary-text);
  border-color: var(--primary-text);
  color: rgba(245, 240, 232, 0.9);
}

/* 徽派门簪造型内部导航 */
.internal-nav {
  position: fixed;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.nav-pin {
  width: 40px;
  height: 60px;
  background: #E0D8C0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-pin::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(45deg, transparent 45%, var(--primary-redwood) 45%, var(--primary-redwood) 55%, transparent 55%);
}

.nav-pin:hover {
  background: var(--secondary-blue);
  transform: rotate(15deg) scale(1.1);
}

.nav-pin.active {
  background: var(--secondary-blue);
  color: white;
  transform: rotate(15deg);
}

/* 村落生长动画 */
.village-animation {
  position: relative;
  width: 100%;
  height: 500px;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-inner);
}

/* 动画控制按钮 */
.animation-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-container {
  width: 200px;
  height: 8px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(to right, var(--primary-redwood), var(--secondary-yellow));
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: progressFlow 2s linear infinite;
}

/* 村落元素样式 */
.village-element {
  position: absolute;
  opacity: 0;
  transform: scale(0.5);
  transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  z-index: 10;
}

.village-element.visible {
  opacity: 1;
  transform: scale(1);
}

/* 元素内容 */
.element-content {
  position: relative;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.village-element:hover .element-content {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

/* 水墨阴影效果 */
.ink-shadow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(139, 69, 19, 0.1) 0%, transparent 70%);
  border-radius: var(--radius-sm);
  pointer-events: none;
  transition: all 0.3s ease;
}

.village-element:hover .ink-shadow {
  background: radial-gradient(circle, rgba(139, 69, 19, 0.2) 0%, transparent 70%);
  transform: scale(1.1);
}

/* 建筑图标 */
.building-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
  transition: all 0.3s ease;
}

.village-element:hover .building-icon {
  transform: scale(1.2) rotate(5deg);
}

/* 建筑标签 */
.building-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.village-element:hover .building-label {
  color: var(--secondary-blue);
  transform: translateY(-3px);
}

/* 活动剪影 */
.activity-silhouette {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(51, 51, 51, 0.85);
  color: white;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.village-element:hover .activity-silhouette {
  bottom: -60px;
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.activity-silhouette::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: rgba(51, 51, 51, 0.85);
}

.silhouette-content {
  text-align: center;
}

/* 元素位置 */
.ancestral-hall {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
}

.branch-hall {
  top: 30%;
  left: 30%;
  transform: translate(-50%, -50%) scale(0.5);
}

.residence {
  top: 70%;
  left: 30%;
  transform: translate(-50%, -50%) scale(0.5);
}

.water-system {
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%) scale(0.5);
}

.alley {
  top: 20%;
  left: 70%;
  transform: translate(-50%, -50%) scale(0.5);
}

.water-entrance {
  top: 80%;
  left: 70%;
  transform: translate(-50%, -50%) scale(0.5);
}

.village-element.growing {
  transition: all 0.5s ease;
  opacity: 1;
  transform: scale(1);
}

/* 层级透视控制 */
.layer-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  padding: 15px;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.layer-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.layer-slider-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.layer-slider {
  width: 200px;
  height: 6px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.layer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-redwood);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
}

.layer-slider::-webkit-slider-thumb:hover {
  background: var(--secondary-blue);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

.layer-indicators {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.layer-indicator {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary-gray);
  padding: 5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-note);
}

.layer-indicator:hover {
  background: rgba(139, 69, 19, 0.1);
  color: var(--primary-redwood);
}

.layer-indicator.active {
  background: var(--primary-redwood);
  color: white;
  font-weight: 600;
}

/* 层级透视图层 */
.layer-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.village-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.village-layer.geo-layer {
  background: linear-gradient(160deg, #e8f4f8 0%, #d5e8f0 55%, #c2dbe8 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E");
}

.village-layer.building-layer {
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

.village-layer.activity-layer {
  background: linear-gradient(160deg, #f8f0dc 0%, #f0e6c8 55%, #e8dcc0 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

.ink-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.activity-points {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 地理风水层 */

.geo-element {
  position: absolute;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.geo-element:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(74, 111, 140, 0.2);
  border-color: var(--secondary-blue);
}

.geo-element .element-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
  transition: all 0.3s ease;
}

.geo-element:hover .element-icon {
  transform: scale(1.2) rotate(5deg);
}

.geo-element .element-label {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.geo-element:hover .element-label {
  color: var(--primary-redwood);
  transform: translateY(-3px);
}

/* 地理元素位置 */
.geo-element.mountain {
  top: 20%;
  left: 20%;
}

.geo-element.water {
  bottom: 20%;
  right: 20%;
}

.geo-element.field {
  bottom: 30%;
  left: 30%;
}

/* 宗族活动层 */

.activity-element {
  position: absolute;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.activity-element:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

.activity-element .element-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
  transition: all 0.3s ease;
}

.activity-element:hover .element-icon {
  transform: scale(1.2) rotate(5deg);
}

.activity-element .element-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.activity-element:hover .element-label {
  color: var(--secondary-blue);
  transform: translateY(-3px);
}

/* 活动元素位置 */
.activity-element.sacrifice {
  top: 30%;
  left: 30%;
}

.activity-element.meeting {
  top: 40%;
  right: 30%;
}

.activity-element.living {
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
}

/* 水墨流动效果 */
.village-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139, 69, 19, 0.05) 0%, transparent 70%);
  pointer-events: none;
  animation: inkFlow 20s ease-in-out infinite;
}

@keyframes inkFlow {
  0%, 100% {
    transform: translateX(0) translateY(0) scale(1);
  }
  25% {
    transform: translateX(-5%) translateY(5%) scale(1.05);
  }
  50% {
    transform: translateX(0) translateY(10%) scale(1.1);
  }
  75% {
    transform: translateX(5%) translateY(5%) scale(1.05);
  }
}

/* 血脉延绵模块容器 */
.genealogy-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  min-height: 500px;
}

/* 水墨生长谱系树 */
.genealogy-scroll {
  background: #fffbf0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inner);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.genealogy-scroll:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
  border-color: var(--primary-redwood);
}

.genealogy-scroll::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.05) 29px, rgba(212, 177, 106, 0.05) 30px);
  pointer-events: none;
  animation: inkFlow 20s ease-in-out infinite;
}

/* 仿古族谱页 */

.person-info {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.person-info:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(139, 69, 19, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.person-name {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.person-desc {
  font-family: var(--font-note);
  color: var(--primary-text);
  font-size: 1.2rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.person-impact {
  text-align: left;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-ink);
}

.person-impact h5 {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.person-impact p {
  font-family: var(--font-note);
  color: var(--primary-text);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* 宗族谱系时间轴 */
.genealogy-timeline {
  margin-top: 30px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-redwood);
}

.timeline-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.timeline-container {
  position: relative;
  padding-left: 30px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-redwood), var(--secondary-yellow));
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-redwood);
  border: 3px solid var(--primary-bg);
  box-shadow: 0 0 0 2px var(--primary-redwood);
}

.timeline-content {
  background: white;
  padding: 15px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-ink);
}

.timeline-content h4 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  margin-bottom: 8px;
  font-size: 1rem;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.5;
}

/* 宗族名人榜 */
.genealogy-famous {
  margin-top: 30px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--secondary-blue);
}

.famous-title {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.famous-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.famous-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-ink);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.famous-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.famous-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.famous-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.famous-info h4 {
  font-family: var(--font-title);
  color: var(--primary-text);
  margin-bottom: 5px;
  font-size: 1rem;
}

.famous-info p {
  font-size: 0.8rem;
  color: var(--secondary-gray);
  line-height: 1.4;
}

/* 祠堂礼制交互 */
.shrine-map {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.6s ease;
}

.shrine-map:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
}

/* 祠堂热点 */
.shrine-hotspot {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--primary-redwood);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.18);
  z-index: 10;
}

/* 热点标签 */
.hotspot-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(51, 51, 51, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-family: var(--font-title);
  white-space: nowrap;
  z-index: 11;
  backdrop-filter: blur(4px);
}

.shrine-hotspot::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--secondary-yellow);
  opacity: 0.6;
}

/* 礼制对比 */
.ritual-comparison {
  margin-top: 20px;
}

.comparison-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comparison-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-redwood);
  cursor: pointer;
}

.comparison-toggle label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comparison-toggle label:hover {
  color: var(--secondary-blue);
  transform: translateX(5px);
}

.comparison-content {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-redwood);
  transition: all 0.3s ease;
}

.comparison-content.visible {
  display: block;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.comparison-item {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-ink);
}

.comparison-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comparison-item h5 {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.comparison-item p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--primary-text);
}

/* 祠堂空间光晕效果 */
.shrine-hotspot::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 177, 106, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.shrine-hotspot:hover::before {
  opacity: 1;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* 古法卷轴 */
.scroll-container {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 40px auto;
  max-width: 1000px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 0 30px;
  box-sizing: border-box;
  justify-content: center;
}

.scroll-btn {
  display: block;
  margin: 0 auto 20px;
  padding: 10px 30px;
  background: var(--primary-redwood);
  color: #fffbf0;
  border: 1px solid var(--border-ink);
  border-radius: 25px;
  font-family: var(--font-title);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.scroll-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74, 111, 140, 0.4);
}

.scroll-pole {
  width: 32px;
  height: clamp(480px, calc(88vh - 120px), 680px);
  background: linear-gradient(90deg, #6B3410 0%, #8B4513 50%, #6B3410 100%);
  border-radius: 8px;
  z-index: 2;
  box-shadow: 0 0 15px rgba(0,0,0,0.2), inset 0 0 10px rgba(0,0,0,0.3);
  transition: transform 4s ease-in-out;
  position: relative;
  overflow: hidden;
}

.scroll-pole::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(255,255,255,0.1) 19px, rgba(255,255,255,0.1) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 9px, rgba(0,0,0,0.1) 9px, rgba(0,0,0,0.1) 10px);
  pointer-events: none;
}

.scroll-pole::after {
  content: '';
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 10px;
  right: 10px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 4px;
  pointer-events: none;
}

.pole-left {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.pole-right {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.scroll-pole .pole-cap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(180deg, #D4AF37 0%, #B8860B 50%, #D4AF37 100%);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-pole .pole-cap::before {
  content: '';
  width: 15px;
  height: 15px;
  background: radial-gradient(circle, #FFD700 0%, #D4AF37 100%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.scroll-pole .pole-base {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(180deg, #B8860B 0%, #D4AF37 50%, #B8860B 100%);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: inset 0 -2px 5px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-pole .pole-base::before {
  content: '';
  width: 15px;
  height: 15px;
  background: radial-gradient(circle, #FFD700 0%, #D4AF37 100%);
  border-radius: 50%;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.3);
}

.pole-left .pole-cap {
  border-top-right-radius: 0;
}

.pole-left .pole-base {
  border-bottom-right-radius: 0;
}

.pole-right .pole-cap {
  border-top-left-radius: 0;
}

.pole-right .pole-base {
  border-bottom-left-radius: 0;
}

.scroll-paper {
  width: 0;
  height: clamp(480px, calc(88vh - 120px), 680px);
  background-color: #F5F0DC;
  margin: 0 -2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  transition: width 4s ease-in-out;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.05) 29px, rgba(212, 177, 106, 0.05) 30px),
    repeating-linear-gradient(90deg, transparent, transparent 29px, rgba(212, 177, 106, 0.03) 29px, rgba(212, 177, 106, 0.03) 30px),
    linear-gradient(90deg, rgba(212, 177, 106, 0.05) 0%, transparent 10%, transparent 90%, rgba(212, 177, 106, 0.05) 100%);
  background-size: 100% 100%;
  background-position: 0 0;
  transition: width 4s ease-in-out, background-position 4s ease-in-out;
}

.scroll-paper.expanded {
  width: 800px;
  background-position: 100% 0;
}

.scroll-pole.rotated-left {
  transform: rotate(-5deg);
}

.scroll-pole.rotated-right {
  transform: rotate(5deg);
}

.scroll-seal {
  position: absolute;
  top: 20px;
  right: 40px;
  width: 80px;
  height: 80px;
  border: 2px solid var(--primary-redwood);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  transform: rotate(15deg);
  opacity: 0;
  z-index: 10;
  transition: opacity 0.5s ease 3s, transform 0.5s ease 3s;
}

.scroll-paper.expanded .scroll-seal {
  opacity: 0.8;
  transform: rotate(15deg) scale(1);
}

.scroll-content-inner {
  column-count: 3;
  column-rule: 1px solid rgba(212, 177, 106, 0.15);
  font-family: var(--font-note);
  line-height: 1.6;
  text-align: justify;
  color: var(--primary-text);
  position: relative;
  z-index: 1;
  letter-spacing: 0.03em;
  padding: 18px 22px 10px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 1s ease 2s, transform 1s ease 2s;
}

.scroll-paper.expanded .scroll-content-inner {
  opacity: 1;
  transform: translateX(0);
}

.scroll-column {
  break-inside: avoid;
  margin-bottom: 20px;
}

.rule-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.1em;
}

.scroll-content-inner p {
  margin-bottom: 12px;
  text-indent: 2em;
  font-size: 0.85rem;
  line-height: 1.6;
}

.scroll-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease 3.5s, transform 1s ease 3.5s;
}

.scroll-paper.expanded .scroll-footer {
  opacity: 1;
  transform: translateY(0);
}

.scroll-footer-line {
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary-redwood), transparent);
  margin: 0 auto 10px;
}

.scroll-footer-text {
  font-family: var(--font-title);
  color: var(--secondary-gray);
  font-size: 0.9rem;
}

/* 增强模块交互动画 */
.clan-module:hover {
  transform: translateY(-15px) scale(1.03) rotateY(3deg);
  box-shadow: 0 30px 60px rgba(139, 69, 19, 0.25);
  border-color: var(--primary-redwood);
  animation: moduleHover 0.4s ease-in-out;
}

@keyframes moduleHover {
  0% {
    transform: translateY(0) scale(1) rotateY(0);
  }
  50% {
    transform: translateY(-10px) scale(1.02) rotateY(2deg);
  }
  100% {
    transform: translateY(-15px) scale(1.03) rotateY(3deg);
  }
}

/* 模块标题动画 */
.module-title {
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
}

.module-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--primary-redwood);
  transition: width 0.5s ease;
}

.clan-module:hover .module-title {
  color: var(--secondary-blue);
  transform: translateY(-5px);
}

.clan-module:hover .module-title::after {
  width: 100%;
  background: var(--secondary-blue);
}

/* 图片悬停动画增强 */
.zongzu-img img,
.zongzu-img-group img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.zongzu-img img::before,
.zongzu-img-group img::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.zongzu-img img:hover,
.zongzu-img-group img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
  border-color: var(--primary-redwood);
}

.zongzu-img img:hover::before,
.zongzu-img-group img:hover::before {
  left: 100%;
}

/* 导航点动画 */
.nav-dot {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(139, 69, 19, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.nav-dot:hover::before {
  width: 30px;
  height: 30px;
}

.nav-dot:hover {
  background: var(--primary-redwood);
  transform: scale(1.5);
  box-shadow: 0 0 15px rgba(139, 69, 19, 0.5);
}

.nav-dot.active {
  background: var(--primary-redwood);
  border-color: var(--primary-redwood);
  transform: scale(1.5);
  box-shadow: 0 0 20px rgba(139, 69, 19, 0.6);
  animation: navDotPulse 2s ease-in-out infinite;
}

@keyframes navDotPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(139, 69, 19, 0.8);
  }
}

/* 按钮动画 */
.nav-btn {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.nav-btn:hover::before {
  width: 300px;
  height: 300px;
}

.nav-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(74, 111, 140, 0.4);
  animation: btnFloat 3s ease-in-out infinite;
}

@keyframes btnFloat {
  0%, 100% {
    transform: translateY(-3px) scale(1.05);
  }
  50% {
    transform: translateY(-6px) scale(1.05);
  }
}

/* 滚动进度条动画 */
.horizontal-scroll-progress {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(to right, var(--primary-redwood), var(--secondary-blue));
  animation: progressFlow 2s linear infinite;
}

@keyframes progressFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* 风水热点动画增强 */
.map-spot {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.map-spot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary-redwood);
  animation: pulse 2s ease-in-out infinite;
}

.map-spot:hover {
  transform: scale(2);
  background: var(--secondary-blue);
  box-shadow: 0 0 20px rgba(74, 111, 140, 0.5);
}

.map-spot:hover::after {
  border-color: var(--secondary-blue);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
}

/* 案例项目动画增强 */
.case-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.case-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.case-item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  animation: caseFloat 3s ease-in-out infinite;
}

.case-item:hover::before {
  left: 100%;
}

@keyframes caseFloat {
  0%, 100% {
    transform: translateY(-10px) scale(1.05);
  }
  50% {
    transform: translateY(-15px) scale(1.05);
  }
}

/* 综合文化模块样式 */
.composite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.composite-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.composite-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(212, 177, 106, 0.1), transparent);
  transition: left 0.6s ease;
}

.composite-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

.composite-item:hover::before {
  left: 100%;
}

/* 符号容器样式 */
.symbols-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}

.symbol-item {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.symbol-item:hover {
  transform: translateY(-5px);
}

.symbol-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.symbol-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.symbol-item:hover .symbol-image {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
}

.golden-stroke {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--secondary-yellow);
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.symbol-item:hover .golden-stroke {
  opacity: 1;
  animation: goldenGlow 2s ease-in-out infinite;
}

@keyframes goldenGlow {
  0%, 100% {
    box-shadow: 0 0 10px var(--secondary-yellow);
  }
  50% {
    box-shadow: 0 0 20px var(--secondary-yellow), 0 0 30px var(--secondary-yellow);
  }
}

.symbol-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  margin-top: 10px;
}

/* 商人滑块样式 */
.merchant-slider-input {
  width: 100%;
  height: 6px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 10px 0;
}

.merchant-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-redwood);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
}

.merchant-slider-input::-webkit-slider-thumb:hover {
  background: var(--secondary-blue);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label {
  font-size: 0.9rem;
  color: var(--primary-text);
  font-family: var(--font-note);
}

.slider-value {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--primary-redwood);
  font-family: var(--font-note);
}

/* 时空联动时间轴 */

/* 综合文化模块样式 */
.composite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.composite-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.composite-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(212, 177, 106, 0.1), transparent);
  transition: left 0.6s ease;
}

.composite-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

.composite-item:hover::before {
  left: 100%;
}

/* 符号容器样式 */
.symbols-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}

.symbol-item {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.symbol-item:hover {
  transform: translateY(-5px);
}

.symbol-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.symbol-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.symbol-item:hover .symbol-image {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
}

.golden-stroke {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--secondary-yellow);
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.symbol-item:hover .golden-stroke {
  opacity: 1;
  animation: goldenGlow 2s ease-in-out infinite;
}

@keyframes goldenGlow {
  0%, 100% {
    box-shadow: 0 0 10px var(--secondary-yellow);
  }
  50% {
    box-shadow: 0 0 20px var(--secondary-yellow), 0 0 30px var(--secondary-yellow);
  }
}

.symbol-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  margin-top: 10px;
}

/* 商人滑块样式 */
.merchant-slider-input {
  width: 100%;
  height: 6px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 10px 0;
}

.merchant-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-redwood);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
}

.merchant-slider-input::-webkit-slider-thumb:hover {
  background: var(--secondary-blue);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label {
  font-size: 0.9rem;
  color: var(--primary-text);
  font-family: var(--font-note);
}

.slider-value {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--primary-redwood);
  font-family: var(--font-note);
}

/* 图表盒子样式 */
.chart-box {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-inner);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.chart-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1rem;
  margin-bottom: 15px;
  text-align: center;
  letter-spacing: 1px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .composite-grid {
    grid-template-columns: 1fr;
  }
  
  .composite-item {
    padding: 15px;
  }
  
  .symbol-image {
    width: 100px;
    height: 100px;
  }
  
  .chart-box {
    height: 180px;
  }
}

/* 时空联动时间轴 */
.timeline-container {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-redwood);
}

.timeline-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.timeline-scroll {
  overflow-x: auto;
  padding: 20px 0;
  margin-bottom: 20px;
}

.timeline-track {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 600px;
  padding: 0 20px;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary-redwood), var(--secondary-yellow), var(--primary-redwood));
  transform: translateY(-50%);
  z-index: 0;
}

.timeline-point {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
}

.timeline-point:hover {
  transform: translateY(-10px);
}

.point-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-redwood);
  border: 3px solid white;
  box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.timeline-point:hover .point-circle {
  transform: scale(1.3);
  background: var(--secondary-blue);
  box-shadow: 0 0 0 6px rgba(74, 111, 140, 0.3);
}

.timeline-point.active .point-circle {
  transform: scale(1.5);
  background: var(--secondary-yellow);
  box-shadow: 0 0 0 8px rgba(212, 177, 106, 0.4);
}

.point-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  margin-top: 10px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.timeline-point:hover .point-label {
  color: var(--secondary-blue);
  transform: translateY(-3px);
}

.point-period {
  font-size: 0.8rem;
  color: var(--secondary-gray);
  margin-top: 5px;
  transition: all 0.3s ease;
}

.timeline-point:hover .point-period {
  color: var(--primary-redwood);
}

.timeline-point-v {
  transition: background 0.25s, box-shadow 0.25s;
}
.timeline-point-v:hover {
  background: rgba(139,69,19,0.08) !important;
  box-shadow: inset 3px 0 0 rgba(139,69,19,0.35);
}
.timeline-point-v.active {
  background: rgba(192,57,43,0.13) !important;
  box-shadow: inset 3px 0 0 var(--primary-redwood);
}

/* Override inline styles on active dot circle and label */
.timeline-point-v.active > div:first-child {
  background: var(--primary-redwood) !important;
  animation: timelineDotPulse 1.8s ease-in-out infinite !important;
}
.timeline-point-v.active > div:last-child > div:first-child {
  color: var(--primary-redwood) !important;
  font-weight: bold !important;
}
@keyframes timelineDotPulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(255,251,242,0.9), 0 0 0 5px rgba(192,57,43,0.22); }
  50%      { box-shadow: 0 0 0 2px rgba(255,251,242,0.9), 0 0 0 10px rgba(192,57,43,0.0); }
}

.timeline-info {
  background: white;
  padding: 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-ink);
  transition: all 0.3s ease;
  margin-top: 20px;
}

.timeline-info h5 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-align: center;
}

.timeline-info p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary-text);
  text-align: center;
}

/* 流觞曲水谱系树 */
.genealogy-tree-container {
  margin-bottom: 30px;
}

.tree-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.tree-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#genealogyTree {
  width: 100%;
  height: 450px;
  min-height: 400px;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: block;
  visibility: visible;
  opacity: 1;
}

#genealogyTree::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.05) 29px, rgba(212, 177, 106, 0.05) 30px);
  pointer-events: none;
  animation: inkFlow 20s ease-in-out infinite;
}

.tree-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.tree-btn {
  padding: 8px 16px;
  background: var(--primary-redwood);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.tree-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

/* 家族名人堂 */
.family-hall-of-fame {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--secondary-blue);
}

.hall-of-fame-title {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.hall-of-fame-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.hall-of-fame-card {
  background: white;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 15px;
}

.hall-of-fame-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

.card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 20px;
  border: 3px solid var(--secondary-blue);
  transition: all 0.3s ease;
}

.hall-of-fame-card:hover .card-avatar {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary-redwood);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.hall-of-fame-card:hover .card-avatar img {
  transform: scale(1.2);
}

.card-info {
  flex: 1;
  transition: all 0.3s ease;
}

.hall-of-fame-card:hover .card-info {
  transform: translateX(10px);
}

.card-info h5 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.card-period {
  font-size: 0.8rem;
  color: var(--secondary-gray);
  margin-bottom: 10px;
  font-family: var(--font-note);
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--primary-text);
}

/* 宗族文化传承 */
.cultural-inheritance {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--secondary-yellow);
}

.inheritance-title {
  font-family: var(--font-title);
  color: var(--secondary-yellow);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.inheritance-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.inheritance-item {
  background: white;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.inheritance-item:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.2);
  border-color: var(--secondary-yellow);
}

.inheritance-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--secondary-yellow);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.inheritance-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.inheritance-item:hover .inheritance-icon {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary-redwood);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.3);
}

.inheritance-item:hover .inheritance-icon img {
  transform: scale(1.2);
}

.inheritance-item h5 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.inheritance-item:hover h5 {
  color: var(--secondary-blue);
  transform: translateY(-3px);
}

.inheritance-item p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--primary-text);
  transition: all 0.3s ease;
}

.inheritance-item:hover p {
  transform: translateY(-3px);
}

/* 名人详情弹窗 */
.person-modal, .inheritance-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background-color: rgba(20, 15, 10, 0.72);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.person-modal .modal-content, .inheritance-modal .modal-content {
  background: linear-gradient(160deg, #fdf8f2, #f5ede0);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(139,69,19,0.25);
  border-radius: 14px;
  width: 90%;
  max-width: 700px;
  max-height: 82vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
}

.person-modal .close-modal, .inheritance-modal .close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-redwood);
  cursor: pointer;
  transition: all 0.3s ease;
}

.person-modal .close-modal:hover, .inheritance-modal .close-modal:hover {
  color: var(--secondary-blue);
  transform: rotate(90deg);
}

.person-modal .modal-header h3, .inheritance-modal .modal-header h3 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.person-modal .modal-body, .inheritance-modal .modal-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.person-modal .modal-image, .inheritance-modal .modal-image {
  flex: 0 0 150px;
}

.person-modal .modal-image img, .inheritance-modal .modal-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 3px solid var(--secondary-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.person-modal .modal-text, .inheritance-modal .modal-text {
  flex: 1;
}

.person-modal .modal-text p, .inheritance-modal .modal-text p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary-text);
  text-align: justify;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeline-track {
    min-width: 400px;
  }
  
  .timeline-point {
    margin: 0 30px;
  }
  
  .hall-of-fame-container {
    grid-template-columns: 1fr;
  }
  
  .inheritance-container {
    grid-template-columns: 1fr;
  }
  
  .person-modal .modal-body {
    flex-direction: column;
    align-items: center;
  }
  
  .person-modal .modal-image {
    flex: 0 0 200px;
  }
  
  .person-modal .modal-image img {
    height: 200px;
  }
  
  #genealogyTree {
    height: 400px;
  }
}

/* 流觞曲水动画 */
@keyframes flowAnimation {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.link.flowing {
  animation: flowAnimation 2s ease-in-out;
}

/* 节点生长动画 */
@keyframes nodeGrowth {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.node.growing {
  animation: nodeGrowth 1s ease-out;
}

/* 谱系树节点和连接线样式 */
.node circle { 
  fill: var(--primary-redwood);
  stroke: var(--primary-bg);
  stroke-width: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.node:hover circle {
  fill: var(--secondary-yellow);
  stroke: var(--primary-redwood);
  stroke-width: 3px;
  transform: scale(1.2);
}

.node text { 
  font: 12px 'Noto Serif SC';
  fill: var(--primary-text);
  transition: all 0.3s ease;
}

.node:hover text {
  fill: var(--primary-redwood);
  font-weight: bold;
  font-size: 14px;
}

.link { 
  fill: none; 
  stroke: var(--secondary-gray); 
  stroke-width: 1.5px;
  transition: all 0.3s ease;
}

.link:hover {
  stroke: var(--primary-redwood);
  stroke-width: 2px;
}

/* 工具提示样式 */
.tooltip {
  position: absolute;
  background: rgba(26, 20, 16, 0.9);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  max-width: 300px;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(26, 20, 16, 0.9);
}

/* 家族故事展示 */
.family-stories {
  margin-bottom: 30px;
}

.stories-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.stories-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.story-card {
  background: white;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-inner);
  transition: all 0.3s ease;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

.story-image {
  height: 200px;
  overflow: hidden;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.story-card:hover .story-image img {
  transform: scale(1.1);
}

.story-content {
  padding: 20px;
}

.story-content h5 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.story-content p {
  font-size: 0.9rem;
  color: var(--primary-text);
  line-height: 1.6;
  margin-bottom: 15px;
}

.story-detail-btn {
  padding: 8px 16px;
  background: var(--primary-redwood);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.story-detail-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

/* 家族记忆上传 */
.family-memories {
  margin-bottom: 30px;
}

.memories-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.memories-upload {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

.upload-area {
  background: rgba(245, 240, 232, 0.6);
  border: 2px dashed var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--primary-redwood);
  background: rgba(245, 240, 232, 0.8);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(139, 69, 19, 0.1);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--secondary-gray);
  transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
  color: var(--primary-redwood);
  transform: scale(1.2) rotate(15deg);
}

.upload-area p {
  font-family: var(--font-note);
  color: var(--primary-text);
  margin-bottom: 20px;
  font-size: 1rem;
}

.upload-input {
  display: none;
}

.upload-btn {
  padding: 10px 20px;
  background: var(--primary-redwood);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.upload-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

.memories-gallery {
  background: white;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-inner);
}

.memories-gallery h5 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
  letter-spacing: 1px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 20px rgba(139, 69, 19, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px;
  font-size: 0.8rem;
  text-align: center;
  font-family: var(--font-note);
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  background: rgba(139, 69, 19, 0.9);
  transform: translateY(0);
}

/* 家族故事弹窗 */
.story-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: var(--radius-sm);
  padding: 30px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--primary-text);
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: var(--primary-redwood);
  transform: rotate(90deg);
}

.modal-header h3 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 2px;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

.modal-image {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.modal-text {
  font-family: var(--font-note);
  color: var(--primary-text);
  line-height: 1.8;
  font-size: 1rem;
}

.modal-text p {
  margin-bottom: 15px;
  text-indent: 2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .memories-upload {
    grid-template-columns: 1fr;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
  }
  
  .stories-container {
    grid-template-columns: 1fr;
  }
  
  .genealogy-search {
    flex-direction: column;
  }
  
  #genealogyTree {
    height: 400px;
  }
}

/* 图表容器动画增强 */
.chart-box {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.chart-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.chart-box:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  animation: chartFloat 3s ease-in-out infinite;
}

.chart-box:hover::before {
  left: 100%;
}

@keyframes chartFloat {
  0%, 100% {
    transform: translateY(-10px) rotateX(5deg);
  }
  50% {
    transform: translateY(-15px) rotateX(8deg);
  }
}

/* 宗族聚居与建筑布局模块 - 徽派水墨长卷 */

/* 长卷说明区 */
.scroll-intro {
  text-align: center;
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-redwood);
}

.scroll-intro-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary-text);
  font-family: var(--font-note);
  letter-spacing: 1px;
}

/* 核心交互长卷区 */
.zongzu-scroll-container {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

/* 图片展示区域 */
.scroll-image-display {
  width: 100%;
  height: 600px;
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  box-shadow: var(--shadow-inner);
}

.display-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.5s ease;
}

.display-image:hover {
  transform: scale(1.02);
}

/* 门簪造型聚焦按钮 */
.scroll-controls {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.scroll-btn {
  position: relative;
  padding: 12px 24px;
  background: #E0D8C0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-note);
  font-size: 1rem;
  color: var(--primary-text);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.scroll-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(45deg, transparent 45%, var(--primary-redwood) 45%, var(--primary-redwood) 55%, transparent 55%);
}

.scroll-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.2);
  background: var(--primary-redwood);
  color: white;
}

.scroll-btn:active {
  transform: translateY(1px);
}

.scroll-btn.active {
  background: var(--primary-redwood);
  color: white;
  border: 2px solid var(--secondary-yellow);
  box-shadow: 0 0 15px rgba(212, 177, 106, 0.5);
}

/* 水墨长卷 */
.scroll-wrapper {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  box-shadow: var(--shadow-inner);
}

.scroll-content {
  position: relative;
  width: 100%;
  height: 600px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

.scroll-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: inkReveal 1.5s ease forwards;
}

@keyframes inkReveal {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 长卷聚焦区域 */
.scroll-areas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.scroll-area {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: var(--radius-sm);
}

.scroll-area--main-hall {
  top: 30%;
  left: 40%;
  width: 20%;
  height: 40%;
}

.scroll-area--branch-hall {
  top: 20%;
  left: 20%;
  width: 15%;
  height: 30%;
}

.scroll-area--residence {
  top: 50%;
  left: 15%;
  width: 25%;
  height: 40%;
}

.scroll-area--water-system {
  top: 40%;
  left: 65%;
  width: 25%;
  height: 30%;
}

.scroll-area--water-entrance {
  top: 60%;
  left: 70%;
  width: 15%;
  height: 25%;
}

.scroll-area:hover {
  background: rgba(212, 177, 106, 0.2);
}

/* 聚焦高亮效果 */
.scroll-area.highlighted {
  animation: areaHighlight 0.5s ease forwards;
}

@keyframes areaHighlight {
  0% {
    transform: scale(1);
    box-shadow: none;
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(212, 177, 106, 0.5);
    border: 2px solid var(--secondary-yellow);
  }
}

/* 标注线（全局回顾时显示） */
.scroll-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.scroll-markers.visible {
  opacity: 1;
}

.marker {
  position: absolute;
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 0.9rem;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marker::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 1px;
  background: var(--primary-redwood);
}

.marker--main-hall {
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
}

.marker--branch-hall {
  top: 10%;
  left: 25%;
}

.marker--residence {
  top: 80%;
  left: 20%;
}

.marker--water-system {
  top: 30%;
  right: 20%;
}

.marker--water-entrance {
  top: 70%;
  right: 15%;
}

.marker--mountain {
  top: 5%;
  right: 5%;
}

/* 解读弹窗 */
.scroll-popup {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 320px;
  max-width: 90%;
  background: #fffbf0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: var(--spacing-md);
  opacity: 0;
  transform: translateY(-50%) translateX(50px);
  transition: all 0.5s ease;
  pointer-events: none;
  z-index: 100;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.03) 29px, rgba(212, 177, 106, 0.03) 30px);
}

.scroll-popup.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--border-ink);
}

.popup-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin: 0;
}

.popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.popup-close:hover {
  color: var(--primary-redwood);
  transform: scale(1.2);
}

.popup-content {
  position: relative;
}

.popup-text-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.popup-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--primary-text);
  font-family: var(--font-body);
  margin: 0;
}

.popup-seal-container {
  margin-top: var(--spacing-sm);
  align-self: flex-end;
}

.popup-seal {
  display: inline-block;
  width: 60px;
  height: 60px;
  border: 2px solid var(--primary-redwood);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 0.9rem;
  transform: rotate(15deg);
  opacity: 0.8;
}

/* 格局解读总结区 */
.scroll-summary {
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  padding: var(--spacing-md);
  border-left: 3px solid var(--secondary-blue);
}

.summary-title {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
  text-align: center;
  letter-spacing: 2px;
}

.summary-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--primary-text);
  text-align: center;
  font-family: var(--font-note);
  letter-spacing: 1px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .scroll-content {
    height: 300px;
  }
  
  .scroll-controls {
    gap: var(--spacing-sm);
  }
  
  .scroll-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .scroll-popup {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
    transform: none;
    width: auto;
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .scroll-popup.visible {
    transform: none;
  }
  
  .scroll-area--main-hall {
    top: 25%;
    left: 35%;
    width: 30%;
    height: 50%;
  }
  
  .scroll-area--branch-hall {
    top: 15%;
    left: 15%;
    width: 20%;
    height: 35%;
  }
  
  .scroll-area--residence {
    top: 50%;
    left: 10%;
    width: 30%;
    height: 45%;
  }
  
  .scroll-area--water-system {
    top: 35%;
    left: 60%;
    width: 35%;
    height: 35%;
  }
  
  .scroll-area--water-entrance {
    top: 60%;
    left: 65%;
    width: 20%;
    height: 30%;
  }
}

/* 水纹动效 */
.scroll-area--water-system::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(74, 111, 140, 0.1) 0%, transparent 70%);
  animation: waterFlow 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes waterFlow {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10%);
  }
}

/* 全局回顾按钮特殊样式 */
.scroll-btn--overview {
  background: #F8F5F0;
  border: 2px solid var(--primary-redwood);
  font-family: var(--font-title);
  letter-spacing: 2px;
}

.scroll-btn--overview:hover {
  background: var(--primary-text);
  color: white;
  border-color: var(--primary-text);
}

.scroll-btn--overview.active {
  background: var(--primary-text);
  color: white;
  border-color: var(--secondary-yellow);
}

/* 血脉延绵模块 - 动态叙事设计 */

/* 模块描述 */
.module-desc {
  text-align: center;
  margin-bottom: var(--spacing-md);
  font-family: var(--font-note);
  color: var(--secondary-gray);
  font-size: 1rem;
  line-height: 1.6;
}

/* 搜索与筛选 */
.genealogy-search {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  background: #fffbf0;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-redwood);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.search-btn {
  padding: 12px 24px;
  background: var(--primary-redwood);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-note);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.3);
}

/* 血脉流核心视觉 */
.bloodline-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
  box-shadow: var(--shadow-inner);
  overflow: hidden;
}

.bloodline-canvas {
  width: 100%;
  height: 100%;
  position: relative;
}

.bloodline-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: var(--spacing-sm);
  z-index: 10;
}

.control-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-note);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.control-btn:hover {
  background: var(--primary-redwood);
  color: white;
  transform: translateY(-2px);
}

/* 血脉故事弹窗 */
.bloodline-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90%;
  max-height: 80vh;
  background: #fffbf0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  padding: var(--spacing-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s ease;
  z-index: 1000;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.03) 29px, rgba(212, 177, 106, 0.03) 30px);
  overflow-y: auto;
}

.bloodline-popup.visible {
  opacity: 1;
  pointer-events: auto;
}

.bloodline-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--border-ink);
}

.bloodline-popup .popup-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin: 0;
}

.bloodline-popup .popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.bloodline-popup .popup-close:hover {
  color: var(--primary-redwood);
  transform: scale(1.2);
}

.story-image {
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.story-image img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.story-text {
  margin-bottom: var(--spacing-md);
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--primary-text);
}

.story-audio {
  margin-top: var(--spacing-md);
  text-align: center;
}

/* 核心模块样式 */
.section-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
  letter-spacing: 2px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--primary-redwood);
}

/* 血脉主线 */
.bloodline-main {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-redwood);
}

.main-line-item {
  text-align: center;
}

.line-title {
  font-family: var(--font-title);
  color: var(--primary-text);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
}

.line-desc {
  font-family: var(--font-note);
  color: var(--secondary-gray);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.line-keywords {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.keyword {
  padding: 6px 16px;
  background: var(--primary-redwood);
  color: white;
  border-radius: 20px;
  font-family: var(--font-note);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.keyword:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.3);
}

/* 分支故事 */
.bloodline-branches {
  margin-bottom: var(--spacing-lg);
}

.branches-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.branch-item {
  background: white;
  padding: var(--spacing-md);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inner);
  transition: all 0.3s ease;
  cursor: pointer;
}

.branch-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(139, 69, 19, 0.2);
  border-color: var(--primary-redwood);
}

.branch-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
}

.branch-desc {
  font-family: var(--font-note);
  color: var(--secondary-gray);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.branch-media {
  text-align: center;
}

.branch-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.branch-item:hover .branch-image {
  transform: scale(1.05);
}

/* 当代延续 */
.bloodline-modern {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--secondary-blue);
}

.modern-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.modern-item {
  text-align: center;
}

.modern-title {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
}

.modern-desc {
  font-family: var(--font-note);
  color: var(--secondary-gray);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.upload-btn {
  padding: 10px 20px;
  background: var(--secondary-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-note);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-btn:hover {
  background: var(--primary-redwood);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.upload-input {
  display: none;
}

.modern-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  text-align: center;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-image {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-caption {
  margin-top: var(--spacing-xs);
  font-family: var(--font-note);
  color: var(--secondary-gray);
  font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .genealogy-search {
    flex-direction: column;
  }
  
  .bloodline-container {
    height: 300px;
  }
  
  .branches-container {
    grid-template-columns: 1fr;
  }
  
  .modern-container {
    grid-template-columns: 1fr;
  }
  
  .bloodline-popup {
    width: 95%;
    padding: var(--spacing-md);
  }
}

/* 血脉流动画效果 */
@keyframes bloodFlow {
  0% {
    stroke-dashoffset: 1000;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.bloodline-path {
  stroke-dasharray: 1000;
  animation: bloodFlow 10s linear infinite;
}

/* 祠堂礼制模块动画 */
#shrine .shrine-map {
  transition: all 0.6s ease;
}

#shrine:hover .shrine-map {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
}

/* 第一视角漫游模态框 */
.first-person-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.first-person-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, rgba(254, 250, 240, 0.95) 0%, rgba(248, 240, 220, 0.95) 55%, rgba(242, 232, 204, 0.95) 100%);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.first-person-modal .modal-content {
  background: #fffbf0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 45px rgba(139, 69, 19, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
  will-change: transform, opacity;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.first-person-modal .close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary-redwood);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.first-person-modal .close-modal:hover {
  color: var(--secondary-blue);
  transform: rotate(90deg) scale(1.2);
}

.first-person-modal .modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-ink);
  text-align: center;
  background: linear-gradient(to right, rgba(139, 69, 19, 0.1), rgba(74, 111, 140, 0.1));
}

.first-person-modal .modal-header h3 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: 2px;
}

.first-person-modal .modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.first-person-modal .view-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.first-person-modal .view-image {
  width: 100%;
  height: 65vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
  transition: transform 0.2s ease;
  margin-bottom: 20px;
  max-width: 100%;
}

.first-person-modal .view-image:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 40px rgba(139, 69, 19, 0.4);
}

.first-person-modal .view-info {
  background: rgba(139, 69, 19, 0.9);
  color: white;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-note);
  font-size: 1rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-out;
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.first-person-modal .navigation-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: 10px;
}

.first-person-modal .nav-btn {
  background: var(--primary-redwood);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.first-person-modal .nav-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 111, 140, 0.4);
}

.first-person-modal .nav-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

/* 修复页面闪烁问题 */
.clan-module {
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* 减少重绘和回流 */
.layer-container, .village-element, .node, .link {
  will-change: transform, opacity;
}

/* 禁用不必要的动画以减少闪烁 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 宗族文化符号模块 */
.symbols-container {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
  gap: 20px;
}

.symbol-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.symbol-item:hover {
  transform: translateY(-10px);
}

.symbol-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inner);
  transition: all 0.3s ease;
}

.symbol-wrapper:hover {
  box-shadow: 0 10px 30px rgba(212, 177, 106, 0.3);
  border-color: var(--secondary-yellow);
}

.symbol-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.symbol-wrapper:hover .symbol-image {
  transform: scale(1.05);
}

/* 鎏金描边效果 */
.golden-stroke {
  position: absolute;
  top: 0;
  left: 0;
}

.symbol-wrapper:hover .golden-stroke {
  opacity: 1;
  animation: goldenGlow 1s ease-in-out infinite;
}

@keyframes goldenGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(212, 177, 106, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(212, 177, 106, 0.8);
  }
}

.symbol-label {
  margin-top: 15px;
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.symbol-item:hover .symbol-label {
  color: var(--secondary-yellow);
  transform: translateY(-3px);
}

/* 虚拟正厅 */
.virtual-hall {
  margin-top: 30px;
}

.hall-canvas {
  position: relative;
  width: 100%;
  height: 300px;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
}

.hall-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* 占位符 */
.plaque-placeholder,
.couplet-placeholder {
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
  border: 2px dashed var(--primary-redwood);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.plaque-placeholder {
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 20%;
}

.couplet-placeholder.left {
  top: 30%;
  left: 10%;
  width: 15%;
  height: 50%;
}

.couplet-placeholder.right {
  top: 30%;
  right: 10%;
  width: 15%;
  height: 50%;
}

.plaque-placeholder:hover,
.couplet-placeholder:hover {
  background: rgba(212, 177, 106, 0.2);
  border-color: var(--secondary-yellow);
  transform: scale(1.05);
}

/* 拓片效果弹窗 */
.rubbing-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.rubbing-modal.visible {
  opacity: 1;
  visibility: visible;
}

.rubbing-content {
  background: #f5f0dc;
  padding: 30px;
  border-radius: var(--radius-sm);
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rubbing-image {
  width: 100%;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rubbing-info h4 {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  margin-bottom: 10px;
}

.rubbing-info p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--primary-text);
  margin-bottom: 15px;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-redwood);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: var(--secondary-blue);
  transform: scale(1.1);
}

/* 贾而好儒模块动画 */
#merchant .chart-box {
  transition: all 0.6s ease;
}

#merchant:hover .chart-box {
  transform: translateY(-10px) rotateX(8deg);
  box-shadow: 0 15px 30px rgba(139, 69, 19, 0.3);
}

/* 枕山环水模块动画 */
#fengshui .fengshui-map {
  transition: all 0.6s ease;
}

#fengshui:hover .fengshui-map {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
}

#fengshui .case-item {
  transition: all 0.4s ease;
}

#fengshui .case-item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 10px 20px rgba(139, 69, 19, 0.2);
}

/* 古风图表样式 */
.chart-box {
  height: 300px;
  position: relative;
  background: #fffbf0;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.chart-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.chart-box:hover::before {
  left: 100%;
}

.chart-title {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-ink);
  position: relative;
  z-index: 2;
}

/* 儒商平衡滑块 */
.merchant-slider {
  margin-top: 30px;
  padding: 20px;
  background: rgba(245, 240, 232, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--secondary-blue);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.slider-label {
  font-family: var(--font-title);
  color: var(--primary-redwood);
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
}

.merchant-slider-input {
  flex: 1;
  height: 8px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
}

.merchant-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary-redwood);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.merchant-slider-input::-webkit-slider-thumb:hover {
  background: var(--secondary-blue);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.4);
}

.slider-value {
  font-family: var(--font-title);
  color: var(--secondary-blue);
  font-size: 1rem;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.slider-value:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 风水布局 */
.fengshui-map {
  width: 100%;
  height: 400px;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #fefaf0 0%, #f8f0dc 55%, #f2e8cc 100%);
}

/* 滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--secondary-yellow);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* 横向滚动导航 */
.horizontal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(248, 245, 240, 0.55);
  border-bottom: 1px solid var(--border-ink);
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(10px);
}

.nav-btn {
  padding: 8px 20px;
  background: var(--primary-redwood);
  color: white;
  border: 1px solid var(--border-ink);
  border-radius: 20px;
  font-family: var(--font-title);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.nav-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.3);
}

.nav-btn:disabled {
  background: var(--secondary-gray);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.nav-indicators {
  display: flex;
  gap: 8px;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(139, 69, 19, 0.3);
  border: 2px solid var(--border-ink);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot:hover {
  background: rgba(139, 69, 19, 0.5);
  transform: scale(1.2);
}

.nav-dot.active {
  background: var(--primary-redwood);
  border-color: var(--primary-redwood);
  transform: scale(1.3);
}

/* 横向滚动进度指示器 */
.horizontal-scroll-progress {
  position: sticky;
  top: 70px;
  left: 0;
  height: 3px;
  background: var(--secondary-yellow);
  z-index: 80;
  width: 0;
  transition: width 0.2s ease;
}

/* 音效控制 */
.sound-control {
  position: fixed;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-redwood);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
}

.sound-control:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
}

/* 响应式设计 */
@media (max-width: 1199px) {
  .clan-container {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  .internal-nav {
    right: var(--spacing-xs);
  }
  
  .nav-pin {
    width: 35px;
    height: 50px;
  }
  
  .circle-btn {
    width: 50px;
    height: 50px;
  }
  
  .horizontal-nav {
    padding: 12px 16px;
  }
  
  .nav-btn {
    padding: 6px 16px;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .clan-container {
    padding: var(--spacing-md) var(--spacing-xs);
  }
  
  #circleNav {
    gap: 16px;
    overflow-x: auto;
    padding: var(--spacing-sm);
  }
  
  .internal-nav {
    position: fixed;
    bottom: var(--spacing-sm);
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    background: rgba(248, 245, 240, 0.95);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-ink);
  }
  
  .nav-pin {
    width: 40px;
    height: 40px;
  }
  
  .scroll-content {
    column-count: 1;
  }
  
  .scroll-box {
    padding: 25px;
    border-left: 8px solid #8c6b48;
    border-right: 8px solid #8c6b48;
  }
  
  .village-animation,
  #genealogyTree,
  .shrine-map,
  .fengshui-map {
    height: 300px;
  }
  
  .chart-box {
    height: 250px;
  }
  
  .horizontal-nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .nav-indicators {
    order: -1;
  }
  
  .nav-btn {
    width: 100px;
    font-size: 0.7rem;
  }
  
  .horizontal-scroll-progress {
    top: 110px;
  }
  
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .hero-right {
    padding-top: 0;
  }
}

@media (max-width: 480px) {
  .clan-container {
    padding: var(--spacing-sm) var(--spacing-xs);
  }
  
  .module-title {
    font-size: 1.2rem;
  }
  
  .circle-btn {
    width: 40px;
    height: 40px;
  }
  
  .circle-btn span {
    font-size: 0.7rem;
  }
  
  .village-animation,
  #genealogyTree,
  .shrine-map,
  .fengshui-map {
    height: 250px;
  }
  
  .chart-box {
    height: 200px;
  }
  
  .clan-module {
    padding: var(--spacing-sm);
  }
  
  .horizontal-nav {
    padding: 8px;
  }
  
  .nav-dot {
    width: 10px;
    height: 10px;
  }
  
  .nav-btn {
    width: 80px;
    font-size: 0.6rem;
    padding: 4px 12px;
  }
  
  .horizontal-scroll-progress {
    top: 95px;
  }
  
  .hero-header {
    padding: 32px 24px;
  }
  
  .hero-title-zh {
    font-size: 3rem;
  }
  
  .famous-container {
    grid-template-columns: 1fr;
  }
  
  .timeline-container {
    padding-left: 20px;
  }
  
  .timeline-dot {
    left: -15px;
  }
}

/* 页面过渡动画 */
.clan-module {
  opacity: 0;
  transform: translateY(50px) scale(0.95) rotateY(-5deg);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 1000px;
  position: relative;
  z-index: 1;
}

.clan-module.visible {
  opacity: 1;
  transform: translateY(0) scale(1) rotateY(0);
  animation: moduleEnter 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes moduleEnter {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.95) rotateY(-5deg);
  }
  50% {
    opacity: 0.8;
    transform: translateY(20px) scale(0.98) rotateY(2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateY(0);
  }
}

/* 模块内容动画 */
.clan-module .module-title {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.8s ease 0.3s;
}

.clan-module.visible .module-title {
  opacity: 1;
  transform: translateY(0);
  animation: fadeSlideDown 0.8s ease 0.3s forwards;
}

.clan-module p {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.5s;
}

.clan-module.visible p {
  opacity: 1;
  transform: translateY(0);
  animation: fadeSlideUp 0.8s ease 0.5s forwards;
}

.clan-module img {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.8s ease 0.7s;
}

.clan-module.visible img {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: scaleIn 0.8s ease 0.7s forwards;
}

/* 动画关键帧 */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 模块悬停时的浮动效果 */
.clan-module:hover {
  animation: floatY 3s ease-in-out infinite;
}

/* 为不同模块添加不同的动画延迟 */
.clan-module:nth-child(1) {
  transition-delay: 0.1s;
}

.clan-module:nth-child(2) {
  transition-delay: 0.2s;
}

.clan-module:nth-child(3) {
  transition-delay: 0.3s;
}

.clan-module:nth-child(4) {
  transition-delay: 0.4s;
}

.clan-module:nth-child(5) {
  transition-delay: 0.5s;
}

.clan-module:nth-child(6) {
  transition-delay: 0.6s;
}

.clan-module:nth-child(7) {
  transition-delay: 0.7s;
}

/* 图片悬停效果 */
.zongzu-img img,
.zongzu-img-group img {
  transition: all 0.3s ease;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.zongzu-img img::before,
.zongzu-img-group img::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.zongzu-img img:hover,
.zongzu-img-group img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
  border-color: var(--primary-redwood);
}

.zongzu-img img:hover::before,
.zongzu-img-group img:hover::before {
  left: 100%;
}

/* 图片进入动画 */
.zongzu-img img.img-visible,
.zongzu-img-group img.img-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: imgEnter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes imgEnter {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.95) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 卷轴内容动画 */
.scroll-content {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-content.scroll-visible {
  opacity: 1;
  transform: translateY(0);
  animation: scrollEnter 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scrollEnter {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 风水热点动画 */
.map-spot {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-spot.spot-visible {
  opacity: 1;
  transform: scale(1);
  animation: spotEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spotEnter {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 图表容器动画 */
.chart-box {
  opacity: 0;
  transform: translateY(20px) rotateX(-10deg);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  perspective: 1000px;
}

.chart-box.chart-visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  animation: chartEnter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes chartEnter {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateX(-10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* 案例项目动画 */
.case-item {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-item.case-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: caseEnter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes caseEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(212, 177, 106, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 69, 19, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 69, 19, 0.5);
}

/* 水墨晕染效果 */
.ink-blur {
  position: relative;
}

.ink-blur::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle, rgba(139, 69, 19, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* 古风按钮 */
.antique-btn {
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--primary-redwood);
  color: white;
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.antique-btn:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 111, 140, 0.3);
}

.antique-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.antique-btn:hover::before {
  width: 200px;
  height: 200px;
}

/* 古风信笺 */
.antique-note {
  background: #fffbf0;
  border: 1px solid var(--border-ink);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  position: relative;
  box-shadow: var(--shadow-inner);
}

.antique-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(212, 177, 106, 0.05) 29px, rgba(212, 177, 106, 0.05) 30px);
  pointer-events: none;
}

/* 古风分割线 */
.antique-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary-redwood), transparent);
  margin: var(--spacing-md) 0;
}

/* 古风标签 */
.antique-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--secondary-yellow);
  color: var(--primary-text);
  border-radius: 12px;
  font-size: 0.8rem;
  font-family: var(--font-note);
  margin-right: 8px;
  margin-bottom: 8px;
}

/* 古风提示框 */
.antique-tooltip {
  position: absolute;
  background: rgba(51, 51, 51, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.antique-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(51, 51, 51, 0.9);
}