/* ===== 基础变量 ===== */
:root {
  --bg-deep: #0a0612;
  --bg-mid: #12081f;
  --gold: #d4a853;
  --gold-light: #f0d78c;
  --gold-dim: #8b6914;
  --crimson: #c23a3a;
  --jade: #3d8b6e;
  --text: #e8e0d0;
  --text-dim: #9a9080;
  --glass: rgba(20, 12, 35, 0.65);
  --glass-border: rgba(212, 168, 83, 0.25);
  --glow-gold: 0 0 30px rgba(212, 168, 83, 0.4);
  --font-title: 'Ma Shan Zheng', cursive;
  --font-body: 'Noto Serif SC', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== 背景层 ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(120, 40, 180, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(194, 58, 58, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(212, 168, 83, 0.06) 0%, transparent 60%);
  animation: auroraShift 12s ease-in-out infinite alternate;
}

.ink-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

@keyframes auroraShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(20deg); }
}

/* ===== 布局 ===== */
.app {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeDown 1s ease;
}

.logo-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
  animation: ringPulse 3s ease-in-out infinite;
}

.logo-ring::before {
  content: '壬';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--gold);
}

@keyframes ringPulse {
  0%, 100% { box-shadow: var(--glow-gold); transform: scale(1); }
  50% { box-shadow: 0 0 50px rgba(212, 168, 83, 0.6); transform: scale(1.05); }
}

.title {
  font-family: var(--font-title);
  font-size: 3.5rem;
  color: var(--gold-light);
  letter-spacing: 0.3em;
  text-shadow: 0 0 40px rgba(212, 168, 83, 0.5);
}

.subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  letter-spacing: 0.5em;
  margin-top: 0.25rem;
}

/* ===== 步骤 ===== */
.step {
  display: none;
  animation: fadeIn 0.6s ease;
}

.step.active {
  display: block;
}

.step.exiting {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-16px); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-card {
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.step-card.wide { max-width: 100%; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.step-number {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: rgba(212, 168, 83, 0.15);
  line-height: 1;
}

.step-card h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.hint {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ===== 输入 ===== */
.input-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  resize: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 168, 83, 0.15);
}

textarea::placeholder { color: var(--text-dim); opacity: 0.6; }

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* ===== 按钮 ===== */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold), var(--gold-light));
  color: #1a0a00;
  font-weight: 600;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-primary:hover:not(:disabled)::before { transform: translateX(100%); }
.btn-primary:hover:not(:disabled) { box-shadow: var(--glow-gold); transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary svg { width: 18px; height: 18px; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  width: 100%;
  margin-top: 0.75rem;
}

.btn-secondary:hover { background: rgba(212, 168, 83, 0.1); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-ghost:hover { color: var(--gold); }

.hidden { display: none !important; }

/* ===== 模式选择 ===== */
.saved-question {
  background: rgba(212, 168, 83, 0.08);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.saved-question em {
  color: var(--gold-light);
  font-style: normal;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .mode-grid { grid-template-columns: 1fr; }
}

.mode-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  color: var(--text);
  font-family: var(--font-body);
}

.mode-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(212, 168, 83, 0.2);
}

.mode-card h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin: 0.75rem 0 0.35rem;
}

.mode-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.mode-tags {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.mode-tags span {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 20px;
  color: var(--gold);
}

/* 模式图标 */
.mode-icon {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-stack {
  position: relative;
  width: 50px;
  height: 70px;
}

.card-stack span {
  position: absolute;
  width: 40px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: linear-gradient(145deg, #1a0a2e, #2d1b4e);
}

.card-stack span:nth-child(1) { transform: rotate(-12deg) translateX(-8px); }
.card-stack span:nth-child(2) { transform: rotate(0deg); z-index: 1; }
.card-stack span:nth-child(3) { transform: rotate(12deg) translateX(8px); }

.mode-card:hover .card-stack span {
  animation: cardShuffle 0.6s ease;
}

@keyframes cardShuffle {
  0%, 100% { transform: rotate(0); }
  33% { transform: rotate(-20deg) translateY(-5px); }
  66% { transform: rotate(20deg) translateY(-5px); }
}

.time-wheel {
  width: 56px;
  height: 56px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
  animation: wheelSpin 8s linear infinite;
}

.time-wheel::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(212, 168, 83, 0.3);
  border-radius: 50%;
}

.tw-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  color: var(--gold);
  animation: wheelSpin 8s linear infinite reverse;
}

@keyframes wheelSpin {
  to { transform: rotate(360deg); }
}

/* ===== 抽卡 ===== */
.cards-deck {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
  perspective: 1000px;
}

.divine-card {
  width: 120px;
  height: 180px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.divine-card.flipped { transform: rotateY(180deg); }
.divine-card.disabled { pointer-events: none; }

.divine-card .card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid;
}

.divine-card .card-back {
  background: linear-gradient(145deg, #1a0828 0%, #2a1040 50%, #1a0828 100%);
  border-color: var(--gold);
  overflow: hidden;
}

.divine-card .card-back::before {
  content: '☯';
  font-size: 2.5rem;
  opacity: 0.6;
  animation: yinYangSpin 6s linear infinite;
}

.divine-card .card-back::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 8px;
}

.divine-card .card-back .card-role {
  position: absolute;
  bottom: 12px;
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.2em;
}

@keyframes yinYangSpin {
  to { transform: rotate(360deg); }
}

.divine-card .card-front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
  padding: 0.75rem;
  text-align: center;
}

.divine-card .card-front .god-name {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.divine-card .card-front .god-alias {
  font-size: 0.7rem;
  opacity: 0.7;
}

.divine-card .card-front .god-luck {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
}

.divine-card.reveal-burst {
  animation: cardBurst 0.6s ease;
}

@keyframes cardBurst {
  0% { transform: rotateY(180deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.1); box-shadow: 0 0 40px var(--burst-color, var(--gold)); }
  100% { transform: rotateY(180deg) scale(1); }
}

.divine-card:not(.flipped):hover {
  transform: translateY(-8px) rotateX(5deg);
}

.card-progress {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* ===== 时间起卦 ===== */
.time-display {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.clock-ring {
  width: 100px;
  height: 100px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
  box-shadow: var(--glow-gold);
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  background: var(--gold);
  border-radius: 2px;
}

.clock-hand.hour {
  width: 3px;
  height: 28px;
  margin-left: -1.5px;
}

.clock-hand.minute {
  width: 2px;
  height: 38px;
  margin-left: -1px;
  background: var(--gold-light);
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.time-now {
  font-size: 1.25rem;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}

.time-lunar, .time-shichen {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* 掌诀图 */
.palm-diagram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 360px;
  margin: 1.5rem auto;
  position: relative;
}

.palm-center {
  display: none;
}

.palm-god {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.5s ease;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.palm-god .pg-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.palm-god .pg-alias {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.palm-god.active {
  border-color: var(--god-color, var(--gold));
  box-shadow: 0 0 25px color-mix(in srgb, var(--god-color, var(--gold)) 40%, transparent);
  transform: scale(1.08);
  z-index: 2;
}

.palm-god.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--god-color, var(--gold)) 15%, transparent);
  animation: palmGlow 1.5s ease infinite alternate;
}

.palm-god.trail {
  border-color: var(--god-color, var(--gold));
  opacity: 0.7;
}

@keyframes palmGlow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.palm-god.step-label {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  background: var(--gold);
  color: #1a0a00;
  border-radius: 4px;
  font-weight: 600;
}

/* ===== 结果页 ===== */
.result-card {
  position: relative;
}

.result-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  transition: background 1s;
}

.result-visual {
  margin: 1.5rem 0;
  text-align: center;
}

.result-god-showcase {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  border-radius: 20px;
  border: 2px solid;
  animation: resultReveal 1s ease;
  position: relative;
}

@keyframes resultReveal {
  from { opacity: 0; transform: scale(0.8) rotate(-5deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.result-god-showcase .rg-name {
  font-family: var(--font-title);
  font-size: 4rem;
  line-height: 1;
}

.result-god-showcase .rg-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.result-cards-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.result-mini-card {
  width: 100px;
  padding: 1rem 0.75rem;
  border-radius: 12px;
  border: 1px solid;
  text-align: center;
  animation: resultReveal 0.8s ease backwards;
}

.result-mini-card:nth-child(2) { animation-delay: 0.15s; }
.result-mini-card:nth-child(3) { animation-delay: 0.3s; }

.result-mini-card .rm-role {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.result-mini-card .rm-name {
  font-family: var(--font-title);
  font-size: 1.4rem;
}

.result-analysis {
  margin-top: 1.5rem;
  line-height: 1.8;
  font-size: 0.95rem;
  animation: fadeIn 1s ease 0.3s backwards;
}

.analysis-intro { margin-bottom: 1rem; }

.calc-steps {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  border-left: 3px solid var(--gold);
}

.three-cards-analysis {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.card-analysis-item {
  padding: 1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--god-color, var(--gold));
}

.card-analysis-item h4 {
  color: var(--gold-light);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.god-detail {
  margin: 1rem 0;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid color-mix(in srgb, var(--god-color) 30%, transparent);
}

.god-detail h4 {
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.god-alias {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: normal;
}

.god-verse {
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.god-details {
  list-style: none;
  margin: 0.75rem 0;
}

.god-details li {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.god-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.luck-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.luck-大吉, .luck-吉 { background: rgba(61, 139, 110, 0.3); color: #6ee7b7; }
.luck-迟滞 { background: rgba(96, 165, 250, 0.2); color: #93c5fd; }
.luck-凶 { background: rgba(194, 58, 58, 0.3); color: #fca5a5; }

.overall-verdict, .contextual-advice {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(212, 168, 83, 0.06);
  border: 1px solid rgba(212, 168, 83, 0.15);
}

.overall-verdict h4, .contextual-advice h4 {
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.result-actions .btn-primary,
.result-actions .btn-secondary {
  flex: 1;
  min-width: 140px;
  width: auto;
  margin-top: 0;
}

/* ===== 起卦动画 ===== */
.divinating .palm-god {
  animation: palmPulse 0.4s ease;
}

@keyframes palmPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

.site-url {
  margin-top: 0.35rem;
  color: var(--gold);
  font-size: 0.7rem;
  word-break: break-all;
}

/* ===== 白话解卦 ===== */
.analysis-human-first { margin-bottom: 1rem; }

.comprehensive-box {
  padding: 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(212, 168, 83, 0.2);
  background: rgba(0, 0, 0, 0.25);
}

.comprehensive-box.verdict-good { border-color: rgba(61, 139, 110, 0.4); background: rgba(61, 139, 110, 0.08); }
.comprehensive-box.verdict-mid { border-color: rgba(212, 168, 83, 0.3); }
.comprehensive-box.verdict-warn { border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.06); }
.comprehensive-box.verdict-bad { border-color: rgba(194, 58, 58, 0.3); background: rgba(194, 58, 58, 0.06); }

.verdict-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.verdict-emoji { font-size: 2rem; line-height: 1; }

.verdict-header h4 {
  color: var(--gold-light);
  font-size: 1.1rem;
}

.verdict-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.timeline-plain p, .plain-summary p, .three-plain-cards p {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.75;
}

.trend-note {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(212, 168, 83, 0.2);
  color: var(--gold);
  font-size: 0.88rem !important;
}

.plain-summary, .three-plain-cards, .action-checklist {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.plain-summary h4, .three-plain-cards h4, .action-checklist h4 {
  color: var(--gold);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.plain-lead {
  font-size: 1rem !important;
  color: var(--gold-light);
}

.plain-action {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(212, 168, 83, 0.08);
  border-radius: 8px;
}

.plain-card-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plain-card-item:last-child { border-bottom: none; }

.plain-card-item h5 {
  color: var(--gold-light);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.action-checklist ul {
  list-style: none;
  padding: 0;
}

.action-checklist li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.6;
}

.action-checklist li::before {
  content: '·';
  position: absolute;
  left: 0.4rem;
  color: var(--gold);
  font-weight: bold;
}

/* 增强解卦样式 */
.analysis-opening {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(212, 168, 83, 0.06);
  border-left: 3px solid var(--gold);
  line-height: 1.75;
  font-size: 0.92rem;
}

.score-bar-wrap {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin: 0.75rem 0 1rem;
  overflow: hidden;
}

.score-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.score-num {
  position: absolute;
  right: 0;
  top: -1.2rem;
  font-size: 0.75rem;
  color: var(--gold);
}

.final-verdict {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.timeline-plain h5, .story-box h5 {
  color: var(--gold-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.5rem 0.75rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  align-items: center;
}

.timeline-item.highlight {
  background: rgba(212, 168, 83, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  margin-top: 0.25rem;
}

.tl-label { color: var(--text-dim); white-space: nowrap; }
.tl-god { font-family: var(--font-title); font-size: 1rem; }
.tl-desc { color: var(--text-dim); font-size: 0.82rem; }

.story-box {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.story-flow {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--gold);
}

.typed-advice {
  padding: 0.6rem 0.75rem;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  margin: 0.5rem 0;
}

.timing-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(212, 168, 83, 0.15);
}

.timing-section h4 { color: var(--gold); font-size: 0.9rem; margin-bottom: 0.4rem; }
.timing-section ul { list-style: none; padding: 0; }
.timing-section li { font-size: 0.85rem; padding: 0.25rem 0; line-height: 1.6; }

.risk-opp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 520px) {
  .risk-opp-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.2rem; }
}

.risk-box, .opp-box {
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.65;
}

.risk-box { background: rgba(194, 58, 58, 0.08); border: 1px solid rgba(194, 58, 58, 0.2); }
.opp-box { background: rgba(61, 139, 110, 0.08); border: 1px solid rgba(61, 139, 110, 0.2); }
.risk-box h5 { color: #fca5a5; margin-bottom: 0.35rem; font-size: 0.85rem; }
.opp-box h5 { color: #6ee7b7; margin-bottom: 0.35rem; font-size: 0.85rem; }
.avoid-tip { margin-top: 0.4rem; font-size: 0.8rem; color: var(--text-dim); }

.card-mood {
  font-size: 0.8rem !important;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.35rem;
}

.plain-card-item {
  border-left: 3px solid var(--god-color, var(--gold));
  padding-left: 0.75rem !important;
}

.closing-note {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(212, 168, 83, 0.1);
  line-height: 1.7;
}

.classic-details {
  margin-top: 1.5rem;
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.classic-details summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  user-select: none;
}

.classic-details summary:hover { color: var(--gold); }

.classic-content {
  padding: 1rem;
  border-top: 1px solid rgba(212, 168, 83, 0.1);
}

/* ===== 下载区 ===== */
.download-section {
  max-width: 720px;
  margin: 0 auto 1rem;
  padding: 1.5rem;
  border-radius: 16px;
  position: relative;
  z-index: 1;
}

.download-section h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 0.35rem;
}

.download-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.download-btns {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dl-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
  width: 100%;
  text-align: left;
}

.dl-btn:hover, .dl-btn.highlight {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.15);
  transform: translateY(-2px);
}

.dl-btn.highlight {
  background: rgba(212, 168, 83, 0.1);
}

.dl-icon { font-size: 1.6rem; line-height: 1; }

.dl-text { display: flex; flex-direction: column; gap: 0.1rem; }
.dl-text strong { font-size: 0.95rem; color: var(--gold-light); }
.dl-text small { font-size: 0.75rem; color: var(--text-dim); }

.dl-android:hover { border-color: #3ddc84; }
.dl-ios:hover { border-color: #007aff; }
.dl-pwa { border-style: dashed; }

/* iOS 弹窗 */
.ios-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.ios-modal.show { display: flex; }

.ios-modal-content {
  max-width: 400px;
  width: 100%;
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 16px;
  position: relative;
  animation: fadeIn 0.4s ease;
}

.ios-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.ios-modal-content h3 {
  font-family: var(--font-title);
  color: var(--gold-light);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.ios-steps {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 0.9rem;
}

.ios-steps li { margin-bottom: 0.35rem; }

.ios-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 12, 35, 0.95);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ===== 打字机效果 ===== */
.typewriter {
  overflow: hidden;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .title { font-size: 2.5rem; }
  .step-card { padding: 1.75rem 1.25rem; }
  .divine-card { width: 100px; height: 150px; }
  .result-god-showcase .rg-name { font-size: 3rem; }
}
