/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg-dark: #0D001A;
  --bg-mid: #1A0533;
  --bg-light: #2D1055;
  --purple: #7B5EA7;
  --purple-light: #C4A8FF;
  --gold: #FFD700;
  --gold-light: #FFE87C;
  --white: #FFFFFF;
  --gray: #8E8E93;
  --card-bg: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);
}
body {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 50%, var(--bg-light) 100%);
  min-height: 100vh;
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  overflow-x: hidden;
}

/* ===== 星空背景 ===== */
.stars-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.star {
  position: absolute; width: 2px; height: 2px;
  background: white; border-radius: 50%;
  animation: twinkle 3s infinite;
}
@keyframes twinkle {
  0%,100% { opacity: 0.3; } 50% { opacity: 1; }
}

/* ===== 导航 ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: rgba(13, 0, 26, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 18px; font-weight: 600; }
.btn-outline {
  padding: 6px 16px; border: 1px solid var(--purple-light);
  border-radius: 20px; background: transparent;
  color: var(--purple-light); cursor: pointer; font-size: 14px;
}
.btn-outline:hover { background: var(--card-bg); }

/* ===== 页面 ===== */
.page { display: none; min-height: 100vh; padding-top: 60px; position: relative; z-index: 1; }
.page.active { display: block; }
.container { max-width: 540px; margin: 0 auto; padding: 20px 16px 80px; }

/* ===== Hero区 ===== */
.hero {
  text-align: center; padding: 60px 20px 40px;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-block; padding: 4px 16px;
  border: 1px solid var(--gold); border-radius: 20px;
  color: var(--gold); font-size: 13px; margin-bottom: 20px;
}
.hero-title {
  font-size: 32px; font-weight: 700; line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(196, 168, 255, 0.5);
}
.hero-sub { color: var(--purple-light); font-size: 16px; margin-bottom: 30px; }
.hero-stats {
  margin-top: 20px; display: flex; gap: 20px;
  justify-content: center; color: var(--gray); font-size: 14px;
}
.hero-stats strong { color: var(--gold); }

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  border: none; border-radius: 28px; color: white;
  padding: 14px 32px; font-size: 16px; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #F59E0B);
  border: none; border-radius: 28px; color: #1A0533;
  padding: 14px 32px; font-size: 16px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 20px rgba(255,215,0,0.4);
  transition: transform 0.2s;
}
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent; border: none; color: var(--gray);
  padding: 12px 20px; font-size: 14px; cursor: pointer;
  display: block; width: 100%; text-align: center;
  margin-top: 12px;
}
.btn-large { width: 100%; max-width: 280px; }
.btn-full { width: 100%; }

/* ===== 特性卡片 ===== */
.features {
  display: flex; gap: 12px; padding: 0 16px 40px;
  overflow-x: auto; justify-content: center; flex-wrap: wrap;
}
.feature-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 16px; text-align: center;
  min-width: 140px; flex: 1;
}
.feature-icon { font-size: 28px; margin-bottom: 8px; }
.feature-card h3 { font-size: 14px; margin-bottom: 6px; }
.feature-card p { font-size: 12px; color: var(--gray); line-height: 1.5; }

/* ===== 步骤 ===== */
.steps { padding: 0 20px 40px; text-align: center; }
.section-title { font-size: 20px; margin-bottom: 24px; }
.steps-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.step { text-align: center; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  font-weight: 700; margin-bottom: 6px; font-size: 16px;
}
.step p { font-size: 12px; color: var(--gray); }
.step-arrow { color: var(--purple); font-size: 20px; }

/* ===== CTA ===== */
.cta-section { text-align: center; padding: 40px 20px 80px; }
.cta-section h2 { font-size: 22px; margin-bottom: 24px; }

/* ===== 输入页 ===== */
.progress-bar { display: flex; align-items: center; margin-bottom: 24px; }
.progress-step { font-size: 13px; color: var(--gray); flex: 1; text-align: center; }
.progress-step.active { color: var(--purple-light); font-weight: 600; }
.progress-line { height: 1px; background: var(--border); flex: 1; }
.page-title { font-size: 24px; margin-bottom: 8px; }
.page-sub { color: var(--gray); font-size: 14px; margin-bottom: 24px; }
.input-card { position: relative; margin-bottom: 20px; }
.dream-input {
  width: 100%; background: rgba(255,255,255,0.07);
  border: 1px solid var(--border); border-radius: 16px;
  color: white; font-size: 15px; padding: 16px;
  resize: none; line-height: 1.6;
  transition: border-color 0.2s;
  font-family: inherit;
}
.dream-input:focus { outline: none; border-color: var(--purple); }
.dream-input::placeholder { color: rgba(255,255,255,0.3); }
.char-count { text-align: right; font-size: 12px; color: var(--gray); margin-top: 6px; }
.label { font-size: 14px; color: var(--gray); margin-bottom: 12px; }
.tag-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.tag {
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 20px;
  font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.tag.active { border-color: var(--purple); background: rgba(123,94,167,0.3); color: var(--purple-light); }

/* ===== 结果页 ===== */
.result-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px; margin-bottom: 20px;
  line-height: 1.8;
}
.result-free { color: rgba(255,255,255,0.9); white-space: pre-wrap; }
.pay-wall { position: relative; margin-top: 16px; }
.blur-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 40%;
  background: linear-gradient(to bottom, transparent, var(--bg-mid));
  z-index: 1;
}
.pay-prompt {
  background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.3);
  border-radius: 16px; padding: 20px; text-align: center; position: relative; z-index: 2;
}
.pay-prompt p { margin-bottom: 8px; font-weight: 600; }
.pay-desc { font-size: 13px; color: var(--gray); margin-bottom: 16px; }
.share-area { text-align: center; margin-bottom: 24px; }

/* ===== 导流卡片 ===== */
.referral-cards { margin-bottom: 24px; }
.referral-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  transition: background 0.2s;
}
.referral-card:hover { background: rgba(255,255,255,0.1); }
.referral-icon { font-size: 28px; flex-shrink: 0; }
.referral-card strong { font-size: 15px; display: block; margin-bottom: 2px; }
.referral-card p { font-size: 12px; color: var(--gray); }
.referral-arrow { margin-left: auto; color: var(--gray); flex-shrink: 0; }
.bottom-btns { display: flex; gap: 12px; flex-direction: column; }
.full-result-area { margin-bottom: 20px; }

/* ===== 弹窗 ===== */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-content {
  position: relative; z-index: 1; background: var(--bg-mid);
  border: 1px solid var(--border); border-radius: 24px 24px 0 0;
  padding: 28px 24px 40px; width: 100%; max-width: 540px;
  text-align: center;
}
.modal-content h3 { font-size: 20px; margin-bottom: 16px; }
.price-display { font-size: 48px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.price { font-size: 60px; }
.price-desc { color: var(--gray); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 14px; }
.input {
  width: 100%; background: rgba(255,255,255,0.07); border: 1px solid var(--border);
  border-radius: 12px; color: white; font-size: 16px; padding: 14px 16px;
}
.input:focus { outline: none; border-color: var(--purple); }
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row .input { flex: 1; }
.btn-send-code {
  padding: 0 16px; background: var(--purple); border: none; border-radius: 12px;
  color: white; font-size: 14px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}

/* ===== 加载状态 ===== */
.loading { text-align: center; padding: 40px; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--purple); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 移动端适配 ===== */
@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .features { padding: 0 12px 30px; }
}
