:root {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border-color: rgba(124, 77, 255, 0.2);
  --card-title-color: #7c4dff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --radius-md: 8px;
  --radius-lg: 12px;
  --sakura-1: #FFE4E1;
  --sakura-2: #FFC0CB;
  --sakura-3: #FFB7C5;
  --sakura-4: #FFF0F5;
  --sakura-5: #FFE4EC;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--sakura-1) 0%, var(--sakura-4) 25%, var(--sakura-2) 50%, var(--sakura-5) 75%, var(--sakura-3) 100%);
  background-size: 400% 400%;
  animation: sakuraFlow 15s ease infinite;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

@keyframes sakuraFlow {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 100% 25%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 0% 75%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.report-page {
  min-height: 100vh;
}

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.hero-version {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.9;
}

.hero-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.5);
  margin: 10px auto 0;
  border-radius: 2px;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.tab-content {
  display: none;
}

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

.apple-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.apple-tab-btn {
  padding: 12px 20px;
  border: none;
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.apple-tab-btn:hover {
  background: #f5f5f5;
}

.apple-tab-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.apple-cards-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.apple-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 20px;
}

.apple-card:last-child {
  margin-bottom: 0;
}

.apple-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.apple-card-header h3 {
  font-size: 20px;
  color: #333;
  font-weight: 600;
}

.apple-card-body {
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
}

.apple-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.apple-card-header h3 {
  font-size: 20px;
  color: #1565C0;
  font-weight: 600;
}

.apple-card-body {
  padding: 20px;
  background: white;
}

.maillun-card {
  border-radius: 12px;
  padding: 16px;
  border: 2px solid rgba(124, 77, 255, 0.2);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.maillun-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.maillun-card:nth-child(5n+1) { background: #E3F2FD; }
.maillun-card:nth-child(5n+2) { background: #F3E5F5; }
.maillun-card:nth-child(5n+3) { background: #E8F5E9; }
.maillun-card:nth-child(5n+4) { background: #FFF3E0; }
.maillun-card:nth-child(5n+5) { background: #FCE4EC; }

.maillun-card-label {
  font-size: 12px;
  color: #7c4dff;
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.maillun-card-value {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
  word-break: break-word;
}

.maillun-card-sub {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.maillun-card-desc {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  line-height: 1.4;
  word-break: break-word;
}

.maillun-card-value-small {
  font-size: 12px !important;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.maillun-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .maillun-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dark Mode - Match Yijing Module Style for All Modules */
body.dark-mode .destiny-grid-2cols,
body.dark-mode .destiny-grid-3cols,
body.dark-mode .destiny-grid-4cols {
  gap: 10px;
}

body.dark-mode .destiny-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 10px;
  padding: 12px;
}

body.dark-mode .destiny-label {
  font-size: 11px;
  color: #888 !important;
  margin-bottom: 4px;
}

body.dark-mode .destiny-value {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0 !important;
}

/* Yijing cards */
body.dark-mode .yijing-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .yijing-card-icon {
  color: #e0e0e0;
}

body.dark-mode .yijing-card-label {
  color: #a0a0a0 !important;
}

body.dark-mode .yijing-card-value {
  color: #c0c0c0 !important;
}

/* Grid layouts */
body.dark-mode .yuce-grid,
body.dark-mode .yunshi-grid,
body.dark-mode .shensha-grid,
body.dark-mode .bagua-grid,
body.dark-mode .gua64-grid {
  gap: 8px;
}

body.dark-mode .yuce-card,
body.dark-mode .shensha-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .yuce-month,
body.dark-mode .yuce-status,
body.dark-mode .shensha-name,
body.dark-mode .shensha-value {
  color: #c0c0c0 !important;
}

body.dark-mode .yunshi-card.good {
  background: #1a3a1a !important;
}

body.dark-mode .yunshi-card.mid {
  background: #3a3a1a !important;
}

body.dark-mode .yunshi-card.bad {
  background: #3a1a1a !important;
}

/* Wuxing analysis */
body.dark-mode .wuxing-analysis {
  gap: 12px;
}

body.dark-mode .wuxing-row {
  gap: 8px;
}

body.dark-mode .wuxing-item.mu { background: #1a3a1a !important; border-color: #2E7D32 !important; color: #81C784 !important; }
body.dark-mode .wuxing-item.huo { background: #3a1a1a !important; border-color: #C62828 !important; color: #EF5350 !important; }
body.dark-mode .wuxing-item.tu { background: #3a3a1a !important; border-color: #F9A825 !important; color: #FFD54F !important; }
body.dark-mode .wuxing-item.jin { background: #2a2a3a !important; border-color: #616161 !important; color: #BDBDBD !important; }
body.dark-mode .wuxing-item.shui { background: #1a2a3a !important; border-color: #1565C0 !important; color: #4FC3F7 !important; }

body.dark-mode .arrow {
  color: #888 !important;
}

/* Maillun cards */
body.dark-mode .maillun-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .maillun-card-label {
  color: #b39ddb !important;
}

body.dark-mode .maillun-card-value {
  color: #e0e0e0 !important;
}

body.dark-mode .maillun-card-sub {
  color: #9090b0 !important;
}

body.dark-mode .maillun-card-desc {
  color: #8080a0 !important;
}

body.dark-mode .maillun-card-value-small {
  color: #e0e0e0 !important;
}

/* Ziwei cards */
body.dark-mode .fudao-card,
body.dark-mode .star-card,
body.dark-mode .palace-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .fudao-label,
body.dark-mode .star-label,
body.dark-mode .palace-label {
  color: #888 !important;
}

body.dark-mode .fudao-value,
body.dark-mode .star-value,
body.dark-mode .palace-value {
  color: #e0e0e0 !important;
}

/* Qimen cards */
body.dark-mode .qimen-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .qimen-label {
  color: #888 !important;
}

body.dark-mode .qimen-value {
  color: #e0e0e0 !important;
}

/* Liuren cards */
body.dark-mode .liuren-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .liuren-label {
  color: #888 !important;
}

body.dark-mode .liuren-value {
  color: #e0e0e0 !important;
}

/* Mima cross cards */
body.dark-mode .mima-cross-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .mima-cross-title {
  color: #a0a0a0 !important;
}

body.dark-mode .mima-cross-content {
  color: #c0c0c0 !important;
}

body.dark-mode .cross-result {
  color: #4CAF50 !important;
}

/* Energy cards */
body.dark-mode .energy-life-item,
body.dark-mode .energy-guide-item {
  background: #1a1a2e !important;
  border: 2px solid #2a2a4a !important;
}

body.dark-mode .energy-life-label,
body.dark-mode .energy-guide-label {
  color: #888 !important;
}

body.dark-mode .energy-life-value,
body.dark-mode .energy-guide-value {
  color: #e0e0e0 !important;
}

/* Oil cards */
body.dark-mode .oil-card,
body.dark-mode .high-card,
body.dark-mode .special-card,
body.dark-mode .aroma-card,
body.dark-mode .crystal-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .oil-label,
body.dark-mode .high-title,
body.dark-mode .special-title {
  color: #888 !important;
}

body.dark-mode .oil-value,
body.dark-mode .high-material,
body.dark-mode .high-effect,
body.dark-mode .special-material {
  color: #c0c0c0 !important;
}

/* Chakra energy */
body.dark-mode .chakra-energy-item {
  background: #1a1a2e !important;
  border: 2px solid #2a2a4a !important;
}

body.dark-mode .chakra-energy-name {
  color: #a0a0a0 !important;
}

body.dark-mode .chakra-energy-value {
  color: #e0e0e0 !important;
}

/* Wuxing energy */
body.dark-mode .wuxing-energy-card {
  background: #1a1a2e !important;
  border: 2px solid #2a2a4a !important;
}

/* Conclusion & Suggestion */
body.dark-mode .conclusion-item,
body.dark-mode .suggestion-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .conclusion-title,
body.dark-mode .suggestion-label {
  color: #a0a0a0 !important;
}

body.dark-mode .conclusion-text,
body.dark-mode .suggestion-value {
  color: #c0c0c0 !important;
}

/* Boost suggestion */
body.dark-mode .boost-suggestion-card {
  background: #1a1a2e !important;
  border: 2px solid #2a2a4a !important;
}

body.dark-mode .boost-title {
  color: #a0a0a0 !important;
}

body.dark-mode .boost-desc {
  color: #888 !important;
}

/* Maillun Module Specific Cards */
body.dark-mode .pillar-card,
body.dark-mode .chakra-core-card,
body.dark-mode .chakra-card,
body.dark-mode .positive-card,
body.dark-mode .negative-card,
body.dark-mode .affirmation-card,
body.dark-mode .meridian-card,
body.dark-mode .jieqi-birth-card,
body.dark-mode .jieqi-card,
body.dark-mode .season-card,
body.dark-mode .qijing-card,
body.dark-mode .zimu-card,
body.dark-mode .tizhi-main-card,
body.dark-mode .tizhi-card,
body.dark-mode .wuxing-cycle-card,
body.dark-mode .gan-card,
body.dark-mode .zhi-card,
body.dark-mode .yinyang-main-card,
body.dark-mode .yinyang-card,
body.dark-mode .liuqie-main-card,
body.dark-mode .liuqie-card,
body.dark-mode .gongfa-main-card,
body.dark-mode .gongfa-card,
body.dark-mode .xuewei-main-card,
body.dark-mode .xuewei-card,
body.dark-mode .yaoshi-main-card,
body.dark-mode .yaoshi-card,
body.dark-mode .yuce-main-card,
body.dark-mode .meiri-card,
body.dark-mode .wuyin-main-card,
body.dark-mode .wuyin-card,
body.dark-mode .secai-main-card,
body.dark-mode .secai-card,
body.dark-mode .waizhi-main-card,
body.dark-mode .waizhi-card,
body.dark-mode .changshi-card,
body.dark-mode .xingbie-main-card,
body.dark-mode .xingbie-card,
body.dark-mode .bagua-main-card,
body.dark-mode .bagua-card,
body.dark-mode .hetu-main-card,
body.dark-mode .hetu-card,
body.dark-mode .zhuyue-main-card,
body.dark-mode .zhuyue-card,
body.dark-mode .shuzi-main-card,
body.dark-mode .shuzi-card,
body.dark-mode .guiren-main-card,
body.dark-mode .guiren-card,
body.dark-mode .xingge-main-card,
body.dark-mode .xingge-card,
body.dark-mode .fengshui-main-card,
body.dark-mode .fengshui-card,
body.dark-mode .yushi-main-card,
body.dark-mode .yushi-card,
body.dark-mode .zonghe-main-card,
body.dark-mode .zonghe-card,
body.dark-mode .liunian-main-card,
body.dark-mode .liunian-card,
body.dark-mode .xiaoxi-main-card,
body.dark-mode .xiaoxi-card,
body.dark-mode .bingji-main-card,
body.dark-mode .bingji-card,
body.dark-mode .zangfu-main-card,
body.dark-mode .zangfu-card,
body.dark-mode .zhouqi-main-card,
body.dark-mode .zhouqi-card,
body.dark-mode .gaofang-main-card,
body.dark-mode .gaofang-card,
body.dark-mode .aijiu-main-card,
body.dark-mode .aijiu-card,
body.dark-mode .zuliao-main-card,
body.dark-mode .zuliao-card,
body.dark-mode .chayin-main-card,
body.dark-mode .chayin-card,
body.dark-mode .health-archive-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Maillun grid layouts */
body.dark-mode .chakra-grid,
body.dark-mode .meridian-grid,
body.dark-mode .jieqi-grid,
body.dark-mode .season-grid,
body.dark-mode .qijing-grid,
body.dark-mode .zimu-grid,
body.dark-mode .tizhi-grid,
body.dark-mode .wuxing-cycle-grid,
body.dark-mode .gan-grid,
body.dark-mode .zhi-grid,
body.dark-mode .yinyang-grid,
body.dark-mode .liuqie-grid,
body.dark-mode .gongfa-grid,
body.dark-mode .xuewei-grid,
body.dark-mode .yaoshi-grid,
body.dark-mode .yuce-grid,
body.dark-mode .meiri-grid,
body.dark-mode .wuyin-grid,
body.dark-mode .secai-grid,
body.dark-mode .waizhi-grid,
body.dark-mode .bagua-grid,
body.dark-mode .hetu-grid,
body.dark-mode .zhuyue-grid,
body.dark-mode .shuzi-grid,
body.dark-mode .guiren-grid,
body.dark-mode .xingge-grid,
body.dark-mode .fengshui-grid,
body.dark-mode .yushi-grid,
body.dark-mode .xiaoxi-grid,
body.dark-mode .zangfu-grid,
body.dark-mode .zhouqi-grid,
body.dark-mode .gaofang-grid,
body.dark-mode .aijiu-grid,
body.dark-mode .zuliao-grid {
  gap: 8px;
}

/* Ziwei Module Cards */
body.dark-mode .fudao-card,
body.dark-mode .star-card,
body.dark-mode .palace-card,
body.dark-mode .zifu-card,
body.dark-mode .fuhua-card,
body.dark-mode .mingju-card,
body.dark-mode .tianfu-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Qimen Module Cards */
body.dark-mode .qimen-pan-card,
body.dark-mode .qimen-gong-card,
body.dark-mode .qimen-xing-card,
body.dark-mode .qimen-jia-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Liuren Module Cards */
body.dark-mode .liuren-pan-card,
body.dark-mode .liuren-sanction-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Traditional Module Cards */
body.dark-mode .bazi-card,
body.dark-mode .wuxing-bar-card,
body.dark-mode .shichen-card,
body.dark-mode .xunhua-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Card Labels and Values */
body.dark-mode .pillar-label,
body.dark-mode .chakra-core-label,
body.dark-mode .meridian-label,
body.dark-mode .jieqi-label,
body.dark-mode .season-label,
body.dark-mode .qijing-label,
body.dark-mode .zimu-label,
body.dark-mode .tizhi-label,
body.dark-mode .gan-label,
body.dark-mode .zhi-label,
body.dark-mode .yinyang-label,
body.dark-mode .liuqie-label,
body.dark-mode .gongfa-label,
body.dark-mode .xuewei-label,
body.dark-mode .yaoshi-label,
body.dark-mode .meiri-label,
body.dark-mode .wuyin-label,
body.dark-mode .secai-label {
  color: #888 !important;
}

body.dark-mode .pillar-value,
body.dark-mode .chakra-core-value,
body.dark-mode .meridian-value,
body.dark-mode .jieqi-value,
body.dark-mode .season-value,
body.dark-mode .qijing-value,
body.dark-mode .zimu-value,
body.dark-mode .tizhi-value,
body.dark-mode .gan-value,
body.dark-mode .zhi-value,
body.dark-mode .yinyang-value,
body.dark-mode .liuqie-value,
body.dark-mode .gongfa-value,
body.dark-mode .xuewei-value,
body.dark-mode .yaoshi-value,
body.dark-mode .meiri-value,
body.dark-mode .wuyin-value,
body.dark-mode .secai-value {
  color: #e0e0e0 !important;
}

/* Archive Card */
body.dark-mode .archive-label {
  color: #888 !important;
}

body.dark-mode .archive-value {
  color: #e0e0e0 !important;
}

body.dark-mode .archive-detail {
  color: #888 !important;
}

/* Grid backgrounds */
body.dark-mode .chakra-grid,
body.dark-mode .meridian-grid,
body.dark-mode .jieqi-grid,
body.dark-mode .season-grid,
body.dark-mode .qijing-grid {
  background: transparent !important;
}

/* Meridian Cards (十二经络) */
body.dark-mode .meridian-tip {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .tip-label {
  color: #888 !important;
}

body.dark-mode .tip-value {
  color: #e0e0e0 !important;
}

body.dark-mode .meridian-grid {
  gap: 8px;
}

body.dark-mode .meridian-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .meridian-card.need-tiaoyang {
  border-color: #4CAF50 !important;
}

body.dark-mode .meridian-name {
  color: #e0e0e0 !important;
}

body.dark-mode .meridian-time {
  color: #a0a0a0 !important;
}

body.dark-mode .meridian-function {
  color: #888 !important;
}

body.dark-mode .meridian-badge {
  color: #4CAF50 !important;
}

/* Zimu Cards (子午流注) */
body.dark-mode .zimu-current {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .current-label {
  color: #888 !important;
}

body.dark-mode .current-value {
  color: #e0e0e0 !important;
}

body.dark-mode .zimu-grid {
  gap: 8px;
}

body.dark-mode .zimu-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .zimu-card.active {
  border-color: #4CAF50 !important;
}

body.dark-mode .zimu-zhi {
  color: #e0e0e0 !important;
}

body.dark-mode .zimu-time,
body.dark-mode .zimu-meridian,
body.dark-mode .zimu-action {
  color: #888 !important;
}

body.dark-mode .zimu-badge {
  color: #4CAF50 !important;
}

/* Tizhi Chengyin (先天体质) */
body.dark-mode .tizhi-chengyin-section {
  background: transparent !important;
}

body.dark-mode .chengyin-main-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .main-label {
  color: #888 !important;
}

body.dark-mode .main-value {
  color: #e0e0e0 !important;
}

/* Qimen Nine Palaces (九宫全息盘) */
body.dark-mode .qimen-plate-container {
  background: transparent !important;
}

body.dark-mode .qimen-plate {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: transparent !important;
}

body.dark-mode .qimen-palace {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 10px;
}

body.dark-mode .palace-header {
  background: #16213e !important;
  color: #4CAF50 !important;
  font-weight: 600;
  margin-bottom: 8px;
  border-bottom: 1px solid #2a2a4a !important;
}

/* Section 1 - BaZi Basics (八字基础) */
body.dark-mode .bazi-basic-grid {
  gap: 10px;
}

/* Section 4 - Patterns (格局分析) Already has pattern-card */

/* Section 5 - WuXing Balance (五行平衡) */
body.dark-mode .wuxing-balance {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .wuxing-bars {
  gap: 8px;
}

body.dark-mode .wuxing-bar-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
}

body.dark-mode .wuxing-bar-item .wx-label {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .wuxing-bar-item .wx-value {
  color: #e0e0e0 !important;
  font-size: 12px;
  font-weight: 600;
}

body.dark-mode .wx-fill-block {
  background: #4CAF50 !important;
}

body.dark-mode .wuxing-assessment {
  color: #a0a0a0 !important;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  background: #1a1a2e !important;
  border-radius: 8px;
}

/* Section 6 - DaYun (大运分析) */
body.dark-mode .dayun-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .dayun-header {
  display: flex;
  gap: 16px;
  justify-content: center;
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .dayun-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark-mode .dayun-item {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 10px;
}

body.dark-mode .dayun-pillar {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .dayun-age {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .dayun-years {
  color: #a0a0a0 !important;
  font-size: 11px;
}

body.dark-mode .dayun-shishen {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .dayun-wuxing {
  color: #888 !important;
  font-size: 12px;
}

/* Section 7 - ShenSha (神煞分析) - Already has shensha-card styles */

/* Section 8 - Relations (刑冲合害) Already added */

/* Section 9 - Cangan (藏干分析) Already added */

/* Section 10 - Nayin (纳音五行) Already added */

/* Section 11 - Changsheng (十二长生) Already added */

/* Section 12 - Yongshen (用神喜忌) Already added */

/* Section 13 - Monthly (流年逐月) Already added */

/* Section 20 - Fortune Level (运势层次) */
body.dark-mode .fortune-level-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .fortune-level-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .fortune-level-title {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .fortune-level-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .fortune-level-desc {
  color: #a0a0a0 !important;
  font-size: 12px;
  margin-top: 4px;
}

/* Section 21 - Marriage (婚姻分析) Already added */

/* Section 22 - Health (健康分析) Already added */

/* Section 23 - Life Advice (人生建议) Already added */

/* Section 24 - Kongwang (空亡分析) Already added */

/* Section 34 - Zhengbage (正八格分析) */
body.dark-mode .zhengbage-pattern {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .zhengbage-name {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .zhengbage-type {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .zhengbage-condition {
  color: #888 !important;
  font-size: 11px;
  margin-top: 6px;
}

body.dark-mode .zhengbage-career {
  background: #16213e !important;
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
}

body.dark-mode .zhengbage-career-item {
  color: #a0a0a0 !important;
  font-size: 12px;
}

/* Ziwei Section 8 - 紫微格局分析 */
body.dark-mode .ziwei-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

body.dark-mode .ziwei-pattern-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-pattern-name {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-pattern-badge {
  background: #4CAF50 !important;
  color: white !important;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

body.dark-mode .ziwei-pattern-nature {
  color: #a0a0a0 !important;
  font-size: 12px;
  margin-top: 6px;
}

/* Ziwei Section 9 - 星曜组合分析 */
body.dark-mode .ziwei-combo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .ziwei-combo-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

body.dark-mode .ziwei-combo-name {
  color: #e0e0e0 !important;
  font-weight: 600;
  margin-bottom: 6px;
}

body.dark-mode .ziwei-combo-stars {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-combo-meaning {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

/* Ziwei Section 10 - 命主身主强度 */
body.dark-mode .ziwei-master-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .ziwei-master-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

body.dark-mode .ziwei-master-label {
  color: #888 !important;
  font-size: 12px;
  margin-bottom: 6px;
}

body.dark-mode .ziwei-master-name {
  color: #e0e0e0 !important;
  font-weight: 600;
  font-size: 16px;
}

body.dark-mode .ziwei-master-wuxing {
  color: #4CAF50 !important;
  font-size: 12px;
  margin-top: 4px;
}

/* Ziwei Section 18 - 疾厄宫分析 */
body.dark-mode .ziwei-jihe-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-jihe-label {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-jihe-title {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-jihe-stars {
  color: #a0a0a0 !important;
  font-size: 13px;
}

body.dark-mode .ziwei-jihe-desc {
  color: #888 !important;
  font-size: 11px;
  margin-top: 6px;
}

/* Ziwei Section 19 - 同宫分析 */
body.dark-mode .ziwei-tonggong-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .ziwei-tonggong-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-tonggong-palaces {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-tonggong-stars {
  color: #a0a0a0 !important;
  font-size: 12px;
  margin-top: 4px;
}

body.dark-mode .ziwei-tonggong-effect {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

/* Ziwei Section 20 - 借宫分析 */
body.dark-mode .ziwei-jiegong-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .ziwei-jiegong-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-jiegong-original {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-jiegong-borrowed {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-jiegong-effect {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

/* Ziwei Section 21 - 夹宫分析 */
body.dark-mode .ziwei-jiagong-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .ziwei-jiagong-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-jiagong-palaces {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-jiagong-stars {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-jiagong-effect {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

/* Ziwei Section 22 - 临宫分析 */
body.dark-mode .ziwei-lingong-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .ziwei-lingong-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-lingong-palace {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-lingong-stars {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-lingong-effect {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

/* Ziwei Section 23 - 六合分析 */
body.dark-mode .ziwei-liuhe-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .ziwei-liuhe-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-liuhe-palaces {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-liuhe-effect {
  color: #888 !important;
  font-size: 12px;
  margin-top: 4px;
}

/* Ziwei Section 24 - 木星/天王分析 Already added (ziwei-muwang-card) */

/* Ziwei Section 32 - 事业宫专项 */
body.dark-mode .ziwei-career-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-career-label {
  color: #888 !important;
  font-size: 12px;
  margin-bottom: 6px;
}

body.dark-mode .ziwei-career-main {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-career-advice {
  color: #a0a0a0 !important;
  font-size: 12px;
  margin-top: 8px;
}

/* Ziwei Section 33 - 财帛宫专项 */
body.dark-mode .ziwei-wealth-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

/* Ziwei Section 34 - 夫妻宫专项 */
body.dark-mode .ziwei-spouse-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

/* Ziwei Section 35 - 子女宫专项 */
body.dark-mode .ziwei-children-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

/* Ziwei Section 36 - 福德宫专项 */
body.dark-mode .ziwei-fude-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

/* Section Title Dark Mode */
body.dark-mode .section-title {
  color: #a0a0a0 !important;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a4a !important;
}

/* No Data Dark Mode */
body.dark-mode .no-data,
body.dark-mode .no-patterns {
  color: #888 !important;
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

/* Ziwei Module - Override inline macaronColors with !important */
/* Section 8 - 紫微格局分析 */
body.dark-mode .ziwei-module [title="八、紫微格局分析"] ~ div div,
body.dark-mode .ziwei-module .apple-card:nth-child(8) > div > div > div {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-module .apple-card-body > div:nth-child(1) > div {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 10px;
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div:nth-child(1) > div div:first-child {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div:nth-child(1) > div div:first-child span {
  background: rgba(255,255,255,0.6) !important;
  color: #333 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div:nth-child(1) > div div:last-child {
  color: #a0a0a0 !important;
}

/* Ziwei Section 8, 9, 10 - Grid card patterns */
body.dark-mode .ziwei-module .apple-card-body > div > div {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div > div div {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div > div div span,
body.dark-mode .ziwei-module .apple-card-body > div > div span {
  color: #333 !important;
  background: rgba(255,255,255,0.6) !important;
}

body.dark-mode .ziwei-module .apple-card-body > div > div div:nth-child(2) {
  color: #a0a0a0 !important;
}

/* Ziwei Section 18-24, 32-36 - Palace analysis cards with inline styles */
body.dark-mode .ziwei-module .apple-card-body > div > div,
body.dark-mode .ziwei-module .apple-card-body > div > div > div,
body.dark-mode .ziwei-module .apple-card-body > div > div > div > div {
  background: #1a1a2e !important;
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div > div > div > div > div,
body.dark-mode .ziwei-module .apple-card-body > div > div > div > div > div > div {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body > div > div > div > div > div:nth-child(2),
body.dark-mode .ziwei-module .apple-card-body > div > div > div > div > div:last-child {
  color: #a0a0a0 !important;
}

/* Ziwei Section 18 - 疾厄宫 */
body.dark-mode .ziwei-module .apple-card-body > div > div div[style*="疾厄宫"],
body.dark-mode .ziwei-module .apple-card-body > div > div > div:contains("疾厄宫") {
  color: #e0e0e0 !important;
}

/* Ziwei Section 19-24 - Grid items */
body.dark-mode .ziwei-module .apple-card-body > div > div > div > div {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  color: #e0e0e0 !important;
}

/* Ziwei Section 25 - 木星/天王 - muwang cards */
body.dark-mode .ziwei-module .apple-card-body .ziwei-muwang-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Ziwei Section 32-36 - Specific palace sections */
body.dark-mode .ziwei-module .apple-card:nth-child(32) > div > div > div > div,
body.dark-mode .ziwei-module .apple-card:nth-child(33) > div > div > div > div,
body.dark-mode .ziwei-module .apple-card:nth-child(34) > div > div > div > div,
body.dark-mode .ziwei-module .apple-card:nth-child(35) > div > div > div > div,
body.dark-mode .ziwei-module .apple-card:nth-child(36) > div > div > div > div {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  color: #e0e0e0 !important;
}

/* Target all ZiweiModule cards with inline background styles in dark mode */
body.dark-mode .ziwei-module .apple-card-body [style*="background"] {
  background: #1a1a2e !important;
  color: #e0e0e0 !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-module .apple-card-body [style*="background"] div,
body.dark-mode .ziwei-module .apple-card-body [style*="background"] span {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body [style*="background"] div:nth-child(2) {
  color: #a0a0a0 !important;
}

/* ZiweiModule text colors in dark mode */
body.dark-mode .ziwei-module .apple-card-body div[style*="font-weight: bold"] {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body [style*="grid"] div {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-module .apple-card-body [style*="grid"] div:nth-child(2) {
  color: #a0a0a0 !important;
}

/* Traditional Mingli Section 1-6, 8-13, 20-24, 34 Additional Styles */
/* Make sure all cards have proper dark mode */
body.dark-mode .bazi-basic-grid .maillun-card {
  background: #1a1a2e !important;
}

body.dark-mode .strength-info .strength-main,
body.dark-mode .strength-info .strength-score,
body.dark-mode .strength-info .strength-detail {
  background: #1a1a2e !important;
}

body.dark-mode .yongshen-section .mini-card {
  background: #1a1a2e !important;
}

body.dark-mode .shishen-pillar-group {
  background: #1a1a2e !important;
}

body.dark-mode .shishen-card-mini {
  background: #16213e !important;
}

body.dark-mode .dayun-header {
  background: transparent !important;
}

body.dark-mode .dayun-item {
  background: #1a1a2e !important;
}

body.dark-mode .fortune-level .maillun-card {
  background: #1a1a2e !important;
}

body.dark-mode .marriage-quality {
  color: #4CAF50 !important;
}

body.dark-mode .disease-item {
  background: #1a1a2e !important;
}

body.dark-mode .solution-item {
  background: #1a1a2e !important;
}

body.dark-mode .keypoint-item {
  background: #1a1a2e !important;
}

body.dark-mode .zhengbage-card {
  background: #1a1a2e !important;
}

/* Section 1 - 八字基础 (八字基础) */
body.dark-mode .bazi-basic-grid {
  gap: 10px;
}

body.dark-mode .bazi-basic-grid .maillun-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .nayin-section {
  background: transparent !important;
}

body.dark-mode .mini-cards-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.dark-mode .mini-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
  flex: 1;
  min-width: 120px;
}

body.dark-mode .mini-card-title {
  color: #888 !important;
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}

body.dark-mode .nayin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

body.dark-mode .nayin-item {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .taiyuan-info,
body.dark-mode .minggong-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .taiyuan-value,
body.dark-mode .minggong-item span {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .taiyuan-desc,
body.dark-mode .minggong-item span:last-child {
  color: #888 !important;
  font-size: 11px;
}

/* Section 2 - 日主旺衰 */
body.dark-mode .strength-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .strength-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body.dark-mode .strength-label {
  color: #888 !important;
  font-size: 14px;
}

body.dark-mode .strength-wuxing {
  color: #a0a0a0 !important;
}

body.dark-mode .strength-level {
  color: #4CAF50 !important;
  font-weight: 600;
  font-size: 14px;
}

body.dark-mode .strength-score {
  color: #e0e0e0 !important;
  font-size: 14px;
}

body.dark-mode .strength-detail {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .strength-item {
  color: #a0a0a0 !important;
  font-size: 13px;
}

body.dark-mode .strength-factors {
  margin-top: 8px;
}

body.dark-mode .factor-item {
  color: #888 !important;
  font-size: 12px;
  padding: 4px 0;
}

body.dark-mode .yongshen-section {
  margin-top: 12px;
}

body.dark-mode .yongshen-section .mini-card {
  background: #1a1a2e !important;
}

body.dark-mode .yongshen-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

body.dark-mode .yongshen-item {
  display: flex;
  gap: 8px;
}

body.dark-mode .yongshen-label {
  color: #888 !important;
}

body.dark-mode .yongshen-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .yongshen-value.avoid {
  color: #F44336 !important;
}

/* Section 3 - 十神分析 */
body.dark-mode .shishen-by-pillar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .shishen-pillar-group {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .pillar-title {
  color: #888 !important;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

body.dark-mode .pillar-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

body.dark-mode .shishen-card-mini {
  background: #16213e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

body.dark-mode .card-top {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .card-center {
  color: #e0e0e0 !important;
  font-weight: 700;
  font-size: 14px;
  margin: 4px 0;
}

body.dark-mode .card-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  color: #a0a0a0 !important;
}

/* Section 6 - 大运分析 */
body.dark-mode .dayun-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .dayun-header {
  display: flex;
  gap: 16px;
  justify-content: center;
  color: #888 !important;
  font-size: 13px;
  padding: 8px;
}

body.dark-mode .dayun-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark-mode .dayun-item {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 10px 12px;
}

body.dark-mode .dayun-pillar {
  color: #e0e0e0 !important;
  font-weight: 700;
  font-size: 14px;
}

body.dark-mode .dayun-age {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .dayun-years {
  color: #a0a0a0 !important;
  font-size: 11px;
}

body.dark-mode .dayun-shishen {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .dayun-wuxing {
  color: #888 !important;
  font-size: 12px;
}

/* Section 8 - 刑冲合害 */
body.dark-mode .relations-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .relation-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .relation-pair {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .relation-type {
  font-size: 12px;
}

body.dark-mode .relation-item.he .relation-type { color: #4CAF50 !important; }
body.dark-mode .relation-item.chong .relation-type { color: #F44336 !important; }
body.dark-mode .relation-item.xing .relation-type { color: #FF9800 !important; }
body.dark-mode .relation-item.hai .relation-type { color: #2196F3 !important; }

body.dark-mode .relation-desc {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .hehua-section,
body.dark-mode .special-relation-section {
  margin-top: 15px;
}

body.dark-mode .hehua-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.dark-mode .hehua-item-inner {
  color: #a0a0a0 !important;
  font-size: 12px;
  padding: 8px;
  background: #1a1a2e !important;
  border-radius: 4px;
}

body.dark-mode .special-relation-item {
  color: #c0c0c0 !important;
  font-size: 12px;
  padding: 8px;
  background: #1a1a2e !important;
  border-radius: 4px;
  margin-top: 6px;
}

/* Section 10 - 纳音五行 */
body.dark-mode .nayin-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .nayin-detail-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .nayin-pillar {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .nayin-value {
  color: #e0e0e0 !important;
  font-weight: 700;
  font-size: 15px;
  margin: 4px 0;
}

body.dark-mode .nayin-wuxing {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .nayin-desc {
  color: #888 !important;
  font-size: 11px;
  margin-top: 6px;
}

body.dark-mode .wuxing-bias {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #2a2a4a;
}

body.dark-mode .wuxing-count-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

body.dark-mode .wx-count-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

body.dark-mode .wx-count-item .wx-label {
  color: #888 !important;
  font-size: 12px;
  display: block;
}

body.dark-mode .wx-count-item .wx-count {
  color: #e0e0e0 !important;
  font-weight: 700;
  font-size: 14px;
  display: block;
  margin-top: 4px;
}

body.dark-mode .bias-desc {
  color: #a0a0a0 !important;
  font-size: 13px;
  text-align: center;
}

/* Section 20 - 运势层次 */
body.dark-mode .fortune-level {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .fortune-level .maillun-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .fortune-level .maillun-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Section 21 - 婚姻分析 */
body.dark-mode .marriage-analysis {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .marriage-quality {
  color: #4CAF50 !important;
  font-weight: 700;
  font-size: 16px;
}

body.dark-mode .marriage-desc {
  color: #c0c0c0 !important;
  font-size: 13px;
  margin-top: 8px;
}

body.dark-mode .liuqin-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

body.dark-mode .liuqin-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  color: #a0a0a0 !important;
}

/* Section 34 - 正八格分析 */
body.dark-mode .zhengbage-analysis {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .zhengbage-analysis .maillun-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .zhengbage-analysis .maillun-card[style*="E3F2FD"],
body.dark-mode .zhengbage-analysis .maillun-card[style*="E8F5E9"] {
  background: #1a1a2e !important;
}

body.dark-mode .zhengbage-analysis .maillun-card[style*="C8E6C9"] span {
  background: #2a4a2a !important;
  color: #81C784 !important;
}

/* Override inline styles for Traditional Mingli in dark mode */
body.dark-mode .tab-content[style*="bazi"] [style*="background"],
body.dark-mode [active="bazi"] [style*="background"],
body.dark-mode .bazi-module [style*="background"] {
  background: #1a1a2e !important;
}

/* Ensure all nested elements have proper dark mode colors */
body.dark-mode .bazi-basic-grid *,
body.dark-mode .nayin-section *,
body.dark-mode .mini-cards-row *,
body.dark-mode .strength-info *,
body.dark-mode .shishen-by-pillar *,
body.dark-mode .dayun-section *,
body.dark-mode .relations-list *,
body.dark-mode .nayin-detail-list *,
body.dark-mode .fortune-level *,
body.dark-mode .marriage-analysis *,
body.dark-mode .zhengbage-analysis * {
  color: inherit;
}

body.dark-mode .palace-body {
  font-size: 12px;
}

body.dark-mode .palace-item,
body.dark-mode .pan-item,
body.dark-mode .shen-item {
  color: #a0a0a0 !important;
  margin: 4px 0;
}

/* Ziwei Palace Cards */
body.dark-mode .ziwei-palace-meanings-grid,
body.dark-mode .ziwei-palace-detail-grid {
  gap: 8px;
}

body.dark-mode .ziwei-palace-meaning-card,
body.dark-mode .ziwei-palace-detail-card,
body.dark-mode .ziwei-daxian-palace-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-palace-name,
body.dark-mode .ziwei-palace-detail-header {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-palace-meaning,
body.dark-mode .ziwei-palace-detail-stars,
body.dark-mode .ziwei-palace-detail-aux {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-star-palace,
body.dark-mode .ziwei-noble-palace,
body.dark-mode .ziwei-mw-palace {
  color: #e0e0e0 !important;
}

/* Maillun card values */
body.dark-mode .maillun-card-label {
  color: #888 !important;
}

body.dark-mode .maillun-card-value {
  color: #e0e0e0 !important;
}

/* More specific overrides */
body.dark-mode .jieqi-section {
  background: transparent !important;
}

body.dark-mode .jieqi-birth-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .birth-label {
  color: #888 !important;
}

body.dark-mode .birth-value {
  color: #e0e0e0 !important;
}

/* Ziwei Module Dark Mode Styles */
body.dark-mode .ziwei-basic-grid {
  gap: 8px;
}

body.dark-mode .ziwei-basic-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-basic-label {
  color: #888 !important;
  font-size: 11px;
  margin-bottom: 4px;
}

body.dark-mode .ziwei-basic-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-star-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-star-name {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-star-level {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-star-palace {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .ziwei-brightness-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-brightness-name {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-brightness-value {
  color: #4CAF50 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-transform-grid {
  gap: 8px;
}

body.dark-mode .ziwei-transform-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-transform-label {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-transform-nature {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-transform-star {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-interaction-grid {
  gap: 8px;
}

body.dark-mode .ziwei-interaction-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-interaction-type {
  color: #4CAF50 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-interaction-palaces {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-interaction-desc {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-monthly-grid {
  gap: 8px;
}

body.dark-mode .ziwei-monthly-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-monthly-name {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-monthly-star {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-monthly-advice {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-daxian-grid {
  gap: 8px;
}

body.dark-mode .ziwei-daxian-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-daxian-period {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-daxian-age {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-daxian-star {
  color: #4CAF50 !important;
  font-weight: 600;
}

body.dark-mode .ziwei-daxian-prediction {
  color: #e0e0e0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-noble-sha-grid {
  gap: 8px;
}

body.dark-mode .ziwei-noble-sha-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-noble-name {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-noble-palace {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-noble-effect {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-sanfang-grid {
  gap: 8px;
}

body.dark-mode .ziwei-sanfang-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-sanfang-title {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-sanfang-main {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-sanfang-aux {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-taohua-section {
  gap: 8px;
}

body.dark-mode .ziwei-taohua-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-taohua-title {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-taohua-content {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-muwang-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-mw-label {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-mw-palace {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-mw-effect {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-xueji-grid {
  gap: 8px;
}

body.dark-mode .ziwei-xueji-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-xj-label {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-xj-value {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-tizhi-main {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-tz-label {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-tz-value {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-tz-desc {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-star-strength-grid {
  gap: 8px;
}

body.dark-mode .ziwei-star-strength-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-ss-name {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-ss-strength {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-ss-analysis {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .ziwei-auspicious-grid {
  gap: 8px;
}

body.dark-mode .ziwei-auspicious-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-au-type {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .ziwei-au-items {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-au-desc {
  color: #a0a0a0 !important;
  font-size: 11px;
}

body.dark-mode .ziwei-comp-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-comp-title {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-comp-content {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-life-analysis {
  gap: 8px;
}

body.dark-mode .ziwei-life-phase {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-life-phase-title {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-life-phase-desc {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-advice-content {
  gap: 8px;
}

body.dark-mode .ziwei-advice-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-advice-title {
  color: #e0e0e0 !important;
}

body.dark-mode .ziwei-advice-text {
  color: #a0a0a0 !important;
}

body.dark-mode .ziwei-bc-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .ziwei-bc-label {
  color: #888 !important;
}

/* Qimen Module Part 2 Dark Mode */
body.dark-mode .qimen-plate .qimen-palace:nth-child(1) { background: #1a1a2e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(2) { background: #16213e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(3) { background: #1a1a2e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(4) { background: #16213e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(5) { background: #1a1a2e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(6) { background: #16213e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(7) { background: #1a1a2e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(8) { background: #16213e !important; }
body.dark-mode .qimen-plate .qimen-palace:nth-child(9) { background: #1a1a2e !important; }

body.dark-mode .qimen-palace:nth-child(1) .palace-header { border-bottom-color: #4CAF50 !important; }
body.dark-mode .qimen-palace:nth-child(2) .palace-header { border-bottom-color: #2196F3 !important; }
body.dark-mode .qimen-palace:nth-child(3) .palace-header { border-bottom-color: #9C27B0 !important; }
body.dark-mode .qimen-palace:nth-child(4) .palace-header { border-bottom-color: #FF9800 !important; }
body.dark-mode .qimen-palace:nth-child(5) .palace-header { border-bottom-color: #E91E63 !important; }
body.dark-mode .qimen-palace:nth-child(6) .palace-header { border-bottom-color: #4CAF50 !important; }
body.dark-mode .qimen-palace:nth-child(7) .palace-header { border-bottom-color: #2196F3 !important; }
body.dark-mode .qimen-palace:nth-child(8) .palace-header { border-bottom-color: #9C27B0 !important; }
body.dark-mode .qimen-palace:nth-child(9) .palace-header { border-bottom-color: #FF9800 !important; }

body.dark-mode .qimen-palace:nth-child(1) .palace-body { background: #1a1a2e !important; }
body.dark-mode .qimen-palace:nth-child(2) .palace-body { background: #16213e !important; }
body.dark-mode .qimen-palace:nth-child(3) .palace-body { background: #1a1a2e !important; }
body.dark-mode .qimen-palace:nth-child(4) .palace-body { background: #16213e !important; }
body.dark-mode .qimen-palace:nth-child(5) .palace-body { background: #1a1a2e !important; }
body.dark-mode .qimen-palace:nth-child(6) .palace-body { background: #16213e !important; }
body.dark-mode .qimen-palace:nth-child(7) .palace-body { background: #1a1a2e !important; }
body.dark-mode .qimen-palace:nth-child(8) .palace-body { background: #16213e !important; }
body.dark-mode .qimen-palace:nth-child(9) .palace-body { background: #1a1a2e !important; }

body.dark-mode .maillun-card-desc {
  color: #888 !important;
}

body.dark-mode .analysis-row {
  background: #1a1a2e !important;
}

body.dark-mode .analysis-row .label {
  color: #888 !important;
}

body.dark-mode .analysis-row .value {
  color: #e0e0e0 !important;
}

body.dark-mode .analysis-suggestion {
  background: #1a3a1a !important;
  color: #81C784 !important;
}

body.dark-mode .energy-result .dominant {
  color: #4CAF50 !important;
}

body.dark-mode .energy-suggestion {
  color: #888 !important;
}

/* Traditional Mingli (传统命理) Dark Mode Styles */
/* Section 1 - Basic Info */
body.dark-mode .nayin-section,
body.dark-mode .mini-cards-row {
  gap: 8px;
}

body.dark-mode .mini-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .mini-card-title {
  color: #888 !important;
  font-size: 12px;
  margin-bottom: 8px;
}

body.dark-mode .nayin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

body.dark-mode .nayin-item {
  color: #e0e0e0 !important;
  font-size: 12px;
}

body.dark-mode .taiyuan-info,
body.dark-mode .minggong-info {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .taiyuan-value,
body.dark-mode .minggong-item span {
  color: #e0e0e0 !important;
}

/* Section 2 - Day Master Strength */
body.dark-mode .strength-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .strength-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.dark-mode .strength-label {
  color: #888 !important;
}

body.dark-mode .strength-wuxing {
  color: #a0a0a0 !important;
}

body.dark-mode .strength-level {
  color: #4CAF50 !important;
  font-weight: 600;
}

body.dark-mode .strength-score {
  color: #e0e0e0 !important;
}

body.dark-mode .strength-detail {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .strength-item {
  color: #a0a0a0 !important;
  font-size: 12px;
}

body.dark-mode .strength-factors {
  margin-top: 8px;
}

body.dark-mode .factor-item {
  color: #888 !important;
  font-size: 12px;
}

body.dark-mode .strength-details-list {
  gap: 8px;
}

body.dark-mode .detail-item {
  color: #c0c0c0 !important;
  font-size: 13px;
  padding: 8px;
  background: #1a1a2e !important;
  border-radius: 6px;
}

body.dark-mode .yongshen-section {
  margin-top: 12px;
}

body.dark-mode .yongshen-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

body.dark-mode .yongshen-item {
  display: flex;
  gap: 8px;
}

body.dark-mode .yongshen-label {
  color: #888 !important;
}

body.dark-mode .yongshen-value {
  color: #e0e0e0 !important;
}

body.dark-mode .yongshen-value.avoid {
  color: #F44336 !important;
}

/* Section 3 - Ten Gods */
body.dark-mode .shishen-by-pillar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .shishen-pillar-group {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .pillar-title {
  color: #888 !important;
  font-size: 12px;
  margin-bottom: 8px;
}

body.dark-mode .pillar-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

body.dark-mode .shishen-card-mini {
  background: #16213e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

body.dark-mode .card-top {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .card-center {
  color: #e0e0e0 !important;
  font-weight: 600;
  font-size: 14px;
  margin: 4px 0;
}

body.dark-mode .card-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  color: #a0a0a0 !important;
}

/* Section 4 - Patterns */
body.dark-mode .patterns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .pattern-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .pattern-name {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .pattern-type {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .pattern-detail {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

/* Section 5 - WuXing Balance */
body.dark-mode .wuxing-balance-grid {
  gap: 8px;
}

body.dark-mode .wuxing-balance-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 10px;
}

/* Section 6 - Bazi Basics Already Done */

/* Section 8 - Relations (刑冲合害) */
body.dark-mode .relations-list {
  gap: 8px;
}

body.dark-mode .relation-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .relation-pair {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .relation-type {
  font-size: 12px;
}

body.dark-mode .relation-item.he .relation-type { color: #4CAF50 !important; }
body.dark-mode .relation-item.chong .relation-type { color: #F44336 !important; }
body.dark-mode .relation-item.xing .relation-type { color: #FF9800 !important; }
body.dark-mode .relation-item.hai .relation-type { color: #2196F3 !important; }

body.dark-mode .relation-desc {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .hehua-section,
body.dark-mode .special-relation-section {
  margin-top: 12px;
}

body.dark-mode .hehua-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.dark-mode .hehua-item-inner {
  color: #a0a0a0 !important;
  font-size: 12px;
  padding: 6px;
  background: #1a1a2e !important;
  border-radius: 4px;
}

body.dark-mode .special-relation-item {
  color: #c0c0c0 !important;
  font-size: 12px;
  padding: 6px;
  background: #1a1a2e !important;
  border-radius: 4px;
  margin-top: 6px;
}

/* Section 9 - Cangan (藏干) */
body.dark-mode .cangan-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

body.dark-mode .cangan-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

body.dark-mode .cangan-pillar {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .cangan-zhi {
  color: #e0e0e0 !important;
}

body.dark-mode .cangan-gans {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

body.dark-mode .cangan-gan {
  background: #16213e !important;
  border-radius: 4px;
  color: #a0a0a0 !important;
}

body.dark-mode .cangan-gan.main {
  background: #4CAF50 !important;
  color: white !important;
}

/* Section 10 - Nayin */
body.dark-mode .nayin-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.dark-mode .nayin-detail-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .nayin-pillar {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .nayin-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .nayin-wuxing {
  color: #4CAF50 !important;
  font-size: 12px;
}

body.dark-mode .nayin-desc {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

body.dark-mode .wuxing-bias {
  margin-top: 12px;
}

body.dark-mode .wuxing-count-grid {
  gap: 8px;
}

body.dark-mode .wx-count-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

body.dark-mode .wx-label {
  color: #888 !important;
}

body.dark-mode .wx-count {
  color: #e0e0e0 !important;
  font-weight: 600;
  display: block;
}

body.dark-mode .bias-desc {
  color: #a0a0a0 !important;
  font-size: 12px;
  text-align: center;
}

/* Additional comprehensive dark mode for Traditional Mingli sections */
body.dark-mode .bazi-basic-grid .maillun-card,
body.dark-mode .mini-card,
body.dark-mode .strength-info,
body.dark-mode .strength-main,
body.dark-mode .strength-score,
body.dark-mode .strength-detail,
body.dark-mode .strength-factors,
body.dark-mode .yongshen-section,
body.dark-mode .nayin-section,
body.dark-mode .wuxing-bias {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .mini-cards-row {
  display: flex;
  gap: 10px;
}

body.dark-mode .mini-card {
  flex: 1;
  min-width: 100px;
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .mini-card-title {
  color: #888 !important;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

body.dark-mode .nayin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

body.dark-mode .nayin-item {
  color: #a0a0a0 !important;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

body.dark-mode .taiyuan-info,
body.dark-mode .minggong-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .taiyuan-value,
body.dark-mode .minggong-item span {
  color: #e0e0e0 !important;
  font-weight: 600;
  font-size: 13px;
}

body.dark-mode .taiyuan-desc,
body.dark-mode .minggong-item span:last-child {
  color: #888 !important;
  font-size: 11px;
}

/* Strength section specific */
body.dark-mode .strength-label {
  color: #888 !important;
}

body.dark-mode .strength-wuxing {
  color: #a0a0a0 !important;
}

body.dark-mode .strength-level {
  color: #4CAF50 !important;
  font-weight: 700;
}

body.dark-mode .strength-item {
  color: #a0a0a0 !important;
  padding: 4px 0;
}

body.dark-mode .factor-item {
  color: #888 !important;
  font-size: 12px;
  padding: 2px 0;
}

/* Yongshen section */
body.dark-mode .yongshen-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

body.dark-mode .yongshen-label {
  color: #888 !important;
}

body.dark-mode .yongshen-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .yongshen-value.avoid {
  color: #F44336 !important;
}

/* WuXing Bias section */
body.dark-mode .wuxing-bias {
  background: transparent !important;
  border: none !important;
  padding-top: 12px;
  border-top: 1px solid #2a2a4a !important;
}

body.dark-mode .wuxing-count-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

body.dark-mode .wx-count-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

body.dark-mode .wx-label {
  color: #888 !important;
  font-size: 12px;
  font-weight: 600;
  display: block;
}

body.dark-mode .wx-count {
  color: #e0e0e0 !important;
  font-weight: 700;
  font-size: 16px;
  display: block;
  margin-top: 4px;
}

body.dark-mode .bias-desc {
  display: block;
  color: #a0a0a0 !important;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  background: #1a1a2e !important;
  border-radius: 6px;
}

/* Section 11 - Changsheng (十二长生) */
body.dark-mode .changsheng-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.dark-mode .changsheng-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

body.dark-mode .cs-position {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .cs-stem,
body.dark-mode .cs-branch {
  color: #e0e0e0 !important;
  font-weight: 600;
}

/* Section 12 - Yongshen (用神喜忌) */
body.dark-mode .yongshen-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ys-main,
body.dark-mode .ys-sub,
body.dark-mode .ys-avoid {
  display: flex;
  gap: 8px;
}

body.dark-mode .ys-label {
  color: #888 !important;
}

body.dark-mode .ys-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .ys-value.avoid {
  color: #F44336 !important;
}

body.dark-mode .ys-desc {
  color: #a0a0a0 !important;
  font-size: 12px;
  margin-top: 8px;
}

body.dark-mode .like-dislike-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

body.dark-mode .ld-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 8px;
}

body.dark-mode .ld-label {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .ld-value {
  color: #e0e0e0 !important;
  font-size: 12px;
}

body.dark-mode .tiaohou-section {
  margin-top: 12px;
}

/* Section 13 - Monthly Fortune */
body.dark-mode .liuyue-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

body.dark-mode .liuyue-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

body.dark-mode .liuyue-month {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .liuyue-ganzhi {
  color: #e0e0e0 !important;
  font-weight: 600;
  font-size: 14px;
}

body.dark-mode .liuyue-wuxing {
  color: #4CAF50 !important;
  font-size: 11px;
}

body.dark-mode .liuyue-shishen {
  color: #a0a0a0 !important;
  font-size: 11px;
}

body.dark-mode .liuyue-status {
  color: #888 !important;
  font-size: 10px;
  margin-top: 4px;
}

/* Section 20 - Fortune Level */
body.dark-mode .fortune-level {
  gap: 10px;
}

/* Section 21 - Marriage */
body.dark-mode .marriage-analysis {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .marriage-quality {
  color: #4CAF50 !important;
  font-weight: 600;
}

body.dark-mode .marriage-desc {
  color: #c0c0c0 !important;
  font-size: 13px;
  margin-top: 8px;
}

body.dark-mode .liuqin-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

body.dark-mode .liuqin-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  color: #a0a0a0 !important;
}

/* Section 22 - Health */
body.dark-mode .health-disease {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark-mode .disease-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 10px;
}

body.dark-mode .disease-organ {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .disease-info {
  color: #F44336 !important;
  font-size: 12px;
}

body.dark-mode .disease-prevention {
  color: #888 !important;
  font-size: 11px;
  margin-top: 4px;
}

body.dark-mode .shishen-health {
  margin-top: 12px;
}

body.dark-mode .shishen-health-item {
  color: #a0a0a0 !important;
  font-size: 12px;
  padding: 6px;
  background: #1a1a2e !important;
  border-radius: 4px;
  margin-top: 6px;
}

/* Section 23 - Life Advice */
body.dark-mode .solution-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark-mode .solution-item {
  color: #c0c0c0 !important;
  padding: 10px;
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  font-size: 13px;
}

body.dark-mode .keypoint-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark-mode .keypoint-item {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 6px;
  padding: 10px;
}

body.dark-mode .kp-title {
  color: #e0e0e0 !important;
  font-weight: 600;
}

body.dark-mode .kp-content {
  color: #888 !important;
  font-size: 12px;
  margin-top: 4px;
}

/* Section 24 - Kongwang Already Done */

/* Section 34 - Zhengbage */
body.dark-mode .zhengbage-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* More Ziwei Dark Mode */
body.dark-mode .ziwei-comp-grid {
  gap: 8px;
}

body.dark-mode .ziwei-comp-card {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
  border-radius: 8px;
  padding: 12px;
}

body.dark-mode .ziwei-comp-label {
  color: #888 !important;
  font-size: 11px;
}

body.dark-mode .ziwei-comp-value {
  color: #e0e0e0 !important;
  font-weight: 600;
}

/* Qimen Palace Header Dark Mode */
body.dark-mode .palace-header {
  background: #16213e !important;
  color: #4CAF50 !important;
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode div {
  color: #c0c0c0 !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #1a1a2e !important;
  color: #e0e0e0 !important;
  border-color: #2a2a4a !important;
}

body.dark-mode button {
  background: #2a2a4a !important;
  color: #e0e0e0 !important;
  border-color: #3a3a5a !important;
}

body.dark-mode .custom-dropdown-options {
  background: #16213e !important;
  border-color: #2a2a4a !important;
}

body.dark-mode .custom-dropdown-option {
  background: #1a1a2e !important;
  color: #e0e0e0 !important;
}

body.dark-mode .custom-dropdown-option:hover {
  background: #2a2a4a !important;
}

body.dark-mode .tab-content {
  background: #16213e !important;
}

/* Unified dark mode backgrounds */
body.dark-mode .report-page,
body.dark-mode .main-container,
body.dark-mode .section,
body.dark-mode .form-section,
body.dark-mode .tab-content,
body.dark-mode .tab-content.active,
body.dark-mode .apple-tabs,
body.dark-mode .apple-card,
body.dark-mode .apple-card-header,
body.dark-mode .apple-card-body {
  background: #16213e !important;
}

body.dark-mode .apple-tab-btn {
  background: #1a1a2e !important;
  color: #a0a0a0 !important;
  border-color: #2a2a4a !important;
}

body.dark-mode .apple-tab-btn.active {
  background: #4CAF50 !important;
  color: white !important;
  border-color: #4CAF50 !important;
}

/* Aggressive overrides for Traditional Mingli sections */
body.dark-mode .apple-card-body .bazi-basic-grid > div,
body.dark-mode .apple-card-body .mini-card,
body.dark-mode .apple-card-body .mini-cards-row > div,
body.dark-mode .apple-card-body .strength-info > div,
body.dark-mode .apple-card-body .strength-detail,
body.dark-mode .apple-card-body .strength-factors,
body.dark-mode .apple-card-body .yongshen-section > div,
body.dark-mode .apple-card-body .nayin-section > div,
body.dark-mode .apple-card-body .wuxing-bias > div {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

/* Text colors for all traditional mingli content */
body.dark-mode .apple-card-body .maillun-card-label,
body.dark-mode .apple-card-body .mini-card-title,
body.dark-mode .apple-card-body .strength-label,
body.dark-mode .apple-card-body .yongshen-label,
body.dark-mode .apple-card-body .nayin-item span:first-child,
body.dark-mode .apple-card-body .wx-label {
  color: #888 !important;
}

body.dark-mode .apple-card-body .maillun-card-value,
body.dark-mode .apple-card-body .taiyuan-value,
body.dark-mode .apple-card-body .minggong-item span,
body.dark-mode .apple-card-body .strength-wuxing,
body.dark-mode .apple-card-body .strength-level,
body.dark-mode .apple-card-body .strength-item,
body.dark-mode .apple-card-body .yongshen-value,
body.dark-mode .apple-card-body .nayin-item span:last-child,
body.dark-mode .apple-card-body .wx-count {
  color: #e0e0e0 !important;
}

body.dark-mode .apple-card-body .taiyuan-desc,
body.dark-mode .apple-card-body .factor-item,
body.dark-mode .apple-card-body .bias-desc {
  color: #a0a0a0 !important;
}

/* Override all inline background styles in traditional mingli sections */
body.dark-mode .apple-card[style*="background"],
body.dark-mode .apple-card-body[style*="background"],
body.dark-mode .apple-card > div[style*="background"] {
  background: #16213e !important;
}

/* Target all divs with style containing background in apple-card-body */
body.dark-mode .apple-card-body div[style*="background"] {
  background: #1a1a2e !important;
  border: 1px solid #2a2a4a !important;
}

body.dark-mode .apple-card-body div[style*="background"] * {
  color: #e0e0e0 !important;
}

body.dark-mode .apple-card-body div[style*="background"] span,
body.dark-mode .apple-card-body div[style*="background"] div {
  color: #e0e0e0 !important;
}

/* Ultimate aggressive overrides for traditional mingli */
body.dark-mode .tab-content.active .apple-card-body .mini-card,
body.dark-mode .tab-content.active .apple-card-body .mini-card * {
  background: #1a1a2e !important;
  border-color: #2a2a4a !important;
  color: #e0e0e0 !important;
}

body.dark-mode .tab-content.active .apple-card-body .mini-card .mini-card-title,
body.dark-mode .tab-content.active .apple-card-body .mini-card .taiyuan-info,
body.dark-mode .tab-content.active .apple-card-body .mini-card .minggong-info {
  color: #888 !important;
}

body.dark-mode .tab-content.active .apple-card-body .mini-card .taiyuan-value,
body.dark-mode .tab-content.active .apple-card-body .mini-card .minggong-item span {
  color: #e0e0e0 !important;
}

body.dark-mode .tab-content.active .apple-card-body .yongshen-section,
body.dark-mode .tab-content.active .apple-card-body .yongshen-section * {
  background: transparent !important;
  color: #e0e0e0 !important;
}

body.dark-mode .tab-content.active .apple-card-body .yongshen-section .yongshen-label {
  color: #888 !important;
}

body.dark-mode .tab-content.active .apple-card-body .yongshen-section .yongshen-value {
  color: #e0e0e0 !important;
}

body.dark-mode .tab-content.active .apple-card-body .hehua-section,
body.dark-mode .tab-content.active .apple-card-body .hehua-section * {
  background: #1a1a2e !important;
  color: #a0a0a0 !important;
}

/* 修复内联样式颜色问题 - 深色模式 */
body.dark-mode [style*="color: #666"],
body.dark-mode [style*="color:#666"],
body.dark-mode [style*="color: #888"],
body.dark-mode [style*="color:#888"],
body.dark-mode [style*="color: #999"],
body.dark-mode [style*="color:#999"],
body.dark-mode .ziwei-palace-desc,
body.dark-mode .ziwei-palace-detail-desc,
body.dark-mode .ziwei-star-desc,
body.dark-mode .ziwei-brightness-desc,
body.dark-mode .ziwei-transform-desc,
body.dark-mode .ziwei-ss-desc,
body.dark-mode .ziwei-mw-desc,
body.dark-mode .ziwei-taohua-desc,
body.dark-mode .ziwei-noble-desc,
body.dark-mode .ziwei-xj-desc,
body.dark-mode .ziwei-tz-detail,
body.dark-mode .ziwei-monthly-desc,
body.dark-mode .ziwei-daxian-desc,
body.dark-mode .ziwei-au-detail,
body.dark-mode .ziwei-advice-detail,
body.dark-mode .ziwei-life-phase-detail,
body.dark-mode .ziwei-bc-desc,
body.dark-mode .ziwei-comp-desc,
body.dark-mode .destiny-value[style*="color"],
body.dark-mode .ziwei-sanfang-desc,
body.dark-mode .ziwei-interaction-detail {
  color: #a0a0a0 !important;
}

/* Maillun Module 深色模式颜色修复 */
body.dark-mode .gan-body,
body.dark-mode .yunqi-health,
body.dark-mode .exercise-benefit,
body.dark-mode .point-benefit,
body.dark-mode .recipe-effect,
body.dark-mode .music-organ,
body.dark-mode .color-effect,
body.dark-mode .bagua-body,
body.dark-mode .hetu-number,
body.dark-mode .monthly-focus,
body.dark-mode .liunian-focus,
body.dark-mode .xiaoxi-month,
body.dark-mode .zangfu-organ,
body.dark-mode .cycle-duration,
body.dark-mode .cycle-focus,
body.dark-mode .foot-location {
  color: #a0a0a0 !important;
}

/* Yijing Module 深色模式颜色修复 */
body.dark-mode .arrow,
body.dark-mode .shensha-name {
  color: #a0a0a0 !important;
}

/* Mima Module 深色模式颜色修复 */
body.dark-mode .destiny-value {
  color: #e0e0e0 !important;
}

/* Energy Module 深色模式颜色修复 */
body.dark-mode .energy-life-item,
body.dark-mode .energy-guide-item {
  color: #a0a0a0 !important;
}

/* Report.vue 深色模式颜色修复 - 纳音、藏干、十二长生等 */
body.dark-mode .cangan-list .maillun-card-value,
body.dark-mode .changsheng-item .cs-desc,
body.dark-mode .dayun-item .dayun-desc,
body.dark-mode .dayMasterFlow .maillun-card-value {
  color: #a0a0a0 !important;
}

/* 修复 Qimen Module */
body.dark-mode .qimen-gong-card [style*="color: #666"],
body.dark-mode .qimen-detail {
  color: #a0a0a0 !important;
}

/* 修复 Oil Module */
body.dark-mode .oil-card-desc,
body.dark-mode .aroma-desc {
  color: #a0a0a0 !important;
}


