/**
 * 占卜命理 - 传统玄学风格
 * 宣纸为底、朱砂为墨、帝金为饰
 */

/* ============================================
   CSS变量 - 传统玄学配色
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 主色调 - 朱砂红 */
  --cinnabar: #b22222;
  --cinnabar-dark: #8b1a1a;
  --cinnabar-light: #cd5c5c;
  --cinnabar-pale: rgba(178, 34, 34, 0.08);

  /* 帝金 */
  --gold: #b8860b;
  --gold-light: #d4a843;
  --gold-dark: #8b6914;
  --gold-pale: rgba(184, 134, 11, 0.1);

  /* 玉石青 */
  --jade: #2d6a4f;
  --jade-light: #40916c;

  /* 宣纸背景系 */
  --bg-primary: #f5f0e0;
  --bg-secondary: #ede5d0;
  --bg-tertiary: #e8dfc8;
  --bg-card: #fffbf0;
  --bg-card-hover: #fff8e8;

  /* 墨系文字 */
  --text-primary: #2c1810;
  --text-secondary: #5a4030;
  --text-muted: #8a7560;

  /* 边框 */
  --border: rgba(160, 120, 48, 0.2);
  --border-red: rgba(178, 34, 34, 0.25);
  --border-gold: rgba(184, 134, 11, 0.35);

  --shadow-sm: 0 1px 4px rgba(44, 24, 16, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 8px 32px rgba(44, 24, 16, 0.12);
  --shadow-gold: 0 0 20px rgba(184, 134, 11, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition: 0.3s ease;
  --max-width: 1100px;
}

/* ============================================
   深色模式 - 紫檀夜读
   ============================================ */
[data-theme="dark"] {
  --bg-primary: #1a0f0a;
  --bg-secondary: #251510;
  --bg-tertiary: #2e1b12;
  --bg-card: rgba(46, 27, 18, 0.92);
  --bg-card-hover: rgba(58, 35, 24, 0.95);

  --text-primary: #e8dcc8;
  --text-secondary: #c4b49a;
  --text-muted: #8a7560;

  --border: rgba(184, 134, 11, 0.15);
  --border-red: rgba(178, 34, 34, 0.2);
  --border-gold: rgba(184, 134, 11, 0.3);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 20px rgba(184, 134, 11, 0.15);
}

/* ============================================
   Reset & Base
   ============================================ */
body {
  font-family: "LXGW WenKai", "STKaiti", "KaiTi", "STSong", "SimSun", "FangSong", "Noto Serif CJK SC", "Source Han Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--cinnabar); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--cinnabar-dark); }

/* ============================================
   基础布局
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   通用表单样式
   ============================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--cinnabar);
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b22222' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1);
  outline: none;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

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

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  background-image: none;
  padding-right: 14px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 140px;
}

/* ============================================
   通用按钮
   ============================================ */
.btn-primary,
.page-header + .container .btn-primary,
.page-header ~ main .btn-primary {
  display: inline-block;
  padding: 12px 40px;
  background: linear-gradient(135deg, var(--cinnabar-dark), var(--cinnabar));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(178, 34, 34, 0.3);
}

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

/* ============================================
   FAQ 区域通用标题
   ============================================ */
.faq-section {
  margin-top: 40px;
}

.faq-section h2 {
  color: var(--cinnabar);
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  letter-spacing: 2px;
}

/* ============================================
   SEO 内容区
   ============================================ */
.seo-content {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  color: var(--cinnabar);
  margin-bottom: 16px;
  font-size: 1.25rem;
  letter-spacing: 2px;
}

.seo-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.main-content {
  padding: 0 0 40px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

/* ============================================
   Hero 区域
   ============================================ */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 20px 36px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 16px auto 0;
}

.hero-cta {
  display: inline-block;
  margin-top: 24px;
  padding: 14px 48px;
  font-size: 1.0625rem;
  font-weight: 600;
  animation: heroCtaFloat 3s ease-in-out infinite;
}

@keyframes heroCtaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============================================
   运势速览
   ============================================ */
.fortune-section {
  position: relative;
  z-index: 1;
}

.fortune-text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-top: 8px;
}

.fortune-stars {
  display: flex;
  gap: 2px;
  margin-top: 8px;
}

/* ============================================
   最近使用
   ============================================ */
.recent-section {
  position: relative;
  z-index: 1;
}

/* ============================================
   页面描述
   ============================================ */
.page-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: 8px;
}

/* ============================================
   FAQ 列表
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================
   结果区域通用
   ============================================ */
.result-section {
  margin-bottom: 20px;
}

.result-section h3 {
  color: var(--cinnabar);
  margin-bottom: 10px;
  font-size: 1.0625rem;
  letter-spacing: 1px;
}

.result-section p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   星级评分
   ============================================ */
.star-rating {
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

/* ============================================
   分数条/进度条
   ============================================ */
.score-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.125rem;
  color: var(--cinnabar);
  font-weight: 700;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

/* ============================================
   响应式表格
   ============================================ */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.time-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.875rem;
}

.time-table th, .time-table td {
  padding: 10px 8px;
  border: 1px solid var(--border);
}

.time-table th {
  background: var(--cinnabar-pale);
  color: var(--cinnabar);
  font-weight: 600;
  white-space: nowrap;
}

.time-table td {
  background: var(--bg-card);
  color: var(--text-primary);
}

.time-table tr.lucky td {
  background: rgba(45, 106, 79, 0.08);
}

.time-table tr.unlucky td {
  background: rgba(178, 34, 34, 0.06);
}

.luck-cell {
  font-weight: 600;
  padding: 10px 16px;
}

.luck-cell.lucky {
  color: var(--jade);
}

.luck-cell.unlucky {
  color: var(--cinnabar);
}

/* ============================================
   颜色标签
   ============================================ */
.color-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  margin: 4px;
  border: 1px solid var(--border);
}

/* ============================================
   配对列表
   ============================================ */
.match-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: var(--transition);
}

.match-item:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-sm);
}

.match-star {
  color: var(--gold);
  font-size: 0.875rem;
}

.match-name {
  font-weight: 600;
  color: var(--cinnabar);
  font-size: 0.9375rem;
}

.match-desc {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  flex: 1;
}

/* ============================================
   易经卜卦专属
   ============================================ */
.divine-animation {
  text-align: center;
  padding: 40px 20px;
}

.yao-anim {
  display: inline-block;
  width: 120px;
  height: 20px;
  margin: 8px;
  background: var(--cinnabar);
  border-radius: 4px;
  animation: yaoFlip 0.6s ease infinite alternate;
}

.yao-anim:nth-child(2) { animation-delay: 0.1s; width: 60px; }
.yao-anim:nth-child(3) { animation-delay: 0.2s; }
.yao-anim:nth-child(4) { animation-delay: 0.3s; width: 60px; }
.yao-anim:nth-child(5) { animation-delay: 0.4s; }
.yao-anim:nth-child(6) { animation-delay: 0.5s; }

@keyframes yaoFlip {
  from { transform: scaleY(0.6); opacity: 0.5; }
  to { transform: scaleY(1); opacity: 1; }
}

.gua-symbol {
  text-align: center;
  font-size: 2.5rem;
  margin: 20px 0;
  color: var(--cinnabar);
}

.gua-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cinnabar);
  margin-bottom: 8px;
}

.yao-line {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0;
}

.yao-line.yang, .yao-line.yin {
  width: 100%;
  max-width: 200px;
  margin: 6px auto;
}

.yao-line.yang::before {
  content: '';
  display: block;
  width: 100%;
  height: 6px;
  background: var(--text-primary);
  border-radius: 3px;
}

.yao-line.yin::before {
  content: '';
  display: block;
  width: 40%;
  height: 6px;
  background: var(--text-primary);
  border-radius: 3px;
}

.yao-line.yin::after {
  content: '';
  display: block;
  width: 40%;
  height: 6px;
  background: var(--text-primary);
  border-radius: 3px;
}

.yao-divider {
  width: 60%;
  max-width: 120px;
  height: 1px;
  background: var(--border);
  margin: 16px auto;
}

/* ============================================
   生肖运势专属
   ============================================ */
.panel-body {
  padding: 20px;
}

.panel-section {
  margin-bottom: 20px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.result-basic {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border-gold);
  text-align: center;
}

.zodiac-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.zodiac-icon {
  font-size: 3rem;
}

.zodiac-name-wrap {
  text-align: left;
}

.zodiac-ganzhi {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.detail-fortune-list {
  list-style: none;
  padding: 0;
}

.detail-fortune-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.detail-fortune-item h4 {
  color: var(--cinnabar);
  margin-bottom: 8px;
  font-size: 1rem;
}

.detail-fortune-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

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

.lucky-grid .lucky-item {
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.lucky-grid .lucky-item h5 {
  color: var(--cinnabar);
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.lucky-grid .lucky-item p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* ============================================
   宣纸纹理背景
   ============================================ */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(178,34,34,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(184,134,11,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(45,106,79,0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] body::before {
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(178,34,34,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(184,134,11,0.05) 0%, transparent 50%);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
  border-bottom: 2px solid var(--border-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cinnabar);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--cinnabar-dark), var(--cinnabar));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(178,34,34,0.25);
}

.logo:hover .logo-icon { transform: rotate(15deg); box-shadow: 0 0 12px rgba(178,34,34,0.3); }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  max-width: calc(100vw - 140px);
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-links a:hover { color: var(--cinnabar); background: var(--cinnabar-pale); }
.nav-links a.active { color: var(--cinnabar); background: var(--cinnabar-pale); font-weight: 600; border-bottom: 2px solid var(--cinnabar); }

.mobile-menu-btn {
  display: none;
  background: none; border: none;
  font-size: 1.5rem; color: var(--cinnabar); cursor: pointer;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  text-align: center;
  padding: 80px 20px 60px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, var(--cinnabar-pale) 0%, transparent 70%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(178,34,34,0.04) 0%, transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(184,134,11,0.03) 0%, transparent 40%);
  animation: heroFloat 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 10px); }
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--cinnabar);
  text-shadow: 0 0 20px rgba(178,34,34,0.15);
  margin-bottom: 16px;
  position: relative;
  letter-spacing: 6px;
}

.hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.hero-divider {
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cinnabar), transparent);
  margin: 24px auto;
  position: relative;
}

/* Hero装饰符号 */
.hero-ornaments {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  position: relative;
}

.ornament {
  font-size: 1.25rem;
  letter-spacing: 8px;
  opacity: 0.3;
  color: var(--gold);
  animation: ornamentFloat 6s ease-in-out infinite;
}

.ornament-center { animation-delay: 2s; opacity: 0.2; }
.ornament-right { animation-delay: 4s; }

@keyframes ornamentFloat {
  0%, 100% { transform: translateY(0); opacity: 0.2; }
  50% { transform: translateY(-6px); opacity: 0.4; }
}

/* ============================================
   运势卡片网格
   ============================================ */
.tools-section {
  padding: 48px 20px;
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cinnabar);
  margin-bottom: 8px;
  letter-spacing: 3px;
}

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

.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 28px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  box-shadow: var(--shadow-sm);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold), var(--jade));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-red);
  box-shadow: var(--shadow-gold), var(--shadow-md);
  background: var(--bg-card-hover);
}

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

.tool-card-icon,
.tool-icon {
  font-size: 2.25rem;
  margin-bottom: 12px;
  display: block;
}

.tool-card-title,
.tool-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cinnabar);
  margin-bottom: 8px;
}

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

/* ============================================
   今日运势卡片
   ============================================ */
.fortune-card {
  background: var(--bg-card);
  border: 2px solid var(--border-red);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: var(--max-width);
  margin: 0 auto 48px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

.fortune-card-header {
  text-align: center;
  margin-bottom: 24px;
}

.fortune-card-header h2 {
  font-size: 1.375rem;
  color: var(--cinnabar);
  letter-spacing: 3px;
}

.fortune-card-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.fortune-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.fortune-item {
  text-align: center;
  padding: 20px 12px;
  background: var(--gold-pale);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.fortune-item:hover {
  border-color: var(--border-gold);
  background: rgba(184,134,11,0.15);
}

.fortune-item-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fortune-item-value {
  font-size: 1.75rem;
  color: var(--cinnabar);
  margin-bottom: 4px;
}

.fortune-item-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* 星级 */
.stars { color: var(--gold); font-size: 1.25rem; letter-spacing: 2px; }
.stars .dim { opacity: 0.25; }

/* ============================================
   页面头部
   ============================================ */
.page-header {
  text-align: center;
  padding: 48px 20px 32px;
  background: radial-gradient(ellipse at center, var(--cinnabar-pale) 0%, transparent 70%);
  position: relative;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--cinnabar);
  text-shadow: 0 0 12px rgba(178,34,34,0.1);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

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

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--cinnabar); text-decoration: none; }
.breadcrumb-sep { margin: 0 6px; color: var(--border); }

/* ============================================
   Tab 选项卡
   ============================================ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
  padding: 4px;
}

.tab-btn {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  border-color: var(--gold);
  color: var(--cinnabar);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--cinnabar-dark), var(--cinnabar));
  color: #fff;
  border-color: var(--cinnabar);
  box-shadow: 0 2px 8px rgba(178, 34, 34, 0.2);
}

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

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

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

.article-list {
  max-width: 800px;
  margin: 0 auto;
}

.article-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.article-item:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-sm);
}

.article-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.article-item-header:hover {
  background: var(--bg-secondary);
}

.article-item-header h3 {
  color: var(--cinnabar);
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.article-item-arrow {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  font-size: 0.75rem;
}

.article-item.open .article-item-arrow {
  transform: rotate(180deg);
}

.article-item-body {
  display: none;
  padding: 0 20px 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.9375rem;
  border-top: 1px solid var(--border);
}

.article-item.open .article-item-body {
  display: block;
  padding-top: 16px;
}

/* ============================================
   面板容器
   ============================================ */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: var(--max-width);
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 1.125rem;
  color: var(--cinnabar);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 2px;
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1.5px solid var(--cinnabar);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--cinnabar-pale), rgba(178,34,34,0.03));
  color: var(--cinnabar);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: linear-gradient(135deg, var(--cinnabar-dark), var(--cinnabar));
  color: #fff;
  box-shadow: 0 0 20px rgba(178,34,34,0.2);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cinnabar-dark), var(--cinnabar));
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(178,34,34,0.3);
}

.btn-gold {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  box-shadow: 0 0 20px rgba(184,134,11,0.2);
}

.btn-jade {
  border-color: var(--jade);
  color: var(--jade);
  background: rgba(45,106,79,0.08);
}
.btn-jade:hover {
  background: var(--jade);
  color: #fff;
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================
   表单元素
   ============================================ */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(178,34,34,0.1);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b22222' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ============================================
   结果区域
   ============================================ */
.result-area {
  background: var(--bg-card);
  border: 2px solid var(--border-red);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.result-title {
  font-size: 1.125rem;
  color: var(--cinnabar);
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: 3px;
}

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

.bazi-table th, .bazi-table td {
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  text-align: center;
}

.bazi-table th {
  background: var(--cinnabar-pale);
  color: var(--cinnabar);
  font-weight: 600;
  font-size: 0.875rem;
}

.bazi-table td {
  color: var(--text-primary);
  font-size: 1rem;
}

.bazi-table .highlight {
  color: var(--cinnabar);
  font-weight: 700;
}

/* ============================================
   FAQ
   ============================================ */
.faq-section { margin-top: 24px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
  background: var(--bg-card);
}

.faq-item:hover { border-color: var(--border-red); }

.faq-question {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.faq-question:hover { background: var(--cinnabar-pale); }
.faq-toggle { color: var(--cinnabar); font-size: 1.2rem; transition: var(--transition); }
.faq-item.open .faq-toggle { transform: rotate(45deg); }

.faq-answer {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  padding: 0 18px 14px;
  max-height: 300px;
}

/* ============================================
   SEO Section
   ============================================ */
.seo-section {
  padding: 48px 20px;
  position: relative;
  z-index: 1;
}

.seo-section h2 {
  font-size: 1.25rem;
  color: var(--cinnabar);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.seo-section p, .seo-section li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-red);
  padding: 40px 20px 32px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--cinnabar); }

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   浮动切换按钮
   ============================================ */
.float-toggle-group {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.theme-toggle {
  border: none;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, var(--cinnabar-dark), var(--cinnabar));
  box-shadow: 0 4px 16px rgba(178,34,34,0.25);
  transition: var(--transition);
}

.theme-toggle:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(178,34,34,0.35); }

/* ============================================
   Toast
   ============================================ */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border-red);
  color: var(--text-primary);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
.toast.success { border-color: var(--jade); color: var(--jade); }
.toast.error { border-color: var(--cinnabar); color: var(--cinnabar); }

@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ============================================
   回到顶部
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cinnabar);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--cinnabar);
  color: #fff;
}

/* ============================================
   装饰分隔线
   ============================================ */
.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cinnabar), transparent);
  margin: 24px auto;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 24px 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

/* ============================================
   标签/徽章
   ============================================ */
.tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--gold-pale);
}

.tag-gold { border-color: var(--gold); color: var(--gold); background: rgba(184,134,11,0.1); }
.tag-red { border-color: var(--cinnabar); color: var(--cinnabar); background: var(--cinnabar-pale); }
.tag-jade { border-color: var(--jade); color: var(--jade); background: rgba(45,106,79,0.08); }

/* ============================================
   加载动画
   ============================================ */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(245,240,224,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

[data-theme="dark"] .loading-overlay {
  background: rgba(26, 15, 10, 0.85);
}

.loading-overlay.visible { opacity: 1; pointer-events: auto; }

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--cinnabar);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ============================================
   滚动揭示
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ============================================
   响应式 - 平板
   ============================================ */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .fortune-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   响应式 - 手机
   ============================================ */
@media (max-width: 768px) {
  .header-inner { height: 56px; padding: 0 12px; }
  .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: var(--bg-primary); flex-direction: column;
    padding: 12px 20px; gap: 4px;
    border-bottom: 2px solid var(--border-red);
    box-shadow: var(--shadow-lg); max-width: 100%;
  }
  .nav-links.mobile-open { display: flex; }
  .nav-links a { padding: 10px 16px; width: 100%; font-size: 0.9375rem; }
  .mobile-menu-btn { display: block; }

  .hero { padding: 48px 16px 36px; }
  .hero h1 { font-size: 1.75rem; letter-spacing: 3px; }
  .hero p { font-size: 0.9375rem; }

  .page-header { padding: 36px 16px 24px; }
  .page-header h1 { font-size: 1.5rem; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tool-card { padding: 20px 14px; }

  .fortune-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .form-row { grid-template-columns: 1fr; }

  .btn { padding: 12px 24px; width: 100%; justify-content: center; }
  .btn-group { flex-direction: column; }

  .float-toggle-group { bottom: 12px; right: 12px; }
  .theme-toggle { width: 44px; height: 44px; font-size: 1.1rem; }
  .back-to-top { bottom: 72px; right: 12px; width: 36px; height: 36px; }

  .footer-links { gap: 6px 12px; }
  .footer-links a { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.375rem; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 16px 12px; }
  .tool-card-icon, .tool-icon { font-size: 1.75rem; }
  .tool-card-title, .tool-name { font-size: 1rem; }
  .fortune-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 1.125rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .logo { font-size: 1rem; }
  .logo-icon { width: 30px; height: 30px; font-size: 0.875rem; }
}

/* ============================================
   老年模式 - 暖黄宣纸
   ============================================ */
[data-mode="elderly"] body { font-size: 18px; line-height: 1.8; }
[data-mode="elderly"] .nav-links a { font-size: 0.9375rem; padding: 8px 12px; }
[data-mode="elderly"] .logo { font-size: 1.375rem; }
[data-mode="elderly"] .tool-card { padding: 32px 24px; }
[data-mode="elderly"] .tool-card-title,
[data-mode="elderly"] .tool-name { font-size: 1.25rem; }
[data-mode="elderly"] .btn { padding: 16px 36px; font-size: 1.125rem; }
[data-mode="elderly"] .hero h1 { font-size: 2.25rem; }
[data-mode="elderly"] .page-header h1 { font-size: 2rem; }
[data-mode="elderly"] .section-title { font-size: 1.75rem; }
[data-mode="elderly"] .faq-question { font-size: 1.0625rem; }

[data-mode="elderly"] {
  --bg-primary: #faf5e6;
  --bg-secondary: #f5edd8;
  --bg-card: #fffdf5;
  --text-primary: #1a0f0a;
  --text-secondary: #4a3020;
  --text-muted: #7a6050;
}

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============================================
   选中文本样式
   ============================================ */
::selection { background: rgba(178, 34, 34, 0.2); color: var(--text-primary); }

/* ============================================
   Header 滚动效果
   ============================================ */
.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: var(--bg-secondary);
}

/* ============================================
   工具卡片图标动画
   ============================================ */
.tool-card .tool-icon {
  font-size: 2.25rem;
  display: block;
  margin-bottom: 12px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tool-card:hover .tool-icon {
  transform: scale(1.15) rotate(-5deg);
}

/* ============================================
   星级评分动画
   ============================================ */
.star {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.fortune-item:hover .star.active {
  animation: starPulse 0.6s ease infinite alternate;
}

.fortune-item:hover .star {
  transform: scale(1.1);
}

@keyframes starPulse {
  from { transform: scale(1); text-shadow: none; }
  to { transform: scale(1.2); text-shadow: 0 0 8px rgba(184, 134, 11, 0.5); }
}

/* ============================================
   面板进入动画
   ============================================ */
.panel, .result-area {
  animation: panelFadeIn 0.5s ease;
}

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

/* ============================================
   按钮点击涟漪效果
   ============================================ */
.btn, .btn-primary, .btn-gold, .btn-jade {
  position: relative;
  overflow: hidden;
}

.btn::after, .btn-primary::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after, .btn-primary:active::after {
  width: 300px; height: 300px;
}

/* ============================================
   页脚渐入
   ============================================ */
.site-footer {
  animation: footerFadeIn 0.6s ease 0.3s both;
}

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

/* ============================================
   工具卡片网格交错动画
   ============================================ */
.tools-grid .tool-card {
  animation: cardSlideIn 0.5s ease both;
}

.tools-grid .tool-card:nth-child(1) { animation-delay: 0.05s; }
.tools-grid .tool-card:nth-child(2) { animation-delay: 0.1s; }
.tools-grid .tool-card:nth-child(3) { animation-delay: 0.15s; }
.tools-grid .tool-card:nth-child(4) { animation-delay: 0.2s; }
.tools-grid .tool-card:nth-child(5) { animation-delay: 0.25s; }
.tools-grid .tool-card:nth-child(6) { animation-delay: 0.3s; }
.tools-grid .tool-card:nth-child(7) { animation-delay: 0.35s; }
.tools-grid .tool-card:nth-child(8) { animation-delay: 0.4s; }
.tools-grid .tool-card:nth-child(9) { animation-delay: 0.45s; }
.tools-grid .tool-card:nth-child(10) { animation-delay: 0.5s; }
.tools-grid .tool-card:nth-child(11) { animation-delay: 0.55s; }
.tools-grid .tool-card:nth-child(12) { animation-delay: 0.6s; }

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

/* ============================================
   运势卡片交错动画
   ============================================ */
.fortune-grid .fortune-item {
  animation: fortuneFadeIn 0.4s ease both;
}

.fortune-grid .fortune-item:nth-child(1) { animation-delay: 0.1s; }
.fortune-grid .fortune-item:nth-child(2) { animation-delay: 0.15s; }
.fortune-grid .fortune-item:nth-child(3) { animation-delay: 0.2s; }
.fortune-grid .fortune-item:nth-child(4) { animation-delay: 0.25s; }
.fortune-grid .fortune-item:nth-child(5) { animation-delay: 0.3s; }
.fortune-grid .fortune-item:nth-child(6) { animation-delay: 0.35s; }

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

/* ============================================
   FAQ 箭头旋转过渡
   ============================================ */
.faq-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

/* ============================================
   最近使用标签动画
   ============================================ */
.tag, .tag-gold, .tag-red, .tag-jade {
  transition: var(--transition);
}

.tag:hover, .tag-gold:hover, .tag-red:hover, .tag-jade:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   空状态文字
   ============================================ */
.empty-text {
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
  font-size: 0.9375rem;
}

/* ============================================
   reduced motion 无障碍
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
  /* 隐藏非内容元素 */
  .site-header, .site-footer, .float-toggle-group, .back-to-top,
  .mobile-menu-btn, .breadcrumb, .faq-section, .page-header,
  .hero-ornaments, .recent-section, .tools-section, .hero-cta,
  .section-about, button, .btn { display: none !important; }

  /* 恢复结果区域显示 */
  .result-area, .panel { display: block !important; opacity: 1 !important; }

  /* 打印友好布局 */
  body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .bazi-table th, .bazi-table td { border: 1px solid #333 !important; }
  .wuxing-item { border: 1px solid #ccc !important; }
  .analysis-box { border: 1px solid #999 !important; box-shadow: none !important; }

  /* 链接显示URL */
  a[href]:after { content: " (" attr(href) ")"; font-size: 10pt; color: #666; }

  /* 避免分页断裂 */
  .result-area, .analysis-box, .wuxing-item, .bazi-table {
    page-break-inside: avoid;
  }

  /* 页眉页脚 */
  @page {
    margin: 2cm;
    @top-center { content: "命理占卜 - 测算结果"; }
    @bottom-center { content: "仅供娱乐参考"; }
  }
}
