/* ========================================
   二级页面公共样式 · 水墨丹青
   ======================================== */

/* 页面顶部横幅 */
.page-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 66px;
  background: linear-gradient(135deg, var(--paper-dark), var(--paper-aged));
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(168, 32, 26, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(74, 66, 56, 0.08) 0%, transparent 50%);
}

/* 横幅装饰山水 */
.page-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,60 Q150,30 300,55 Q450,35 600,55 Q750,30 900,55 Q1050,35 1200,55 L1200,80 L0,80 Z' fill='%234a4238' opacity='0.15'/%3E%3Cpath d='M0,70 Q200,50 400,65 Q600,55 800,65 Q1000,50 1200,65 L1200,80 L0,80 Z' fill='%232b2620' opacity='0.2'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: cover;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 24px;
}

.banner-number {
  font-family: var(--font-title);
  font-size: 56px;
  color: var(--seal-red);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 8px;
}

.banner-title {
  font-family: var(--font-title);
  font-size: clamp(36px, 5vw, 56px);
  color: var(--ink-black);
  letter-spacing: 10px;
  margin-bottom: 16px;
  text-shadow: 2px 2px 6px rgba(240, 230, 210, 0.6);
}

.banner-desc {
  font-family: var(--font-deco);
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 4px;
}

.banner-seal {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%) rotate(-6deg);
  width: 70px;
  height: 70px;
  background: var(--seal-red);
  color: var(--paper-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 28px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(168, 32, 26, 0.35);
  opacity: 0.9;
}

/* 面包屑导航 */
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px 0;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}

.breadcrumb a {
  color: var(--ink-soft);
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--seal-red);
}

.breadcrumb .sep {
  margin: 0 10px;
  color: var(--paper-aged);
}

.breadcrumb .current {
  color: var(--seal-red);
}

/* 子模块区 */
.sub-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 32px;
}

.sub-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.sub-section-header h2 {
  font-family: var(--font-title);
  font-size: 32px;
  color: var(--ink-black);
  letter-spacing: 4px;
  margin-bottom: 12px;
  display: inline-block;
  position: relative;
}

.sub-section-header h2::before,
.sub-section-header h2::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: var(--seal-red);
  opacity: 0.4;
}

.sub-section-header h2::before { right: 100%; margin-right: 20px; }
.sub-section-header h2::after { left: 100%; margin-left: 20px; }

.sub-section-header p {
  font-family: var(--font-deco);
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}

/* 交互卡片 */
.interact-card {
  background: var(--paper-light);
  border: 1px solid rgba(168, 32, 26, 0.15);
  border-radius: 4px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s ease;
}

.interact-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(168, 32, 26, 0.08);
  pointer-events: none;
  border-radius: 2px;
}

.interact-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.interact-card h3 {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--ink-black);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.interact-card .card-subtitle {
  font-family: var(--font-deco);
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.interact-card p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 24px;
}

/* 交互区 */
.interact-area {
  background: var(--paper);
  border: 1px dashed rgba(168, 32, 26, 0.2);
  border-radius: 4px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.interact-placeholder {
  color: var(--ink-soft);
  font-family: var(--font-deco);
  font-size: 16px;
  letter-spacing: 2px;
}

.interact-placeholder .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* 标签药丸 */
.tag-pill {
  display: inline-block;
  padding: 6px 18px;
  background: var(--paper);
  border: 1px solid var(--seal-red);
  color: var(--seal-red);
  font-family: var(--font-title);
  font-size: 18px;
  border-radius: 20px;
  margin: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag-pill:hover,
.tag-pill.active {
  background: var(--seal-red);
  color: var(--paper-light);
  transform: scale(1.05);
}

/* 信息条 */
.info-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--paper);
  border-radius: 20px;
  font-size: 13px;
  color: var(--ink-soft);
}

.info-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
}

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* 大字背景装饰 */
.bg-deco-char {
  position: absolute;
  bottom: -30px;
  right: -10px;
  font-family: var(--font-title);
  font-size: 180px;
  color: var(--ink-black);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--seal-red), var(--gold), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--paper-light);
  border: 2px solid var(--seal-red);
  border-radius: 50%;
}

.timeline-item .time {
  font-family: var(--font-deco);
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.timeline-item h4 {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--ink-black);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.timeline-item p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.9;
}

/* 视频卡片 */
.video-card {
  background: var(--paper-light);
  border: 1px solid rgba(168, 32, 26, 0.15);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--seal-red);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ink-deep), var(--ink-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-thumb .surname-big {
  font-family: var(--font-title);
  font-size: 72px;
  color: var(--paper-light);
  opacity: 0.9;
}

.video-thumb .play-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  background: rgba(168, 32, 26, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-light);
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .play-icon { opacity: 1; }

.video-info {
  padding: 16px 20px;
}

.video-info h4 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--ink-black);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.video-info p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  background: var(--seal-red);
  color: var(--paper-light);
  font-size: 11px;
  border-radius: 2px;
  letter-spacing: 1px;
}

/* 案例卡片 */
.case-card {
  background: var(--paper-light);
  border: 1px solid rgba(168, 32, 26, 0.15);
  border-radius: 4px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--seal-red);
}

.case-card .case-char {
  font-family: var(--font-title);
  font-size: 64px;
  color: var(--seal-red);
  opacity: 0.8;
  line-height: 1;
  margin-bottom: 16px;
}

.case-card h4 {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--ink-black);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.case-card .case-field {
  font-family: var(--font-deco);
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.case-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.9;
  margin-bottom: 16px;
}

.case-card .case-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.case-card .case-tag {
  padding: 3px 12px;
  background: var(--paper);
  border: 1px solid rgba(168, 32, 26, 0.2);
  border-radius: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* 卦象展示 */
.hexagram-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
}

.hexagram-line {
  width: 120px;
  height: 14px;
  background: var(--ink-black);
  border-radius: 2px;
}

.hexagram-line.broken {
  background: transparent;
  position: relative;
}

.hexagram-line.broken::before,
.hexagram-line.broken::after {
  content: '';
  position: absolute;
  top: 0;
  width: 52px;
  height: 14px;
  background: var(--ink-black);
  border-radius: 2px;
}

.hexagram-line.broken::before { left: 0; }
.hexagram-line.broken::after { right: 0; }

/* 搜索框 */
.search-box {
  display: flex;
  max-width: 480px;
  margin: 0 auto 40px;
  gap: 0;
}

.search-box input {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid rgba(168, 32, 26, 0.25);
  border-right: none;
  background: var(--paper-light);
  border-radius: 4px 0 0 4px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--ink-deep);
}

.search-box input:focus {
  outline: none;
  border-color: var(--seal-red);
}

.search-box button {
  padding: 12px 28px;
  background: var(--seal-red);
  color: var(--paper-light);
  border: none;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: var(--seal-deep);
}

/* 引用块 */
.quote-block {
  position: relative;
  padding: 32px 40px;
  background: var(--paper);
  border-left: 4px solid var(--seal-red);
  border-radius: 0 4px 4px 0;
  margin: 32px 0;
}

.quote-block::before {
  content: '「';
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--font-title);
  font-size: 40px;
  color: var(--seal-red);
  opacity: 0.3;
}

.quote-block p {
  font-family: var(--font-cursive);
  font-size: 20px;
  color: var(--ink-deep);
  line-height: 2;
  letter-spacing: 2px;
  margin: 0;
}

.quote-block .source {
  display: block;
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gold);
  text-align: right;
}

/* 子页面页脚间距修正 */
.site-footer { margin-top: 0; }

/* 响应式 */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .banner-seal { display: none; }
  .sub-section { padding: 40px 20px; }
}

@media (max-width: 600px) {
  .page-banner { min-height: 240px; margin-top: 56px; }
  .interact-card { padding: 24px; }
  .bg-deco-char { font-size: 120px; }

  /* 横幅 */
  .banner-content { padding: 28px 16px; }
  .banner-number { font-size: 40px; }
  .banner-title { letter-spacing: 4px; margin-bottom: 10px; }
  .banner-desc { font-size: 14px; letter-spacing: 2px; }

  /* 面包屑 */
  .breadcrumb { padding: 16px 20px 0; font-size: 13px; }

  /* 子区块 */
  .sub-section { padding: 36px 16px; }
  .sub-section-header { margin-bottom: 32px; }
  .sub-section-header h2 { font-size: 26px; letter-spacing: 2px; }
  .sub-section-header p { font-size: 13px; letter-spacing: 2px; }

  /* 交互卡片 */
  .interact-card { padding: 20px 16px; }
  .interact-card h3 { font-size: 20px; }
  .interact-card p { font-size: 14px; line-height: 1.9; }

  /* 标签药丸 */
  .tag-pill { font-size: 16px; padding: 5px 16px; margin: 3px; }

  /* 引用块 */
  .quote-block { padding: 24px 20px; margin: 24px 0; }
  .quote-block p { font-size: 17px; letter-spacing: 1px; }
  .quote-block .source { font-size: 12px; }

  /* 搜索框 */
  .search-box { max-width: 100%; }
  .search-box input { font-size: 14px; padding: 10px 16px; }
  .search-box button { padding: 10px 20px; font-size: 13px; }

  /* 信息条 */
  .info-chip { font-size: 12px; padding: 5px 12px; }
}

@media (max-width: 480px) {
  .page-banner { min-height: 200px; }
  .banner-content { padding: 20px 12px; }
  .banner-number { font-size: 32px; }
  .banner-title { font-size: 30px; letter-spacing: 2px; }
  .banner-desc { font-size: 13px; letter-spacing: 1px; }

  .sub-section { padding: 28px 12px; }
  .sub-section-header h2 { font-size: 22px; }
  .interact-card { padding: 16px 12px; }
  .interact-card h3 { font-size: 18px; }
  .bg-deco-char { font-size: 90px; }

  .tag-pill { font-size: 15px; padding: 4px 14px; }

  .quote-block { padding: 20px 16px; }
  .quote-block p { font-size: 15px; }
}

/* ========================================
   八卦起卦 · 六爻神卦 样式（深色古玉风格）
   仅用于 .bagua-card 内部
   ======================================== */

.bagua-card {
  background: linear-gradient(160deg, #0d0d1f 0%, #14142a 50%, #0e0e20 100%) !important;
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: #e8d5b7;
  position: relative;
  overflow: hidden;
}

.bagua-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 15%, rgba(120, 80, 20, 0.12), transparent 60%),
    radial-gradient(ellipse at 75% 85%, rgba(80, 20, 20, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.bagua-card > * {
  position: relative;
  z-index: 1;
}

.bagua-card h3 {
  color: #f0d68a !important;
  text-shadow: 0 2px 12px rgba(201, 168, 76, 0.3);
}

.bagua-card .card-subtitle {
  color: #8a7a5a !important;
  font-size: 15px !important;
}

.bagua-card p:not(.card-subtitle) {
  color: #c8b898 !important;
  font-size: 15px !important;
  line-height: 2 !important;
}

.bagua-card .bg-deco-char {
  color: rgba(201, 168, 76, 0.06) !important;
}

/* === 布局：上(龟壳+六爻) 下(解读) === */
.bagua-layout {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-top: 20px;
}

.bagua-top-row {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  justify-content: center;
}

.bagua-bottom-row {
  width: 100%;
  min-height: 80px;
}

/* === 主题选择 === */
.bagua-topic-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 28px;
}

.bagua-topic-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: #b8a87a;
  padding: 10px 26px;
  border-radius: 24px;
  cursor: pointer;
  font-family: var(--font-deco);
  font-size: 16px;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.bagua-topic-btn:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.5);
  color: #e8d5b7;
}

.bagua-topic-btn.active {
  background: linear-gradient(135deg, #c9a84c, #a08030);
  color: #1a1a2e;
  border-color: #c9a84c;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.35);
}

/* === 龟壳区域 === */
.bagua-shell-panel {
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 460px;
}

.bagua-shell-wrap {
  position: relative;
  width: 360px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.bagua-shell-wrap::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.22) 0%, rgba(201, 168, 76, 0.1) 35%, rgba(201, 168, 76, 0.04) 55%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.bagua-shell-wrap.disabled {
  cursor: default;
  pointer-events: none;
}

.bagua-shell-img {
  width: 320px;
  height: 320px;
  object-fit: contain;
  background: transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.1s;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.25));
}

.bagua-shell-wrap.shaking .bagua-shell-img {
  animation: bagua-shake 0.85s ease-in-out;
}

.bagua-shell-hint {
  font-size: 16px;
  color: #8a7a5a;
  margin-top: 16px;
  animation: bagua-hint-pulse 2.5s ease-in-out infinite;
  letter-spacing: 2px;
  font-family: var(--font-deco);
}

.bagua-shell-count {
  font-size: 15px;
  color: #c9a84c;
  margin-top: 8px;
  font-family: var(--font-deco);
  letter-spacing: 2px;
}

/* === 铜钱 === */
.bagua-coin-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  perspective: 600px;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

.bagua-coin-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.bagua-coin-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.bagua-coin-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  backface-visibility: hidden;
}

.bagua-coin-front {
  transform: rotateY(0deg);
}

.bagua-coin-back {
  transform: rotateY(180deg);
}

.bagua-coin-wrap.rattle {
  animation: bagua-coin-rattle 1.2s ease-in-out forwards;
}

.bagua-coin-wrap.rattle .bagua-coin-inner {
  animation: bagua-coin-spin 1.2s linear forwards;
}

.bagua-coin-wrap.fly-out {
  animation: bagua-coin-fly 1.3s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.bagua-coin-wrap.fly-out .bagua-coin-inner.yang-flip {
  animation: bagua-flip-yang 1.3s ease-out forwards;
}

.bagua-coin-wrap.fly-out .bagua-coin-inner.yin-flip {
  animation: bagua-flip-yin 1.3s ease-out forwards;
}

/* === 六爻卦象 === */
.bagua-yao-panel {
  flex: 1;
  min-width: 340px;
  max-width: 420px;
  padding-top: 20px;
}

.bagua-yao-section {
  margin-top: 0;
}

.bagua-yao-title {
  font-size: 18px;
  color: #c9a84c;
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 4px;
  font-family: var(--font-deco);
}

.bagua-yao-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 44px;
  margin: 6px 0;
  opacity: 0;
  transform: translateY(-12px);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.bagua-yao-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.bagua-yao-label {
  font-size: 15px;
  color: #8a7a5a;
  width: 36px;
  text-align: right;
  font-family: var(--font-deco);
}

.bagua-yao-lines {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 180px;
  height: 8px;
}

.bagua-yao-solid {
  width: 100%;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, #8a7030, #c9a84c, #8a7030);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.35);
}

.bagua-yao-broken {
  display: flex;
  gap: 18px;
  width: 100%;
}

.bagua-yao-broken span {
  flex: 1;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, #8a7030, #c9a84c, #8a7030);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.35);
}

.bagua-yao-tag {
  font-size: 14px;
  padding: 3px 10px;
  border-radius: 12px;
  min-width: 34px;
  text-align: center;
  letter-spacing: 1px;
  font-family: var(--font-deco);
}

.bagua-yao-tag.yang {
  color: #f0d68a;
  background: rgba(201, 168, 76, 0.15);
}

.bagua-yao-tag.yin {
  color: #d48888;
  background: rgba(168, 32, 26, 0.12);
}

/* === 卦象解读 === */
.bagua-interp {
  padding: 32px 36px;
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 40, 0.95));
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  animation: bagua-interp-in 0.6s ease-out;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.bagua-interp h2 {
  font-size: 32px;
  text-align: center;
  color: #f0d68a;
  font-family: var(--font-title);
  margin-bottom: 6px;
  letter-spacing: 4px;
  text-shadow: 0 0 16px rgba(201, 168, 76, 0.4);
}

.bagua-gua-num {
  font-size: 15px;
  color: #8a7a5a;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 2px;
  font-family: var(--font-deco);
}

.bagua-section {
  margin: 16px 0;
}

.bagua-section-title {
  font-size: 16px;
  color: #c9a84c;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding-bottom: 6px;
  letter-spacing: 3px;
  font-family: var(--font-deco);
}

.bagua-section-body {
  font-size: 17px;
  line-height: 2;
  color: #d8c8a8;
}

.bagua-topic-result {
  margin-top: 20px;
  padding: 20px 24px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
}

.bagua-topic-result h3 {
  font-size: 18px;
  color: #c9a84c;
  margin-bottom: 10px;
  font-family: var(--font-title);
  letter-spacing: 2px;
}

.bagua-topic-result p {
  font-size: 16px;
  line-height: 2;
  color: #d8c8a8;
  margin: 0;
}

/* === 重新问卦 === */
.bagua-restart-wrap {
  text-align: center;
  margin-top: 28px;
}

.bagua-restart-btn {
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: #c9a84c;
  padding: 12px 40px;
  border-radius: 28px;
  cursor: pointer;
  font-family: var(--font-deco);
  font-size: 16px;
  letter-spacing: 4px;
  transition: all 0.3s;
}

.bagua-restart-btn:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: #c9a84c;
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.3);
}

/* === 八卦关键帧动画（适配纸本配色）=== */

@keyframes bagua-shake {
  0%, 100% { transform: rotate(0) translateY(0); }
  8% { transform: rotate(-6deg) translateY(-3px); }
  16% { transform: rotate(5deg) translateY(-2px); }
  24% { transform: rotate(-7deg) translateY(-4px); }
  32% { transform: rotate(6deg) translateY(-2px); }
  40% { transform: rotate(-5deg) translateY(-3px); }
  48% { transform: rotate(4deg) translateY(-1px); }
  56% { transform: rotate(-3deg) translateY(-2px); }
  64% { transform: rotate(2deg) translateY(-1px); }
  76% { transform: rotate(-1deg) translateY(0); }
  88% { transform: rotate(1deg); }
}

@keyframes bagua-coin-rattle {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  6% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.55); }
  12% { transform: translate(-44%, -52%) scale(0.68); }
  18% { transform: translate(-56%, -48%) scale(0.68); }
  24% { transform: translate(-46%, -54%) scale(0.76); }
  30% { transform: translate(-54%, -46%) scale(0.76); }
  36% { transform: translate(-48%, -53%) scale(0.82); }
  42% { transform: translate(-52%, -47%) scale(0.82); }
  48% { transform: translate(-47%, -52%) scale(0.88); }
  54% { transform: translate(-53%, -48%) scale(0.88); }
  60% { transform: translate(-49%, -51%) scale(0.92); }
  66% { transform: translate(-51%, -49%) scale(0.92); }
  72% { transform: translate(-49%, -51%) scale(0.95); }
  78% { transform: translate(-51%, -49%) scale(0.95); }
  84% { transform: translate(-50%, -50%) scale(0.97); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes bagua-coin-spin {
  0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
  25% { transform: rotateX(180deg) rotateY(90deg) rotateZ(30deg); }
  50% { transform: rotateX(360deg) rotateY(-60deg) rotateZ(-20deg); }
  75% { transform: rotateX(540deg) rotateY(120deg) rotateZ(45deg); }
  100% { transform: rotateX(720deg) rotateY(-30deg) rotateZ(10deg); }
}

@keyframes bagua-coin-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  10% { opacity: 1; transform: translate(-50%, -80%) scale(1.05); }
  22% { opacity: 1; transform: translate(-50%, -120%) scale(1.12); }
  35% { opacity: 1; transform: translate(-50%, -95%) scale(1.05); }
  50% { opacity: 1; transform: translate(-50%, -108%) scale(1.02); }
  68% { opacity: 1; transform: translate(-50%, -98%) scale(1); }
  85% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

@keyframes bagua-flip-yang {
  0% { transform: rotateX(0) rotateZ(0); }
  100% { transform: rotateX(1440deg) rotateZ(15deg); }
}

@keyframes bagua-flip-yin {
  0% { transform: rotateX(0) rotateZ(0); }
  100% { transform: rotateX(1620deg) rotateZ(-12deg); }
}

@keyframes bagua-hint-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

@keyframes bagua-interp-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 八卦区响应式 === */
@media (max-width: 900px) {
  .bagua-top-row {
    gap: 32px;
  }

  .bagua-shell-panel {
    flex: 0 0 320px;
  }

  .bagua-shell-wrap {
    width: 300px;
    height: 320px;
  }

  .bagua-shell-img {
    width: 270px;
    height: 270px;
  }

  .bagua-yao-panel {
    min-width: 280px;
  }
}

@media (max-width: 720px) {
  .bagua-card {
    padding: 24px 16px !important;
  }

  .bagua-top-row {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .bagua-shell-panel {
    flex: none;
    width: 100%;
    min-height: auto;
  }

  .bagua-shell-wrap {
    width: 280px;
    height: 300px;
  }

  .bagua-shell-wrap::before {
    width: 240px;
    height: 240px;
  }

  .bagua-shell-img {
    width: 250px;
    height: 250px;
  }

  .bagua-shell-hint {
    font-size: 15px;
    letter-spacing: 1px;
  }

  .bagua-shell-count {
    font-size: 14px;
  }

  .bagua-yao-panel {
    width: 100%;
    max-width: 360px;
    min-width: 0;
    padding-top: 0;
  }

  .bagua-yao-row {
    height: 40px;
  }

  .bagua-yao-lines {
    width: 150px;
  }

  .bagua-bottom-row {
    width: 100%;
  }

  .bagua-interp {
    padding: 24px 20px;
  }

  .bagua-interp h2 {
    font-size: 26px;
  }

  .bagua-section-body {
    font-size: 16px;
    line-height: 1.9;
  }

  .bagua-topic-btn {
    padding: 8px 20px;
    font-size: 15px;
  }

  .bagua-coin-wrap {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .bagua-card {
    padding: 20px 12px !important;
  }

  .bagua-topic-bar {
    gap: 8px;
    margin: 16px 0 20px;
  }

  .bagua-topic-btn {
    padding: 7px 16px;
    font-size: 14px;
  }

  .bagua-shell-wrap {
    width: 240px;
    height: 260px;
  }

  .bagua-shell-wrap::before {
    width: 200px;
    height: 200px;
  }

  .bagua-shell-img {
    width: 220px;
    height: 220px;
  }

  .bagua-shell-hint {
    font-size: 14px;
  }

  .bagua-yao-panel {
    max-width: 300px;
  }

  .bagua-yao-row {
    height: 38px;
    gap: 10px;
  }

  .bagua-yao-lines {
    width: 120px;
    height: 6px;
  }

  .bagua-yao-solid,
  .bagua-yao-broken span {
    height: 6px;
  }

  .bagua-interp {
    padding: 20px 16px;
  }

  .bagua-interp h2 {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .bagua-gua-num {
    font-size: 13px;
  }

  .bagua-section-body {
    font-size: 15px;
  }

  .bagua-topic-result p {
    font-size: 15px;
  }
}
