/* ========== 基础变量与重置 ========== */
:root {
  --gold: #D4AF37;
  --gold-light: #FFD700;
  --gold-dark: #B8860B;
  --gold-dim: #8B6914;
  --red-dark: #8B0000;
  --red-wine: #4A0000;
  --wood-dark: #1a0a05;
  --wood-mid: #2d1810;
  --wood-light: #4a2c1a;
  --ink: #0d0d0d;
  --paper: #f5f0e8;
  --paper-dark: #e8e0d0;
  --text-gold: #c9a84c;
  --text-light: #f0e6d0;
  --text-dim: #8a7a60;
  --shadow-gold: rgba(212, 175, 55, 0.3);
  --shadow-dark: rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  font-weight: 500;
  background: var(--ink);
  color: var(--text-light);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ========== 场景系统 ========== */
.scene {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  overflow-y: auto;
}
.scene.active {
  opacity: 1;
  pointer-events: all;
  z-index: 10;
}

/* 网站名称 */
.site-logo {
  position: fixed;
  top: 12px;
  left: 16px;
  height: 72px;
  width: auto;
  z-index: 50;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.5)) drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

/* ========== 按钮 ========== */
.btn {
  font-family: 'Noto Serif SC', serif;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  position: relative;
  overflow: hidden;
}
.btn-main {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 48px;
  border-radius: 4px;
  letter-spacing: 4px;
  box-shadow: 0 4px 20px var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid var(--gold-dark);
}
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.3);
  filter: brightness(1.1);
}
.btn-main:active { transform: translateY(0); }
.btn-secondary {
  background: transparent;
  color: var(--gold);
  font-size: 1rem;
  padding: 12px 32px;
  border-radius: 4px;
  border: 1px solid var(--gold-dark);
  letter-spacing: 2px;
}
.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
}
.btn-skip {
  background: transparent;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 8px 20px;
  border: 1px solid rgba(138, 122, 96, 0.3);
  border-radius: 4px;
  letter-spacing: 1px;
  margin-top: 12px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}
.btn-skip:hover { color: var(--text-gold); border-color: var(--gold-dark); text-shadow: 0 0 8px rgba(0, 0, 0, 0.7); }
.btn-toss {
  animation: breathe 2s ease-in-out infinite;
}
.btn-toss:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ========== 首页 ========== */
.scene-home {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a0a0a 0%, #0d0d0d 70%);
}
.home-content {
  text-align: center;
  animation: fadeInUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-yin-yang {
  font-size: 5rem;
  color: var(--gold);
  text-shadow: 0 0 40px var(--shadow-gold);
  margin-bottom: 20px;
  animation: yinYangPulse 3s ease-in-out infinite;
}
@keyframes yinYangPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.home-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 12px;
  text-shadow: 0 2px 20px var(--shadow-gold);
  margin-bottom: 8px;
}
.home-subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  letter-spacing: 6px;
  margin-bottom: 40px;
  font-weight: 500;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9);
}
.home-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  line-height: 2;
  margin-bottom: 40px;
  font-weight: 500;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9);
}
.home-footer {
  margin-top: 60px;
  font-size: 0.75rem;
  color: rgba(138, 122, 96, 0.5);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

/* ========== 首页八卦背景动画 ========== */
.bagua-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(100vw, 1200px);
  height: min(100vh, 1200px);
  max-width: 100vw;
  max-height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
  animation: baguaFloat 10s ease-in-out infinite;
}
@keyframes baguaFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-20px); }
}
.bagua-svg {
  width: 100%;
  height: 100%;
  animation: baguaRotate 80s linear infinite;
}
@keyframes baguaRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* 文字环（最外层） */
.text-ring {
  animation: textRingRotate 100s linear infinite;
  transform-origin: 400px 400px;
}
@keyframes textRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
/* 装饰线环（次外层） */
.lines-ring {
  animation: linesRingRotate 90s linear infinite reverse;
  transform-origin: 400px 400px;
}
@keyframes linesRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* 八卦符号环（主环） */
.bagua-outer-ring {
  animation: outerRingRotate 80s linear infinite reverse;
  transform-origin: 400px 400px;
}
@keyframes outerRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* 连接线动画 */
.connect-lines {
  animation: connectPulse 3s ease-in-out infinite;
  transform-origin: 400px 400px;
}
@keyframes connectPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}
/* 中心太极图 */
.taiji-center {
  animation: taijiPulse 4s ease-in-out infinite;
  transform-origin: 400px 400px;
}
@keyframes taijiPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.04); opacity: 1; }
}
/* 粒子群流动 */
.particle-flow {
  animation: particleRotate 30s linear infinite;
  transform-origin: 400px 400px;
}
@keyframes particleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
/* 轨道光点 */
.orbit-dots {
  animation: orbitDotsRotate 25s linear infinite;
  transform-origin: 400px 400px;
}
@keyframes orbitDotsRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
/* 背景多层光晕 */
.bagua-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
  animation: baguaGlow 5s ease-in-out infinite;
  pointer-events: none;
}
.bagua-bg::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
  animation: baguaGlowOuter 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes baguaGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.15); }
}
@keyframes baguaGlowOuter {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}
.home-content {
  position: relative;
  z-index: 2;
}

/* ========== 起卦仪式页 ========== */
.scene-ritual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #2a0a0a 0%, #0d0d0d 60%);
}
.ritual-container {
  text-align: center;
  max-width: 600px;
  padding: 40px;
}
.ritual-incense {
  position: relative;
  width: 60px;
  height: 80px;
  margin: 0 auto 40px;
}
.incense-stick {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 50px;
  background: linear-gradient(to bottom, #8B4513, #3d1f0a);
  border-radius: 2px;
}
.incense-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ff6600, #ff3300);
  border-radius: 50%;
  box-shadow: 0 0 20px #ff6600, 0 0 40px rgba(255, 102, 0, 0.3);
  animation: incenseGlow 1.5s ease-in-out infinite alternate;
}
@keyframes incenseGlow {
  from { opacity: 0.7; box-shadow: 0 0 15px #ff6600; }
  to { opacity: 1; box-shadow: 0 0 30px #ff6600, 0 0 50px rgba(255, 102, 0, 0.4); }
}
.ritual-texts {
  margin-bottom: 40px;
  min-height: 180px;
}
.ritual-line {
  font-size: 1.3rem;
  color: var(--text-gold);
  letter-spacing: 4px;
  line-height: 2.2;
  font-weight: 500;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}
.ritual-line.show {
  opacity: 1;
  transform: translateY(0);
}
.ritual-line-warn {
  color: var(--red-dark);
  text-shadow: 0 0 15px rgba(139, 0, 0, 0.3);
}
.ritual-input-area {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.3s;
}
.ritual-input-area.show {
  opacity: 1;
  transform: translateY(0);
}
.ritual-input {
  width: 100%;
  max-width: 400px;
  padding: 14px 20px;
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  outline: none;
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.ritual-input::placeholder {
  color: rgba(138, 122, 96, 0.5);
  font-size: 0.9rem;
}
.ritual-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

/* ========== 粒子画布 ========== */
.particle-canvas {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.6;
}

/* ========== 摇卦页 ========== */
.scene-divination {
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at center, #1a0a05 0%, #0d0d0d 60%);
}

/* 顶部信息栏 */
.div-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.div-progress {
  display: flex;
  gap: 10px;
}
.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.3);
  transition: all 0.4s ease;
}
.progress-dot.completed {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--shadow-gold);
}
.progress-dot.current {
  border-color: var(--gold);
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}
.div-info {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}
.div-round { color: var(--gold); text-shadow: 0 0 8px rgba(0, 0, 0, 0.7); }
.div-yao-name { color: var(--text-gold); text-shadow: 0 0 8px rgba(0, 0, 0, 0.7); }

/* 主区域 */
.div-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 20px 40px;
  position: relative;
}

/* 紫檀木桌面 - 3D透视效果 */
.wood-table {
  width: 640px;
  height: 440px;
  position: relative;
  border-radius: 12px;
  /* 3D透视基础 */
  perspective: 1200px;
  transform-style: preserve-3d;
  /* 桌面表面：多层木纹叠加 */
  background:
    /* 表面高光 */
    linear-gradient(170deg, rgba(212,175,55,0.08) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.3) 100%),
    /* 横向木纹纹理 */
    repeating-linear-gradient(90deg, 
      #1e0f08 0px, #2a150a 1px, #1e0f08 3px, 
      #3d1f12 5px, #1e0f08 7px, #251208 8px,
      #1e0f08 10px, #2d1810 12px, #1e0f08 14px
    ),
    /* 纵向木纹渐变 */
    linear-gradient(to bottom, 
      #2d1810 0%, #2a150a 20%, #251208 40%, 
      #2d1810 60%, #1e0f08 80%, #1a0a05 100%
    );
  /* 3D厚度阴影 */
  box-shadow:
    /* 桌面下方厚度 */
    0 3px 0 #1a0a05,
    0 6px 0 #151005,
    0 9px 0 #100a04,
    0 12px 0 #0a0503,
    /* 桌面边缘光 */
    inset 0 1px 0 rgba(212,175,55,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    inset 1px 0 0 rgba(212,175,55,0.05),
    inset -1px 0 0 rgba(0,0,0,0.4),
    /* 外部投影 */
    0 25px 50px rgba(0,0,0,0.7),
    0 40px 80px rgba(0,0,0,0.4),
    0 0 100px rgba(0,0,0,0.3);
  border: 1px solid #3d1f12;
  overflow: hidden;
  /* 3D倾斜 */
  transform: perspective(1200px) rotateX(8deg);
  transform-origin: center bottom;
  transition: transform 0.5s ease;
}
.wood-table:hover {
  transform: perspective(1200px) rotateX(6deg);
}
/* 桌面表面光泽层 */
.wood-table::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 25% 15%, rgba(212,175,55,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 85%, rgba(139,0,0,0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}
/* 桌面边缘3D厚度伪元素 */
.wood-table::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 5px;
  right: 5px;
  height: 12px;
  background: linear-gradient(to bottom, 
    #1a0a05 0%, 
    #151005 30%, 
    #100a04 60%, 
    #0a0503 100%
  );
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* 铜钱 */
.coin-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 2;
}
.coin {
  position: absolute;
  width: 120px;
  height: 120px;
  transform-style: preserve-3d;
}
.coin-1 { top: 50%; left: 30%; transform: translate(-50%, -50%); }
.coin-2 { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.coin-3 { top: 50%; left: 70%; transform: translate(-50%, -50%); }

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px rgba(0,0,0,0.6),
    inset 0 2px 8px rgba(255,255,255,0.25),
    inset 0 -2px 8px rgba(0,0,0,0.4),
    0 0 0 4px rgba(101, 67, 33, 0.3);
}

/* 仿古铜钱正面 - 字面 */
.coin-front {
  background:
    radial-gradient(circle at 50% 50%, transparent 18%, rgba(139, 90, 20, 0.3) 19%, transparent 20%),
    radial-gradient(circle at 50% 50%, transparent 10%, rgba(0,0,0,0.15) 11%, transparent 12%),
    radial-gradient(circle at 35% 35%, #C9A84C 0%, #A07820 15%, #8B6914 40%, #6B4A1A 65%, #3d1f0a 90%);
  border: 3px solid #7A5A1A;
  transform: rotateY(0deg);
}

/* 仿古铜钱背面 - 满文/龙纹 */
.coin-back {
  background:
    radial-gradient(circle at 50% 50%, transparent 18%, rgba(101, 67, 33, 0.4) 19%, transparent 20%),
    radial-gradient(circle at 50% 50%, transparent 10%, rgba(0,0,0,0.2) 11%, transparent 12%),
    radial-gradient(circle at 35% 35%, #A07820 0%, #8B6914 25%, #6B4A1A 55%, #4a2c1a 85%);
  border: 3px solid #5A3A10;
  transform: rotateY(180deg);
}

/* 铜钱边缘厚度 - 3D侧面 */
.coin::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 4px solid #5A3A10;
  box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.2), 0 0 0 3px rgba(101, 67, 33, 0.5);
  pointer-events: none;
}

/* 中心方孔 */
.coin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #2a150a 0%, #3d1f0a 50%, #1a0a05 100%);
  border: 2px solid #6B4A1A;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6), 0 0 2px rgba(212,175,55,0.3);
  pointer-events: none;
  z-index: 2;
}

/* 正面文字布局 - 上右下左环绕方孔 */
.coin-front .coin-text-top {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2E1A0F;
  text-shadow: 0 1px 1px rgba(212,175,55,0.4);
  letter-spacing: 1px;
  opacity: 0.95;
}
.coin-front .coin-text-right {
  position: absolute;
  top: 50%;
  right: 20%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2E1A0F;
  text-shadow: 0 1px 1px rgba(212,175,55,0.4);
  letter-spacing: 1px;
  opacity: 0.95;
}
.coin-front .coin-text-bottom {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2E1A0F;
  text-shadow: 0 1px 1px rgba(212,175,55,0.4);
  letter-spacing: 1px;
  opacity: 0.95;
}
.coin-front .coin-text-left {
  position: absolute;
  top: 50%;
  left: 20%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2E1A0F;
  text-shadow: 0 1px 1px rgba(212,175,55,0.4);
  letter-spacing: 1px;
  opacity: 0.95;
}

/* 背面文字 - 满文简化 */
.coin-back .coin-manchu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  color: #2E1A0F;
  opacity: 0.7;
  letter-spacing: 2px;
  text-shadow: 0 1px 1px rgba(139,105,20,0.3);
}

/* 铜钱表面铜锈质感 */
.coin-face::before {
  content: '';
  position: absolute;
  top: 10%; left: 15%; width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 95, 48, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.coin-face::after {
  content: '';
  position: absolute;
  bottom: 20%; right: 20%; width: 15px; height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 95, 48, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* 碰撞光斑 */
.impact-flare {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.4) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
}
.impact-flare.active {
  animation: impactFlare 0.4s ease-out forwards;
}
@keyframes impactFlare {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* 记录区 */
.div-record {
  width: 280px;
  min-height: 420px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
}
.record-title {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  font-weight: 500;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 0 6px rgba(212, 175, 55, 0.3);
}
.record-list {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}
.record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.5s ease;
  opacity: 0;
  transform: translateY(10px);
}
.record-item.show {
  opacity: 1;
  transform: translateY(0);
}
.record-item.highlight {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
}
.record-item.highlight .record-yao-symbol {
  color: var(--gold-light);
  text-shadow: 0 0 12px var(--shadow-gold), 0 0 24px rgba(212, 175, 55, 0.3);
}
.record-yao-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 40px;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 4px rgba(212, 175, 55, 0.25);
}
.record-yao-symbol {
  font-family: monospace;
  font-size: 1.1rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4), 0 0 16px rgba(212, 175, 55, 0.15);
}
.record-yao-mark {
  font-size: 0.9rem;
  color: var(--gold);
  margin-left: 4px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5), 0 0 16px rgba(212, 175, 55, 0.2);
}
.record-yao-mark.change-old-yin {
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.4), 0 0 16px rgba(255, 68, 68, 0.15);
}

/* 操作区 */
.div-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 40px 40px;
  gap: 10px;
}
.btn-icon { margin-right: 6px; }

/* 结果弹窗 */
.result-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 100;
}
.result-modal.show {
  opacity: 1;
  pointer-events: all;
}
.result-modal-content {
  background: linear-gradient(135deg, #1a0a0a 0%, #2a1510 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 40px 50px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(212,175,55,0.1);
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.result-modal.show .result-modal-content {
  transform: scale(1);
}
.result-yao-name {
  font-size: 1.6rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 16px;
  text-shadow: 0 0 20px var(--shadow-gold);
}
.result-yao-symbol {
  font-family: monospace;
  font-size: 2rem;
  color: var(--gold-light);
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.result-yao-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 24px;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}
.result-coins {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}
.result-coin {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  font-family: 'SimSun', 'STSong', serif;
  position: relative;
  border: 2px solid #8B6914;
  box-shadow: 
    0 2px 6px rgba(0,0,0,0.4),
    inset 0 2px 3px rgba(255,255,255,0.1),
    inset 0 -2px 3px rgba(0,0,0,0.2);
  overflow: hidden;
}

.result-coin::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  opacity: 0.3;
  z-index: 1;
}

.result-coin::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(139, 105, 20, 0.15);
  pointer-events: none;
  z-index: 2;
}

.result-coin.yang {
  background: 
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 65% 65%, rgba(0,0,0,0.1) 0%, transparent 40%),
    radial-gradient(circle, #D4AF37 0%, #B8941F 40%, #8B6914 100%);
  color: #3E2723;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3), 0 0 2px rgba(0,0,0,0.2);
}

.result-coin.yin {
  background: 
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 65% 65%, rgba(0,0,0,0.2) 0%, transparent 40%),
    radial-gradient(circle, #5a3a10 0%, #4a2a0a 50%, #3d1f0a 100%);
  color: #B8941F;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 0 2px rgba(0,0,0,0.3);
}

/* ========== 卦象展示页 ========== */
.scene-hexagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a0a0a 0%, #0d0d0d 60%);
  gap: 30px;
}
.hexagram-display {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}
.hexagram-original, .hexagram-changed {
  text-align: center;
  padding: 30px 40px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  min-width: 200px;
}
.hex-title {
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  margin-bottom: 16px;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}
.hex-name {
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}
.hex-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hex-line-item {
  font-family: monospace;
  font-size: 1.3rem;
  color: var(--gold-dark);
  letter-spacing: 4px;
  position: relative;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
.hex-line-item.change-mark::after {
  content: attr(data-mark);
  position: absolute;
  right: -20px;
  font-size: 0.9rem;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
.hex-line-item.change-old-yin::after {
  color: #ff4444;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
.hex-change-info {
  font-size: 1rem;
  color: var(--text-gold);
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

/* ========== 解卦结果页 ========== */
.scene-interpret {
  background: linear-gradient(to bottom, #f5f0e8 0%, #e8e0d0 100%);
  color: #3d2b1f;
  overflow-y: auto;
}
.interpret-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* 卦象概览卡片 */
.overview-card {
  background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 100%);
  border: 1px solid rgba(139, 105, 20, 0.2);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.overview-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.overview-gua {
  text-align: center;
}
.overview-label {
  font-size: 0.8rem;
  color: #8a7a60;
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.overview-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #5a3a10;
  letter-spacing: 4px;
}
.overview-symbol {
  font-size: 2rem;
  color: #8B6914;
  margin-top: 4px;
}
.overview-arrow {
  font-size: 2rem;
  color: #8B6914;
  font-weight: 300;
}
.overview-hex-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 105, 20, 0.1);
}
.overview-line {
  font-family: monospace;
  font-size: 1.2rem;
  color: #5a3a10;
  letter-spacing: 4px;
  position: relative;
}
.overview-line .line-mark {
  position: absolute;
  right: -24px;
  font-size: 0.85rem;
}
.overview-line .line-mark.yang-change { color: #D4AF37; }
.overview-line .line-mark.yin-change { color: #cc3333; }

/* 解卦依据 */
.interpret-rule {
  background: #faf8f3;
  border: 1px solid rgba(139, 105, 20, 0.15);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}
.rule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.rule-badge {
  background: linear-gradient(135deg, #8B6914, #D4AF37);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 2px;
}
.rule-title {
  font-size: 1rem;
  font-weight: 600;
  color: #5a3a10;
  letter-spacing: 1px;
}
.rule-content {
  font-size: 0.95rem;
  color: #6a5a40;
  line-height: 1.8;
  letter-spacing: 0.5px;
}

/* 卦辞爻辞 */
.interpret-texts {
  margin-bottom: 24px;
}
.text-card {
  background: #faf8f3;
  border: 1px solid rgba(139, 105, 20, 0.1);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.text-card-header {
  font-size: 0.85rem;
  color: #8a7a60;
  letter-spacing: 2px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(139, 105, 20, 0.08);
}
.text-card-content {
  font-size: 1rem;
  color: #5a3a10;
  line-height: 2;
  letter-spacing: 1px;
  font-weight: 600;
}
.text-card-translation {
  font-size: 0.9rem;
  color: #7a6a50;
  line-height: 1.8;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(139, 105, 20, 0.15);
}

/* 综合解读 */
.interpret-summary {
  background: linear-gradient(135deg, #faf8f3 0%, #f5f0e8 100%);
  border: 1px solid rgba(139, 105, 20, 0.2);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.summary-title {
  font-size: 1.1rem;
  color: #5a3a10;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 16px;
  text-align: center;
}
.summary-content {
  font-size: 0.95rem;
  color: #5a3a40;
  line-height: 2;
  letter-spacing: 0.5px;
}

/* 问题关联 */
.interpret-question {
  background: rgba(139, 105, 20, 0.05);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}
.question-text {
  font-size: 1rem;
  color: #5a3a10;
  font-style: italic;
  letter-spacing: 1px;
}

/* 操作按钮 */
.interpret-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 105, 20, 0.15);
}
.interpret-actions .btn-main {
  background: linear-gradient(135deg, #8B6914, #D4AF37);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 105, 20, 0.3);
}
.interpret-actions .btn-secondary {
  color: #8B6914;
  border-color: #8B6914;
}
.interpret-actions .btn-secondary:hover {
  background: rgba(139, 105, 20, 0.1);
}

/* ========== 加载动画 ========== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
.loading-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 铜钱动画类 ========== */

/* 收聚动画 */
.coin.gathering {
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 摇卦运动（高频颤动） */
.coin.shaking {
  animation: shake 0.1s steps(1) infinite;
}
@keyframes shake {
  0% { transform: translate(-50%, -50%) translateX(0) rotate(0deg); }
  25% { transform: translate(-50%, -50%) translateX(8px) rotate(30deg); }
  50% { transform: translate(-50%, -50%) translateX(-6px) rotate(-45deg); }
  75% { transform: translate(-50%, -50%) translateX(4px) rotate(60deg); }
  100% { transform: translate(-50%, -50%) translateX(-8px) rotate(-30deg); }
}

/* 抛掷升空 */
.coin.tossing-up {
  transition: all 0.3s ease-out;
}

/* 下落 */
.coin.falling {
  transition: all 0.4s cubic-bezier(0.55, 0, 1, 0.45);
}

/* 弹跳 */
.coin.bouncing {
  animation: bounce 0.5s ease-out forwards;
}
@keyframes bounce {
  0% { transform: translate(-50%, -50%) translateY(0); }
  20% { transform: translate(-50%, -50%) translateY(-20px); }
  40% { transform: translate(-50%, -50%) translateY(0); }
  60% { transform: translate(-50%, -50%) translateY(-10px); }
  80% { transform: translate(-50%, -50%) translateY(0); }
  100% { transform: translate(-50%, -50%) translateY(-3px); }
}

/* 桌面震动 */
.wood-table.shaking {
  animation: tableShake 0.15s ease-out;
}
@keyframes tableShake {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* 揭示高亮 */
.coin.revealing {
  animation: coinReveal 0.4s ease-out forwards;
}
@keyframes coinReveal {
  0% { box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 30px rgba(212,175,55,0.6), 0 4px 15px rgba(0,0,0,0.5); }
  100% { box-shadow: 0 0 15px rgba(212,175,55,0.3), 0 4px 15px rgba(0,0,0,0.5); }
}

/* 翻转动画 */
.coin.flipping {
  animation: flipCoin 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
@keyframes flipCoin {
  0% { transform: translate(-50%, -50%) rotateY(0deg); }
  100% { transform: translate(-50%, -50%) rotateY(1800deg); }
}

/* 变爻脉动 */
.change-pulse {
  animation: changePulse 0.5s ease-in-out 3;
}
@keyframes changePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* ========== 音频开关 ========== */
.audio-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}
.audio-toggle:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .div-main {
    flex-direction: column;
    gap: 30px;
  }
  .wood-table {
    width: 80vw;
    max-width: 520px;
    height: 340px;
  }
  .div-record {
    width: 90vw;
    max-width: 400px;
    min-height: auto;
    max-height: 200px;
    overflow-y: auto;
  }
  .hexagram-display {
    flex-direction: column;
    gap: 30px;
  }
  .home-title { font-size: 2rem; letter-spacing: 6px; }
  .ritual-line { font-size: 1.1rem; }
  .interpret-container { padding: 20px 16px 40px; }
  .overview-header { gap: 16px; }
}

@media (max-width: 600px) {
  .coin { width: 80px; height: 80px; }
  .coin-text { font-size: 0.45rem; }
  .div-header { padding: 12px 20px; flex-direction: column; gap: 8px; }
  .btn-main { padding: 12px 32px; font-size: 1rem; }
}

/* ========== 打印样式 ========== */
@media print {
  .scene-interpret { background: #fff; color: #000; }
  .interpret-actions, .audio-toggle { display: none; }
}

/* ========== 支付模态框 ========== */
.payment-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.payment-modal.show {
  opacity: 1;
  pointer-events: all;
}
.payment-modal-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}
.payment-modal-content {
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, var(--wood-dark) 0%, var(--wood-mid) 100%);
  border: 2px solid var(--gold-dim);
  border-radius: 12px;
  padding: 36px 40px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 0 40px var(--shadow-gold), 0 20px 60px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 支付选项 */
.payment-options {
  text-align: center;
}
.payment-title-main {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  text-shadow: 0 0 12px var(--shadow-gold);
}
.payment-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.payment-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(212, 175, 55, 0.08);
  border: 1.5px solid var(--gold-dim);
  border-radius: 8px;
  color: var(--text-light);
  font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.payment-method:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--shadow-gold);
  transform: translateY(-2px);
}
.payment-method-icon {
  font-size: 1.4rem;
}
.payment-method-name {
  font-weight: 600;
}
.payment-footer {
  margin-top: 16px;
}
.payment-footer p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* 支付状态 */
.payment-status {
  text-align: center;
  padding: 12px 0;
}
.payment-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: iconPulse 2s ease-in-out infinite;
}
.payment-icon.success { animation: iconBounce 0.6s ease; }
.payment-icon.error { animation: iconShake 0.5s ease; }
.payment-icon.timeout { animation: none; }
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@keyframes iconBounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes iconShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}
.payment-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  text-shadow: 0 0 10px var(--shadow-gold);
}
.payment-spinner {
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spinnerRotate 1s linear infinite;
}
@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}
.payment-hint {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 16px;
}

/* 文字按钮 */
.btn-text {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.3s ease;
}
.btn-text:hover {
  color: var(--gold);
}
