/* ============================================
   知时 合盘 — 双方输入页专属样式
   墨黑 · 流金 · 双人对照
   ============================================ */

/* === 合盘 Wrap === */
.hepan-wrap {
  position: relative; z-index: 1;
  max-width: 520px; margin: 0 auto;
  padding: 48px 20px 60px;
  display: flex; flex-direction: column; align-items: center;
  min-height: 100vh;
  animation: fadeUp 1s ease-out;
}

/* === 关系类型选择 === */
.relation-types {
  display: flex; gap: 8px; margin: 0 0 36px;
  width: 100%; max-width: 480px;
}
.rel-card {
  flex: 1; padding: 20px 10px;
  background: var(--card);
  border: 1px solid var(--bd); border-radius: var(--radius);
  text-align: center; cursor: pointer;
  transition: all .35s;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: relative; overflow: hidden;
}
.rel-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.1), transparent);
}
.rel-card:hover {
  border-color: var(--bd2);
  background: rgba(24,24,42,.7);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.rel-card.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,.06);
  box-shadow: 0 0 28px var(--gold-glow), 0 0 0 1px rgba(201,168,76,.08) inset;
}
.rel-card .rel-icon {
  font-size: 32px; margin-bottom: 8px; display: block;
}
.rel-card .rel-label {
  font-size: 16px; font-weight: 700; color: var(--tx);
  letter-spacing: 6px;
}
.rel-card.selected .rel-label {
  color: var(--gold-l);
}
.rel-card .rel-sub {
  font-size: 10px; color: var(--tx3); letter-spacing: 2px; margin-top: 4px;
  opacity: .5;
}
.rel-card.selected .rel-sub {
  color: var(--gold); opacity: .7;
}

/* === 人像 Section === */
.person-section {
  width: 100%; max-width: 480px;
  background: var(--card);
  border: 1px solid var(--bd); border-radius: var(--radius);
  padding: 28px 24px 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  position: relative; overflow: hidden;
  animation: panelIn .4s ease-out;
}
.person-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.12), transparent);
}
.person-label {
  font-size: 13px; font-weight: 700; letter-spacing: 8px;
  color: var(--gold-l); text-align: center; margin-bottom: 22px;
  text-shadow: 0 0 16px var(--gold-glow);
}
.person-label.p2 {
  color: var(--mist);
  text-shadow: 0 0 12px rgba(180,170,150,.08);
}

/* === 交换按钮 === */
.swap-bar {
  width: 100%; max-width: 480px; text-align: center; margin-bottom: 20px;
}
.swap-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 28px;
  background: rgba(20,20,36,.5);
  border: 1px solid rgba(255,255,255,.06); border-radius: 8px;
  color: var(--tx3); font-size: 13px; font-weight: 600;
  letter-spacing: 4px; cursor: pointer; font-family: inherit;
  transition: all .3s;
}
.swap-btn:hover {
  border-color: var(--bd2); color: var(--tx2);
  background: rgba(24,24,42,.6);
  box-shadow: 0 0 20px rgba(201,168,76,.06);
}
.swap-btn .swap-arrow {
  font-size: 16px; transition: transform .3s;
}
.swap-btn:hover .swap-arrow {
  transform: rotate(180deg);
}

/* === 提交按钮 === */
.hepan-submit {
  width: 100%; max-width: 480px; padding: 17px;
  margin-top: 8px;
  font-family: inherit; font-size: 17px; font-weight: 700; letter-spacing: 10px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-d) 0%, var(--gold) 40%, var(--gold-l) 100%);
  background-size: 200% 100%;
  border: none; border-radius: 8px; cursor: pointer;
  transition: all .4s;
  box-shadow: 0 4px 24px rgba(201,168,76,.2);
  animation: shimmer 3s ease-in-out infinite;
}
.hepan-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 32px rgba(201,168,76,.3);
}
.hepan-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(201,168,76,.15);
}
.hepan-submit.loading {
  pointer-events: none; opacity: .65;
}
.hepan-submit:disabled {
  pointer-events: none; opacity: .3; cursor: not-allowed;
}

/* === 合盘 Footer === */
.hepan-footer {
  text-align: center; margin-top: 48px;
}
.hepan-footer p {
  font-size: 12px; color: var(--tx3); letter-spacing: 3px; line-height: 2.2;
}
.hepan-footer .disc {
  font-size: 10px; opacity: .4; margin-top: 4px;
}

/* === Validation toast === */
.valid-toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 28px;
  background: rgba(180,40,40,.85);
  border: 1px solid rgba(220,60,60,.4);
  border-radius: 8px; color: #f0c0c0;
  font-size: 14px; letter-spacing: 2px; z-index: 100;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: toastIn .3s ease-out;
  pointer-events: none;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === Mobile === */
@media(max-width:400px) {
  .hepan-wrap { padding: 32px 12px 48px; }
  .relation-types { gap: 4px; margin-bottom: 28px; }
  .rel-card { padding: 16px 6px; }
  .rel-card .rel-icon { font-size: 24px; }
  .rel-card .rel-label { font-size: 14px; letter-spacing: 4px; }
  .person-section { padding: 22px 16px 20px; }
  .person-label { font-size: 12px; letter-spacing: 6px; }
  .hp-drawer-toggle { padding: 12px 14px; }
  .hp-drawer-toggle h2 { font-size: 16px; letter-spacing: 3px; }
  .hp-bazi-card { padding: 14px 10px; min-width: 140px; }
  .hp-pillar { padding: 8px 6px; }
  .hp-pillar-gan { font-size: 20px; }
   .hp-pillar-zhi { font-size: 20px; }
  .hp-cross-item { padding: 10px 12px; }
  .hp-yearly-grid { flex-direction: column; }
}
@media(min-width:500px) {
  .hepan-wrap { padding: 56px 20px 72px; }
  .person-section { padding: 32px 28px 28px; }
}

/* ============================================
   结果页：抽屉式板块
   ============================================ */
.hp-drawer {
  margin-bottom: 20px;
  border: 1px solid rgba(201,168,76,.14);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(201,168,76,.04), rgba(15,12,8,.5));
  box-shadow: 0 0 30px rgba(201,168,76,.04), inset 0 0 30px rgba(201,168,76,.02);
}
.hp-drawer-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  cursor: pointer; user-select: none;
  background: rgba(201,168,76,.03);
  border-bottom: 1px solid rgba(201,168,76,.1);
  transition: background .3s;
}
.hp-drawer-toggle:hover { background: rgba(201,168,76,.07); }
.hp-drawer-arrow {
  display: inline-block; font-size: 10px; color: var(--gold);
  transition: transform .35s ease; flex-shrink: 0;
}
.hp-drawer-open .hp-drawer-arrow { transform: rotate(90deg); }
.hp-drawer-toggle h2 {
  font-family: 'STKaiti','KaiTi','FangSong','Source Han Serif SC',serif;
  font-size: 18px; font-weight: 600; color: var(--gold);
  letter-spacing: 4px; margin: 0; line-height: 1;
  text-shadow: 0 0 10px rgba(201,168,76,.15);
}
.hp-drawer-body {
  max-height: 0; overflow: hidden;
  transition: max-height .55s ease;
}
.hp-drawer-open .hp-drawer-body {
  max-height: 8000px; padding: 16px 18px 20px;
}

/* 双方八字卡片 */
.hp-dual-bazi { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hp-bazi-card {
  flex: 1; min-width: 160px; max-width: 280px;
  background: rgba(20,18,26,.5); border: 1px solid rgba(201,168,76,.08);
  border-radius: 10px; padding: 16px 12px; text-align: center;
}
.hp-bazi-label { font-size: 13px; color: var(--gold); letter-spacing: 3px; margin-bottom: 10px; font-weight: 600; }
.hp-bazi-pillars { display: flex; gap: 6px; justify-content: center; }
.hp-pillar { padding: 10px 8px; text-align: center; }
.hp-pillar-label { font-size: 10px; color: rgba(180,170,150,.4); margin-bottom: 4px; }
.hp-pillar-gan { font-size: 24px; font-weight: 700; color: #e0d8c8; }
.hp-pillar-zhi { font-size: 24px; font-weight: 700; color: #e0d8c8; }

/* 喜用神 */
.hp-xiyong-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hp-xiyong-card {
  flex: 1; min-width: 140px;
  background: rgba(20,18,26,.4); border: 1px solid rgba(201,168,76,.06);
  border-radius: 10px; padding: 14px;
}
.hp-xiyong-name { font-size: 14px; color: var(--gold); letter-spacing: 3px; margin-bottom: 8px; font-weight: 600; }
.hp-xiyong-row { display: flex; gap: 8px; margin-bottom: 4px; font-size: 13px; color: rgba(200,190,170,.7); }
.hp-xiyong-tag { font-size: 10px; padding: 1px 8px; border-radius: 10px; font-weight: 600; min-width: 40px; text-align: center; }
.hp-xiyong-tag.xi { background: rgba(100,200,120,.15); color: #7ec87e; }
.hp-xiyong-tag.yong { background: rgba(201,168,76,.15); color: #c9a84c; }
.hp-xiyong-tag.ji { background: rgba(220,80,60,.12); color: #e06055; }
.hp-xiyong-complement { font-size: 13px; color: rgba(180,170,150,.5); line-height: 1.8; margin-top: 6px; }

/* 五行互补 */
.hp-wuxing-bars { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hp-wuxing-card { flex: 1; min-width: 140px; }
.hp-wuxing-name { font-size: 13px; color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }
.hp-wx-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.hp-wx-name { width: 20px; font-size: 12px; font-weight: 600; text-align: center; }
.hp-wx-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,.04); border-radius: 3px; overflow: hidden; }
.hp-wx-bar-fill { height: 100%; border-radius: 3px; transition: width .8s ease; }
.hp-wx-count { width: 18px; font-size: 11px; color: rgba(180,170,150,.5); text-align: center; }
.hp-wuxing-desc { font-size: 13px; color: rgba(180,170,150,.55); line-height: 1.8; }
.hp-wuxing-score { font-size: 12px; color: rgba(201,168,76,.6); margin-top: 8px; }

/* 日柱契合度 */
.hp-daily-score { font-size: 14px; color: var(--gold); margin-bottom: 8px; }
.hp-daily-desc { font-size: 13px; color: rgba(180,170,150,.6); line-height: 1.8; margin-bottom: 6px; }

/* 日干旺衰 */
.hp-dgs-grid { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hp-dgs-card { flex: 1; background: rgba(20,18,26,.4); border: 1px solid rgba(201,168,76,.06); border-radius: 10px; padding: 14px; text-align: center; }
.hp-dgs-name { font-size: 14px; color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }
.hp-dgs-gan { font-size: 13px; color: rgba(200,190,170,.7); margin-bottom: 4px; }
.hp-dgs-gan b { font-size: 18px; color: #e0d8c8; }
.hp-dgs-strength { font-size: 12px; color: var(--gold); margin-bottom: 2px; }
.hp-dgs-wx { font-size: 11px; color: rgba(180,170,150,.4); }
.hp-dgs-vs { font-size: 14px; color: rgba(201,168,76,.3); font-weight: 700; }
.hp-dgs-summary { font-size: 14px; color: rgba(200,190,170,.7); margin-bottom: 6px; }
.hp-dgs-detail { font-size: 13px; color: rgba(180,170,150,.5); line-height: 1.8; }

/* 跨盘交互 */
.hp-cross-list { display: flex; flex-direction: column; gap: 8px; }
.hp-cross-item { padding: 12px 14px; background: rgba(20,18,26,.4); border-radius: 8px; border-left: 3px solid rgba(201,168,76,.2); }
.hp-cross-item.hp-cross-he { border-left-color: #7ec87e; }
.hp-cross-item.hp-cross-sheng { border-left-color: #5b9bd5; }
.hp-cross-item.hp-cross-chong { border-left-color: #e06055; }
.hp-cross-item.hp-cross-ke { border-left-color: #d4a843; }
.hp-cross-type { font-size: 11px; font-weight: 700; margin-right: 6px; color: var(--gold); }
.hp-cross-pillars { font-size: 14px; color: #e0d8c8; }
.hp-cross-detail { font-size: 12px; color: rgba(180,170,150,.5); margin-top: 4px; }

/* 核心模式 */
.hp-mode-card { padding: 14px; }
.hp-mode-title { font-size: 16px; color: var(--gold); letter-spacing: 3px; margin-bottom: 10px; }
.hp-mode-detail { font-size: 13px; color: rgba(200,190,170,.65); line-height: 2; }

/* 流年 */
.hp-yearly-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.hp-yearly-card { flex: 1; min-width: 140px; background: rgba(20,18,26,.4); border: 1px solid rgba(201,168,76,.08); border-radius: 10px; padding: 14px; }
.hp-yearly-label { font-size: 13px; color: var(--gold); letter-spacing: 2px; margin-bottom: 6px; }
.hp-yearly-advice { font-size: 12px; color: rgba(180,170,150,.55); line-height: 1.8; }

/* 宜忌 */
.hp-dosdonts { display: flex; gap: 14px; }
.hp-dos-col, .hp-donts-col { flex: 1; }
.hp-dos-title { font-size: 14px; color: #7ec87e; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.hp-donts-title { font-size: 14px; color: #e06055; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.hp-dos-list, .hp-donts-list { list-style: none; padding: 0; margin: 0; }
.hp-do-item, .hp-dont-item { font-size: 12px; color: rgba(200,190,170,.55); line-height: 1.8; padding: 4px 0; }
.hp-do-item::before { content: '✓ '; color: #7ec87e; }
.hp-dont-item::before { content: '✗ '; color: #e06055; }
