/* ============================================
   命运天机 - 中国风算命网站全局样式
   ============================================ */

/* CSS 变量 */
:root {
  --purple-primary: #6B2FA0;
  --purple-dark: #4A1A6B;
  --purple-light: #9B59B6;
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a2e;
  --red-primary: #E53935;
  --red-light: #FF5252;
  --red-dark: #C62828;
  --gold: #D4A843;
  --gold-light: #F0D68A;
  --text-primary: #E53935;
  --text-secondary: #FF5252;
  --text-light: #e0d0e8;
  --text-muted: #8a7a9a;
  --border-color: rgba(107, 47, 160, 0.3);
  --shadow-glow: 0 0 20px rgba(107, 47, 160, 0.3);
  --shadow-red: 0 0 15px rgba(229, 57, 53, 0.2);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d0515 30%, #150a20 60%, var(--bg-dark) 100%);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--red-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--red-light);
  text-shadow: var(--shadow-red);
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto !important;
}

.navbar .logo {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.5rem;
  color: var(--red-primary);
  text-shadow: 0 0 10px rgba(229, 57, 53, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .logo .logo-icon {
  font-size: 1.8rem;
}

.navbar .nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navbar .nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: var(--red-primary);
  text-shadow: var(--shadow-red);
}

.navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red-primary), var(--purple-primary));
  transition: width 0.3s ease;
}

.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after {
  width: 100%;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--red-primary);
  transition: var(--transition);
}

/* ============================================
   粒子画布
   ============================================ */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   英雄区
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 4.5rem;
  color: var(--red-primary);
  text-shadow:
    0 0 20px rgba(229, 57, 53, 0.6),
    0 0 40px rgba(229, 57, 53, 0.3),
    0 0 80px rgba(229, 57, 53, 0.1);
  margin-bottom: 1rem;
  letter-spacing: 0.5rem;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 20px rgba(229, 57, 53, 0.6), 0 0 40px rgba(229, 57, 53, 0.3); }
  100% { text-shadow: 0 0 30px rgba(229, 57, 53, 0.8), 0 0 60px rgba(229, 57, 53, 0.4), 0 0 100px rgba(229, 57, 53, 0.2); }
}

.hero-subtitle {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.3rem;
}

/* 中国风装饰线 */
.ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.ornament-line::before,
.ornament-line::after {
  content: '';
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
}

.ornament-line .diamond {
  width: 8px;
  height: 8px;
  background: var(--red-primary);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(229, 57, 53, 0.5);
}

/* 祥云装饰 */
.cloud-decoration {
  position: absolute;
  opacity: 0.08;
  pointer-events: none;
}

.cloud-decoration svg {
  fill: var(--purple-light);
}

.cloud-left {
  top: 15%;
  left: -5%;
  width: 300px;
  animation: cloudFloat 20s ease-in-out infinite;
}

.cloud-right {
  bottom: 20%;
  right: -5%;
  width: 250px;
  animation: cloudFloat 25s ease-in-out infinite reverse;
}

@keyframes cloudFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-20px) translateX(15px); }
}

/* CTA 按钮 */
.cta-btn {
  display: inline-block;
  padding: 1rem 3rem;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.2rem;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-primary));
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: 0.2rem;
}

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

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

.cta-btn:hover {
  box-shadow: 0 0 30px rgba(107, 47, 160, 0.5), 0 0 60px rgba(107, 47, 160, 0.2);
  transform: translateY(-2px);
  color: #fff;
}

/* ============================================
   内容区域通用
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  pointer-events: none;
}

.container * {
  pointer-events: auto;
}

.section-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 2.2rem;
  color: var(--red-primary);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(229, 57, 53, 0.3);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

/* ============================================
   功能卡片网格
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.fortune-card {
  background: linear-gradient(145deg, var(--bg-card), rgba(74, 26, 107, 0.15));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.fortune-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-primary), var(--purple-primary), var(--red-primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fortune-card:hover::before {
  opacity: 1;
}

.fortune-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(107, 47, 160, 0.5);
}

.fortune-card .card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.fortune-card .card-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.4rem;
  color: var(--red-primary);
  margin-bottom: 0.8rem;
}

.fortune-card .card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================
   星座运势网格
   ============================================ */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
}

.zodiac-item {
  background: linear-gradient(145deg, var(--bg-card), rgba(74, 26, 107, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.zodiac-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--purple-primary);
}

.zodiac-item .zodiac-symbol {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.zodiac-item .zodiac-name {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.zodiac-item .zodiac-date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.zodiac-item .zodiac-score {
  margin-top: 0.5rem;
  color: var(--gold);
  font-size: 0.85rem;
}

/* ============================================
   表单样式
   ============================================ */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--bg-card), rgba(74, 26, 107, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  position: relative;
}

.form-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
}

/* 表单卡片样式 */
.form-card {
  max-width: 580px;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--bg-card), rgba(74, 26, 107, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.form-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
}

.form-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.4rem;
  color: var(--red-primary);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.2rem;
}

/* 表单行布局 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.form-group {
  margin-bottom: 0;
}

/* 性别选择单独一行时 */
.form-group:has(.radio-group) {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.form-group label {
  display: block;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.1rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-light);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--purple-primary);
  box-shadow: 0 0 10px rgba(107, 47, 160, 0.3);
}

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

.form-group select option {
  background: var(--bg-card);
  color: var(--text-light);
}

.submit-btn {
  width: 100%;
  padding: 1.2rem 2rem;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.25rem;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-primary));
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3rem;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  box-shadow: 0 0 30px rgba(107, 47, 160, 0.5);
  transform: translateY(-2px);
}

.submit-btn:active {
  transform: translateY(0);
}

/* 性别选择 */
.gender-group {
  display: flex;
  gap: 1.2rem;
}

.gender-option {
  flex: 1;
  position: relative;
}

.gender-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gender-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1rem;
}

.gender-option input:checked + label {
  border-color: var(--purple-primary);
  color: var(--red-primary);
  box-shadow: 0 0 10px rgba(107, 47, 160, 0.3);
}

/* 单选按钮组 */
.radio-group {
  display: flex;
  gap: 1.2rem;
}

.radio-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1rem;
}

.radio-label input {
  display: none;
}

.radio-label:has(input:checked) {
  border-color: var(--purple-primary);
  color: var(--red-primary);
  box-shadow: 0 0 10px rgba(107, 47, 160, 0.3);
  background: rgba(107, 47, 160, 0.15);
}

/* ============================================
   结果展示区
   ============================================ */
.result-container {
  max-width: 800px;
  margin: 2rem auto 0;
  display: none;
}

.result-container.show {
  display: block;
  animation: fadeInUp 0.6s ease;
}

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

.result-card {
  background: linear-gradient(145deg, var(--bg-card), rgba(74, 26, 107, 0.15));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.result-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
}

.result-card h3 {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(107, 47, 160, 0.2);
}

/* 八字排盘表格 */
.bazi-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.bazi-table th {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--gold);
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  background: rgba(74, 26, 107, 0.2);
  font-size: 0.95rem;
}

.bazi-table td {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.3rem;
  color: var(--red-primary);
}

.bazi-table .wuxing {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.3rem;
}

/* 五格分析 */
.wuge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.wuge-item {
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  transition: var(--transition);
}

.wuge-item:hover {
  border-color: var(--purple-primary);
  box-shadow: var(--shadow-glow);
}

.wuge-item .wuge-label {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.wuge-item .wuge-value {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1.8rem;
  font-weight: bold;
}

.wuge-item .wuge-element {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

/* 评分展示 */
.score-display {
  text-align: center;
  padding: 2rem;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--purple-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  background: rgba(74, 26, 107, 0.1);
}

.score-circle::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(107, 47, 160, 0.2);
}

.score-number {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 2.5rem;
  color: var(--red-primary);
  text-shadow: 0 0 15px rgba(229, 57, 53, 0.5);
}

.score-label {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--gold);
  font-size: 1.1rem;
}

/* ============================================
   塔罗牌样式
   ============================================ */
.tarot-spread-options {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.spread-option {
  background: linear-gradient(145deg, var(--bg-card), rgba(74, 26, 107, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  min-width: 150px;
}

.spread-option:hover,
.spread-option.active {
  border-color: var(--purple-primary);
  box-shadow: var(--shadow-glow);
}

.spread-option .spread-name {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.spread-option .spread-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tarot-reading-area {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  min-height: 300px;
  align-items: center;
}

.tarot-card {
  width: 140px;
  height: 240px;
  perspective: 1000px;
  cursor: pointer;
}

.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.tarot-card.flipped .tarot-card-inner {
  transform: rotateY(180deg);
}

.tarot-card-front,
.tarot-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
}

.tarot-card-back {
  background: linear-gradient(145deg, var(--purple-dark), var(--purple-primary));
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(107, 47, 160, 0.3);
}

.tarot-card-back .card-pattern {
  width: 80%;
  height: 80%;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gold);
}

.tarot-card-front {
  background: linear-gradient(145deg, #1a1a2e, #0d0515);
  transform: rotateY(180deg);
  padding: 1rem;
  text-align: center;
}

.tarot-card-front .card-number {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.tarot-card-front .card-symbol {
  font-size: 3rem;
  margin: 0.5rem 0;
}

.tarot-card-front .card-name {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.tarot-card-front .card-keywords {
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.tarot-interpretation {
  max-width: 600px;
  margin: 2rem auto 0;
  display: none;
}

.tarot-interpretation.show {
  display: block;
  animation: fadeInUp 0.6s ease;
}

/* ============================================
   运势详情
   ============================================ */
.fortune-detail {
  display: none;
  max-width: 800px;
  margin: 2rem auto 0;
}

.fortune-detail.show {
  display: block;
  animation: fadeInUp 0.6s ease;
}

.fortune-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fortune-bar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fortune-bar-label {
  width: 60px;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.fortune-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(10, 10, 15, 0.8);
  border-radius: 4px;
  overflow: hidden;
}

.fortune-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--purple-primary), var(--red-primary));
  transition: width 1s ease;
}

.fortune-bar-value {
  width: 30px;
  color: var(--gold);
  font-size: 0.9rem;
  text-align: right;
  flex-shrink: 0;
}

.lucky-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.lucky-item {
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.lucky-item .lucky-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.lucky-item .lucky-value {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1rem;
}

/* ============================================
   页面标题区（子页面）
   ============================================ */
.page-header {
  position: relative;
  z-index: 1;
  padding: 7rem 2rem 3rem;
  text-align: center;
  pointer-events: none;
}

.page-header * {
  pointer-events: auto;
}

.page-header h1 {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 2.8rem;
  color: var(--red-primary);
  text-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ============================================
   页脚
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer .footer-brand {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ============================================
   古典边框装饰
   ============================================ */
.classical-border {
  position: relative;
  padding: 2rem;
}

.classical-border::before,
.classical-border::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold);
  border-style: solid;
}

.classical-border::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.classical-border::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.classical-border .corner-tr,
.classical-border .corner-bl {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold);
  border-style: solid;
}

.classical-border .corner-tr {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.classical-border .corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

/* ============================================
   加载动画
   ============================================ */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

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

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

/* ============================================
   返回首页按钮
   ============================================ */
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.back-home:hover {
  color: var(--red-primary);
}

/* ============================================
   Toast 提示
   ============================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-primary));
  color: var(--gold-light);
  padding: 1rem 2rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  z-index: 9999;
  transition: transform 0.3s ease;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .navbar .nav-links.open {
    display: flex;
  }

  .navbar .nav-links a {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(107, 47, 160, 0.1);
  }

  .menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2.8rem;
    letter-spacing: 0.3rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .zodiac-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .form-container {
    padding: 1.5rem;
  }

  .form-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .form-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  /* 移动端表单单列布局 */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

  .form-group input,
  .form-group select {
    padding: 0.9rem 1rem;
  }

  .radio-label {
    padding: 0.9rem;
  }

  .submit-btn {
    padding: 1rem;
    font-size: 1.1rem;
  }

  .tarot-card {
    width: 110px;
    height: 190px;
  }

  .tarot-spread-options {
    flex-direction: column;
    align-items: center;
  }

  .wuge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .zodiac-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fortune-bar-item {
    flex-wrap: wrap;
  }

  .fortune-bar-label {
    width: 100%;
  }
}

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--purple-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--purple-primary);
}

/* ============================================
   选中文字样式
   ============================================ */
::selection {
  background: rgba(107, 47, 160, 0.4);
  color: var(--red-light);
}

/* ============================================
   页面过渡
   ============================================ */
.page-content {
  position: relative;
  z-index: 1;
}

/* 祥云 CSS 图案 */
.css-cloud {
  position: relative;
  width: 100px;
  height: 40px;
  background: rgba(107, 47, 160, 0.05);
  border-radius: 50px;
}

.css-cloud::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: rgba(107, 47, 160, 0.05);
  border-radius: 50%;
}

.css-cloud::after {
  content: '';
  position: absolute;
  top: -10px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(107, 47, 160, 0.05);
  border-radius: 50%;
}

/* 八卦符号装饰 */
.bagua-decoration {
  position: absolute;
  width: 80px;
  height: 80px;
  opacity: 0.05;
  animation: rotateSlow 60s linear infinite;
}

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

/* 渐入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   AI分析功能样式
   ============================================ */

/* AI按钮 */
.ai-btn {
  display: inline-block;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(107, 47, 160, 0.3);
}

.ai-btn:hover {
  background: linear-gradient(135deg, var(--purple-light), var(--purple-primary));
  box-shadow: 0 0 25px rgba(107, 47, 160, 0.5);
  transform: translateY(-2px);
}

.ai-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* AI加载状态 */
.ai-loading {
  text-align: center;
  padding: 3rem 2rem;
  pointer-events: none;
}

.ai-loading .loading-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--border-color);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.ai-loading p {
  color: var(--text-light);
  font-size: 1.1rem;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  margin-bottom: 0.5rem;
}

.ai-loading .loading-tip {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* AI分析结果 */
.ai-result {
  background: linear-gradient(135deg, rgba(74, 26, 107, 0.3), rgba(107, 47, 160, 0.2));
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  animation: fadeInUp 0.6s ease;
  position: relative;
  overflow: hidden;
}

.ai-result::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ai-result-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 168, 67, 0.3);
}

.ai-result-header .ai-icon {
  font-size: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.ai-result-header .ai-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.4rem;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}

.ai-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
}

.ai-content p,
.ai-content .md-p {
  margin-bottom: 1rem;
  text-indent: 2em;
}

.ai-content p:first-child,
.ai-content .md-p:first-child {
  text-indent: 0;
}

.ai-content strong,
.ai-content .md-strong {
  color: var(--gold);
  font-weight: 600;
}

/* Markdown标题样式 */
.ai-content .md-h2 {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.3rem;
  color: var(--red-primary);
  margin: 2rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--gold);
  text-indent: 0;
}

.ai-content .md-h3 {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.15rem;
  color: var(--red-primary);
  margin: 1.5rem 0 0.8rem;
  padding-left: 0.6rem;
  border-left: 3px solid rgba(212, 168, 67, 0.5);
  text-indent: 0;
}

.ai-content .md-h4 {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.05rem;
  color: var(--red-light);
  margin: 1.2rem 0 0.6rem;
  text-indent: 0;
}

/* Markdown列表样式 */
.ai-content .md-ul,
.ai-content .md-ol {
  margin: 0.8rem 0;
  padding-left: 2rem;
}

.ai-content .md-li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
  text-indent: 0;
}

.ai-content .md-li::marker {
  color: var(--gold);
}

/* Markdown分隔线 */
.ai-content .md-hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.5rem 0;
}

/* Markdown引用 */
.ai-content .md-blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  background: rgba(212, 168, 67, 0.05);
  border-radius: 0 8px 8px 0;
  color: var(--gold-light);
  font-style: italic;
  text-indent: 0;
}

/* Markdown行内代码 */
.ai-content .md-code {
  background: rgba(10, 10, 15, 0.8);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--red-light);
  border: 1px solid var(--border-color);
}

.ai-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 168, 67, 0.3);
}

.ai-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--gold-light);
}

/* AI错误状态 */
.ai-error {
  text-align: center;
  padding: 2rem;
  background: rgba(229, 57, 53, 0.1);
  border: 1px solid rgba(229, 57, 53, 0.3);
  border-radius: 12px;
  margin-top: 1rem;
}

.ai-error .error-icon {
  font-size: 2.5rem;
  color: var(--red-primary);
  display: block;
  margin-bottom: 1rem;
}

.ai-error p {
  color: var(--red-light);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.ai-error .error-tip {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 八字结果增强 */
.bazi-result {
  animation: fadeInUp 0.6s ease;
}

.bazi-result h3 {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--red-primary);
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
}

.bazi-result h3:first-child {
  margin-top: 0;
}

.bazi-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

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

.bazi-row {
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.bazi-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.bazi-value {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.5rem;
  color: var(--red-primary);
  margin-bottom: 0.3rem;
}

.bazi-detail {
  color: var(--gold);
  font-size: 0.85rem;
}

.wuxing-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.wuxing-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wuxing-name {
  width: 40px;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  color: var(--gold);
  font-size: 1rem;
}

.wuxing-bar {
  flex: 1;
  height: 10px;
  background: rgba(10, 10, 15, 0.8);
  border-radius: 5px;
  overflow: hidden;
}

.wuxing-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}

.wuxing-count {
  width: 50px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: right;
}

.analysis-text {
  color: var(--text-light);
  line-height: 1.8;
  text-indent: 2em;
}

/* 姓名分析结果增强 */
.name-result-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .name-result-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.name-ge-card {
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.name-ge-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(212, 168, 67, 0.2);
}

.name-ge-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.name-ge-value {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 1.8rem;
  color: var(--red-primary);
  margin-bottom: 0.3rem;
}

.name-ge-meaning {
  color: var(--gold);
  font-size: 0.8rem;
}

.name-score {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(107, 47, 160, 0.2), rgba(74, 26, 107, 0.3));
  border-radius: 12px;
  border: 1px solid var(--gold);
}

.score-value {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 3rem;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 168, 67, 0.5);
}

.score-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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