/*
Theme Name: SSS Fortune
Theme URI: https://sss.work/
Author: WTWT Studio
Author URI: https://wtwt.com/
Description: SSS Fortune —— 聚焦财富增长的奇门遁甲与AI决策主题。以“时势·位势·气势”为方法论，集成Kimi、DeepSeek等AI服务，定位财富方位与最佳时机，生成可执行的增收行动清单。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qimen-fortune
Requires at least: 6.0
Requires PHP: 8.0
Tags: qimen, fortune, ai, wealth, strategy, metaphysics
*/

/* 世界级玄学设计 - 奇门遁甲主题 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;600;700;800;900&family=Noto+Serif+SC:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* 玄学主色调 - 深度五行色彩系统 */
  --primary-wood: #2dd4bf;     /* 木 - 青翠玉色 */
  --primary-fire: #f43f5e;     /* 火 - 朱砂红 */
  --primary-earth: #fbbf24;    /* 土 - 琥珀金 */
  --primary-metal: #e5e7eb;    /* 金 - 月华银 */
  --primary-water: #3b82f6;    /* 水 - 深海蓝 */
  
  /* 奇门九宫神秘色彩 */
  --palace-kan: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3730a3 100%);    /* 坎宫 - 玄武深蓝 */
  --palace-kun: linear-gradient(135deg, #92400e 0%, #a16207 50%, #854d0e 100%);    /* 坤宫 - 厚土棕 */
  --palace-zhen: linear-gradient(135deg, #047857 0%, #059669 50%, #065f46 100%);   /* 震宫 - 青龙绿 */
  --palace-xun: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #6d28d9 100%);   /* 巽宫 - 紫气东来 */
  --palace-zhong: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%); /* 中宫 - 帝王金 */
  --palace-qian: linear-gradient(135deg, #374151 0%, #4b5563 50%, #1f2937 100%);  /* 乾宫 - 天玄灰 */
  --palace-dui: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #b91c1c 100%);   /* 兑宫 - 朱雀红 */
  --palace-gen: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 50%, #8b5cf6 100%);   /* 艮宫 - 山岚紫 */
  --palace-li: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #c2410c 100%);    /* 离宫 - 离火橙 */
  
  /* 神秘背景系统 */
  --bg-primary: radial-gradient(ellipse at center, #0f172a 0%, #020617 70%, #000000 100%);
  --bg-secondary: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #020617 100%);
  --bg-card: linear-gradient(145deg, #334155 0%, #1e293b 50%, #0f172a 100%);
  --bg-mystical: radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                  radial-gradient(circle at 70% 30%, rgba(239, 68, 68, 0.08) 0%, transparent 50%),
                  radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
  
  /* 文字色彩层次 */
  --text-primary: #fafafa;     /* 主文字 - 月白 */
  --text-secondary: #e2e8f0;   /* 次要文字 - 银灰 */
  --text-muted: #94a3b8;       /* 弱化文字 - 雾灰 */
  --text-accent: #fbbf24;      /* 强调文字 - 金辉 */
  --text-mystical: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  
  /* 神秘边框与阴影 */
  --border-color: rgba(71, 85, 105, 0.6);
  --border-mystical: linear-gradient(90deg, transparent 0%, #fbbf24 50%, transparent 100%);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.4);
  --shadow-mystical: 0 0 40px rgba(251, 191, 36, 0.3), 0 0 80px rgba(251, 191, 36, 0.1);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
  --shadow-palace: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* 动画时长与缓动 */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-mystical: 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
  /* 玄学几何参数 */
  --golden-ratio: 1.618;
  --sacred-radius: 12px;
  --mystical-spacing: 1.618rem;
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', 'Noto Serif SC', 'Inter', sans-serif;
  background: var(--bg-primary), var(--bg-mystical);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.68; /* 黄金比例 */
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 神秘背景粒子效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(251, 191, 36, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(59, 130, 246, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(239, 68, 68, 0.2), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(45, 212, 191, 0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(139, 92, 246, 0.2), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: mysticalFloat 20s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes mysticalFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* 容器布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 神秘头部样式 */
.site-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 2px solid transparent;
  border-image: var(--border-mystical) 1;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(251, 191, 36, 0.1);
  transition: all var(--transition-normal);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--primary-earth) 20%, var(--primary-fire) 40%, var(--primary-water) 60%, var(--primary-wood) 80%, transparent 100%);
  opacity: 0.6;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(251, 191, 36, 0.5) 50%, transparent 100%);
  animation: mysticalPulse 3s ease-in-out infinite;
}

@keyframes mysticalPulse {
  0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
  50% { opacity: 0.8; transform: scaleX(1.2); }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--text-mystical);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  transition: all var(--transition-normal);
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.site-logo::before {
  content: "☯";
  font-size: 2.2rem;
  background: conic-gradient(from 0deg, var(--primary-fire), var(--primary-earth), var(--primary-water), var(--primary-wood), var(--primary-fire));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: mysticalRotate 12s linear infinite;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.4));
  position: relative;
}

.site-logo::after {
  content: '';
  position: absolute;
  left: -5px;
  top: -5px;
  right: -5px;
  bottom: -5px;
  background: conic-gradient(from 0deg, transparent, rgba(251, 191, 36, 0.2), transparent, rgba(59, 130, 246, 0.2), transparent);
  border-radius: 50%;
  animation: mysticalRotate 8s linear infinite reverse;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.site-logo:hover::after {
  opacity: 1;
}

@keyframes mysticalRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 神秘导航菜单 */
.main-nav {
  display: flex;
  gap: 2.5rem;
  position: relative;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--sacred-radius);
  position: relative;
  transition: all var(--transition-normal);
  background: linear-gradient(135deg, transparent 0%, rgba(251, 191, 36, 0.05) 100%);
  border: 1px solid transparent;
  overflow: hidden;
}

.main-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
  transition: left var(--transition-normal);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-fire), var(--primary-earth), var(--primary-water));
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--text-accent);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.main-nav a:hover::before {
  left: 100%;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  width: 80%;
}

.main-nav a.current {
  color: var(--text-accent);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: var(--shadow-mystical);
}

.main-nav a.current::after {
  width: 90%;
  background: var(--text-mystical);
}

/* 主要内容区 */
.main-content {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* 专业奇门盘样式 */
.qimen-plate {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 480px;
  width: 480px;
  height: 480px;
  margin: 2rem auto;
  background: linear-gradient(135deg, 
    rgba(13, 71, 161, 0.08) 0%,
    rgba(26, 35, 126, 0.05) 50%,
    rgba(13, 71, 161, 0.08) 100%
  );
  border: 2px solid rgba(13, 71, 161, 0.2);
  border-radius: 16px;
  padding: 12px;
  position: relative;
  box-shadow: 
    0 8px 32px rgba(13, 71, 161, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.qimen-plate::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: conic-gradient(from 0deg, var(--primary-fire), var(--primary-earth), var(--primary-water), var(--primary-wood), var(--primary-metal), var(--primary-fire));
  border-radius: 22px;
  z-index: -1;
  animation: mysticalRotate 30s linear infinite;
}

.qimen-plate::after {
  content: '奇門遁甲';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--text-mystical);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

@keyframes plateGlow {
  0%, 100% { 
    box-shadow: var(--shadow-card), 0 0 30px rgba(251, 191, 36, 0.3);
  }
  50% { 
    box-shadow: var(--shadow-card), 0 0 50px rgba(251, 191, 36, 0.5), 0 0 80px rgba(59, 130, 246, 0.2);
  }
}

.palace {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(13, 71, 161, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 140px;
}

.palace::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.palace:hover {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(251, 191, 36, 0.1) 100%);
  transform: scale(1.05) rotateZ(1deg);
  box-shadow: var(--shadow-palace), 0 0 30px rgba(251, 191, 36, 0.4);
  border-color: rgba(251, 191, 36, 0.6);
}

.palace:nth-child(5) {
  background: linear-gradient(135deg, var(--palace-zhong));
  color: #000;
  font-weight: 700;
  border: 2px solid var(--primary-earth);
  box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.3), var(--shadow-palace);
}

.palace:nth-child(5):hover {
  transform: scale(1.08) rotateZ(-1deg);
  box-shadow: inset 0 0 30px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.6);
}

.palace-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a365d;
  margin-bottom: 0.4rem;
  font-family: 'Noto Sans SC', sans-serif;
  letter-spacing: 0.5px;
}

.palace-elements {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.7rem;
  width: 100%;
  flex: 1;
  justify-content: center;
}

.element {
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(13, 71, 161, 0.1);
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.2;
  color: #2d3748;
}

.element::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  border-radius: 8px;
  pointer-events: none;
}

.element:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.element-gate { 
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.3) 0%, rgba(34, 197, 94, 0.2) 100%); 
  color: var(--primary-wood); 
  border-color: rgba(45, 212, 191, 0.4);
}

.element-star { 
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.3) 0%, rgba(239, 68, 68, 0.2) 100%); 
  color: var(--primary-fire); 
  border-color: rgba(244, 63, 94, 0.4);
}

.element-spirit { 
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%); 
  color: var(--primary-water); 
  border-color: rgba(59, 130, 246, 0.4);
}

.element-gate:hover { box-shadow: 0 4px 15px rgba(45, 212, 191, 0.3); }
.element-star:hover { box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3); }
.element-spirit:hover { box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }

/* 宫位神秘特殊样式 */
.palace-kan { 
  background: linear-gradient(135deg, var(--palace-kan), rgba(30, 58, 138, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-kan) 1;
}
.palace-kun { 
  background: linear-gradient(135deg, var(--palace-kun), rgba(146, 64, 14, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-kun) 1;
}
.palace-zhen { 
  background: linear-gradient(135deg, var(--palace-zhen), rgba(4, 120, 87, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-zhen) 1;
}
.palace-xun { 
  background: linear-gradient(135deg, var(--palace-xun), rgba(124, 58, 237, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-xun) 1;
}
.palace-zhong { 
  background: var(--palace-zhong);
  border: 4px solid var(--primary-earth);
  box-shadow: inset 0 0 30px rgba(251, 191, 36, 0.4), var(--shadow-mystical);
}
.palace-qian { 
  background: linear-gradient(135deg, var(--palace-qian), rgba(55, 65, 81, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-qian) 1;
}
.palace-dui { 
  background: linear-gradient(135deg, var(--palace-dui), rgba(220, 38, 38, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-dui) 1;
}
.palace-gen { 
  background: linear-gradient(135deg, var(--palace-gen), rgba(167, 139, 250, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-gen) 1;
}
.palace-li { 
  background: linear-gradient(135deg, var(--palace-li), rgba(234, 88, 12, 0.1));
  border-top: 4px solid transparent;
  border-image: var(--palace-li) 1;
}

/* 预测输入区域 */
.prediction-form {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-fire);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* 神秘按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--sacred-radius);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 1.05rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-normal);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-fire) 0%, var(--primary-earth) 50%, #dc2626 100%);
  color: white;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--primary-fire), var(--primary-earth), var(--primary-water));
  border-radius: var(--sacred-radius);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #dc2626 0%, var(--primary-earth) 50%, #b91c1c 100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(244, 63, 94, 0.4), var(--shadow-mystical);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  color: var(--text-primary);
  border: 2px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(251, 191, 36, 0.1) 100%);
  border-color: rgba(251, 191, 36, 0.6);
  color: var(--text-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled::before {
  display: none;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

/* AI预测结果 */
.prediction-result {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-card);
}

.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-fire);
  margin-bottom: 0.5rem;
}

.result-confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 197, 94, 0.2);
  color: var(--primary-wood);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
}

.result-sections {
  display: grid;
  gap: 1.5rem;
}

.result-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.5rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-content {
  color: var(--text-secondary);
  line-height: 1.7;
}

.advice-list {
  list-style: none;
  padding: 0;
}

.advice-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.advice-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--primary-fire);
}

/* 时间选择器 */
.datetime-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

/* 方向指示器 */
.direction-indicator {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 200px;
  margin: 1rem auto;
}

.direction {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.direction.favorable {
  background: var(--primary-wood);
  color: white;
  box-shadow: var(--shadow-glow);
}

.direction.unfavorable {
  background: var(--primary-fire);
  color: white;
  opacity: 0.7;
}

/* 加载状态 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-fire);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .container {
    max-width: 900px;
  }
  
  .qimen-plate {
    max-width: 450px;
  }
  
  .prediction-form,
  .prediction-result {
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* 移动设备 (最大768px) */
/* 响应式设计 - 移动端优先 */

/* 超大屏 (>= 1200px) */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }

  .qimen-plate {
    max-width: 500px;
  }
}

/* 大屏 (>= 992px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }

  .qimen-plate {
    max-width: 450px;
  }
}

/* 中屏 (>= 768px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container {
    max-width: 720px;
    padding: 0 2rem;
  }

  .qimen-plate {
    max-width: 400px;
  }
}

/* 小屏 (>= 576px) */
@media (min-width: 576px) and (max-width: 767px) {
  .container {
    padding: 0 1.5rem;
  }

  .qimen-plate {
    max-width: 350px;
  }
}

/* 超小屏 (< 576px) */
@media (max-width: 575px) {
  .container {
    padding: 0 1rem;
  }
  
  /* 头部优化 */
  .site-header {
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
  
  .header-content {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .site-logo {
    font-size: 1.2rem;
    font-weight: 600;
  }
  
  .site-logo::before {
    font-size: 1.4rem;
  }
  
  /* 导航移动端优化 */
  .main-nav {
    order: 3;
    width: 100%;
    position: relative;
  }
  
  .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1rem;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a {
    position: relative;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    border: 1px solid transparent;
  }

  .nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--text-accent), var(--primary-fire));
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 2px 2px 0;
  }

  .nav-menu a:hover::before,
  .nav-menu a.active::before {
    transform: scaleY(1);
  }

  .nav-menu a:hover,
  .nav-menu a.active {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(8px);
    color: var(--text-accent);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
  }

  .nav-menu a.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--text-accent);
  }

  /* 移动菜单切换按钮 */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-accent);
    transform: scale(1.05);
  }

  .mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  .mobile-menu-toggle span:nth-child(1) {
    margin-bottom: 4px;
  }

  .mobile-menu-toggle span:nth-child(3) {
    margin-top: 4px;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  /* 主要内容优化 */
  .main-content {
    padding: 1rem 0 2rem;
    min-height: calc(100vh - 200px);
  }
  
  .page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
  }
  
  .page-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #1a365d;
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: -0.025em;
    line-height: 1.2;
  }
  
  .page-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
  }

  /* 奇门盘移动端优化 */
  .qimen-plate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }

  .qimen-plate {
    max-width: min(90vw, 320px);
    width: 100%;
    aspect-ratio: 1;
    gap: 2px;
    margin: 0 auto;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
  }

  .qimen-plate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
  }
  
  .palace {
    aspect-ratio: 1;
    padding: 0.4rem;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .palace:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }
  
  .palace-name {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    text-align: center;
    line-height: 1.2;
  }
  
  .palace-elements {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    align-items: center;
  }
  
  .element {
    font-size: 0.55rem;
    padding: 0.1rem 0.2rem;
    border-radius: 4px;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    word-break: break-all;
  }

  /* 中央宫特殊样式 */
  .palace:nth-child(5) {
    background: linear-gradient(135deg, var(--palace-center), rgba(255,255,255,0.1));
    border: 2px solid var(--text-accent);
    font-weight: 700;
  }

  .palace:nth-child(5) .palace-name {
    color: var(--text-accent);
    font-size: 0.8rem;
  }
  
  /* 表单移动端优化 */
  .plate-controls {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.1);
  }

  .controls-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 16px; /* 防止iOS缩放 */
    font-family: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-appearance: none;
    appearance: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  }

  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    outline: none;
    border-color: var(--text-accent);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
  }

  .form-input::placeholder,
  .form-textarea::placeholder {
    color: var(--text-muted);
  }

  .form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
  }

  /* 按钮组优化 */
  .form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  
  .btn {
    position: relative;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
    min-height: 48px; /* 触屏友好 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
  }

  .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
  }

  .btn:hover::before {
    left: 100%;
  }

  .btn:active {
    transform: translateY(1px);
  }

  .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  }

  .btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.2);
  }

  .btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
  }

  /* 按钮加载状态 */
  .btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* 移动端特殊优化 */
  @media (max-width: 575px) {
    /* 触屏优化 */
    * {
      -webkit-tap-highlight-color: transparent;
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    }

    /* 允许文本选择 */
    .form-input,
    .form-textarea,
    .page-description,
    input[type="text"],
    input[type="email"],
    textarea {
      -webkit-user-select: text;
      -moz-user-select: text;
      -ms-user-select: text;
      user-select: text;
    }

    /* 滚动优化 */
    body {
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }

    /* 防止双击缩放 */
    .qimen-plate,
    .palace,
    .btn {
      touch-action: manipulation;
    }

    /* 奇门盘触屏优化 */
    .palace {
      min-height: 44px; /* 触屏最小点击区域 */
      min-width: 44px;
    }

    /* 性能优化 - 减少动画 */
    .mysticalFloat,
    .mysticalPulse,
    .plateGlow {
      animation-duration: 2s;
    }

    /* 移动端友好的滚动条 */
    ::-webkit-scrollbar {
      width: 4px;
      height: 4px;
    }

    ::-webkit-scrollbar-track {
      background: rgba(255,255,255,0.1);
      border-radius: 2px;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.3);
      border-radius: 2px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(255,255,255,0.5);
    }
  }

  /* 横屏优化 */
  @media (max-height: 500px) and (orientation: landscape) {
    .site-header {
      padding: 0.5rem 0;
    }

    .main-content {
      padding: 0.5rem 0;
    }

    .page-header {
      margin-bottom: 1rem;
    }

    .qimen-plate {
      max-width: min(70vw, 250px);
      padding: 0.5rem;
    }

    .palace {
      padding: 0.3rem;
      font-size: 0.7rem;
    }

    .palace-name {
      font-size: 0.6rem;
    }

    .element {
      font-size: 0.5rem;
    }
  }

  /* 高对比度模式支持 */
  @media (prefers-contrast: high) {
    .form-input,
    .form-select,
    .form-textarea {
      border-width: 2px;
    }

    .btn {
      border: 2px solid currentColor;
    }
  }

  /* 减少动画模式支持 */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
  
  /* 结果展示调整 */
  .result-sections {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .result-card {
    padding: 1rem;
  }
  
  .result-section {
    padding: 1rem;
  }
  
  /* 历史记录调整 */
  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .history-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-controls {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .history-item {
    padding: 1rem;
  }
  
  .history-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .history-item-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .history-item-actions .btn {
    width: 100%;
  }
  
  /* 模态框调整 */
  .modal-content {
    width: 95%;
    max-width: none;
    margin: 1rem;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  /* 通知调整 */
  .notification-container {
    left: 1rem;
    right: 1rem;
    top: 1rem;
  }
  
  .notification {
    margin-bottom: 0.5rem;
  }
  
  /* 页脚调整 */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  /* 返回顶部按钮调整 */
  .back-to-top button {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

/* 小屏手机 (最大480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  /* 奇门盘进一步缩小 */
  .qimen-plate {
    max-width: 280px;
  }
  
  .palace {
    padding: 0.3rem;
    min-height: 80px;
  }
  
  .palace-name {
    font-size: 0.7rem;
  }
  
  .palace-elements {
    gap: 0.1rem;
  }
  
  .element {
    font-size: 0.55rem;
    padding: 0.05rem 0.2rem;
  }
  
  /* AI预测页面移动端优化 */
  .prediction-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
  }

  .prediction-form-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .prediction-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .form-section {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
  }

  .form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .form-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .form-section h3::before {
    content: "✨";
    font-size: 1.2rem;
  }

  .question-suggestions {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
  }

  .question-suggestions h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }

  .suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .suggestion-tag {
    background: linear-gradient(135deg, var(--text-accent), var(--primary-fire));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .suggestion-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  }

  .suggestion-tag:active {
    transform: translateY(0);
  }

  /* 结果展示优化 */
  .prediction-result {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .prediction-result.show {
    opacity: 1;
    transform: translateY(0);
  }

  .result-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .result-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
  }

  .result-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

  .result-meta span {
    background: rgba(255,255,255,0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
  }

  .result-content {
    display: grid;
    gap: 2rem;
  }

  .result-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
  }

  .result-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .result-section h4::before {
    content: "🔮";
    font-size: 1rem;
  }

  .result-text {
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 0.95rem;
  }

  .confidence-meter {
    margin-top: 1rem;
  }

  .confidence-bar {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
  }

  .confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f);
    border-radius: 10px;
    transition: width 0.8s ease;
  }

  .confidence-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
  }
  
  .suggestion-tags {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .suggestion-tag {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  /* 结果显示优化 */
  .result-card {
    padding: 0.75rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .confidence-badge {
    align-self: flex-end;
  }
  
  /* 统计面板调整 */
  /* 历史记录页面移动端优化 */
  .history-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
  }

  .stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--text-accent), var(--primary-fire));
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }

  .stat-card:hover::before {
    transform: scaleX(1);
  }

  .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  }

  .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
  }

  .stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
  }

  .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
  }

  /* 历史记录列表优化 */
  .history-list {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .history-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--text-accent), var(--primary-fire));
    transform: scaleY(0);
    transition: transform 0.3s ease;
  }

  .history-item:hover::before {
    transform: scaleY(1);
  }

  .history-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }

  .history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .history-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 200px;
  }

  .history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }

  .history-meta span {
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
  }

  .history-content {
    display: grid;
    gap: 1rem;
  }

  .history-summary {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid var(--text-accent);
  }

  .history-summary h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
  }

  .history-summary p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
  }

  .history-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .history-actions button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .history-actions button:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
  }

  /* 筛选控制优化 */
  .history-controls {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
  }

  .filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .filter-select,
  .filter-input {
    padding: 0.75rem;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
  }

  .filter-select:focus,
  .filter-input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  }

  /* 分页优化 */
  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
  }

  .page-btn {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
  }

  .page-btn:hover:not(.disabled) {
    background: var(--text-accent);
    color: white;
    transform: translateY(-2px);
  }

  .page-btn.active {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
  }

  .page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .stat-icon {
    font-size: 1.5rem;
  }
  
  .stat-number {
    font-size: 1.2rem;
  }
  
  /* 历史记录优化 */
  .history-item-content {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .prediction-metrics {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .metric {
    min-width: auto;
  }
  
  /* 模态框进一步优化 */
  .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  
  .modal-body {
    flex: 1;
    overflow-y: auto;
  }
  
  /* 加载指示器调整 */
  .global-loading {
    padding: 1rem;
  }
  
  .loading-spinner {
    width: 30px;
    height: 30px;
  }
  
  .loading-text {
    font-size: 0.9rem;
    margin-top: 0.75rem;
  }
}

/* 超小屏设备 (最大360px) */
@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .qimen-plate {
    max-width: 250px;
  }
  
  .palace {
    padding: 0.2rem;
    min-height: 70px;
  }
  
  .palace-name {
    font-size: 0.65rem;
  }
  
  .element {
    font-size: 0.5rem;
    padding: 0.05rem 0.15rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* 横屏模式优化 */
@media (max-height: 600px) and (orientation: landscape) {
  .main-content {
    padding: 0.5rem 0;
  }
  
  .page-header {
    margin-bottom: 1rem;
  }
  
  .qimen-plate {
    max-width: 300px;
  }
  
  .palace {
    padding: 0.3rem;
    min-height: 60px;
  }
  
  .prediction-form,
  .prediction-result {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: 90vh;
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .palace {
    border-width: 0.5px;
  }
  
  .element {
    border-width: 0.5px;
  }
}

/* 打印样式 */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .site-header,
  .site-footer,
  .prediction-form,
  .btn,
  .notification-container,
  .global-loading,
  .modal {
    display: none !important;
  }
  
  .main-content {
    padding: 0;
  }
  
  .prediction-result {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
  
  .qimen-plate {
    border: 2px solid #000;
  }
  
  .palace {
    border: 1px solid #666;
    background: white;
  }
  
  .result-sections {
    page-break-inside: avoid;
  }
  
  .result-section {
    margin-bottom: 1rem;
    page-break-inside: avoid;
  }
}

/* 无障碍访问增强 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .mystical-glow::before {
    animation: none;
  }
  
  .site-logo::before {
    animation: none;
  }
}

/* 暗色主题增强 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-card: #1e293b;
  }
}

/* 打印样式 */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .site-header,
  .prediction-form {
    display: none;
  }
  
  .prediction-result {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* 辅助功能 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn var(--transition-slow) ease-in-out;
}

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

.slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 神秘特殊效果 */
.mystical-glow {
  position: relative;
  overflow: hidden;
}

.mystical-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    transparent, 
    rgba(251, 191, 36, 0.15), 
    transparent, 
    rgba(59, 130, 246, 0.1), 
    transparent,
    rgba(244, 63, 94, 0.08),
    transparent
  );
  animation: mysticalShimmer 4s infinite;
  pointer-events: none;
}

.mystical-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
  animation: mysticalPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mysticalShimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 八卦符号动画 */
.bagua-symbol {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  animation: baguaRotate 20s linear infinite;
}

.bagua-symbol::before {
  content: '☰☱☲☳☴☵☶☷';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  opacity: 0.3;
  animation: baguaOrbit 15s linear infinite reverse;
}

@keyframes baguaRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes baguaOrbit {
  from { transform: translateX(-50%) rotate(0deg) translateX(30px) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg) translateX(30px) rotate(-360deg); }
}

/* 五行能量流动效果 */
.wuxing-flow {
  position: relative;
  overflow: hidden;
}

.wuxing-flow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(0deg, transparent 0%, var(--primary-wood) 20%, transparent 40%),
    linear-gradient(72deg, transparent 0%, var(--primary-fire) 20%, transparent 40%),
    linear-gradient(144deg, transparent 0%, var(--primary-earth) 20%, transparent 40%),
    linear-gradient(216deg, transparent 0%, var(--primary-metal) 20%, transparent 40%),
    linear-gradient(288deg, transparent 0%, var(--primary-water) 20%, transparent 40%);
  background-size: 100% 100%;
  opacity: 0.1;
  animation: wuxingFlow 10s linear infinite;
  pointer-events: none;
}

@keyframes wuxingFlow {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* 星座轨道效果 */
.constellation-orbit {
  position: relative;
}

.constellation-orbit::before {
  content: '✦';
  position: absolute;
  top: 10%;
  left: 10%;
  font-size: 0.8rem;
  color: var(--primary-earth);
  animation: orbitStar1 8s linear infinite;
}

.constellation-orbit::after {
  content: '✧';
  position: absolute;
  top: 80%;
  right: 20%;
  font-size: 0.6rem;
  color: var(--primary-water);
  animation: orbitStar2 12s linear infinite reverse;
}

@keyframes orbitStar1 {
  0% { transform: rotate(0deg) translateX(20px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
}

@keyframes orbitStar2 {
  0% { transform: rotate(0deg) translateX(15px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(15px) rotate(-360deg); }
}

/* 神秘粒子效果 */
.mystical-particles {
  position: relative;
  overflow: hidden;
}

.mystical-particles::before,
.mystical-particles::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary-earth);
  border-radius: 50%;
  animation: particleFloat 6s ease-in-out infinite;
}

.mystical-particles::before {
  top: 20%;
  left: 30%;
  animation-delay: -2s;
}

.mystical-particles::after {
  top: 70%;
  right: 25%;
  animation-delay: -4s;
  background: var(--primary-water);
}

@keyframes particleFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1);
    opacity: 0.3;
  }
  50% { 
    transform: translateY(-20px) scale(1.5);
    opacity: 0.8;
  }
}
/* 专业排盘分析区域样式 */

/* 分析容器 */
.plate-analysis {
  max-width: 1200px;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 0 1rem;
}

/* 分析区块 */
.analysis-section {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(13, 71, 161, 0.1);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
}

.analysis-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(13, 71, 161, 0.1);
  font-family: 'Noto Sans SC', sans-serif;
}

/* 基本信息网格 */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.info-item {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(13, 71, 161, 0.08);
}

.info-item label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item > div {
  font-size: 0.95rem;
  color: #2d3748;
  line-height: 1.5;
}

/* 干支信息特殊样式 */
#ganzhi-info div {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.25rem 0.5rem;
  background: rgba(13, 71, 161, 0.05);
  border-radius: 6px;
  font-weight: 500;
}

/* 时间质量评分 */
.quality-score {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

.quality-excellent {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.quality-good {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
}

.quality-moderate {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
}

.quality-poor {
  background: linear-gradient(135deg, #f56565, #e53e3e);
  color: white;
}

/* 方向标签 */
.direction-tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0.2rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* 宫位详情 */
.palace-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.palace-detail-item {
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid rgba(13, 71, 161, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.palace-detail-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.palace-detail-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(13, 71, 161, 0.1);
}

.palace-detail-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.detail-row span:first-child {
  font-weight: 500;
  color: #4a5568;
  font-size: 0.875rem;
}

.detail-row span:last-child {
  font-weight: 600;
  color: #2d3748;
}

/* 能量值样式 */
.energy-value {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
}

.energy-excellent {
  background: #48bb78;
  color: white;
}

.energy-good {
  background: #4299e1;
  color: white;
}

.energy-average {
  background: #ed8936;
  color: white;
}

.energy-poor {
  background: #f56565;
  color: white;
}

/* 综合分析 */
.overall-analysis {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analysis-item {
  background: rgba(248, 250, 252, 0.6);
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid #667eea;
}

.analysis-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
}

.analysis-item p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.analysis-item ul {
  list-style: none;
  padding: 0;
}

.analysis-item li {
  padding: 0.5rem 0;
  color: #4a5568;
  line-height: 1.5;
  position: relative;
  padding-left: 1.5rem;
}

.analysis-item li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .plate-analysis {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .analysis-section {
    padding: 1.5rem;
  }
  
  .palace-details {
    grid-template-columns: 1fr;
  }
  
  .info-item {
    padding: 1rem;
  }
}
