/* ==================== 中国古代算命术 - 全局样式 ==================== */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2128;
  --border-color: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-gold: #d4af37;
  --accent-red: #c9302c;
  --accent-jade: #2e8b57;
  --wx-wood: #4caf50;
  --wx-fire: #f44336;
  --wx-earth: #ffc107;
  --wx-metal: #bdbdbd;
  --wx-water: #2196f3;
}

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

body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== 头部 ==================== */
.app-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 20px 0;
  text-align: center;
  border-bottom: 2px solid var(--accent-gold);
  position: relative;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="1" fill="%23d4af37" opacity="0.05"/></svg>');
  pointer-events: none;
}

.app-header h1 {
  font-size: 28px;
  color: var(--accent-gold);
  letter-spacing: 4px;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.app-header .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  letter-spacing: 2px;
}

/* ==================== 输入区域 ==================== */
.input-section {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px;
}

.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.input-group input,
.input-group select {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 15px;
  width: 100px;
  transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.gender-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.gender-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 15px;
}

.btn-calculate {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  color: #1a1a2e;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-calculate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ==================== 标签导航 ==================== */
.tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* ==================== 内容区域 ==================== */
.result-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* ==================== 信息栏 ==================== */
.info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 12px;
  color: var(--text-muted);
}

.info-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ==================== 八字排盘表格 ==================== */
.bazi-chart {
  overflow-x: auto;
  margin-bottom: 24px;
}

.bazi-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  min-width: 500px;
}

.bazi-table th {
  background: rgba(212, 175, 55, 0.1);
  padding: 12px 8px;
  font-size: 14px;
  color: var(--accent-gold);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.bazi-table th:first-child {
  width: 80px;
}

.bazi-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 18px;
}

.bazi-table td.row-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
  padding-right: 12px;
  background: rgba(255,255,255,0.02);
}

.bazi-table td small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cell-gan, .cell-zhi {
  font-size: 24px;
  font-weight: 700;
}

.day-master {
  position: relative;
}

.day-master::after {
  content: '日主';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
  color: var(--accent-gold);
}

.cell-hide span {
  display: inline-block;
  margin: 0 2px;
  font-size: 16px;
  font-weight: 500;
}

.cell-shishen span {
  display: inline-block;
  margin: 0 2px;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
}

.day-master-tag span {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
}

.cell-nayin span,
.cell-dishi span,
.cell-xunkong span {
  font-size: 12px;
  color: var(--text-secondary);
}

.cell-shensha {
  padding: 8px 4px;
}

/* ==================== 神煞标签 ==================== */
.shensha-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  margin: 1px;
  border-radius: 4px;
  white-space: nowrap;
}

.shensha-tag.ji {
  background: rgba(46, 139, 87, 0.2);
  color: #6bcf7f;
  border: 1px solid rgba(46, 139, 87, 0.3);
}

.shensha-tag.xiong {
  background: rgba(201, 48, 44, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(201, 48, 44, 0.3);
}

.shensha-tag.neutral {
  background: rgba(255, 193, 7, 0.15);
  color: #ffd54f;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  color: var(--accent-gold);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 2px;
}

/* ==================== 五行分析 ==================== */
.season-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.wuxing-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.wx-bar-item {
  text-align: center;
}

.wx-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.wx-name {
  font-size: 18px;
  font-weight: 700;
}

.wx-wangshuai {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}

.ws-strong {
  color: #6bcf7f;
  background: rgba(46, 139, 87, 0.15);
}

.ws-weak {
  color: #ff6b6b;
  background: rgba(201, 48, 44, 0.15);
}

.wx-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.wx-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.wx-bar-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.day-wx .wx-name::after {
  content: '★';
  font-size: 12px;
  color: var(--accent-gold);
}

.judge-section {
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 16px;
}

.judge-section h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.judge-strong {
  color: #ff6b6b;
  font-weight: 700;
}

.judge-weak {
  color: #6bcf7f;
  font-weight: 700;
}

.judge-balanced {
  color: var(--accent-gold);
  font-weight: 700;
}

.force-detail {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 13px;
}

.force-help { color: #6bcf7f; }
.force-consume { color: #ff6b6b; }

.yongshen-section {
  padding: 16px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
}

.yongshen-section h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

.yongshen-tag {
  font-size: 18px;
  font-weight: 700;
  padding: 2px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  margin: 0 4px;
}

.yongshen-reason {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0;
}

.yongshen-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.yongshen-extras strong {
  color: var(--accent-gold);
}

/* ==================== 辅助信息 ==================== */
.extra-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.extra-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.extra-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.extra-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}

.extra-card small {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==================== 六亲分析 ==================== */
.liuqin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.liuqin-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
}

.liuqin-header {
  font-size: 15px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.liuqin-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.liuqin-content {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.ss-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
}

.ss-tag.sm {
  font-size: 10px;
  padding: 0 4px;
}

.liuqin-legend {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.liuqin-legend h4 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.legend-grid {
  line-height: 2;
}

/* ==================== 大运流年 ==================== */
.yun-info {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.yun-info span {
  padding: 4px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
}

.dayun-timeline {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.dayun-item {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.03);
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.dayun-item.favorable {
  border-color: rgba(46, 139, 87, 0.4);
  background: rgba(46, 139, 87, 0.05);
}

.dayun-item.unfavorable {
  border-color: rgba(201, 48, 44, 0.4);
  background: rgba(201, 48, 44, 0.05);
}

.dayun-item.current {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.dayun-age {
  font-size: 13px;
  color: var(--text-secondary);
}

.dayun-year {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0;
}

.dayun-ganzhi {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0;
}

.dayun-ganzhi span {
  display: inline-block;
}

.dayun-shishen {
  font-size: 11px;
}

.current-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-gold);
  color: #1a1a2e;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

/* 流年 */
.liunian-section {
  margin-top: 24px;
}

.liunian-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.ln-tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}

.ln-tab-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.ln-tab-btn.active {
  background: var(--accent-gold);
  color: #1a1a2e;
  border-color: var(--accent-gold);
}

.dayun-header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.dayun-header strong {
  color: var(--accent-gold);
  font-size: 18px;
}

.liunian-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.liunian-item {
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.liunian-item:hover {
  transform: translateY(-2px);
}

.liunian-item.favorable {
  border-color: rgba(46, 139, 87, 0.4);
  background: rgba(46, 139, 87, 0.05);
}

.liunian-item.unfavorable {
  border-color: rgba(201, 48, 44, 0.4);
  background: rgba(201, 48, 44, 0.05);
}

.liunian-item.neutral {
  border-color: var(--border-color);
}

.liunian-item.current-year {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.liunian-item.past-year {
  opacity: 0.75;
}

.ln-year {
  font-size: 14px;
  font-weight: 600;
}

.ln-age {
  font-size: 11px;
  color: var(--text-muted);
}

.ln-ganzhi {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0;
}

.ln-shishen {
  font-size: 10px;
}

/* ==================== 十神分析 ==================== */
.shishen-analysis h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin: 16px 0 10px;
}

.ss-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.ss-row {
  display: grid;
  grid-template-columns: 100px 60px 80px 60px;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  font-size: 13px;
}

.ss-row.day-master-row {
  background: rgba(212, 175, 55, 0.1);
}

.ss-pos {
  color: var(--text-secondary);
}

.ss-gan {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.ss-name {
  color: var(--text-primary);
}

.ss-nature {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}

.ss-nature.ji { background: rgba(46, 139, 87, 0.2); color: #6bcf7f; }
.ss-nature.xiong { background: rgba(201, 48, 44, 0.2); color: #ff6b6b; }
.ss-nature.neutral { background: rgba(255,255,255,0.1); color: var(--text-secondary); }

.ss-distribution {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.ss-dist-item {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.ss-bar {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.ss-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s;
}

.ss-bar-fill.ji { background: #2e8b57; }
.ss-bar-fill.xiong { background: #c9302c; }
.ss-bar-fill.neutral { background: #8b949e; }

.ss-count {
  text-align: right;
  color: var(--text-muted);
  font-size: 12px;
}

.personality-analysis {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  font-size: 13px;
  line-height: 2;
}

.personality-analysis ul {
  margin-left: 20px;
  margin-top: 8px;
}

.health-tip {
  margin-top: 12px;
  padding: 10px;
  background: rgba(201, 48, 44, 0.08);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==================== 格局 ==================== */
.geju-result {
  padding: 20px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
}

.geju-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.geju-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ==================== 神煞详表 ==================== */
.shensha-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.shensha-col h4 {
  font-size: 14px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.shensha-col .shensha-tag {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.shensha-legend {
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}

.shensha-legend h4 {
  font-size: 15px;
  margin-bottom: 10px;
}

.legend-list {
  font-size: 13px;
  line-height: 2.2;
  color: var(--text-secondary);
}

/* ==================== 干支关系 ==================== */
.gz-relations {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.relation-section {
  padding: 12px;
  border-radius: 8px;
}

.relation-section.he {
  background: rgba(46, 139, 87, 0.05);
  border: 1px solid rgba(46, 139, 87, 0.15);
}

.relation-section.chong {
  background: rgba(201, 48, 44, 0.05);
  border: 1px solid rgba(201, 48, 44, 0.15);
}

.relation-section.xing {
  background: rgba(255, 193, 7, 0.05);
  border: 1px solid rgba(255, 193, 7, 0.15);
}

.relation-section.hai {
  background: rgba(255, 87, 34, 0.05);
  border: 1px solid rgba(255, 87, 34, 0.15);
}

.relation-section h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.relation-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 2px 0;
}

.no-relation {
  color: var(--text-muted);
  font-style: italic;
}

/* ==================== 过往经历推演 ==================== */
.exp-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  line-height: 1.8;
}

.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-year-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s;
}

.exp-year-item.favorable {
  border-left: 3px solid #2e8b57;
  background: rgba(46, 139, 87, 0.04);
}

.exp-year-item.unfavorable {
  border-left: 3px solid #c9302c;
  background: rgba(201, 48, 44, 0.04);
}

.exp-year-item.neutral {
  border-left: 3px solid var(--text-muted);
}

.exp-year-item:hover {
  background: rgba(255,255,255,0.05);
}

.exp-year-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.exp-year-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 70px;
}

.exp-year-age {
  font-size: 12px;
  color: var(--text-muted);
}

.exp-year-gz {
  font-size: 18px;
  font-weight: 700;
}

.exp-year-gz span {
  display: inline-block;
}

.exp-year-dy {
  font-size: 12px;
  color: var(--accent-gold);
  padding: 2px 8px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 4px;
}

.exp-year-score {
  font-size: 14px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
}

.favorable .exp-year-score {
  background: rgba(46, 139, 87, 0.2);
  color: #6bcf7f;
}

.unfavorable .exp-year-score {
  background: rgba(201, 48, 44, 0.2);
  color: #ff6b6b;
}

.neutral .exp-year-score {
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.exp-year-ss {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.exp-year-comment {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ==================== 秤骨算命 ==================== */
.chenggu-info {
  margin-bottom: 20px;
}

.chenggu-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 14px;
}

.chenggu-row span:first-child {
  color: var(--text-secondary);
}

.chenggu-row span:last-child {
  font-weight: 600;
}

.chenggu-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

.total-weight {
  color: var(--accent-gold);
  font-size: 22px;
}

.chenggu-level {
  text-align: center;
  padding: 20px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  margin-bottom: 20px;
}

.level-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.level-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.chenggu-song {
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  margin-bottom: 16px;
}

.chenggu-song h4 {
  font-size: 15px;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.song-text {
  font-size: 16px;
  line-height: 2.2;
  color: var(--text-primary);
  text-align: center;
  font-style: italic;
}

.chenggu-note {
  padding: 14px;
  background: rgba(255, 193, 7, 0.05);
  border: 1px solid rgba(255, 193, 7, 0.15);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .app-header h1 {
    font-size: 22px;
  }

  .input-card {
    flex-direction: column;
    align-items: stretch;
  }

  .input-group input,
  .input-group select {
    width: 100%;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 10px 16px;
  }

  .wuxing-bars {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .wx-name {
    font-size: 14px;
  }

  .extra-info,
  .liuqin-grid,
  .shensha-detail {
    grid-template-columns: repeat(2, 1fr);
  }

  .ss-row {
    grid-template-columns: 80px 50px 70px 50px;
    font-size: 12px;
  }

  .yongshen-extras {
    grid-template-columns: 1fr;
  }

  .exp-year-item {
    grid-template-columns: 1fr;
  }

  .bazi-table td {
    font-size: 16px;
  }

  .cell-gan, .cell-zhi {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .wuxing-bars {
    grid-template-columns: 1fr 1fr;
  }

  .extra-info,
  .liuqin-grid,
  .shensha-detail {
    grid-template-columns: 1fr;
  }

  .liunian-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ==================== 白话解读区块 ==================== */
.plain-explain {
  padding: 14px 18px;
  background: rgba(33, 150, 243, 0.06);
  border: 1px solid rgba(33, 150, 243, 0.15);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.plain-explain h4 {
  color: var(--accent-gold);
  font-size: 15px;
  margin-bottom: 8px;
}

.plain-explain p {
  margin: 0;
}

.plain-explain strong {
  color: var(--text-primary);
}

.plain-judge {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.9;
  padding: 4px 0;
}

.geju-plain-explain {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 2;
  margin-top: 8px;
}

.dayun-plain {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  padding: 4px 2px;
}

.ln-plain {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
  padding: 2px 0;
}

.relation-plain {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ss-plain {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  grid-column: span 1;
}

.ss-row {
  grid-template-columns: 100px 50px 70px 1fr;
}

.yongshen-plain {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .ss-row {
    grid-template-columns: 80px 45px 65px 1fr;
    font-size: 11px;
  }

  .ss-plain {
    font-size: 10px;
  }

  .plain-explain {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* ==================== 未来运势 ==================== */
.future-years {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.future-year-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.future-year-card.favorable {
  border-color: rgba(46, 139, 87, 0.4);
  background: rgba(46, 139, 87, 0.04);
}

.future-year-card.unfavorable {
  border-color: rgba(201, 48, 44, 0.4);
  background: rgba(201, 48, 44, 0.04);
}

.future-year-card.neutral {
  border-color: var(--border-color);
  background: rgba(255,255,255,0.02);
}

.fy-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

.fy-year {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 100px;
}

.fy-gz {
  font-size: 22px;
  font-weight: 700;
}

.fy-gz span {
  display: inline-block;
}

.fy-comment {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
}

.fy-toggle {
  font-size: 12px;
  color: var(--accent-gold);
  white-space: nowrap;
}

.fy-months {
  padding: 12px 18px 18px;
  border-top: 1px solid var(--border-color);
}

.fy-months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.fy-month-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

.fy-month-item.favorable {
  border-color: rgba(46, 139, 87, 0.3);
  background: rgba(46, 139, 87, 0.05);
}

.fy-month-item.unfavorable {
  border-color: rgba(201, 48, 44, 0.3);
  background: rgba(201, 48, 44, 0.05);
}

.fy-month-item.neutral {
  background: rgba(255,255,255,0.02);
}

.fm-name {
  font-weight: 600;
  min-width: 40px;
}

.fm-gz {
  font-size: 16px;
  font-weight: 700;
}

.fm-gz span {
  display: inline-block;
}

.fm-comment {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==================== 每日宜忌 ==================== */
.daily-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dl-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.dl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dl-dot.favorable { background: #2e8b57; }
.dl-dot.neutral { background: #8b949e; }
.dl-dot.unfavorable { background: #c9302c; }

.daily-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 800px;
  overflow-y: auto;
  padding-right: 4px;
}

.daily-item {
  display: grid;
  grid-template-columns: 140px 80px 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 13px;
  transition: all 0.15s;
}

.daily-item.favorable {
  border-left: 3px solid #2e8b57;
  background: rgba(46, 139, 87, 0.04);
}

.daily-item.unfavorable {
  border-left: 3px solid #c9302c;
  background: rgba(201, 48, 44, 0.04);
}

.daily-item.neutral {
  border-left: 3px solid #8b949e;
  background: rgba(255,255,255,0.02);
}

.daily-item.today {
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

.daily-item:hover {
  background: rgba(255,255,255,0.05);
}

.di-date {
  display: flex;
  flex-direction: column;
}

.di-md {
  font-weight: 600;
  font-size: 14px;
}

.di-week {
  font-size: 11px;
  color: var(--text-muted);
}

.di-lunar {
  font-size: 11px;
  color: var(--text-muted);
}

.di-today-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.15);
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 2px;
  width: fit-content;
}

.di-gz {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.di-gz span {
  display: inline-block;
}

.di-gz small {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: normal;
}

.di-comment {
  font-size: 12px;
  color: var(--text-secondary);
}

.di-yi {
  font-size: 11px;
  color: #6bcf7f;
  line-height: 1.5;
}

.di-ji {
  font-size: 11px;
  color: #ff9800;
  line-height: 1.5;
}

/* ==================== 八字合盘 ==================== */
.hepan-input {
  margin-bottom: 20px;
}

.hepan-input h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hepan-result {
  margin-top: 20px;
}

.hepan-total {
  text-align: center;
  padding: 30px 20px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  margin-bottom: 20px;
}

.hepan-percent {
  font-size: 48px;
  font-weight: 700;
}

.hepan-level {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0;
}

.hepan-score-detail {
  font-size: 14px;
  color: var(--text-muted);
}

.hepan-compare {
  margin-bottom: 20px;
}

.hepan-compare h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hepan-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.hepan-table th {
  background: rgba(212, 175, 55, 0.1);
  padding: 12px;
  font-size: 14px;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-color);
}

.hepan-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.hepan-table td:first-child {
  color: var(--text-secondary);
  font-size: 13px;
}

.hepan-table td:nth-child(2),
.hepan-table td:nth-child(3) {
  font-size: 18px;
  font-weight: 700;
}

.hepan-table td:last-child {
  font-size: 12px;
  color: var(--text-muted);
}

.hepan-scores {
  margin-bottom: 20px;
}

.hepan-scores h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hepan-score-item {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.hepan-score-item.favorable {
  border-color: rgba(46, 139, 87, 0.3);
  background: rgba(46, 139, 87, 0.04);
}

.hepan-score-item.neutral {
  border-color: rgba(255, 193, 7, 0.3);
  background: rgba(255, 193, 7, 0.04);
}

.hepan-score-item.unfavorable {
  border-color: rgba(201, 48, 44, 0.3);
  background: rgba(201, 48, 44, 0.04);
}

.hsi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.hsi-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.hsi-score {
  font-size: 13px;
  color: var(--accent-gold);
  font-weight: 600;
}

.hsi-bar {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.hsi-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-gold);
}

.hsi-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hepan-wuxing {
  margin-bottom: 20px;
}

.hepan-wuxing h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hepan-wx-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hepan-wx-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
}

.hw-name {
  font-size: 18px;
  font-weight: 700;
}

.hw-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hw-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.hw-fill {
  height: 8px;
  border-radius: 4px;
  min-width: 2px;
}

.hepan-wx-legend {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.hepan-advice {
  padding: 16px 20px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
}

/* ==================== 开运提醒 ==================== */
.lucky-reminder {
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.lucky-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.lucky-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.lc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.lc-wx {
  font-size: 28px;
  font-weight: 700;
}

.lc-title {
  font-size: 14px;
  color: var(--text-secondary);
}

.lc-body {
  padding: 14px 18px;
}

.lc-item {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 2;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.lc-item:last-child {
  border-bottom: none;
}

.lc-item strong {
  color: var(--accent-gold);
}

.lucky-today {
  padding: 16px 20px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
}

.lucky-today h4 {
  font-size: 15px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.lucky-today p {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.today-yiji {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ty-yi {
  font-size: 13px;
  color: #6bcf7f;
  padding: 8px 12px;
  background: rgba(46, 139, 87, 0.08);
  border-radius: 6px;
}

.ty-ji {
  font-size: 13px;
  color: #ff9800;
  padding: 8px 12px;
  background: rgba(255, 152, 0, 0.08);
  border-radius: 6px;
}

/* ==================== 响应式补充 ==================== */
@media (max-width: 768px) {
  .lucky-grid {
    grid-template-columns: 1fr;
  }

  .daily-item {
    grid-template-columns: 100px 60px 1fr;
    font-size: 12px;
  }

  .di-ji, .di-yi {
    grid-column: 1 / -1;
    font-size: 10px;
  }

  .hepan-table td:nth-child(2),
  .hepan-table td:nth-child(3) {
    font-size: 16px;
  }

  .fy-months-grid {
    grid-template-columns: 1fr;
  }

  .today-yiji {
    grid-template-columns: 1fr;
  }
}
