/* ========================================
   衣脉·非遗志 - CSS样式文件
   主色调：朱砂红(#C23B22)、石青(#4A5B6E)、牙白(#F5F0E8)、金色(#C9AE5D)
   ======================================== */

/* ===== CSS变量定义 ===== */
:root {
  /* 主色调 */
  --color-primary: #C23B22;      /* 朱砂红 */
  --color-secondary: #4A5B6E;   /* 石青 */
  --color-background: #F5F0E8;  /* 牙白 */
  --color-accent: #C9AE5D;      /* 金色 */

  /* 辅助色 */
  --color-light-secondary: #6B7B8E;
  --color-light-accent: #E8D9A8;
  --color-dark-primary: #8B2E1A;
  --color-dark: #2C2C2C;
  --color-white: #FFFFFF;

  /* 字体 */
  --font-title: "Noto Serif SC", "思源宋体", "Songti SC", serif;
  --font-body: "Noto Sans SC", "思源黑体", "Heiti SC", sans-serif;
  --font-decorative: "Ma Shan Zheng", "马善政毛笔", cursive;

  /* 间距 */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 64px;

  /* 阴影 */
  --shadow-card: 0 4px 20px rgba(74, 91, 110, 0.15);
  --shadow-hover: 0 8px 32px rgba(194, 59, 34, 0.2);
  --shadow-modal: 0 16px 64px rgba(44, 44, 44, 0.3);

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* ===== 全局重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* ===== 容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===== 头部导航 ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(245, 240, 232, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(74, 91, 110, 0.1);
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.logo-text {
  font-family: var(--font-decorative);
  font-size: 32px;
  color: var(--color-primary);
  font-weight: bold;
}

.logo-sub {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-secondary);
}

.nav-list {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: block;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 16px;
  color: var(--color-secondary);
  transition: color 0.3s;
}

.nav-item:hover > a,
.nav-item.active > a {
  color: var(--color-primary);
}

/* 子导航 */
.sub-nav {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.nav-item:hover .sub-nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-nav li a {
  display: block;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 14px;
  color: var(--color-secondary);
  transition: all 0.3s;
}

.sub-nav li a:hover {
  background: var(--color-background);
  color: var(--color-primary);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: none;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-secondary);
  transition: all 0.3s;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-area,
.user-area {
  display: flex;
  align-items: center;
}

.btn-login {
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #D4563A 100%);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(194, 59, 34, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(194, 59, 34, 0.24);
}

.user-area {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(194, 59, 34, 0.12);
  box-shadow: 0 6px 20px rgba(74, 91, 110, 0.08);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.user-info:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(74, 91, 110, 0.12);
}

.user-avatar {
  display: block;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(194, 59, 34, 0.18);
}

.user-nickname {
  color: var(--color-secondary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 150px;
  padding: 8px 0;
  background: var(--color-white);
  border: 1px solid #E8DCD0;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(74, 91, 110, 0.14);
  overflow: hidden;
  display: none;
  z-index: 1002;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--color-secondary);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.user-dropdown a:hover {
  background: var(--color-background);
  color: var(--color-primary);
}

/* ===== 首页封面 ===== */
.home-section {
  min-height: 100vh;
}

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #F5F0E8 0%, #E8D9A8 50%, #F5F0E8 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(194, 59, 34, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(74, 91, 110, 0.1) 0%, transparent 50%);
}

.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.cloud-1 {
  width: 200px;
  height: 60px;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.cloud-2 {
  width: 150px;
  height: 45px;
  top: 25%;
  right: 15%;
  animation-delay: -5s;
}

.cloud-3 {
  width: 180px;
  height: 55px;
  bottom: 20%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(20px) translateY(-10px); }
  50% { transform: translateX(0) translateY(-20px); }
  75% { transform: translateX(-20px) translateY(-10px); }
}

.hero-content {
  position: relative;
  text-align: center;
  padding: var(--spacing-lg);
}

.hero-title {
  margin-bottom: var(--spacing-md);
}

.title-main {
  display: block;
  font-family: var(--font-decorative);
  font-size: 72px;
  color: var(--color-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: var(--spacing-sm);
}

.title-sub {
  display: block;
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-secondary);
  letter-spacing: 8px;
}

.hero-desc {
  font-size: 18px;
  color: var(--color-light-secondary);
  margin-bottom: var(--spacing-lg);
}

.hero-btns {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 16px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-dark-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
  background: var(--color-secondary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* 滚动指示器 */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  animation: bounce 2s infinite;
}

.scroll-indicator span {
  font-size: 14px;
  color: var(--color-light-secondary);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== 简介卡片区域 ===== */
.intro-section {
  padding: var(--spacing-xxl) 0;
  background: var(--color-white);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.intro-card {
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--color-background);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--color-light-accent);
}

.intro-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.intro-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-sm);
}

.intro-card h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.intro-card p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* ===== 通用区块样式 ===== */
.section {
  padding: var(--spacing-xxl) 0;
  min-height: calc(100vh - 80px);
  margin-top: 80px;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-family: var(--font-decorative);
  font-size: 42px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-light-secondary);
}

/* 子区块标签 */
.subsection-tabs {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.tab-btn {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 16px;
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.subsection-content {
  display: block;
}

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.filter-group label {
  font-size: 14px;
  color: var(--color-secondary);
}

.filter-group select {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 14px;
  border: 1px solid var(--color-light-secondary);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-secondary);
  cursor: pointer;
}

/* ===== 卡片网格 ===== */
.clothing-grid,
.skills-grid,
.inheritors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

/* 服饰卡片 */
.clothing-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.clothing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-accent);
}

.clothing-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.clothing-info {
  padding: var(--spacing-sm);
}

.clothing-info h4 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.clothing-meta {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.clothing-meta span {
  font-size: 12px;
  padding: 2px 8px;
  background: var(--color-background);
  border-radius: var(--radius-sm);
  color: var(--color-light-secondary);
}

.clothing-info p {
  font-size: 14px;
  color: var(--color-light-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 技艺卡片 */
.skill-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.skill-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.skill-info {
  padding: var(--spacing-sm);
}

.skill-info h4 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.skill-category {
  font-size: 12px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.skill-info p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* 传承人卡片 */
.inheritor-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.inheritor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.inheritor-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.inheritor-info {
  padding: var(--spacing-sm);
  flex: 1;
}

.inheritor-info h4 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.inheritor-title {
  font-size: 14px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.inheritor-skill {
  font-size: 12px;
  color: var(--color-light-secondary);
  margin-bottom: var(--spacing-xs);
}

.inheritor-info p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* ===== 虚拟试穿 ===== */
.tryon-container {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: var(--spacing-lg);
  min-height: 500px;
}

.tryon-left h3,
.tryon-right h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--color-accent);
}

.tryon-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.tryon-option {
  padding: var(--spacing-xs);
  background: var(--color-white);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.tryon-option:hover {
  border-color: var(--color-accent);
}

.tryon-option.active {
  border-color: var(--color-primary);
  background: rgba(194, 59, 34, 0.1);
}

.tryon-option img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.tryon-option span {
  font-size: 14px;
  color: var(--color-secondary);
}

.tryon-preview {
  position: relative;
  width: 100%;
  height: 400px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--color-light-accent);
}

.avatar-area {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-area img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.clothing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.clothing-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.8;
}

.tryon-actions {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.upload-btn {
  cursor: pointer;
}

.upload-btn input {
  display: none;
}

.selected-info {
  padding: var(--spacing-sm);
  background: var(--color-white);
  border-radius: var(--radius-md);
  min-height: 150px;
}

.selected-info .placeholder {
  color: var(--color-light-secondary);
  font-size: 14px;
  text-align: center;
}

.selected-info h4 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xs);
}

.selected-info p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* ===== 纹样设计 ===== */
.design-container {
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  gap: var(--spacing-md);
  min-height: 500px;
}

.design-left h3,
.design-right h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--color-accent);
}

.pattern-elements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xs);
}

.pattern-item {
  padding: var(--spacing-xs);
  background: var(--color-white);
  border: 1px solid var(--color-light-secondary);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: grab;
  font-size: 12px;
  transition: all 0.3s;
}

.pattern-item:hover {
  border-color: var(--color-primary);
  background: rgba(194, 59, 34, 0.1);
}

.pattern-item:active {
  cursor: grabbing;
}

.color-picker {
  margin-top: var(--spacing-md);
}

.color-picker h4 {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xs);
}

.color-picker input[type="color"] {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.design-canvas {
  background: var(--color-white);
  border: 2px solid var(--color-light-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#patternCanvas {
  background: linear-gradient(135deg, #F5F0E8 0%, #E8D9A8 100%);
  border-radius: var(--radius-md);
}

.design-actions {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.design-tips {
  padding: var(--spacing-sm);
  background: var(--color-white);
  border-radius: var(--radius-md);
}

.design-tips p {
  font-size: 14px;
  color: var(--color-light-secondary);
  margin-bottom: var(--spacing-xs);
  padding-left: var(--spacing-xs);
  border-left: 3px solid var(--color-accent);
}

/* ===== 知识问答 ===== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--spacing-xl);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.quiz-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-light-accent);
}

.quiz-header h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
}

.quiz-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
}

.quiz-stats span {
  font-size: 16px;
  color: var(--color-light-secondary);
}

.quiz-stats strong {
  color: var(--color-primary);
}

.quiz-start {
  text-align: center;
  padding: var(--spacing-xl);
}

.quiz-start p {
  font-size: 18px;
  color: var(--color-light-secondary);
  margin-bottom: var(--spacing-lg);
}

.quiz-question {
  padding: var(--spacing-md);
}

.question-text {
  font-size: 20px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.option-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 16px;
  background: var(--color-background);
  color: var(--color-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  text-align: left;
  transition: all 0.3s;
}

.option-btn:hover {
  border-color: var(--color-primary);
}

.option-btn.correct {
  background: rgba(76, 175, 80, 0.2);
  border-color: #4CAF50;
}

.option-btn.wrong {
  background: rgba(244, 67, 54, 0.2);
  border-color: #F44336;
}

.quiz-result {
  text-align: center;
  padding: var(--spacing-xl);
}

.quiz-result h4 {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.final-score {
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-md);
}

#resultMessage {
  font-size: 18px;
  color: var(--color-light-secondary);
  margin-bottom: var(--spacing-lg);
}

/* ===== 地图 ===== */
.map-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-md);
  height: 500px;
}

.map-sidebar {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  overflow-y: auto;
}

.map-sidebar h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--color-accent);
}

.map-filters {
  margin-bottom: var(--spacing-md);
}

.map-filters label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 14px;
  color: var(--color-secondary);
  cursor: pointer;
  margin-bottom: var(--spacing-xs);
}

.map-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.map-item {
  padding: var(--spacing-xs);
  background: var(--color-background);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s;
}

.map-item:hover {
  background: rgba(194, 59, 34, 0.1);
}

.map-item.active {
  background: rgba(194, 59, 34, 0.15);
  border-left: 3px solid var(--color-primary);
}

.map-item h4 {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 2px;
}

.map-item p {
  font-size: 12px;
  color: var(--color-light-secondary);
}

.map-main {
  border-radius: var(--radius-md);
  overflow: hidden;
}

#amapContainer {
  width: 100%;
  height: 100%;
}

/* ===== 评论 ===== */
.comments-container {
  min-height: 400px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

/* ===== 我的作品 ===== */
.works-container {
  min-height: 400px;
}

.works-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.works-header h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xs);
}

.works-header p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.works-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-light-secondary);
  font-size: 16px;
}

.work-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.work-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.work-info {
  padding: var(--spacing-xs);
}

.work-info h4 {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.work-info span {
  font-size: 12px;
  color: var(--color-light-secondary);
}

.work-actions {
  padding: var(--spacing-xs);
  border-top: 1px solid var(--color-background);
}

.work-actions button {
  width: 100%;
  padding: var(--spacing-xs);
  font-size: 12px;
  background: var(--color-background);
  color: var(--color-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.3s;
}

.work-actions button:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ===== 模态框 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  width: 60%;
  max-width: 60%;
  max-height: 60%;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  animation: modalIn 0.3s ease;
}

.modal-large {
  max-width: 800px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 36px;
  height: 36px;
  background: var(--color-background);
  border-radius: 50%;
  font-size: 24px;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.modal-close:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.modal-body {
  padding: var(--spacing-lg);
  max-height: 70vh;
  overflow-y: auto;
}

.modal-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.modal-body h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xs);
}

.modal-meta {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.modal-meta span {
  font-size: 14px;
  padding: 4px 12px;
  background: var(--color-background);
  border-radius: var(--radius-sm);
  color: var(--color-light-secondary);
}

.modal-body h4 {
  font-size: 18px;
  color: var(--color-secondary);
  margin: var(--spacing-md) 0 var(--spacing-xs);
}

.modal-body p {
  font-size: 16px;
  color: var(--color-secondary);
  line-height: 1.8;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
}

.modal-tags span {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
}

/* ===== 页脚 ===== */
.footer {
  background: var(--color-secondary);
  color: var(--color-background);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xxl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  font-family: var(--font-title);
  font-size: 18px;
  margin-bottom: var(--spacing-sm);
  color: var(--color-accent);
}

.footer-section p {
  font-size: 14px;
  margin-bottom: var(--spacing-xs);
  color: rgba(245, 240, 232, 0.8);
}

.footer-section a:hover {
  color: var(--color-accent);
}

.social-icons {
  display: flex;
  gap: var(--spacing-sm);
}

.social-icons span {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(245, 240, 232, 0.6);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .clothing-grid,
  .skills-grid,
  .inheritors-grid,
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tryon-container,
  .design-container {
    grid-template-columns: 1fr;
  }

  .tryon-left,
  .tryon-right,
  .design-left,
  .design-right {
    order: 2;
  }

  .tryon-center,
  .design-center {
    order: 1;
  }

  .map-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .map-main {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 var(--spacing-sm);
  }

  .nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .menu-toggle {
    display: flex;
  }

  .title-main {
    font-size: 48px;
  }

  .title-sub {
    font-size: 16px;
    letter-spacing: 4px;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .clothing-grid,
  .skills-grid,
  .inheritors-grid,
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .subsection-tabs {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .title-main {
    font-size: 36px;
  }

  .section-title {
    font-size: 32px;
  }

  .clothing-grid,
  .skills-grid,
  .inheritors-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ==================== 首页新增样式 ==================== */
/* 英雄区轮播 */
.hero-banner {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin-top: 80px;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

.hero-content {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  z-index: 10;
}

.hero-content .hero-title {
  font-family: var(--font-decorative);
  font-size: 48px;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content .hero-desc {
  font-size: 20px;
  opacity: 0.9;
}

.hero-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.hero-dots {
  display: flex;
  gap: 12px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.hero-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.btn-explore {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(194, 59, 34, 0.9);
  color: #fff;
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-explore:hover {
  background: #C23B22;
  transform: translateX(-50%) translateY(-2px);
}

.arrow-down {
  width: 20px;
  height: 20px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

/* 精选推荐 */
.featured-section {
  padding: 80px 0;
  background: #fff;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.featured-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
  cursor: pointer;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.featured-card .card-image {
  height: 200px;
  overflow: hidden;
}

.featured-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card .card-content {
  padding: 20px;
}

.featured-card .card-title {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.featured-card .card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.featured-card .tag {
  padding: 4px 12px;
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 12px;
}

.featured-card .card-slogan {
  font-family: var(--font-decorative);
  font-size: 18px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.featured-card .card-desc {
  font-size: 14px;
  color: var(--color-light-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.btn-card {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-card:hover {
  background: var(--color-primary);
  color: #fff;
}

/* 热门速览 */
.hot-section {
  padding: 80px 0;
  background: var(--color-background);
}

.hot-scroll-container {
  overflow-x: auto;
  padding: 20px 0;
}

.hot-scroll {
  display: flex;
  gap: 20px;
  min-width: max-content;
}

.hot-card {
  width: 160px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.3s;
}

.hot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.hot-card .hot-image {
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.hot-card .hot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-card h4 {
  font-size: 14px;
  padding: 12px 12px 4px;
  color: var(--color-secondary);
}

.hot-card .hot-region {
  font-size: 12px;
  color: var(--color-light-secondary);
  padding: 0 12px;
}

.hot-card .hot-link {
  display: block;
  font-size: 12px;
  color: var(--color-primary);
  padding: 8px 12px 12px;
}

/* ==================== 认识非遗页面样式 ==================== */
.main-content {
  margin-top: 80px;
  padding: 40px 0;
  min-height: calc(100vh - 80px);
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-decorative);
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 18px;
  color: var(--color-light-secondary);
}

.content-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
}

/* 筛选栏 */
.filter-sidebar {
  position: sticky;
  top: 112px;
  height: fit-content;
}

.filter-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.filter-title {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.filter-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.checkbox-label {
  font-size: 14px;
  color: var(--color-secondary);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-links a {
  padding: 8px 12px;
  background: var(--color-background);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-secondary);
  transition: all 0.3s;
}

.quick-links a:hover {
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
}

/* 瀑布流 */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.masonry-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.3s;
}

.masonry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.masonry-card .card-image {
  height: 200px;
  overflow: hidden;
  background-color: #f5f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.masonry-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.masonry-card .card-info {
  padding: 16px;
}

.masonry-card .card-name {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.masonry-card .card-region {
  font-size: 12px;
  color: var(--color-light-secondary);
  margin-bottom: 8px;
}

.masonry-card .card-level {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.level-national {
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
}

.level-provincial {
  background: rgba(74, 91, 110, 0.1);
  color: var(--color-secondary);
}

.level-un {
  background: rgba(201, 174, 93, 0.2);
  color: #8B6914;
}

.masonry-loading,
.masonry-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--color-light-secondary);
}

/* 指尖技艺 */
.finger-crafts-section,
.pattern-section,
.artisan-section {
  padding: 80px 0;
}

.section-title-group {
  text-align: center;
  margin-bottom: 40px;
}

.section-title-sm {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.3s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.video-cover {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(194, 59, 34, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.video-card:hover .video-play-btn {
  background: var(--color-primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
  color: #fff;
  font-size: 24px;
  margin-left: 4px;
}

.video-info {
  padding: 16px;
}

.video-info h4 {
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.video-info p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* 纹样网格 */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 16px;
}

.pattern-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.pattern-item:hover {
  transform: scale(1.1);
}

.pattern-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  background-size: cover;
  background-position: center;
}

.pattern-icon img,
.pattern-icon-img,
.pattern-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.pattern-grid .pattern-item img,
.pattern-grid .pattern-item .pattern-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.pattern-name {
  font-size: 12px;
  color: var(--color-secondary);
  text-align: center;
}

/* 传承人网格 - 守艺之人 */
.artisan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.artisan-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}

.artisan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.artisan-card:hover .artisan-watch-btn {
  background: var(--color-primary);
  color: #fff;
}

.artisan-photo {
  height: 160px;
  overflow: hidden;
}

.artisan-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artisan-info {
  padding: 16px;
}

.artisan-info h4 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.artisan-skill {
  font-size: 13px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.artisan-region {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.artisan-level {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 12px;
}

.artisan-quote {
  font-size: 13px;
  color: var(--color-light-secondary);
  font-style: italic;
  margin-bottom: 12px;
}

/* 观看视频按钮 */
.artisan-watch-btn {
  display: inline-block;
  padding: 6px 16px;
  border: 2px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.3s;
}

/* 弹窗详情 */
.pattern-detail,
.artisan-detail {
  padding: 20px;
}

.pattern-title,
.artisan-title {
  font-family: var(--font-decorative);
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.pattern-ethnicity {
  font-size: 16px;
  color: var(--color-light-secondary);
  margin-bottom: 20px;
}

.pattern-preview,
.artisan-portrait {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  font-family: var(--font-decorative);
}

.pattern-section,
.artisan-section {
  margin-bottom: 20px;
}

.pattern-section h4,
.artisan-section h4 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.pattern-scenes,
.artisan-works {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-tag,
.work-tag {
  padding: 6px 14px;
  background: var(--color-background);
  border-radius: 20px;
  font-size: 14px;
  color: var(--color-secondary);
}

.achievement-list {
  list-style: none;
}

.achievement-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-background);
  font-size: 14px;
  color: var(--color-secondary);
}

.achievement-list li:last-child {
  border-bottom: none;
}

/* ==================== 体验非遗页面样式 ==================== */
.experience-tabs,
.interact-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.exp-tab,
.interact-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: #fff;
  border: 2px solid var(--color-light-secondary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.exp-tab:hover,
.interact-tab:hover,
.exp-tab.active,
.interact-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.tab-icon {
  font-size: 24px;
}

.tab-text {
  font-size: 16px;
  font-weight: 500;
}

.exp-section,
.interact-section {
  display: none;
}

.exp-section.active,
.interact-section.active {
  display: block;
}

/* 纹样工坊 */
.diy-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.diy-canvas-area {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.canvas-wrapper {
  background: var(--color-background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.canvas-tools {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.tool-btn {
  width: 44px;
  height: 44px;
  background: var(--color-background);
  border: 2px solid var(--color-light-secondary);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
}

.tool-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.diy-control-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.control-card h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
}

.control-group {
  margin-bottom: 16px;
}

.control-group label {
  display: block;
  font-size: 14px;
  color: var(--color-light-secondary);
  margin-bottom: 8px;
}

.size-buttons,
.bg-colors,
.color-palette {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-btn,
.bg-btn,
.color-btn {
  padding: 8px 16px;
  background: var(--color-background);
  border: 2px solid var(--color-light-secondary);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.size-btn:hover,
.bg-btn:hover,
.color-btn:hover,
.size-btn.active,
.bg-btn.active,
.color-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.color-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.diy-pattern-library {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-card);
}

.pattern-library-title {
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-background);
}

.pattern-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-background);
  padding-bottom: 12px;
}

.pattern-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.pattern-tab:hover,
.pattern-tab.active {
  color: var(--color-primary);
}

.pattern-tab.active {
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: -14px;
}

.pattern-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pattern-lib-item {
  width: 80px;
  height: 80px;
  padding: 8px;
  background: var(--color-background);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pattern-lib-item:hover {
  background: rgba(194, 59, 34, 0.1);
  transform: scale(1.1);
}

.pattern-lib-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}



.pattern-lib-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  margin-bottom: 4px;
  border-radius: 8px;
}

.pattern-lib-item span {
  font-size: 12px;
  color: var(--color-secondary);
}

.pattern-icon-small {
  width: 60px;
  height: 60px;
  margin: 0 auto 4px;
  background: var(--color-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
}

.diy-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

.canvas-hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

/* 华服映画 */
.avatar-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}

.avatar-canvas-area {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.avatar-canvas-wrapper {
  background: var(--color-background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  width: 500px;
  height: 700px;
}

.avatar-canvas-wrapper canvas {
  display: block;
  border-radius: 12px;
}
  margin-top: 12px;
}

.photo-thumbs {
  display: flex;
  gap: 12px;
}

.photo-thumb {
  width: 100px;
  height: 80px;
  background: var(--color-background);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-light-secondary);
}

.photo-thumb:not(.empty) {
  background-size: cover;
  background-position: center;
}

.avatar-control-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 800px;
  overflow-y: auto;
}

.clothing-tabs,
.clothing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clothing-tab {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--color-light-secondary);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.clothing-tab:hover,
.clothing-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.clothing-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.clothing-item {
  background: var(--color-background);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.clothing-item:hover {
  border-color: var(--color-primary);
}

.clothing-item.active {
  border-color: var(--color-primary);
  background: rgba(194, 59, 34, 0.1);
}

.clothing-thumb {
  width: 100%;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clothing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clothing-icon {
  font-size: 20px;
  color: var(--color-primary);
  font-weight: bold;
}

.clothing-item span {
  font-size: 12px;
  color: var(--color-secondary);
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-btn {
  padding: 8px 12px;
  background: var(--color-background);
  border: 2px solid var(--color-light-secondary);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.option-btn:hover,
.option-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.color-options {
  display: flex;
  gap: 8px;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-light-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.color-option:hover,
.color-option.active {
  border-color: var(--color-primary);
  transform: scale(1.1);
}

.slider {
  width: 100%;
  accent-color: var(--color-primary);
}

.avatar-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

/* ==================== 知识问答模块 ==================== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

/* 背景纹样 */
.quiz-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(194, 59, 34, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(74, 91, 110, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.quiz-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.quiz-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.quiz-header h2 {
  font-family: var(--font-decorative);
  font-size: 28px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.quiz-subtitle {
  color: var(--color-secondary);
  font-size: 14px;
}

/* 答题模式切换 */
.quiz-mode-switch {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #fff;
  border: 2px solid var(--color-light);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: var(--color-text);
}

.mode-btn:hover {
  border-color: var(--color-primary);
  background: rgba(194, 59, 34, 0.05);
}

.mode-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.mode-icon {
  font-size: 18px;
}

/* 故事区 - 卷轴样式 */
.story-scroll {
  background: linear-gradient(180deg, #F5F0E8 0%, #E8D9A8 100%);
  position: relative;
}

.scroll-top,
.scroll-bottom {
  height: 20px;
  background: linear-gradient(180deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.scroll-content {
  padding: 20px 24px;
}

.story-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.story-icon {
  font-size: 20px;
}

.story-title {
  font-family: var(--font-decorative);
  font-size: 18px;
  color: var(--color-primary);
}

.story-content {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.8;
  font-size: 14px;
  color: var(--color-text);
  position: relative;
}

.story-content::before,
.story-content::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-light), transparent);
}

.story-content::before {
  top: 0;
}

.story-content::after {
  bottom: 0;
}

.story-audio-btn {
  display: block;
  margin: 12px auto 0;
  padding: 8px 20px;
  background: var(--color-secondary);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
}

.story-audio-btn:hover {
  background: var(--color-primary);
}

/* 答题区 */
.question-area {
  padding: 24px;
}

/* 进度条 */
.progress-container {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background: var(--color-background);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #E8A87C);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-secondary);
}

/* 题目卡片 - 刺绣绷子样式 */
.question-card {
  padding: 20px;
}

.question-frame {
  background: var(--color-background);
  border-radius: 50%;
  padding: 30px;
  position: relative;
  border: 3px solid var(--color-primary);
  box-shadow: 
    inset 0 0 20px rgba(194, 59, 34, 0.1),
    0 4px 12px rgba(0,0,0,0.1);
}

.question-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px dashed var(--color-light);
  border-radius: 50%;
  pointer-events: none;
}

.question-number {
  text-align: center;
  font-family: var(--font-decorative);
  font-size: 16px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.question-text {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 20px;
  line-height: 1.5;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-label {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 2px solid var(--color-light);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
}

.option-label:hover:not(.disabled) {
  border-color: var(--color-primary);
  background: rgba(194, 59, 34, 0.05);
  transform: translateX(4px);
}

.option-label.selected {
  border-color: var(--color-primary);
  background: rgba(194, 59, 34, 0.1);
}

.option-label.correct {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.option-label.incorrect {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

.option-label.disabled {
  cursor: default;
  opacity: 0.7;
}

.option-label input {
  display: none;
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

.option-label.correct .option-letter {
  background: #28a745;
}

.option-label.incorrect .option-letter {
  background: #dc3545;
}

.option-text {
  font-size: 14px;
  color: var(--color-text);
}

/* 答题反馈 */
.answer-feedback {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.answer-feedback.correct {
  background: rgba(40, 167, 69, 0.1);
  border: 2px solid #28a745;
}

.answer-feedback.incorrect {
  background: rgba(220, 53, 69, 0.1);
  border: 2px solid #dc3545;
}

.feedback-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.feedback-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.answer-feedback.correct .feedback-text {
  color: #28a745;
}

.answer-feedback.incorrect .feedback-text {
  color: #dc3545;
}

.feedback-knowledge {
  font-size: 13px;
  color: var(--color-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}

.next-btn {
  padding: 12px 32px;
}

/* 结果展示 */
.quiz-result {
  padding: 32px;
  text-align: center;
}

.score-display {
  margin-bottom: 20px;
}

.badge-display {
  font-size: 48px;
  margin-bottom: 12px;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, #8B4513 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 8px 32px rgba(194, 59, 34, 0.3);
}

.score-number {
  font-size: 48px;
  font-weight: bold;
  color: #fff;
  line-height: 1;
}

.score-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.score-title {
  font-family: var(--font-decorative);
  font-size: 22px;
  color: var(--color-primary);
}

.badge-earned {
  padding: 12px 20px;
  background: linear-gradient(90deg, #F5D742, #FFD700);
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  color: #8B4513;
  margin-bottom: 16px;
  display: inline-block;
}

.new-record {
  padding: 12px 20px;
  background: linear-gradient(90deg, #FF6B6B, #FF8E53);
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 答题报告 */
.answer-report {
  text-align: left;
  margin-bottom: 20px;
}

.answer-report h4 {
  font-family: var(--font-decorative);
  font-size: 16px;
  color: var(--color-primary);
  margin-bottom: 12px;
  text-align: center;
}

.report-item {
  padding: 12px;
  background: var(--color-background);
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-item .report-icon {
  font-size: 20px;
}

.report-item.correct .report-icon {
  color: #28a745;
}

.report-item.incorrect .report-icon {
  color: #dc3545;
}

.report-item .report-text {
  font-size: 13px;
  color: var(--color-text);
  flex: 1;
}

.report-item .report-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.report-item.correct .report-status {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.report-item.incorrect .report-status {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 印章样式按钮 */
.stamp-btn {
  background: var(--color-primary);
  border: none;
  font-weight: 600;
  letter-spacing: 1px;
}

/* 排行榜弹窗 */
.modal-leaderboard {
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.lb-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--color-light);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
}

.lb-tab:hover {
  border-color: var(--color-primary);
}

.lb-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.leaderboard-header {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-light);
  margin-bottom: 12px;
}

.leaderboard-header h3 {
  font-family: var(--font-decorative);
  font-size: 20px;
  color: var(--color-primary);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-light);
}

.leaderboard-table th {
  background: var(--color-background);
  font-weight: 600;
  color: var(--color-secondary);
  font-size: 12px;
}

.leaderboard-table td {
  font-size: 13px;
  color: var(--color-text);
}

.leaderboard-table tr:first-child td {
  font-weight: 600;
}

.my-rank {
  text-align: center;
  padding: 12px;
  background: var(--color-background);
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  color: var(--color-primary);
}

.leaderboard-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-light);
}

/* 响应式 */
@media (max-width: 600px) {
  .quiz-container {
    padding: 12px;
  }
  
  .quiz-header h2 {
    font-size: 22px;
  }
  
  .quiz-mode-switch {
    flex-direction: column;
    gap: 8px;
  }
  
  .mode-btn {
    width: 100%;
    justify-content: center;
  }
  
  .question-frame {
    border-radius: 20px;
    padding: 20px;
  }
  
  .question-frame::before {
    display: none;
  }
  
  .option-label {
    padding: 12px 14px;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .result-actions .btn {
    width: 100%;
  }
}

/* ========================================
   成绩分享预览弹窗样式
   ======================================== */

/* 预览弹窗容器 */
.score-preview-container {
  position: relative;
  width: 400px;
  max-width: 90vw;
  background-color: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
  padding: 24px;
  z-index: 1001;
  animation: scorePreviewSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 弹窗标题 */
.score-preview-title {
  text-align: center;
  margin-bottom: 20px;
}

.score-preview-title h3 {
  font-family: var(--font-title);
  font-size: 20px;
  color: #2C2C2C;
  margin: 0 0 4px 0;
}

.score-preview-title p {
  font-size: 13px;
  color: #999999;
  margin: 0;
}

/* 成绩卡片预览 */
.score-card-preview {
  background: linear-gradient(135deg, #C23B22 0%, #4A5B6E 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  overflow: hidden;
}

.score-card-inner {
  position: relative;
  text-align: center;
  color: #F5F0E8;
}

/* 卡片顶部装饰 */
.score-card-decor-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: rgba(245, 240, 232, 0.5);
  border-radius: 0 0 50% 50%;
}

/* Logo区域 */
.score-card-logo {
  padding: 8px 0;
}

.score-card-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* 副标题 */
.score-card-subtitle {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

/* 分割线 */
.score-card-divider {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 240, 232, 0.5), transparent);
  margin: 12px auto;
}

/* 徽章 */
.score-card-badge {
  font-size: 40px;
  margin: 8px 0;
}

/* 得分 */
.score-card-score {
  margin: 8px 0;
}

.score-card-number {
  font-size: 56px;
  font-weight: bold;
  color: #F5F0E8;
  line-height: 1;
}

.score-card-unit {
  font-size: 18px;
  color: rgba(245, 240, 232, 0.8);
  margin-left: 4px;
}

/* 星级 */
.score-card-stars {
  font-size: 20px;
  color: #FFD700;
  letter-spacing: 4px;
  margin: 8px 0;
}

/* 称号 */
.score-card-rank {
  font-family: var(--font-title);
  font-size: 18px;
  color: #F5F0E8;
  margin: 8px 0;
}

/* 鼓励语 */
.score-card-quote {
  font-size: 12px;
  color: rgba(245, 240, 232, 0.7);
  font-style: italic;
  margin: 12px 0;
}

/* 底部信息 */
.score-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 240, 232, 0.2);
}

.score-card-date {
  font-size: 12px;
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 4px;
}

.score-card-tip {
  font-size: 11px;
  color: rgba(245, 240, 232, 0.5);
}

/* 卡片底部装饰 */
.score-card-decor-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: rgba(245, 240, 232, 0.5);
  border-radius: 50% 50% 0 0;
}

/* 操作按钮 */
.score-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-preview-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.score-preview-actions .btn-secondary {
  background-color: #F5F0E8;
  border: 1px solid #DDD4C4;
  color: #4A5B6E;
}

.score-preview-actions .btn-secondary:hover {
  background-color: #EDE6D8;
}

.btn-cancel-preview {
  background-color: transparent;
  border: none;
  color: #999999;
  font-size: 13px;
}

.btn-cancel-preview:hover {
  color: #666666;
}

/* 弹窗动画 */
@keyframes scorePreviewSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 保存成功提示 */
.score-save-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #FFFFFF;
  padding: 16px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
}

.score-save-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.score-save-toast .toast-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: bold;
}

.score-save-toast .toast-text {
  font-size: 14px;
  color: #2C2C2C;
  font-weight: 500;
}

/* 响应式 */
@media (max-width: 450px) {
  .score-preview-container {
    padding: 16px;
  }

  .score-card-preview {
    padding: 16px;
  }

  .score-card-number {
    font-size: 48px;
  }

  .score-card-badge {
    font-size: 32px;
  }
}

/* 衣脉地图 */
.map-container-full {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.map-header {
  padding: 24px;
  background: var(--color-secondary);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-title-group h2 {
  font-family: var(--font-decorative);
  font-size: 28px;
  margin-bottom: 4px;
}

.map-title-group p {
  font-size: 14px;
  opacity: 0.8;
}

.map-stats {
  display: flex;
  gap: 24px;
}

.stat-card {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: bold;
  color: var(--color-accent);
}

.stat-label {
  font-size: 12px;
  opacity: 0.8;
}

.map-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  height: 500px;
}

.map-main {
  position: relative;
}

#amapFullContainer {
  width: 100%;
  height: 100%;
}

.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.legend-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.legend-marker.red { background: #C23B22; }
.legend-marker.green { background: #4A7C59; }
.legend-marker.gold { background: #C9AE5D; }

.map-sidebar-full {
  background: var(--color-background);
  padding: 20px;
  overflow-y: auto;
}

.map-filters-full .filter-section {
  margin-bottom: 16px;
}

.map-filters-full h4 {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.map-filters-full label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.map-filters-full select,
.map-filters-full input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--color-light-secondary);
  border-radius: 8px;
  font-size: 14px;
}

.map-list-full {
  margin-top: 16px;
}

.map-item-full {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.map-item-full:hover {
  box-shadow: var(--shadow-hover);
}

.map-item-full h4 {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.map-item-full p {
  font-size: 12px;
  color: var(--color-light-secondary);
}

/* ==================== 互动非遗页面样式 ==================== */
.comments-wrapper {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.comments-header {
  text-align: center;
  margin-bottom: 32px;
}

.comments-header h2 {
  font-family: var(--font-decorative);
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.comments-header p {
  color: var(--color-light-secondary);
}

.comments-placeholder {
  text-align: center;
  padding: 60px 20px;
}

.placeholder-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.comments-placeholder h3 {
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.comments-placeholder .hint {
  font-size: 14px;
  color: var(--color-light-secondary);
  margin-top: 8px;
}

.works-wrapper {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.works-header-custom {
  text-align: center;
  margin-bottom: 32px;
}

.works-header-custom h2 {
  font-family: var(--font-decorative);
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.works-header-custom p {
  color: var(--color-light-secondary);
}

.login-prompt {
  text-align: center;
  padding: 60px 20px;
}

.prompt-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.login-prompt h3 {
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.login-prompt p {
  color: var(--color-light-secondary);
  margin-bottom: 20px;
}

.works-tabs-custom {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--color-background);
  padding-bottom: 12px;
}

/* ==================== 衣脉地图 - 地区分布 ==================== */
.region-map-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.region-map-header {
  text-align: center;
  margin-bottom: 24px;
}

.region-map-header h2 {
  font-family: var(--font-decorative);
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.region-map-header p {
  color: var(--color-light-secondary);
  font-size: 16px;
}

/* 地区筛选按钮 */
.region-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.region-tab {
  padding: 10px 24px;
  border: 2px solid #ddd;
  background: #fff;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  color: #666;
}

.region-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.region-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* 地区按钮颜色 */
.region-tab[data-region="西南"].active { background: #3A6B4B; border-color: #3A6B4B; }
.region-tab[data-region="华东"].active { background: #4A90E2; border-color: #4A90E2; }
.region-tab[data-region="华南"].active { background: #E88D67; border-color: #E88D67; }
.region-tab[data-region="北方"].active { background: #5B8C5A; border-color: #5B8C5A; }
.region-tab[data-region="华中"].active { background: #C23B22; border-color: #C23B22; }
.region-tab[data-region="西北"].active { background: #D4A56A; border-color: #D4A56A; }

/* 地区内容区域 */
.region-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.region-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-background);
}

.region-title-bar h3 {
  font-size: 20px;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.region-icon {
  font-size: 24px;
}

.region-count {
  color: var(--color-light-secondary);
  font-size: 14px;
}

/* 项目卡片网格 */
.region-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.region-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: 1px solid #f0f0f0;
}

.region-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.region-card-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.region-card-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.region-card-location {
  font-size: 14px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.region-card-feature {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
  line-height: 1.5;
}

.region-card-btn {
  padding: 8px 20px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.region-card-btn:hover {
  background: #a12d1a;
}

.region-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

/* 响应式 - 衣脉地图 */
@media (max-width: 1024px) {
  .region-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .region-map-container {
    padding: 16px;
  }

  .region-map-header h2 {
    font-size: 24px;
  }

  .region-tabs {
    gap: 8px;
  }

  .region-tab {
    padding: 8px 16px;
    font-size: 13px;
  }

  .region-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .region-card {
    padding: 16px;
  }

  .region-card-icon {
    font-size: 32px;
  }

  .region-card-name {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .region-cards {
    grid-template-columns: 1fr;
  }

  .region-title-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

.works-tab-btn {
  padding: 8px 20px;
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.works-tab-btn:hover,
.works-tab-btn.active {
  color: var(--color-primary);
}

.works-tab-btn.active {
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: -14px;
}

/* ==================== AI非遗小助手 ==================== */
.ai-assistant-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.ai-header {
  text-align: center;
  margin-bottom: 24px;
}

.ai-header h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  color: #4A5B6E;
  margin-bottom: 8px;
}

.ai-header p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* 快捷提问按钮 */
.ai-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #F5F0E8 0%, #E8D9A8 100%);
  border-radius: 12px;
  align-items: center;
}

.quick-label {
  font-size: 14px;
  color: #4A5B6E;
  font-weight: 500;
}

.quick-btn {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #D4C5A9;
  border-radius: 20px;
  font-size: 13px;
  color: #4A5B6E;
  cursor: pointer;
  transition: all 0.3s;
}

.quick-btn:hover {
  background: #C23B22;
  color: #fff;
  border-color: #C23B22;
}

/* 对话容器 */
.ai-chat-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 16px;
}

.ai-messages {
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #FAFAFA;
}

/* 消息样式 */
.message {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
}

.message.ai-message {
  justify-content: flex-start;
}

.message.user-message {
  justify-content: flex-end !important;
}

.message.user-message .message-avatar {
  order: 2;
  margin-right: 0;
  margin-left: 10px;
  background: linear-gradient(135deg, #C23B22 0%, #D4563A 100%) !important;
}

.message.user-message .message-content {
  order: 1;
  background: linear-gradient(135deg, #C23B22 0%, #D4563A 100%) !important;
  color: #fff !important;
  border-top-left-radius: 4px;
  border-top-right-radius: 16px;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.ai-message .message-avatar {
  background: linear-gradient(135deg, #4A5B6E 0%, #6B7C8E 100%);
}

.user-message .message-avatar {
  background: linear-gradient(135deg, #C23B22 0%, #D4563A 100%);
  margin-right: 0;
  margin-left: 12px;
  order: 2;
}

.message-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  word-wrap: break-word;
}

.ai-message .message-content {
  background: #fff;
  border: 1px solid #E8E4DD;
  border-top-left-radius: 4px;
}

.user-message .message-content {
  background: linear-gradient(135deg, #C23B22 0%, #D4563A 100%);
  color: #fff;
  border-top-left-radius: 4px;
  border-top-right-radius: 16px;
  order: 1;
}

/* 加载动画 */
.message.loading .message-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-dots {
  display: flex;
  gap: 4px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
  animation: loadingBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ========================================
   评论系统样式
   ======================================== */

/* 评论列表容器 */
.comments-list {
  margin-bottom: 24px;
}

/* 评论卡片 */
.comment-card {
  display: flex;
  gap: 16px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease;
}

.comment-card:hover {
  box-shadow: var(--shadow-hover);
}

/* 头像 */
.comment-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-title);
}

/* 评论主体 */
.comment-body {
  flex: 1;
  min-width: 0;
}

/* 评论头部 */
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-nickname {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-secondary);
}

.comment-time {
  font-size: 13px;
  color: var(--color-light-secondary);
}

/* 评论内容 */
.comment-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-dark);
  word-wrap: break-word;
}

/* 暂无评论 */
.comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--color-light-secondary);
}

.comments-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.comments-empty p {
  font-size: 16px;
}

/* 评论按钮 */
.comments-action {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.btn-comment {
  padding: 14px 40px;
  font-size: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-primary) 100%);
  color: var(--color-white);
  font-family: var(--font-title);
  transition: all 0.3s ease;
}

.btn-comment:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 评论弹窗 */
.modal-comment {
  width: 90%;
  max-width: 500px;
  padding: 30px;
}

.modal-comment .modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-comment .modal-header h3 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.modal-comment .modal-header p {
  font-size: 14px;
  color: var(--color-light-secondary);
}

.modal-comment .form-group {
  margin-bottom: 20px;
}

.modal-comment .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.modal-comment .form-group input,
.modal-comment .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E0D8CC;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--color-white);
  transition: border-color 0.3s ease;
}

.modal-comment .form-group input:focus,
.modal-comment .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.modal-comment .form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.modal-comment .modal-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.modal-comment .btn-secondary {
  padding: 12px 32px;
  background: var(--color-background);
  color: var(--color-secondary);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all 0.3s ease;
}

.modal-comment .btn-secondary:hover {
  background: #E8DED0;
}

.modal-comment .btn-primary {
  padding: 12px 32px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: all 0.3s ease;
}

.modal-comment .btn-primary:hover {
  background: var(--color-dark-primary);
}

/* 成功提示弹窗 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: var(--color-white);
  padding: 20px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.toast-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 18px;
  font-weight: bold;
}

.toast-message {
  font-size: 16px;
  color: var(--color-secondary);
  font-weight: 500;
}

/* 响应式 */
@media (max-width: 768px) {
  .comment-card {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .comment-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 16px;
  }

  .comment-header {
    flex-direction: row;
    align-items: center;
  }

  .modal-comment {
    width: 95%;
    padding: 20px;
  }

  .modal-comment .modal-actions {
    flex-direction: column;
  }

  .modal-comment .modal-actions .btn {
    width: 100%;
  }
}

/* ========================================
   国风评论弹窗样式
   ======================================== */

/* 弹窗容器 - 与登录弹窗统一 */
.comment-modal-container {
  position: relative;
  width: 500px;
  max-width: 90vw;
  background-color: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid #EEEEEE;
  padding: 24px;
  z-index: 1001;
  animation: modalIn 0.3s ease;
}

/* 关闭按钮 */
.comment-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background-color: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.comment-modal-close svg {
  width: 20px;
  height: 20px;
  color: #999999;
}

.comment-modal-close:hover {
  background-color: #F5F5F5;
}

.comment-modal-close:hover svg {
  color: #4A5B6E;
}

/* 头部 */
.comment-modal-header {
  text-align: center;
  padding: 8px 0 20px;
}

.comment-modal-header h3 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
  color: #2C2C2C;
  margin: 0 0 12px 0;
}

.comment-modal-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C23B22, transparent);
  margin: 0 auto;
}

/* 表单 */
.comment-form {
  padding: 0;
}

/* 输入框组 */
.comment-input-group {
  position: relative;
  margin-bottom: 16px;
}

.comment-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  z-index: 1;
}

.comment-textarea-icon {
  top: 20px;
  transform: none;
}

.comment-input-group input,
.comment-input-group textarea {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid #DDDDDD;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  background-color: #FFFFFF;
  color: #2C2C2C;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.comment-input-group textarea {
  min-height: 100px;
  padding: 12px 16px 12px 44px;
  resize: vertical;
}

.comment-input-group input:focus,
.comment-input-group textarea:focus {
  outline: none;
  border-color: #C23B22;
  box-shadow: 0 0 0 3px rgba(194, 59, 34, 0.1);
}

.comment-input-group input::placeholder,
.comment-input-group textarea::placeholder {
  color: #999999;
}

/* 操作按钮区域 */
.comment-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* 取消按钮 */
.btn-cancel {
  flex: 1;
  padding: 12px 20px;
  background-color: transparent;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  font-size: 14px;
  color: #666666;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.btn-cancel:hover {
  background-color: #F5F5F5;
  color: #4A5B6E;
}

/* 提交按钮 */
.btn-submit-comment {
  flex: 2;
  padding: 12px 24px;
  background: linear-gradient(135deg, #C23B22 0%, #8B2E1A 100%);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit-comment:hover {
  background: linear-gradient(135deg, #A3301C 0%, #6B2314 100%);
  box-shadow: 0 4px 12px rgba(194, 59, 34, 0.3);
}

.btn-submit-comment:active {
  transform: scale(0.98);
}

.btn-icon {
  font-size: 14px;
}

/* Toast提示 */
.toast-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #FFFFFF;
  padding: 16px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
}

.toast-success.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.toast-success-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;
}

.toast-success-message {
  font-size: 14px;
  color: #2C2C2C;
  font-weight: 500;
}

/* 响应式 */
@media (max-width: 600px) {
  .comment-modal-container {
    padding: 20px;
    border-radius: 12px;
  }

  .comment-modal-header h3 {
    font-size: 20px;
  }

  .comment-input-group input,
  .comment-input-group textarea {
    padding: 10px 14px 10px 40px;
    font-size: 14px;
  }

  .comment-input-icon {
    font-size: 14px;
    left: 12px;
  }

  .comment-modal-actions {
    flex-direction: column;
  }

  .btn-cancel,
  .btn-submit-comment {
    width: 100%;
  }
}

/* 输入区域 */
.ai-input-area {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.ai-input-area input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #E8E4DD;
  border-radius: 30px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.ai-input-area input:focus {
  border-color: #C23B22;
}

.ai-send-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, #C23B22 0%, #D4563A 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.ai-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 59, 34, 0.3);
}

.ai-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 底部操作 */
.ai-actions {
  text-align: center;
}

.ai-clear-btn {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid #D4C5A9;
  border-radius: 20px;
  font-size: 13px;
  color: #4A5B6E;
  cursor: pointer;
  transition: all 0.3s;
}

.ai-clear-btn:hover {
  background: #f5f5f5;
  border-color: #C23B22;
  color: #C23B22;
}

/* 响应式 */
@media (max-width: 768px) {
  .ai-assistant-container {
    padding: 16px;
  }

  .ai-header h2 {
    font-size: 22px;
  }

  .ai-quick-questions {
    padding: 12px;
  }

  .quick-label {
    width: 100%;
    margin-bottom: 8px;
  }

  .ai-messages {
    height: 300px;
    padding: 12px;
  }

  .message-content {
    max-width: 85%;
  }

  .ai-input-area {
    flex-direction: column;
  }

  .ai-send-btn {
    width: 100%;
  }
}

.works-grid-custom {
  display: none;
}

.works-grid-custom.active {
  display: block;
}

.works-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.work-card-custom {
  background: var(--color-background);
  border-radius: 12px;
  overflow: hidden;
}

.work-image-custom {
  height: 150px;
  overflow: hidden;
}

.work-image-custom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-info-custom {
  padding: 12px;
}

.work-info-custom h4 {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.work-time {
  font-size: 12px;
  color: var(--color-light-secondary);
}

.work-actions-custom {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}

.action-btn {
  flex: 1;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--color-light-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #c82333;
}

.modal-small {
  max-width: 400px;
}

/* ==================== 非遗详情页样式 ==================== */
.detail-main {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

.detail-back {
  padding: 20px 40px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-radius: 8px;
  color: var(--color-secondary);
  font-size: 14px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
}

.btn-back:hover {
  background: var(--color-primary);
  color: #fff;
}

.detail-loading {
  text-align: center;
  padding: 80px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-background);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.detail-content {
  padding-bottom: 60px;
}

/* ==================== 非遗详情页 - 图片展示区（彻底修复） ==================== */
.detail-main {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  background: #f5f0e8;
}

/* 图片主容器 - 使用padding-bottom为文字信息留空间 */
.detail-hero {
  position: relative;
  width: 100%;
  min-height: 600px;
  height: auto;
  background-color: #f5f0e8;
  margin-bottom: 0;
  overflow: visible;
}

/* 轮播容器 */
.hero-slider-detail {
  width: 100%;
  min-height: 600px;
  height: auto;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* 每张轮播图片容器 */
.hero-slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 600px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s, visibility 0.8s;
  background-color: #f5f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  box-sizing: border-box;
}

.hero-slide-item.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* 轮播图片 - 完整显示不裁剪 */
.hero-slide-item img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

/* 文字信息区 - 固定在底部，不遮挡图片 */
.hero-info {
  position: relative;
  width: 100%;
  padding: 40px;
  background: linear-gradient(135deg, rgba(194, 59, 34, 0.95) 0%, rgba(139, 69, 55, 0.95) 100%);
  color: #fff;
  text-align: center;
  z-index: 10;
}

.hero-info::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, rgba(194, 59, 34, 0.95), transparent);
  pointer-events: none;
}

.detail-title {
  font-family: var(--font-decorative);
  font-size: 42px;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  gap: 20px;
  align-items: center;
}

.meta-item {
  font-size: 16px;
  opacity: 0.9;
}

.detail-intro,
.detail-techniques,
.detail-video,
.detail-patterns,
.detail-artisans,
.detail-experience {
  padding: 0 40px;
  margin-bottom: 48px;
}

.detail-description {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-secondary);
}

/* 新增详情区域样式 */
.detail-history,
.detail-crafting,
.detail-culture {
  padding: 0 40px;
  margin-bottom: 48px;
}

.history-content,
.crafting-content,
.culture-content {
  font-size: 16px;
  line-height: 2;
  color: var(--color-secondary);
  background: rgba(255, 255, 255, 0.6);
  padding: 24px 32px;
  border-radius: 12px;
  border-left: 4px solid var(--color-primary);
  margin-top: 16px;
  text-align: justify;
}

.history-content {
  border-left-color: var(--color-accent);
}

.crafting-content {
  border-left-color: var(--color-secondary);
}

.culture-content {
  border-left-color: #4A7C59;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.feature-tag {
  padding: 8px 20px;
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
  border-radius: 24px;
  font-size: 14px;
}

.technique-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.technique-tag {
  padding: 8px 20px;
  background: var(--color-background);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-secondary);
}

.video-embed {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
}

.pattern-list-detail,
.artisan-list-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.pattern-card-mini {
  width: 100px;
  padding: 8px;
  background: var(--color-background);
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--color-secondary);
}

.pattern-card-mini img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.artisan-card-mini {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--color-background);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  width: calc(50% - 8px);
}

.artisan-card-mini:hover {
  background: #fff;
  box-shadow: var(--shadow-card);
}

.artisan-card-mini img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.artisan-mini-info h4 {
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.artisan-mini-info p {
  font-size: 14px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.artisan-mini-info span {
  font-size: 12px;
  color: var(--color-light-secondary);
}

.experience-buttons {
  display: flex;
  gap: 24px;
}

.btn-exp {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  background: var(--color-background);
  border-radius: 16px;
  transition: all 0.3s;
}

.btn-exp:hover {
  background: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.btn-icon {
  font-size: 48px;
}

.btn-text {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-secondary);
}

.btn-desc {
  font-size: 14px;
  color: var(--color-light-secondary);
}

/* 响应式 */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .quick-nav {
    grid-column: 1 / -1;
  }

  .pattern-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .artisan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .artisan-card .artisan-photo {
    height: 140px;
  }

  .artisan-card .artisan-info h4 {
    font-size: 14px;
  }

  .diy-container,
  .avatar-container {
    grid-template-columns: 1fr;
  }

  .map-content {
    grid-template-columns: 1fr;
    height: auto;
  }

  .map-main {
    height: 400px;
  }

  .works-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .experience-buttons {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    grid-template-columns: 1fr;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .pattern-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .artisan-grid {
    grid-template-columns: 1fr;
  }

  .map-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  /* 移动端详情页图片 */
  .detail-hero {
    min-height: 400px;
    background-color: #f5f0e8;
  }

  .hero-slider-detail {
    min-height: 400px;
    padding: 10px 0;
  }

  .hero-slide-item {
    min-height: 400px;
    padding: 10px 20px;
  }

  .hero-slide-item img {
    max-height: 60vh;
    width: 100%;
  }

  .hero-info {
    padding: 30px 20px;
  }

  .detail-title {
    font-size: 28px;
  }

  .detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .works-list {
    grid-template-columns: 1fr;
  }

  .artisan-card-mini {
    width: 100%;
  }

  .exp-tab,
  .interact-tab {
    padding: 12px 20px;
  }

  .tab-text {
    font-size: 14px;
  }
}

/* ==================== 视频卡片样式 ==================== */
.video-card {
  width: 280px;
  height: 220px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-cover {
  position: relative;
  width: 280px;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #4A5B6E 0%, #2C2C2C 100%);
}

.video-cover img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-play-btn:hover {
  transform: scale(1.15);
  background: linear-gradient(135deg, #FF8585 0%, #FF6B6B 100%);
}

.play-icon {
  color: #fff;
  font-size: 16px;
  margin-left: 2px;
}

.video-info {
  padding: 12px;
}

.video-info h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-info p {
  font-size: 12px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  height: 34px;
}

/* 视频弹窗 - 800x500，白色背景，圆角 */
.modal-video .modal-content {
  width: 800px;
  height: 500px;
  max-width: 90%;
  max-height: 90%;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.modal-video .video-player {
  width: 100%;
  height: calc(100% - 40px);
}

.modal-video .video-player iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 响应式视频卡片 */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .video-card {
    width: 100%;
    height: auto;
  }
  
  .video-cover {
    width: 100%;
    height: 140px;
  }
  
  .video-cover img {
    height: 140px;
  }
  
  .modal-video .modal-content {
    width: 95%;
    max-width: 95%;
  }
}

/* ========================================
   非遗身份馆样式
   ======================================== */

/* 主容器 */
.identity-museum-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}

/* 顶部装饰 */
.identity-decor-top {
  margin-bottom: 24px;
}

.decor-svg {
  width: 200px;
  height: 40px;
}

/* 标题区 */
.identity-header {
  margin-bottom: 32px;
}

.identity-header h2 {
  font-family: var(--font-decorative);
  font-size: 36px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.identity-subtitle {
  font-size: 18px;
  color: var(--color-secondary);
  font-weight: 300;
}

/* 测试介绍页 */
.identity-intro {
  max-width: 600px;
  margin: 0 auto;
}

/* 诗句区域 */
.intro-poem {
  background: linear-gradient(135deg, #F5F0E8 0%, #E8D9A8 100%);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.intro-poem::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 120px;
  color: rgba(194, 59, 34, 0.1);
  font-family: serif;
}

.poem-title {
  font-family: var(--font-decorative);
  font-size: 20px;
  color: var(--color-primary);
  margin-bottom: 20px;
  position: relative;
}

.poem-content {
  font-size: 16px;
  line-height: 2;
  color: var(--color-secondary);
}

.poem-content p {
  margin: 8px 0;
}

.poem-highlight {
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 16px !important;
}

.poem-question {
  font-family: var(--font-decorative);
  font-size: 20px !important;
  color: var(--color-primary);
  margin-top: 16px !important;
}

/* 测试规则 */
.intro-rules {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.rules-title {
  font-family: var(--font-decorative);
  font-size: 18px;
  color: var(--color-secondary);
  margin-bottom: 16px;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.rules-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #E0D8CC;
  color: var(--color-text);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-list li:last-child {
  border-bottom: none;
}

.rules-list li::before {
  content: '✦';
  color: var(--color-primary);
}

/* 开始测试按钮 */
.btn-start-test {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 48px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-primary) 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-family: var(--font-decorative);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(194, 59, 34, 0.3);
}

.btn-start-test:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(194, 59, 34, 0.4);
}

.btn-arrow {
  transition: transform 0.3s;
}

.btn-start-test:hover .btn-arrow {
  transform: translateX(4px);
}

/* 测试进行页 */
.identity-test {
  max-width: 600px;
  margin: 0 auto;
}

/* 进度条 */
.test-progress {
  margin-bottom: 32px;
}

.progress-track {
  height: 8px;
  background: var(--color-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-label {
  text-align: center;
  font-size: 14px;
  color: var(--color-secondary);
}

/* 问题卡片容器 */
.question-cards-wrapper {
  perspective: 1000px;
  margin-bottom: 24px;
}

.question-cards {
  position: relative;
}

/* 单个问题卡片 */
.question-card-item {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  text-align: left;
}

.question-dimension {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 16px;
}

.question-title {
  font-family: var(--font-decorative);
  font-size: 20px;
  color: var(--color-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.question-desc {
  font-size: 15px;
  color: var(--color-light-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* 倾向选择器 */
.tendency-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tendency-label {
  font-size: 13px;
  color: var(--color-light-secondary);
  width: 80px;
  text-align: center;
}

.tendency-label:last-child {
  text-align: center;
}

/* 滑块样式 */
.tendency-slider {
  flex: 1;
  margin: 0 16px;
  position: relative;
}

.tendency-slider input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #E8D9A8 0%, #F5F0E8 50%, #E8D9A8 100%);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.tendency-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(194, 59, 34, 0.3);
  transition: transform 0.2s;
}

.tendency-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.tendency-slider input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(194, 59, 34, 0.3);
}

/* 分值显示 */
.score-display {
  text-align: center;
  margin-top: 16px;
}

.score-value {
  display: inline-block;
  padding: 8px 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-primary) 100%);
  color: #fff;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
}

/* 导航按钮 */
.test-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.btn-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-prev {
  background: #fff;
  border: 2px solid var(--color-light);
  color: var(--color-secondary);
}

.btn-prev:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-prev:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-next {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-primary) 100%);
  border: none;
  color: #fff;
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 59, 34, 0.3);
}

.btn-next:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.nav-icon {
  font-size: 18px;
}

/* 加载动画页 */
.identity-loading {
  padding: 60px 20px;
  text-align: center;
}

.loading-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: pulse 1.5s infinite;
}

.loading-text {
  font-family: var(--font-decorative);
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: 16px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: loadingBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.loading-dimension {
  font-size: 16px;
  color: var(--color-light-secondary);
  margin-top: 20px;
}

/* 结果页 */
.identity-result {
  max-width: 500px;
  margin: 0 auto;
}

/* 身份卡 */
.identity-card {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.card-decor-top,
.card-decor-bottom {
  text-align: center;
  margin: 8px 0;
}

.card-decor-svg {
  width: 100%;
  max-width: 300px;
  height: auto;
}

/* 卡片头部 */
.card-header {
  text-align: center;
  margin-bottom: 20px;
}

.card-badge {
  font-size: 48px;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-decorative);
  font-size: 18px;
  color: var(--color-secondary);
}

/* 非遗名称 */
.card-heritage-name {
  text-align: center;
  padding: 20px 0;
  border-top: 1px dashed var(--color-light);
  border-bottom: 1px dashed var(--color-light);
  margin-bottom: 20px;
}

.heritage-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.heritage-text {
  font-family: var(--font-decorative);
  font-size: 32px;
  color: var(--color-primary);
  display: block;
}

/* MBTI类型 */
.card-mbti {
  text-align: center;
  margin-bottom: 16px;
}

.mbti-type {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-secondary);
  letter-spacing: 4px;
}

.mbti-label {
  margin: 0 8px;
  color: var(--color-light-secondary);
}

.mbti-name {
  font-size: 18px;
  color: var(--color-primary);
}

/* 称号 */
.card-slogan {
  text-align: center;
  font-family: var(--font-decorative);
  font-size: 20px;
  color: var(--color-accent);
  margin-bottom: 24px;
}

/* 维度图谱 */
.card-dimensions {
  background: var(--color-background);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.dimensions-title {
  font-size: 14px;
  color: var(--color-secondary);
  margin-bottom: 16px;
  text-align: center;
}

.dimensions-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dimension-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dimension-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-light-secondary);
}

.dimension-bar {
  height: 8px;
  background: var(--color-light);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dimension-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.dimension-fill.left {
  left: 0;
  background: linear-gradient(90deg, #4A5B6E 0%, #6B7C8E 100%);
}

.dimension-fill.right {
  right: 0;
  background: linear-gradient(90deg, #C9AE5D 0%, var(--color-accent) 100%);
}

.dimension-percentage {
  text-align: center;
  font-size: 12px;
  color: var(--color-secondary);
  margin-top: 4px;
}

/* 非遗解读 */
.card-interpretation {
  text-align: left;
  margin-bottom: 20px;
}

.interp-title {
  font-family: var(--font-decorative);
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.interp-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  font-style: italic;
}

/* 标签 */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  padding: 6px 14px;
  background: rgba(194, 59, 34, 0.1);
  color: var(--color-primary);
  border-radius: 16px;
  font-size: 13px;
}

/* 推荐语 */
.card-quote {
  text-align: center;
  font-family: var(--font-decorative);
  font-size: 16px;
  color: var(--color-secondary);
  padding: 16px;
  background: linear-gradient(135deg, #F5F0E8 0%, #E8D9A8 100%);
  border-radius: 12px;
  margin-bottom: 20px;
}

/* 了解更多按钮 */
.card-learn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 25px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.card-learn-more:hover {
  background: var(--color-primary);
  color: #fff;
}

.learn-arrow {
  transition: transform 0.3s;
}

.card-learn-more:hover .learn-arrow {
  transform: translateX(4px);
}

/* 结果操作按钮 */
.identity-actions {
  margin-bottom: 20px;
}

.btn-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.btn-action span:first-child {
  font-size: 24px;
}

.btn-save {
  background: #fff;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-save:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-share {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-primary) 100%);
  border: none;
  color: #fff;
}

.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 59, 34, 0.3);
}

.btn-retest {
  background: #fff;
  border: 2px solid var(--color-light);
  color: var(--color-secondary);
}

.btn-retest:hover {
  border-color: var(--color-secondary);
}

/* 历史记录入口 */
.history-entry {
  text-align: center;
}

.btn-history {
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--color-light);
  border-radius: 25px;
  color: var(--color-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-history:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* 身份分享弹窗 */
.identity-share-container {
  position: relative;
  width: 400px;
  max-width: 90vw;
  background-color: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
  padding: 24px;
  z-index: 1001;
  animation: scorePreviewSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-preview-title {
  text-align: center;
  margin-bottom: 20px;
}

.share-preview-title h3 {
  font-family: var(--font-title);
  font-size: 20px;
  color: #2C2C2C;
  margin: 0 0 4px 0;
}

.share-preview-title p {
  font-size: 13px;
  color: #999999;
  margin: 0;
}

.share-card-preview {
  background: linear-gradient(135deg, #C23B22 0%, #4A5B6E 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* 收藏记录弹窗 */
.identity-history-container {
  position: relative;
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  background-color: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
  padding: 24px;
  z-index: 1001;
  overflow-y: auto;
  animation: scorePreviewSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.history-title {
  text-align: center;
  margin-bottom: 20px;
}

.history-title h3 {
  font-family: var(--font-title);
  font-size: 20px;
  color: #2C2C2C;
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--color-background);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.history-item:hover {
  background: #EDE6D8;
}

.history-icon {
  font-size: 36px;
}

.history-info {
  flex: 1;
}

.history-heritage {
  font-family: var(--font-decorative);
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.history-mbti {
  font-size: 13px;
  color: var(--color-light-secondary);
}

.history-date {
  font-size: 12px;
  color: var(--color-light-secondary);
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-light-secondary);
}

.history-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.history-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-light);
}

/* 保存成功提示 */
.identity-save-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #FFFFFF;
  padding: 16px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
}

.identity-save-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* 响应式 */
@media (max-width: 768px) {
  .identity-museum-container {
    padding: 16px;
  }

  .identity-header h2 {
    font-size: 28px;
  }

  .identity-subtitle {
    font-size: 16px;
  }

  .intro-poem {
    padding: 24px;
  }

  .poem-title {
    font-size: 18px;
  }

  .poem-content {
    font-size: 15px;
    line-height: 1.8;
  }

  .btn-start-test {
    padding: 14px 36px;
    font-size: 16px;
  }

  .question-card-item {
    padding: 24px;
  }

  .question-title {
    font-size: 18px;
  }

  .tendency-label {
    font-size: 12px;
    width: 60px;
  }

  .test-navigation {
    flex-direction: column;
  }

  .btn-nav {
    width: 100%;
  }

  .identity-actions {
    flex-wrap: wrap;
  }

  .btn-action {
    flex: 1;
    min-width: calc(50% - 8px);
  }

  .identity-share-container,
  .identity-history-container {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .identity-header h2 {
    font-size: 24px;
  }

  .card-heritage-name {
    padding: 16px 0;
  }

  .heritage-text {
    font-size: 26px;
  }

  .mbti-type {
    font-size: 22px;
  }

  .card-slogan {
    font-size: 18px;
  }

  .btn-action {
    flex: 100%;
  }

  .btn-action span:first-child {
    font-size: 20px;
  }
}

/* ==================== 非遗树洞模块样式 ==================== */

/* 树洞容器 */
.treehole-container {
  position: relative;
  width: 100%;
  min-height: 600px;
  overflow: hidden;
  border-radius: 16px;
  background: #F5F0E8;
}

/* 山间场景背景 */
.treehole-scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  overflow: hidden;
  z-index: 0;
}

/* 天空渐变 */
.sky-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, 
    #FFE4B5 0%,    /* 浅金色（夕阳） */
    #FFDAB9 30%,   /* 桃色 */
    #F5F0E8 100%   /* 牙白渐变到底部 */
  );
}

/* 远山 */
.mountains-far {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
}

.mountain {
  position: absolute;
  bottom: 0;
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
}

.mountain-1 {
  left: -50px;
  border-bottom: 120px solid #B8C4CE;
}

.mountain-2 {
  left: 30%;
  border-left-width: 150px;
  border-right-width: 150px;
  border-bottom: 140px solid #9AACBA;
}

.mountain-3 {
  right: -50px;
  border-left-width: 120px;
  border-right-width: 120px;
  border-bottom: 110px solid #A8B8C8;
}

/* 近山 */
.mountains-near {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
}

.hill {
  position: absolute;
  bottom: 0;
  background: #8BA3B5;
  border-radius: 50% 50% 0 0;
}

.hill-1 {
  left: -30px;
  width: 250px;
  height: 80px;
  background: linear-gradient(180deg, #7A93A5 0%, #6A8395 100%);
}

.hill-2 {
  right: -30px;
  width: 280px;
  height: 90px;
  background: linear-gradient(180deg, #8599AB 0%, #7589A1 100%);
}

/* 树木 */
.trees {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  height: 150px;
}

.tree {
  position: absolute;
  bottom: 0;
}

.tree::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 40px;
  background: #5D4E37;
  border-radius: 2px;
}

.tree::after {
  content: '';
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 60px solid #3A5A40;
}

.tree-1 {
  left: 8%;
}

.tree-2 {
  right: 12%;
}

.tree-2::before {
  height: 50px;
}

.tree-2::after {
  bottom: 45px;
  border-bottom-width: 70px;
}

.tree-3 {
  left: 15%;
  transform: scale(0.7);
}

/* 阳光效果 */
.sunlight {
  position: absolute;
  top: 20px;
  right: 60px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, 
    rgba(255, 215, 0, 0.6) 0%, 
    rgba(255, 200, 100, 0.3) 40%, 
    transparent 70%
  );
  border-radius: 50%;
  animation: sunlightPulse 4s ease-in-out infinite;
}

@keyframes sunlightPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* 云朵 */
.clouds {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  height: 60px;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50px;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-1 {
  top: 10px;
  left: 20%;
  width: 80px;
  height: 25px;
  animation: cloudFloat 20s linear infinite;
}

.cloud-1::before {
  width: 40px;
  height: 40px;
  top: -20px;
  left: 10px;
}

.cloud-1::after {
  width: 30px;
  height: 30px;
  top: -15px;
  right: 10px;
}

.cloud-2 {
  top: 35px;
  left: 55%;
  width: 60px;
  height: 20px;
  animation: cloudFloat 25s linear infinite;
}

.cloud-2::before {
  width: 30px;
  height: 30px;
  top: -15px;
  left: 8px;
}

.cloud-2::after {
  width: 25px;
  height: 25px;
  top: -12px;
  right: 8px;
}

@keyframes cloudFloat {
  0% { transform: translateX(0); }
  50% { transform: translateX(20px); }
  100% { transform: translateX(0); }
}

/* 树洞对话区 */
.treehole-dialogue {
  position: relative;
  z-index: 1;
  padding: 20px;
  margin-top: 200px;
}

/* 听阿婆讲故事入口 */
.treehole-entry {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

.treehole-entry-hint {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(194, 59, 34, 0.15);
  border: 2px solid rgba(194, 59, 34, 0.2);
  max-width: 400px;
  margin: 0 auto;
}

.hint-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hint-icon {
  font-size: 28px;
  animation: treeSwing 2s ease-in-out infinite;
}

@keyframes treeSwing {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.hint-text {
  font-size: 16px;
  color: #666;
  font-family: 'Noto Serif SC', serif;
}

/* 阿婆容器 */
.apo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

/* 阿婆大头像 - 改进版 */
.apo-avatar {
  position: relative;
  width: 110px;
  height: 130px;
  animation: apoFloat 3s ease-in-out infinite;
}

@keyframes apoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 阿婆身体（深蓝色苗族便装，带绣花装饰） */
.apo-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 55px;
  background: linear-gradient(180deg, #2C3E50 0%, #1A252F 100%);
  border-radius: 10px 10px 25px 25px;
  overflow: hidden;
}

/* 身体上的苗绣装饰条纹 */
.apo-body::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #C9AE5D 20%, #C9AE5D 80%, transparent);
  border-radius: 2px;
}

.apo-body::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #C23B22 20%, #C23B22 80%, transparent);
  border-radius: 2px;
}

/* 阿婆头部 - 更大更慈祥 */
.apo-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 65px;
  background: linear-gradient(180deg, #F5DEB3 0%, #E8D4A8 100%);
  border-radius: 50% 50% 45% 45%;
  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.1);
}

/* 阿婆头发（黑色头帕，包头样式） */
.apo-hair {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 35px;
  background: linear-gradient(180deg, #1A1A1A 0%, #2D2D2D 100%);
  border-radius: 50% 50% 20% 20%;
  z-index: 2;
}

/* 头帕边缘装饰线 */
.apo-hair::before {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C9AE5D 20%, #C9AE5D 80%, transparent);
}

/* 阿婆面部 - 慈祥的老人面容 */
.apo-face {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 42px;
}

/* 阿婆眼睛 - 眯眼慈祥 */
.apo-eyes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.apo-eye {
  width: 8px;
  height: 5px;
  background: #333;
  border-radius: 50%;
  position: relative;
}

/* 眼睛下的细纹 */
.apo-eye::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(180,140,100,0.5), transparent);
}

/* 眉毛 */
.apo-eyebrow {
  position: absolute;
  width: 10px;
  height: 2px;
  background: #4A4A4A;
  border-radius: 2px;
}

.apo-eyebrow.left {
  top: -2px;
  left: -4px;
  transform: rotate(-5deg);
}

.apo-eyebrow.right {
  top: -2px;
  right: -4px;
  transform: rotate(5deg);
}

/* 阿婆慈祥的微笑 - 更大的笑容 */
.apo-smile {
  width: 20px;
  height: 10px;
  border: 2px solid #C0392B;
  border-top: none;
  border-radius: 0 0 20px 20px;
  margin: 8px auto 0;
}

/* 脸颊红晕 */
.apo-cheeks {
  position: absolute;
  top: 18px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.apo-cheek {
  width: 10px;
  height: 6px;
  background: radial-gradient(ellipse, rgba(220,150,120,0.4), transparent);
  border-radius: 50%;
}

/* 阿婆银耳环 - 更大更精美 */
.apo-earring {
  position: absolute;
  top: 30px;
  width: 10px;
  height: 16px;
  background: linear-gradient(180deg, #F0F0F0 0%, #C0C0C0 50%, #A0A0A0 100%);
  border-radius: 0 0 50% 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.apo-earring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 3px;
  background: #E8E8E8;
  border-radius: 2px;
}

.apo-earring.left {
  left: 0px;
}

.apo-earring.right {
  right: 0px;
}

/* 阿婆头帕装饰 - 更精美的苗族头帕 */
.apo-headscarf {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 10px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #4A5B6E 10%,
    #6A7B8E 30%,
    #C9AE5D 50%,
    #6A7B8E 70%,
    #4A5B6E 90%,
    transparent 100%
  );
  border-radius: 3px;
  z-index: 3;
}

/* 头帕上的小银饰 */
.apo-headscarf::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #F0F0F0 40%, #C0C0C0 100%);
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

/* 头帕两端垂下的装饰 */
.apo-headscarf-tassel {
  position: absolute;
  top: 33px;
  width: 4px;
  height: 15px;
  background: linear-gradient(180deg, #C9AE5D, #8B7355);
  border-radius: 0 0 2px 2px;
}

.apo-headscarf-tassel.left {
  left: 12px;
}

.apo-headscarf-tassel.right {
  right: 12px;
}

/* 颈部银项圈装饰 */
.apo-neck {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 6px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #C0C0C0 10%,
    #E8E8E8 50%,
    #C0C0C0 90%,
    transparent 100%
  );
  border-radius: 3px;
}

/* 阿婆名字 */
.apo-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--color-secondary);
  font-family: var(--font-decorative);
}

.apo-name-icon {
  font-size: 16px;
}

/* 聊天消息区域 */
.chat-messages {
  max-height: 350px;
  overflow-y: auto;
  padding: 10px 0;
  margin-bottom: 15px;
}

/* 点击提示 - 引导用户选择 */
.click-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  margin: 10px 0;
  background: linear-gradient(135deg, rgba(194, 59, 34, 0.1), rgba(194, 59, 34, 0.05));
  border: 2px dashed var(--color-primary);
  border-radius: 15px;
  animation: pulse 2s ease-in-out infinite;
}

.hint-arrow {
  font-size: 28px;
  color: var(--color-primary);
  animation: bounce 1s ease-in-out infinite;
}

.hint-text {
  font-size: 15px;
  color: var(--color-primary);
  margin-top: 8px;
  font-family: var(--font-decorative);
  font-weight: 500;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 消息包装器 */
.message-wrapper {
  display: flex;
  margin-bottom: 15px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 阿婆消息 */
.apo-message {
  align-items: flex-start;
}

.apo-message .apo-avatar-mini {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(180deg, #2C3E50 0%, #1A252F 100%);
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
  overflow: hidden;
}

/* 小头像的头发 */
.apo-message .apo-avatar-mini::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 14px;
  background: #1A1A1A;
  border-radius: 50% 50% 30% 30%;
}

/* 小头像的脸部 */
.apo-message .apo-avatar-mini::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(180deg, #F5DEB3 0%, #E8D4A8 100%);
  border-radius: 50% 50% 45% 45%;
}

/* 聊天气泡基础 */
.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  line-height: 1.6;
  font-size: 14px;
}

.chat-bubble p {
  margin: 0;
}

/* 阿婆气泡 */
.apo-bubble {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0 20px 20px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  color: var(--color-secondary);
  position: relative;
}

.apo-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  border: 8px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(255, 255, 255, 0.95);
}

/* 用户气泡 */
.user-bubble {
  background: linear-gradient(135deg, var(--color-primary) 0%, #D85A3E 100%);
  color: #fff;
  border-radius: 20px 0 20px 20px;
  box-shadow: 0 2px 10px rgba(194, 59, 34, 0.3);
}

/* 滑入动画 */
.slide-in-left {
  animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 选项容器 */
.options-container {
  padding: 15px 0;
  min-height: 60px;
}

/* 选项网格 */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.two-options {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.two-options .option-btn {
  flex: 1;
  min-width: calc(50% - 8px);
  max-width: 280px;
}

.multi-options .option-btn {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

/* 选项按钮 - 树洞专用 */
.treehole-options .option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, #fff 0%, #FDF8F5 100%);
  border: 3px solid var(--color-primary);
  border-radius: 30px;
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(194, 59, 34, 0.15);
  margin: 0 auto;
}

.treehole-options .option-btn:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, #D85A3E 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(194, 59, 34, 0.35);
}

.treehole-options .option-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(194, 59, 34, 0.25);
}

.option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 24px;
  color: var(--color-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(194, 59, 34, 0.1);
}

.option-btn:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, #D85A3E 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(194, 59, 34, 0.3);
}

.option-btn:active {
  transform: translateY(0);
}

.option-btn.fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 进度指示器 */
.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
}

/* 进度圆点 */
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #DDD;
  transition: all 0.3s ease;
  position: relative;
}

.progress-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 8px;
  height: 2px;
  background: #DDD;
  transform: translateY(-50%);
}

.progress-dot:last-child::after {
  display: none;
}

.progress-dot.completed {
  background: var(--color-primary);
  box-shadow: 0 0 8px rgba(194, 59, 34, 0.5);
}

.progress-dot.completed::after {
  background: var(--color-primary);
}

.progress-dot.current {
  background: var(--color-accent);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(201, 174, 93, 0.6);
}

.progress-dot.current::after {
  background: linear-gradient(90deg, var(--color-accent), #DDD);
}

/* 进度文字 */
.progress-text {
  font-size: 13px;
  color: var(--color-light-secondary);
}

/* 上一题按钮 */
.btn-prev-question {
  display: block;
  margin: 15px auto 0;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--color-light-secondary);
  border-radius: 20px;
  color: var(--color-light-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-prev-question:hover {
  background: var(--color-light-secondary);
  color: #fff;
}

/* 开始对话按钮 */
.btn-start-chat {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  padding: 18px 50px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #D85A3E 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-family: var(--font-decorative);
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(194, 59, 34, 0.5);
  transition: all 0.3s;
  animation: floatBtn 3s ease-in-out infinite;
}

@keyframes floatBtn {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.btn-start-chat:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 35px rgba(194, 59, 34, 0.6);
  animation: none;
}

.btn-start-chat:active {
  transform: translateY(-2px) scale(0.98);
}

.btn-start-chat .btn-arrow {
  transition: transform 0.3s;
}

.btn-start-chat:hover .btn-arrow {
  transform: translateX(8px);
}

/* 结果页 */
.treehole-result {
  position: relative;
  z-index: 1;
  padding: 20px;
  margin-top: 200px;
}

/* 结果卡片 */
.result-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px 25px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.result-card.scale-in {
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* 结果装饰线 */
.result-decor-top,
.result-decor-bottom {
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-primary) 20%, 
    var(--color-accent) 50%, 
    var(--color-primary) 80%, 
    transparent 100%
  );
}

.result-decor-bottom {
  margin-top: 25px;
}

/* 阿婆结语 */
.apo-conclusion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.apo-avatar-small {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, #2C3E50 0%, #4A5B6E 100%);
  border-radius: 50%;
  position: relative;
}

.apo-avatar-small::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #F5DEB3;
  border-radius: 50%;
}

.apo-bubble-small {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 14px;
  border-radius: 0 16px 16px 16px;
  font-size: 14px;
  color: var(--color-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 结果头部 */
.result-header {
  text-align: center;
  margin-bottom: 20px;
}

.result-badge {
  font-size: 40px;
  margin-bottom: 10px;
}

.result-title {
  font-size: 18px;
  color: var(--color-secondary);
  font-family: var(--font-decorative);
}

/* 结果非遗 */
.result-heritage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.result-icon {
  font-size: 72px;
  margin-bottom: 10px;
}

.result-name {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 36px;
  color: var(--color-primary);
  text-align: center;
}

/* 结果描述 */
.result-description {
  text-align: center;
  font-size: 14px;
  color: var(--color-light-secondary);
  margin-bottom: 20px;
}

/* 分割线 */
.result-divider {
  text-align: center;
  margin: 20px 0;
}

.divider-svg {
  width: 200px;
  height: 20px;
}

/* 推荐语 */
.result-quote {
  text-align: center;
  font-size: 15px;
  font-style: italic;
  color: var(--color-secondary);
  line-height: 1.8;
  padding: 0 15px;
}

/* 四角装饰 */
.corner-decor {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--color-accent);
  opacity: 0.5;
}

.corner-decor.top-left {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
}

.corner-decor.top-right {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
}

.corner-decor.bottom-left {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
}

.corner-decor.bottom-right {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

/* 了解更多按钮 */
.result-learn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 80%;
  max-width: 280px;
  margin: 25px auto 0;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, #3A4B5E 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 15px rgba(74, 91, 110, 0.3);
}

.result-learn-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(74, 91, 110, 0.4);
  color: #fff;
}

.learn-arrow {
  transition: transform 0.3s;
}

.result-learn-more:hover .learn-arrow {
  transform: translateX(5px);
}

/* 结果操作按钮 */
.treehole-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.treehole-actions .btn-action {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
}

/* 历史记录入口 */
.treehole-history {
  margin-top: 20px;
}

.treehole-history .btn-history {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-light);
  color: var(--color-secondary);
}

/* 分享预览弹窗 */
.treehole-share-container,
.treehole-history-container {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 450px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.share-preview-title {
  text-align: center;
  margin-bottom: 20px;
}

.share-preview-title h3 {
  font-family: var(--font-decorative);
  font-size: 22px;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.share-preview-title p {
  font-size: 13px;
  color: var(--color-light-secondary);
}

.share-card-preview {
  margin: 15px 0;
}

.share-card-inner {
  border-radius: 16px;
  overflow: hidden;
}

.share-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.share-preview-actions .btn {
  flex: 1;
  min-width: 100px;
}

/* 保存提示 */
.treehole-save-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
}

.treehole-save-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  font-size: 16px;
}

/* 历史列表 */
.treehole-history-container .history-list {
  max-height: 400px;
  overflow-y: auto;
}

.treehole-history-container .history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: var(--color-background);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.treehole-history-container .history-item:hover {
  background: var(--color-light);
}

.treehole-history-container .history-icon {
  font-size: 32px;
}

.treehole-history-container .history-info {
  flex: 1;
}

.treehole-history-container .history-heritage {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 3px;
}

.treehole-history-container .history-desc {
  font-size: 12px;
  color: var(--color-light-secondary);
}

.treehole-history-container .history-date {
  font-size: 12px;
  color: var(--color-light-secondary);
}

/* 空状态 */
.history-empty {
  text-align: center;
  padding: 40px 20px;
}

.history-empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.history-empty p {
  color: var(--color-light-secondary);
  margin-bottom: 5px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .treehole-dialogue {
    margin-top: 180px;
  }
  
  .chat-messages {
    max-height: 300px;
  }
  
  .chat-bubble {
    max-width: 85%;
    font-size: 13px;
    padding: 10px 14px;
  }
  
  .two-options {
    flex-direction: column;
  }
  
  .two-options .option-btn {
    min-width: 100%;
  }
  
  .option-btn {
    padding: 12px 16px;
    font-size: 13px;
  }
  
  .progress-dots {
    gap: 5px;
  }
  
  .progress-dot {
    width: 10px;
    height: 10px;
  }
  
  .progress-dot::after {
    width: 5px;
  }
  
  .result-card {
    padding: 25px 18px;
  }
  
  .result-icon {
    font-size: 56px;
  }
  
  .result-name {
    font-size: 28px;
  }
  
  .btn-start-chat {
    margin: 15px auto;
    padding: 14px 30px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .treehole-scene {
    height: 250px;
  }
  
  .treehole-dialogue {
    margin-top: 150px;
  }
  
  .apo-avatar {
    width: 80px;
    height: 100px;
  }
  
  .apo-body {
    width: 55px;
    height: 40px;
  }
  
  .apo-head {
    width: 40px;
    height: 45px;
  }
  
  .apo-hair {
    width: 44px;
    height: 25px;
  }
  
  .treehole-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .treehole-actions .btn-action {
    width: 100%;
    max-width: 250px;
  }
}

/* ==================== 图片放大弹窗样式 ==================== */
.image-zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-zoom-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.image-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.image-zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #333;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  line-height: 1;
}

.image-zoom-close:hover {
  background: #fff;
  transform: scale(1.1);
}

.image-zoom-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

#zoomedImage {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

.image-zoom-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  z-index: 10001;
  pointer-events: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .image-zoom-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  #zoomedImage {
    max-width: 95vw;
    max-height: 80vh;
  }

  .image-zoom-hint {
    font-size: 12px;
    bottom: 15px;
  }
}
