:root {
  --bazi-red: #991b1b;
  --bazi-red-dark: #7f1d1d;
  --bazi-gold: #b45309;
  --bazi-gold-light: #fef3c7;
  --bazi-bg: #fdfbf7;
  --bazi-card: #ffffff;
  --bazi-border: #e7e0d3;
  --bazi-table-head: #fbf7ee;
  --bazi-text: #292524;
  --bazi-text-dim: #78716c;
  
  --wood-color: #15803d;
  --fire-color: #dc2626;
  --earth-color: #b45309;
  --metal-color: #475569;
  --water-color: #0284c7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Serif SC", serif;
  background-color: var(--bazi-bg);
  color: var(--bazi-text);
  line-height: 1.6;
}

/* 顶部与总站返回条 */
.top-hub-nav {
  background: #1c1917;
  color: #f5f5f4;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-hub-nav a {
  color: #fed7aa;
  text-decoration: none;
  font-weight: 600;
}

/* 标题区 */
.bazi-header {
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
  border-bottom: 2px solid #fee2e2;
  padding: 24px 20px;
  text-align: center;
}

.bazi-header h1 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--bazi-red);
  letter-spacing: 0.05em;
}

.bazi-subtitle {
  font-size: 0.88rem;
  color: var(--bazi-text-dim);
  margin-top: 4px;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* 输入表单 */
.input-card {
  background: var(--bazi-card);
  border: 1px solid var(--bazi-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 28px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--bazi-red);
  border-left: 4px solid var(--bazi-red);
  padding-left: 10px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bazi-text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--bazi-border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  outline: none;
}
.form-control:focus {
  border-color: var(--bazi-red);
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.1);
}

.gender-radios {
  display: flex;
  gap: 20px;
  padding: 8px 0;
}

.btn-bazi-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--bazi-red), var(--bazi-red-dark));
  color: #fff;
  border: none;
  padding: 13px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.35);
  transition: all 0.2s;
}
.btn-bazi-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.45);
}

/* ==================== 问真八字经典表格 ==================== */
.paipan-result {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

.result-card {
  background: #fff;
  border: 1px solid var(--bazi-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

/* 基本信息条 */
.info-strip {
  display: flex;
  justify-content: space-between;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

/* 四柱八字大排盘表格 */
.bazi-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.bazi-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  border: 2px solid var(--bazi-border);
}

.bazi-table th {
  background: var(--bazi-table-head);
  padding: 10px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bazi-text);
  border: 1px solid var(--bazi-border);
}

.bazi-table td {
  padding: 12px 8px;
  border: 1px solid var(--bazi-border);
  font-size: 0.95rem;
}

.col-header {
  width: 90px;
  background: #fafaf9;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--bazi-text-dim);
}

.tiangan-char {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
}

.dizhi-char {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
}

.shishen-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f5f5f4;
  color: var(--bazi-text-dim);
  display: inline-block;
}
.shishen-main {
  background: #fee2e2;
  color: var(--bazi-red);
}

/* 五行颜色 */
.wood { color: var(--wood-color); }
.fire { color: var(--fire-color); }
.earth { color: var(--earth-color); }
.metal { color: var(--metal-color); }
.water { color: var(--water-color); }

/* 五行比例能量条 */
.wuxing-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 20px 0;
  text-align: center;
}

.wuxing-item {
  background: #fafaf9;
  border: 1px solid var(--bazi-border);
  border-radius: 8px;
  padding: 10px;
}

.wuxing-name {
  font-size: 0.88rem;
  font-weight: 800;
}

.wuxing-score {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 4px 0;
}

.wuxing-bar {
  height: 6px;
  background: #e7e5e4;
  border-radius: 999px;
  overflow: hidden;
}
.wuxing-bar-fill {
  height: 100%;
}

/* 命盘分析解读卡片 */
.analysis-box {
  background: #fdfbf7;
  border: 1px solid var(--bazi-border);
  border-radius: 8px;
  padding: 18px;
  margin-top: 16px;
  line-height: 1.8;
}

.analysis-box h4 {
  color: var(--bazi-red);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.footer-btn-row {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}
