/* ============================================================
   命理大全 — Master Stylesheet
   Dark Mystical Chinese Theme
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-deep: #e8e2d6;
  --bg-card: rgba(255, 252, 245, 0.78);
  --bg-input: rgba(255, 252, 245, 0.90);
  --gold: #8b6f3a;
  --gold-light: #a08452;
  --gold-pale: #5c4a28;
  --gold-dark: #4a3a1e;
  --red: #a8323a;
  --text: #2a2218;
  --text-secondary: #5c4e3a;
  --text-muted: #8a7a60;
  --border-subtle: rgba(100, 80, 50, 0.15);
  --border-medium: rgba(100, 80, 50, 0.40);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 700px;
  --font-body: "KaiTi", "STKaiti", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "KaiTi", "STKaiti", "Noto Serif SC", "Georgia", serif;
  --transition: 0.28s ease;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 16px rgba(140,110,60,0.20);
}

/* --- Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  font-family: var(--font-body);
  background: #e8e2d6;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(180,160,130,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(160,150,130,0.2) 0%, transparent 60%);
}

/* ========== SPLASH - 水墨画风格 ========== */
.splash-overlay {
  position:fixed;inset:0;z-index:10000;
  background:radial-gradient(ellipse at center, #3a3a3a 0%, #1a1a1a 40%, #0a0a0a 70%, #000000 100%);
  cursor:pointer;overflow:hidden;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.splash-overlay.fade-out { animation:splashOut 0.6s ease forwards; }
@keyframes splashOut { 0%{opacity:1;} 100%{opacity:0;pointer-events:none;} }

/* ---- 水墨远山 ---- */
.ink-mountains { position:absolute;bottom:0;left:0;right:0;height:45%; }
.ink-mountain {
  position:absolute;bottom:0;width:100%;
  background:linear-gradient(180deg, transparent, rgba(60,60,60,0.8) 30%, rgba(30,30,30,0.95) 60%, rgba(0,0,0,1));
  border-radius:50% 60% 0 0;
  filter:blur(1.5px);
}
.ink-mountain::after {
  content:'';position:absolute;inset:0;
  background:linear-gradient(180deg, transparent 10%, rgba(20,20,20,0.9), rgba(0,0,0,1) 80%);
  border-radius:inherit;
}
.m1 { left:-30%;width:160%;height:70%;border-radius:70% 30% 0 0;filter:blur(3px);opacity:0.95; }
.m2 { left:10%;width:80%;height:50%;border-radius:40% 60% 0 0;filter:blur(2px);opacity:0.9; }
.m3 { left:-10%;width:120%;height:35%;border-radius:60% 40% 0 0;filter:blur(4px);opacity:0.85; }

/* ---- 水墨云雾 ---- */
.ink-mist {
  position:absolute;height:20%;border-radius:50%;
  background:radial-gradient(ellipse, rgba(200,200,200,0.5) 0%, rgba(150,150,150,0.25) 40%, transparent 70%);
  filter:blur(18px);
  animation:mistFloat 8s ease-in-out infinite;
}
.mist1 { width:80%;top:15%;left:-20%;animation-delay:0s; }
.mist2 { width:60%;top:35%;right:-15%;animation-delay:3s; }
.mist3 { width:70%;top:55%;left:10%;animation-delay:5s; }
@keyframes mistFloat {
  0%,100% { transform:translateX(0) translateY(0); }
  25% { transform:translateX(4%) translateY(-2%); }
  50% { transform:translateX(-2%) translateY(1%); }
  75% { transform:translateX(3%) translateY(-1%); }
}

/* ---- 中心八卦区 ---- */
.splash-center {
  position:relative;z-index:2;
  display:flex;flex-direction:column;align-items:center;
}
/* 光晕环 - 围绕八卦 */
.splash-ring-glow {
  position:absolute;
  width:min(45vw,45vh);height:min(45vw,45vh);
  border-radius:50%;
  border:3px solid rgba(255,255,255,0.8);
  box-shadow:0 0 60px rgba(255,255,255,0.5),0 0 120px rgba(255,255,255,0.3),0 0 200px rgba(255,255,255,0.15);
  animation:ringBreath 4s ease-in-out infinite;
}
@keyframes ringBreath {
  0%,100% { transform:scale(0.95);opacity:0.6; }
  50% { transform:scale(1.05);opacity:1; }
}

/* ---- 文字 ---- */
.splash-text {
  position:relative;z-index:3;
  font-family:"KaiTi","STKaiti","Georgia",serif;
  font-size:clamp(2.6rem,7vw,4.5rem);
  background:linear-gradient(180deg,#ffffff 0%,#e0e0e0 30%,#c0c0c0 60%,#ffffff 100%);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
  letter-spacing:0.3em;opacity:0;
  animation:textIn 1.2s ease 0.3s forwards;
  filter:drop-shadow(0 0 20px rgba(255,255,255,0.6)) drop-shadow(0 0 40px rgba(255,255,255,0.3));
}
@keyframes textIn {
  0% { opacity:0;transform:translateY(18px);letter-spacing:0.5em; }
  100% { opacity:1;transform:translateY(0);letter-spacing:0.3em; }
}
.splash-sub {
  position:relative;z-index:3;margin-top:0.6rem;
  color:#d0d0d0;font-size:clamp(0.8rem,1.8vw,0.95rem);
  letter-spacing:0.25em;opacity:0;
  animation:textIn 1s ease 0.7s forwards;
}
.splash-hint {
  position:absolute;bottom:2.5rem;z-index:3;
  color:rgba(220,220,220,0.9);font-size:0.85rem;
  letter-spacing:0.2em;
  animation:hintPulse 2.5s ease-in-out 1.5s infinite;
}
@keyframes hintPulse {
  0%,100% { opacity:0.5; }
  50% { opacity:1; }
}

/* ========== STAR BACKGROUND ========== */
#starCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ========== HEADER ========== */
.header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.2rem 1rem 1.2rem;
}
.header-top-right {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  z-index: 3;
}
.redeem-btn {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #c9a96e, #d4a574);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(201,169,110,0.3);
  margin-right: 0.5rem;
}
.redeem-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(201,169,110,0.5); }

.contact-btn {
  padding: 0.6rem 1.2rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.contact-btn:hover { border-color: var(--gold); color: var(--gold); transform: scale(1.05); }
.contact-popup {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  min-width: 240px;
  z-index: 100;
}
.contact-popup.show { display: block; }
.contact-item {
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}
.contact-item:last-child { border-bottom: none; }
.copy-btn {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  white-space: nowrap;
}
.copy-btn:hover { border-color: var(--gold); color: var(--gold); }
.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  background: linear-gradient(135deg, #d4a843, #f0d080 40%, #c9a96e 70%, #8b7340);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.site-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}

/* ========== NAVIGATION ========== */
.nav-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem;
  background: rgba(245,240,232,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(100,80,50,0.2);
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}
.nav-tab:hover {
  color: var(--gold-pale);
  border-color: var(--border-subtle);
  background: rgba(201,169,110,0.06);
}
.nav-tab.active {
  color: var(--gold);
  border-color: var(--border-medium);
  background: rgba(201,169,110,0.1);
  box-shadow: 0 0 14px rgba(201,169,110,0.2);
}
.nav-icon { font-size: 1.1rem; }
.nav-label { font-size: 0.82rem; }

/* ========== MAIN CONTENT ========== */
.main-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

/* Module wrapper */
.module {
  animation: fadeIn 0.35s ease;
}

/* ========== MODULE CARD (Glass Effect) ========== */
.module-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.module-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.module-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.4rem;
}
.module-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.6rem;
}

/* ========== FORMS ========== */
.fortune-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.form-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.form-group {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.form-group label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.fortune-form input,
.fortune-form select,
.fortune-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  outline: none;
}
.fortune-form input:focus,
.fortune-form select:focus,
.fortune-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201,169,110,0.2);
}
.fortune-form select option {
  background: #1a1a30;
  color: var(--text);
}
.fortune-form textarea {
  resize: vertical;
  min-height: 70px;
}
.api-key-group small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1.6rem;
  background: linear-gradient(135deg, #c9a96e, #d4a574);
  color: #1a1a2e;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  text-align: center;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201,169,110,0.35);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  display: inline-block;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.55rem 1.2rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  text-align: center;
}
.btn-secondary:hover {
  background: rgba(201,169,110,0.08);
  border-color: var(--gold);
}
.btn-glow {
  animation: glowPulse 2.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(201,169,110,0.25); }
  50% { box-shadow: 0 0 22px rgba(201,169,110,0.45); }
}

/* ========== RESULT CONTAINER ========== */
.result-container {
  animation: fadeIn 0.5s ease;
}
.result-header {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-medium);
}
.result-content {
  line-height: 1.8;
}

/* ========== STEP HINTS (Tarot / Flow) ========== */
.step-hint {
  font-size: 1.05rem;
  color: var(--gold-pale);
  text-align: center;
  margin-bottom: 0.3rem;
}
.step-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}
.text-gold { color: var(--gold); }

/* ========== LOADING ========== */
.loading-text {
  text-align: center;
  color: var(--gold);
  font-size: 1.05rem;
  padding: 2rem 0;
}
.api-error {
  color: #e74c3c;
  text-align: center;
  padding: 0.7rem;
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}

/* AI Reading Sections */
.reading-section-title {
  color: var(--gold);
  font-size: 1rem;
  margin: 1.1rem 0 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.reading-section-content {
  color: var(--text);
  line-height: 1.8;
  font-size: 0.93rem;
}

/* ========== TAROT ========== */
/* 洗牌动画 */
@keyframes bounceIn {
  0% { opacity:0; transform: translateY(30px) scale(0.4); }
  60% { opacity:1; transform: translateY(-4px) scale(1.04); }
  100% { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes shufflePulse {
  0%,100% { opacity:1; }
  50% { opacity:0.4; }
}
.shuffle-text {
  animation: shufflePulse 0.6s ease-in-out infinite !important;
}

/* 弧牌容器 */
#cardDeck {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#cardDeck::-webkit-scrollbar { display:none; }

.arc-card {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  will-change: auto;
}
.arc-card:active { cursor: grabbing; }
#arcTrack { will-change: transform; }

/* Mini cards (deck) */
.card-deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.6rem;
  min-height: 110px;
}
.mini-card {
  width: 64px;
  height: 98px;
  background: linear-gradient(135deg, #2a1a3a, #1a1030, #3a2040);
  border: 2px solid var(--gold-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  user-select: none;
}
.mini-card:hover {
  transform: translateY(-10px) scale(1.08) !important;
  box-shadow: 0 8px 22px rgba(201,169,110,0.35);
  border-color: var(--gold);
}

/* Card slots (3-card spread) */
.card-slots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.2rem 0;
}
.card-slot {
  text-align: center;
}
.slot-label {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 0.35rem;
  font-weight: bold;
  letter-spacing: 0.06em;
}
.slot-card {
  width: 130px;
  height: 200px;
  perspective: 1000px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.slot-card.empty {
  background: linear-gradient(135deg, rgba(42,26,58,0.5), rgba(26,16,48,0.5));
  border: 2px dashed var(--border-medium);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: var(--text-muted);
}
.slot-card.empty:hover {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(201,169,110,0.3);
  color: var(--gold);
}
.slot-card.revealed { cursor: default; }
.slot-card.flipping { animation: cardFlipAnim 0.6s ease; }
@keyframes cardFlipAnim {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg) scale(1.05); }
  100% { transform: rotateY(0); }
}

/* Tarot card inner */
.tarot-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 8px;
}
.tarot-card-inner.reversed { transform: rotate(180deg); }
.tarot-card-front {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 3px solid var(--gold);
  background: linear-gradient(180deg, #faf3e8, #f0e6d2 50%, #e8dcc0);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  box-shadow: 0 5px 18px rgba(0,0,0,0.5);
  color: #3a2a1a;
  font-size: 0.74rem;
  text-align: center;
  overflow: hidden;
}
.card-type-badge {
  font-size: 0.6rem;
  padding: 2px 7px;
  border-radius: 10px;
  margin-bottom: 0.25rem;
  font-weight: bold;
}
.card-type-badge.major { background: #c9a96e; color: #1a1a2e; }
.card-type-badge.minor { background: #b0b0b0; color: #1a1a2e; }
.card-type-badge.court { background: #d4a574; color: #1a1a2e; }
.card-name {
  font-weight: bold;
  font-size: 0.82rem;
  color: #2a1a0a;
  margin-bottom: 0.15rem;
}
.card-num {
  font-size: 1.3rem;
  font-weight: bold;
  color: #8b4513;
  margin-bottom: 0.15rem;
}
.card-keywords {
  font-size: 0.62rem;
  color: #6b5040;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.card-suit {
  font-size: 0.65rem;
  font-weight: bold;
  margin-top: auto;
}

/* Reading display */
.reading-cards {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}
.reading-card {
  flex: 1 1 170px;
  max-width: 220px;
  background: var(--bg-card);
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  text-align: center;
}
.reading-card h3 {
  color: var(--gold);
  font-size: 0.95rem;
  margin: 0.35rem 0;
}
.reading-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
}
.position-badge {
  background: var(--gold);
  color: #1a1a2e;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
}
.reversed-badge {
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: bold;
}
.reversed-badge.is-upright {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border: 1px solid #2ecc71;
}
.reversed-badge.is-reversed {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  border: 1px solid #e74c3c;
}
.reading-desc {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0.35rem 0;
}
.reading-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-top: 0.7rem;
}
.reading-summary h4 { color: var(--gold); margin-bottom: 0.3rem; }
.reading-summary p { color: var(--text); font-size: 0.88rem; line-height: 1.7; }

/* ========== DAILY FORTUNE STICKS ========== */
.stick-holder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}
.stick-tube {
  position: relative;
  width: 100px;
  height: 220px;
  background: linear-gradient(180deg, #2a2015, #3d2e1a 30%, #5a4222 50%, #3d2e1a 70%, #2a2015);
  border: 3px solid var(--gold-dark);
  border-radius: 8px 8px 6px 6px;
  box-shadow: inset 0 0 25px rgba(0,0,0,0.5), 0 5px 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  cursor: pointer;
  user-select: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stick-tube:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 25px rgba(0,0,0,0.5), 0 8px 28px rgba(0,0,0,0.55), 0 0 20px rgba(201,169,110,0.2);
}
.tube-body { font-size: 2.6rem; margin-bottom: 0.2rem; }
.tube-label {
  font-size: 0.82rem;
  color: var(--gold);
  font-family: var(--font-display);
}
.stick-tube.shaking { animation: shakeTube 0.5s ease-in-out 4; }
@keyframes shakeTube {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-6px) rotate(-2deg); }
  30% { transform: translateX(6px) rotate(2deg); }
  45% { transform: translateX(-4px) rotate(-1deg); }
  60% { transform: translateX(4px) rotate(1deg); }
  75% { transform: translateX(-2px) rotate(0); }
  90% { transform: translateX(2px) rotate(0); }
}

.stick-result {
  width: 100%;
  text-align: center;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  animation: fadeIn 0.5s ease;
}
.level-badge {
  display: inline-block;
  padding: 7px 22px;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: bold;
  font-family: var(--font-display);
  margin-bottom: 0.8rem;
}
.stick-title {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}
.stick-poem-text {
  font-family: "KaiTi", "STKaiti", var(--font-display);
  font-size: 1rem;
  color: var(--gold-pale);
  line-height: 2;
  white-space: pre-line;
  text-align: center;
  margin: 0.7rem 0;
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  background: rgba(201,169,110,0.04);
}
.stick-summary {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}
.interp-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  margin: 0.7rem 0;
}
.interp-item {
  padding: 0.45rem 0.6rem;
  background: rgba(201,169,110,0.04);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-medium);
  color: var(--text);
  font-size: 0.87rem;
  line-height: 1.5;
}
.interp-item strong { color: var(--gold); }
.interp-icon { margin-right: 0.25rem; }
.lucky-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.7rem;
}
.lucky-item {
  background: rgba(201,169,110,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.lucky-item b { color: var(--gold); }

/* ========== BAZI ========== */
.pillar-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.7rem 0;
}
.pillar-table th, .pillar-table td {
  padding: 0.5rem 0.4rem;
  text-align: center;
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}
.pillar-table thead th {
  background: rgba(201,169,110,0.1);
  color: var(--gold);
  font-weight: bold;
}
.pillar-col { color: var(--gold); }
.row-label { color: var(--text-secondary); font-weight: bold; font-size: 0.8rem; }
.gan-char, .zhi-char {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: "KaiTi", "STKaiti", var(--font-display);
}
.day-master {
  font-size: 1.4rem;
  text-shadow: 0 0 6px rgba(201,169,110,0.35);
}
.day-master-label { color: var(--gold); font-weight: bold; }
.bazi-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  padding: 0.7rem;
  background: rgba(201,169,110,0.04);
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
  font-size: 0.88rem;
}
.bazi-info-row b { color: var(--gold); }
.wuxing-chart-container {
  display: flex;
  justify-content: center;
  margin: 0.8rem 0;
}
.wuxing-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.wx-bar-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wx-label {
  width: 22px;
  font-weight: bold;
  font-size: 0.85rem;
  text-align: center;
}
.wx-bar-track {
  flex: 1;
  height: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: hidden;
  min-width: 100px;
}
.wx-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
  min-width: 3px;
}
.wx-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 28px;
  text-align: right;
}
.analysis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-top: 0.7rem;
}
.analysis-card h4 { color: var(--gold); font-size: 0.95rem; margin-bottom: 0.3rem; }
.analysis-card p { color: var(--text); font-size: 0.88rem; line-height: 1.7; }

/* ========== MBTI QUIZ ========== */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.progress-bar {
  flex: 1;
  height: 7px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 6px rgba(201,169,110,0.35);
}
.progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 34px;
}
.quiz-question {
  font-size: 1.05rem;
  color: var(--gold-pale);
  text-align: center;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.quiz-option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  font-family: var(--font-body);
}
.quiz-option-btn:hover {
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
  transform: translateX(3px);
}

/* MBTI Result */
.mbti-type-badge {
  text-align: center;
  padding: 0.9rem;
  background: linear-gradient(135deg, rgba(201,169,110,0.08), rgba(212,165,116,0.04));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}
.mbti-emoji { font-size: 2.6rem; display: block; margin-bottom: 0.25rem; }
.mbti-type-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--gold);
  display: block;
}
.mbti-ancient {
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.15rem;
}
.mbti-desc {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
  text-align: center;
  padding: 0.5rem 0;
}
.mbti-details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.5rem 0;
}
.mbti-trait-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
}
.mbti-trait-box h5 { color: var(--gold); font-size: 0.84rem; margin-bottom: 0.2rem; }
.mbti-trait-box p { color: var(--text); font-size: 0.83rem; line-height: 1.5; }
.mbti-share-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.7rem;
  font-style: italic;
}

/* ========== CLASSICS MODULE ========== */
.classics-subnav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.3rem; margin-bottom: 1.2rem;
}
.classics-tab {
  padding: 0.45rem 0.9rem;
  background: transparent; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 0.84rem; cursor: pointer; transition: all var(--transition);
  font-family: var(--font-body);
}
.classics-tab:hover { border-color: var(--gold); color: var(--gold); }
.classics-tab.active {
  background: rgba(201,169,110,0.1); border-color: var(--gold);
  color: var(--gold); font-weight: bold;
}
.classics-header { text-align: center; margin-bottom: 1rem; }
.classics-header h3 { color: var(--gold); font-size: 1.2rem; margin-bottom: 0.4rem; }
.classics-intro {
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7;
  max-width: 600px; margin: 0 auto 0.8rem;
}
.classics-actions {
  display: flex; gap: 0.6rem; align-items: center; justify-content: center;
  margin-bottom: 0.6rem; flex-wrap: wrap;
}
.classics-actions .btn-primary { width: auto; padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.hexagram-search {
  padding: 0.5rem 0.8rem; background: var(--bg-input); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem;
  width: 200px; outline: none; font-family: var(--font-body);
}
.hexagram-search:focus { border-color: var(--gold); }

.hexagram-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.4rem; margin-bottom: 1rem;
}
.hexagram-card {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.7rem; background: var(--bg-card);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
}
.hexagram-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.hexagram-num { font-size: 0.72rem; color: var(--text-muted); min-width: 22px; }
.hexagram-symbols { font-size: 1.1rem; }
.hexagram-name { font-size: 0.84rem; color: var(--text); font-weight: bold; }
.hexagram-brief { font-size: 0.7rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hexagram-full { padding: 0.5rem 0; }
.hexagram-title-row {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem;
  justify-content: center; text-align: center;
}
.hg-symbols { font-size: 2.4rem; }
.hg-section {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; margin-bottom: 0.5rem;
}
.hg-section h5 { color: var(--gold); font-size: 0.85rem; margin-bottom: 0.25rem; }
.hg-section p { color: var(--text); font-size: 0.88rem; line-height: 1.7; }

.classics-chapter-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem; transition: all 0.4s ease;
}
.classics-chapter-card h4 { color: var(--gold); font-size: 0.95rem; margin-bottom: 0.4rem; }
.chapter-text {
  color: var(--text); font-size: 0.88rem; line-height: 1.8;
  white-space: pre-line; margin-bottom: 0.4rem;
}
.chapter-explain {
  color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6;
  padding-top: 0.4rem; border-top: 1px solid var(--border-subtle);
}

@media (max-width: 480px) {
  .hexagram-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .classics-subnav { gap: 0.15rem; }
  .classics-tab { font-size: 0.74rem; padding: 0.35rem 0.55rem; }
}

/* ========== FOOTER ========== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.6rem 1rem 2.2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-subtle);
}

/* Disclaimer */
.disclaimer {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  font-style: italic;
  text-align: center;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 滴水涟漪反馈 */
.ripple-effect {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  animation: rippleOut 0.8s ease-out forwards;
}
@keyframes rippleOut {
  0% {
    width: 0; height: 0;
    margin-left: 0; margin-top: 0;
    opacity: 0.65;
    border-width: 3px;
  }
  40% {
    opacity: 0.35;
    border-width: 1.5px;
  }
  100% {
    width: 80px; height: 80px;
    margin-left: -40px; margin-top: -40px;
    opacity: 0;
    border-width: 0.3px;
  }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #e8e2d6; }
::-webkit-scrollbar-thumb { background: rgba(120,100,70,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,100,70,0.5); }
html { scrollbar-color: rgba(120,100,70,0.3) #e8e2d6; scrollbar-width: thin; }

::selection { background: rgba(140,110,60,0.25); color: #3a2a10; }

/* ========== HERO SECTION ========== */
.hero-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1rem 2.2rem;
  max-width: 680px;
  margin: 0 auto;
}
.hero-inner {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-card);
}
.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  color: var(--gold);
  margin-bottom: 0.6rem;
  letter-spacing: 0.08em;
}
.hero-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 1.2rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hs-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: bold;
}
.hs-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.btn-hero {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  background: linear-gradient(135deg, #c9a96e, #d4a574);
  color: #1a1a2e;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  box-shadow: 0 4px 18px rgba(201,169,110,0.25);
}
.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,169,110,0.4);
}

/* ========== SECTION HEADERS ========== */
.section-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem 0.8rem;
  max-width: 680px;
  margin: 0 auto;
}
.section-h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 0.2rem;
  letter-spacing: 0.06em;
}
.section-lead {
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ========== TOOL CARDS GRID ========== */
.tools-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  max-width: 780px;
  margin: 0 auto 0.5rem;
  padding: 0 1rem;
}
.tool-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.28s ease;
}
.tool-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(201,169,110,0.18);
}
.tc-icon { font-size: 2.2rem; margin-bottom: 0.4rem; }
.tc-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  font-weight: bold;
  margin-bottom: 0.3rem;
}
.tc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.tc-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

/* ========== TOOL MODAL / OVERLAY ========== */
.tool-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  animation: fadeIn 0.25s ease;
}
.tool-overlay.active { display: flex; }
.tool-modal {
  background: #f5f0e6;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.4rem;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 12px 60px rgba(0,0,0,0.3);
  animation: modalSlideIn 0.3s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalSlideIn {
  0% { opacity:0; transform:translateY(30px); }
  100% { opacity:1; transform:translateY(0); }
}
.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  z-index: 2;
}
.modal-close:hover { color: var(--red); background: rgba(168,50,58,0.06); }
.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.3rem;
  padding-right: 2rem;
}
.modal-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.87rem;
  margin-bottom: 1.3rem;
  line-height: 1.6;
}

/* ========== NEW FORM ELEMENTS ========== */
.form-input.full {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  outline: none;
  margin-bottom: 0.6rem;
}
.form-input.full:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201,169,110,0.2);
}
.form-input.full.large-input {
  font-size: 2rem;
  text-align: center;
  padding: 1rem;
  height: auto;
}
.form-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.76rem;
  margin: 0.5rem 0;
}
.btn-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.btn-row .btn-primary,
.btn-row .btn-secondary {
  flex: 1;
  width: auto;
  margin-top: 0;
}

/* ========== KNOWLEDGE SECTION ========== */
.knowledge-section {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}
.knowledge-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.knowledge-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.knowledge-card > p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}
.knowledge-card .knote {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.8rem;
  line-height: 1.5;
}
.diagram-svg {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
  min-height: 200px;
}
.diagram-svg svg {
  max-width: 100%;
  height: auto;
}

/* ========== PRICING ========== */
.pricing-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}
.pricing-card {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.pricing-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.pc-price {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: bold;
  margin-bottom: 0.2rem;
}
.pc-title {
  font-size: 0.95rem;
  color: var(--gold-pale);
  font-weight: bold;
  margin-bottom: 0.4rem;
}
.pc-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== COIN DISPLAY (六爻) ========== */
.coins-display {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 0;
}
.coin-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0d080, #c9a040, #a07820);
  border: 3px solid #8b6914;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 4px 15px rgba(180,130,40,0.4), inset 0 2px 4px rgba(255,255,200,0.3);
  transition: all 0.4s ease;
}
.coin-img.shaking {
  animation: coinShakeImg 0.12s linear infinite;
}
@keyframes coinShakeImg {
  0% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(30deg) translateY(-8px); }
  50% { transform: rotate(-10deg) translateY(2px); }
  75% { transform: rotate(-30deg) translateY(-8px); }
  100% { transform: rotate(0deg) translateY(0); }
}
.coin-img.heads {
  background: linear-gradient(135deg, #ffe8a0, #f0c040, #c08020);
  box-shadow: 0 4px 20px rgba(240,180,40,0.6), inset 0 2px 4px rgba(255,255,200,0.4);
}
.coin-img.tails {
  background: linear-gradient(135deg, #d0c0a0, #a09070, #706040);
  box-shadow: 0 4px 15px rgba(140,120,80,0.4), inset 0 2px 4px rgba(200,200,180,0.2);
}
.coin-result-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gold);
  min-height: 1.5rem;
  padding: 0.3rem 0;
}
.yao-display {
  text-align: center;
  padding: 0.5rem 0;
}
.yao-line {
  font-size: 1.3rem;
  padding: 0.15rem 0;
  font-family: "KaiTi", monospace;
}
/* SVG line styles */
.yao-line-yang {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--gold);
  border-radius: 3px;
  margin: 4px 0;
}
.yao-line-yin {
  display: inline-flex;
  gap: 12px;
  margin: 4px 0;
}
.yao-line-yin span {
  display: inline-block;
  width: 30px;
  height: 6px;
  background: var(--gold);
  border-radius: 3px;
}
.yao-line-old {
  position: relative;
}
.yao-line-marker {
  font-size: 0.7rem;
  color: var(--red);
  margin-left: 6px;
}

/* ========== DREAM QUICK TAGS ========== */
.dream-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 0.5rem 0;
}
.dream-tag {
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.dream-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========== ALMANAC TABLE ========== */
.almanac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.almanac-item {
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}
.almanac-item .alabel {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.almanac-item .avalue {
  color: var(--gold-pale);
  font-weight: bold;
}
.almanac-yi, .almanac-ji {
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  margin: 0.3rem 0;
  font-size: 0.84rem;
  line-height: 1.6;
}
.almanac-yi { background: rgba(60,179,113,0.06); border: 1px solid rgba(60,179,113,0.15); }
.almanac-ji { background: rgba(200,80,60,0.06); border: 1px solid rgba(200,80,60,0.15); }
.almanac-yi .alabel { color: #3cb371; }
.almanac-ji .alabel { color: #c8503c; }

/* ========== LOT/LINE/HEXAGRAM DISPLAY ========== */
.lot-display {
  text-align: center;
  padding: 1rem;
}
.lot-number {
  font-size: 3rem;
  color: var(--gold);
  font-family: var(--font-display);
}
.lot-poem {
  font-size: 1.1rem;
  color: var(--gold-pale);
  line-height: 1.8;
  white-space: pre-line;
  margin: 0.8rem 0;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.lot-advice {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}
.hexa-display {
  text-align: center;
  font-family: "KaiTi", monospace;
  font-size: 2.5rem;
  letter-spacing: 0.15em;
  padding: 0.8rem 0;
  color: var(--gold);
}

/* ========== BAZI MODE TABS ========== */
.bazi-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}
.bazi-mode-btn {
  padding: 0.5rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.bazi-mode-btn:hover { border-color: var(--gold); color: var(--gold); }
.bazi-mode-btn.active {
  background: rgba(201,169,110,0.12);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: bold;
}
.dual-label {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  text-align: center;
}
.true-solar-display {
  text-align: center;
  padding: 0.4rem 0.6rem;
  margin: 0.4rem 0;
  background: rgba(201,169,110,0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--gold-pale);
}
.true-solar-display b { color: var(--gold); }
.ts-note { font-size: 0.72rem; color: var(--text-muted); }

/* ========== PAYWALL ========== */
.paywall-cover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: inherit;
  min-height: 200px;
}
.paywall-inner {
  text-align: center;
  padding: 1.5rem;
}
.paywall-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.paywall-inner h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.5rem; }
.paywall-inner p { color: #bbb; font-size: 0.85rem; margin-bottom: 0.6rem; }
.shop-grid {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.shop-card {
  flex: 1;
  min-width: 130px;
  max-width: 180px;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}
.shop-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.shop-card .sc-price { font-size: 1.5rem; color: var(--gold); font-weight: bold; }
.shop-card .sc-count { font-size: 0.85rem; color: var(--text-secondary); }
.shop-card .sc-unit { font-size: 0.72rem; color: var(--text-muted); }
.shop-card.best { border-color: var(--gold); background: rgba(201,169,110,0.06); position: relative; }
.balance-bar {
  text-align: center;
  padding: 0.4rem 0.8rem;
  margin-bottom: 0.5rem;
  background: rgba(201,169,110,0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.balance-bar b { color: var(--gold); }

.shop-card.best::after {
  content: '推荐';
  position: absolute;
  top: -10px;
  right: -5px;
  background: var(--gold);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ========== ZIWEI SVG ========== */
#ziweiResult { overflow-x: auto; }
#ziweiResult svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }

/* ========== DISCLAIMER ========== */
.disclaimer-section {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}
.disclaimer-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  text-align: center;
}
.disclaimer-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0;
  user-select: none;
}
.disclaimer-toggle:hover { color: var(--gold); }
.disclaimer-toggle.open .toggle-arrow { transform: rotate(90deg); }
.toggle-arrow {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}
.disclaimer-content {
  display: none;
  margin-top: 0.4rem;
}
.disclaimer-content.show { display: block; }
.disclaimer-content p {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.7;
  margin: 0.2rem 0;
}

/* ========== FOOTER QUOTE ========== */
.footer-quote {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 0.3rem;
  font-style: italic;
  letter-spacing: 0.1em;
}

/* ========== RESPONSIVE (extended) ========== */
@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
  }
  .tool-card { padding: 1rem 0.8rem; }
  .tc-icon { font-size: 1.8rem; }
  .tc-name { font-size: 0.9rem; }
  .tool-modal { padding: 1.4rem 1rem; max-width: 95vw; }
  .knowledge-section { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.2rem; }
  .hs-num { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .tool-card { padding: 0.8rem 0.5rem; }
  .tc-icon { font-size: 1.5rem; }
  .tc-name { font-size: 0.8rem; }
  .tc-desc { font-size: 0.7rem; }
  .tc-tag { font-size: 0.62rem; }
  .tool-modal { padding: 1.1rem 0.7rem; border-radius: var(--radius-md); }
  .modal-title { font-size: 1.2rem; }
  .hero-inner { padding: 1.2rem 0.8rem; }
  .pricing-card { min-width: 130px; }
  .pc-price { font-size: 1.5rem; }
  .btn-row { flex-direction: column; }
}

@media (max-width: 768px) {
  .header { padding: 1.6rem 0.8rem 0.9rem; }
  .nav-tab { padding: 0.4rem 0.6rem; }
  .nav-label { font-size: 0.74rem; }
  .module-card { padding: 1.4rem 1rem; }
  .module-title { font-size: 1.3rem; }
  .form-row { flex-direction: column; gap: 0.7rem; }
  .slot-card { width: 100px; height: 155px; }
  .mini-card { width: 50px; height: 78px; font-size: 1.2rem; }
  .btn-primary { font-size: 0.88rem; padding: 0.6rem 1.2rem; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .header { padding: 1.6rem 0.8rem 0.9rem; }
  .nav-tab { padding: 0.4rem 0.6rem; }
  .nav-label { font-size: 0.74rem; }
  .module-card { padding: 1.4rem 1rem; }
  .module-title { font-size: 1.3rem; }
  .form-row { flex-direction: column; gap: 0.7rem; }
  .slot-card { width: 100px; height: 155px; }
  .mini-card { width: 50px; height: 78px; font-size: 1.2rem; }
  .btn-primary { font-size: 0.88rem; padding: 0.6rem 1.2rem; }
}

@media (max-width: 480px) {
  .site-title { font-size: 1.5rem; }
  .header { padding: 1.2rem 0.6rem 0.7rem; }
  .nav-tabs { gap: 0.15rem; padding: 0.35rem; }
  .nav-tab { padding: 0.35rem 0.45rem; gap: 0.15rem; }
  .nav-label { font-size: 0.7rem; }
  .nav-icon { font-size: 0.95rem; }
  .module-card { padding: 1.1rem 0.7rem; border-radius: var(--radius-md); }
  .module-title { font-size: 1.2rem; }
  .slot-card { width: 80px; height: 125px; }
  .slot-label { font-size: 0.7rem; }
  .mini-card { width: 42px; height: 64px; font-size: 1rem; }
  .stick-tube { width: 80px; height: 180px; }
  .btn-primary { font-size: 0.82rem; padding: 0.55rem 1rem; }
  .btn-secondary { font-size: 0.78rem; }
  .pillar-table th, .pillar-table td { padding: 0.35rem 0.2rem; font-size: 0.78rem; }
  .gan-char, .zhi-char { font-size: 1rem; }
  .reading-cards { flex-direction: column; align-items: center; }
  .reading-card { max-width: 100%; }
}
