/* ============================================================
   WitchyLili · Quiz 玄学测试站 · 全局样式
   配色方案 A「月光薰衣草」：奶油白底 + 薰衣草紫 + 香槟金
   移动端优先，浅色治愈系
   ============================================================ */

:root {
  /* 方案 A 色板 */
  --bg: #FAF7FC;            /* 奶白微紫 页面底 */
  --bg-soft: #F1EAF7;       /* 浅紫 卡片区底/区块底 */
  --card: #FFFFFF;          /* 纯白 卡片 */
  --primary: #C3B1E1;       /* 薰衣草紫 主色 */
  --primary-deep: #8E7CC3;  /* 中紫 按钮/强调 */
  --primary-dark: #6F5BB5;  /* 深紫 按钮 hover */
  --gold: #D4AF37;          /* 香槟金 点缀 */
  --gold-soft: #F0E6C8;     /* 淡金 背景点缀 */
  --text: #3A2E54;          /* 深紫灰 正文 */
  --text-soft: #6B5E86;     /* 中紫灰 次级文字 */
  --text-faint: #9A8FB8;    /* 浅紫灰 弱文字 */
  --line: #E5DDF0;          /* 边框线 */
  --success: #7FB685;       /* 解锁成功绿 */
  --radius: 18px;           /* 圆角 */
  --shadow: 0 6px 24px rgba(138, 108, 195, 0.12);
  --font: "Georgia", "Times New Roman", serif;          /* 标题字体 */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* 顶部星尘装饰（极简，浅色） */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-soft), var(--primary), var(--gold-soft));
  z-index: 50;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.container-wide { max-width: 1100px; }

/* ---------- 全站梦幻星云底图 + 星星装饰层 + 透明蒙版 ---------- */
.bg-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background:
    url("../img/bg-stars.png") center/cover no-repeat fixed,
    url("../img/bg-mystic.jpg") center/cover no-repeat fixed;
  pointer-events: none;
}
.bg-layer::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 38% at 18% 8%, rgba(212, 175, 55, 0.14), transparent 70%),
    radial-gradient(ellipse 55% 35% at 85% 22%, rgba(195, 177, 225, 0.30), transparent 70%),
    radial-gradient(ellipse 70% 45% at 50% 115%, rgba(142, 124, 195, 0.20), transparent 75%),
    rgba(250, 247, 252, 0.30);
}

/* ---------- 页头品牌 ---------- */
.brand {
  text-align: center;
  padding: 30px 0 8px;
}
.brand .brand-logo {
  width: 86px;
  height: 86px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 4px 14px rgba(138, 108, 195, 0.35));
}
.brand h1 {
  font-family: var(--font);
  font-size: 44px;
  letter-spacing: 3px;
  color: var(--primary-dark);
  font-weight: normal;
  text-shadow: 0 2px 14px rgba(138, 108, 195, 0.25);
}
.brand p {
  color: var(--text-soft);
  font-size: 18px;
  margin-top: 6px;
  letter-spacing: 0.4px;
}
@media (max-width: 640px) {
  .brand .brand-logo { width: 76px; height: 76px; }
  .brand h1 { font-size: 36px; letter-spacing: 2px; }
  .brand p { font-size: 16px; }
}

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 18px;
}

/* ---------- 首页测试列表（卡片网格：手机2列 → 平板3列 → 桌面4列） ---------- */
.test-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-top: 22px;
}
@media (min-width: 640px) {
  .test-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (min-width: 1000px) {
  .test-grid { grid-template-columns: repeat(4, 1fr); }
}
/* 着陆页 related 区固定 3 卡（桌面 3 列不因首页 4 列变化） */
.landing-related .test-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .landing-related .test-grid { grid-template-columns: repeat(2, 1fr); }
}

.test-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.test-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(138,108,195,0.2); }
.test-card .t-thumb {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  display: block; background: var(--bg-soft);
}
.test-card .t-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.test-card .t-name {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.22;
  color: var(--primary-dark);
}
@media (min-width: 1000px) {
  .test-card .t-name { font-size: 17px; }
}
@media (max-width: 420px) {
  .test-card .t-name { font-size: 17px; }
}
.t-badge {
  font-size: 10px; font-family: var(--font-body);
  background: linear-gradient(90deg, var(--primary-deep), var(--gold));
  color: #fff; padding: 2px 8px; border-radius: 999px; font-weight: 600;
  letter-spacing: 0.4px;
  position: absolute; top: 10px; right: 10px; z-index: 2;
  box-shadow: 0 2px 8px rgba(58,46,84,0.25);
}
.test-card .t-meta { display: inline-flex; gap: 8px; align-items: baseline; }
.t-price { font-size: 16px; color: var(--primary-deep); font-weight: 700; font-family: var(--font-body); }
.t-price::before { content: "✦ "; }
.t-price-sub { font-size: 12px; color: var(--text-soft); font-family: var(--font-body); }

/* 做题页付费透明提示 */
.q-notice {
  background: linear-gradient(90deg, rgba(196,177,225,.18), rgba(212,175,55,.14));
  border: 1.5px dashed var(--primary);
  border-radius: 14px; padding: 12px 16px; margin: 6px 0 18px;
  font-size: 14px; line-height: 1.6; color: var(--text); text-align: center;
}
.q-notice b { color: var(--primary-dark); }
.test-card .t-desc { font-size: 13.5px; color: var(--text-soft); margin-top: 3px; }
.test-card .t-arrow { margin-left: auto; color: var(--gold); font-size: 20px; }

/* ---------- 测试页 ---------- */
.quiz-header { text-align: center; padding: 14px 0 20px; }
.quiz-header .q-icon { font-size: 44px; }
.quiz-header h1 { font-family: var(--font); font-size: 26px; color: var(--primary-dark); font-weight: normal; }
.quiz-header .sub { color: var(--text-soft); font-size: 14px; margin-top: 6px; }

/* 进度条 */
.progress-wrap { background: var(--bg-soft); border-radius: 999px; height: 10px; margin: 6px 0 22px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--primary-deep)); border-radius: 999px; transition: width .3s ease; }

/* 题目 */
.q-block .q-text { font-family: var(--font); font-size: 20px; color: var(--text); margin-bottom: 20px; line-height: 1.5; }
.q-options { display: flex; flex-direction: column; gap: 12px; }
.q-option {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 15.5px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  text-align: left;
}
.q-option:hover { border-color: var(--primary-deep); background: var(--bg-soft); }
.q-option.selected { border-color: var(--primary-deep); background: var(--bg-soft); }
.q-option .letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-soft); color: var(--primary-dark);
  font-size: 13px; margin-right: 10px; font-weight: 600;
}
.q-option.selected .letter { background: var(--primary-deep); color: #fff; }

/* 导航按钮 */
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.btn {
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 15.5px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s;
}
.btn-primary { background: var(--primary-deep); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--line); color: var(--text-faint); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary-deep); color: var(--primary-dark); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { filter: brightness(0.95); }
.btn-block { width: 100%; }

/* ---------- 结果页 ---------- */
.result-hero { text-align: center; padding: 20px 0 6px; }
.result-hero .r-icon { font-size: 56px; }
.result-hero h1 { font-family: var(--font); font-size: 30px; color: var(--primary-dark); font-weight: normal; }
.result-hero .tagline { color: var(--text-soft); font-size: 15px; margin-top: 8px; font-style: italic; }

.r-section-title {
  font-family: var(--font);
  font-size: 19px;
  color: var(--primary-dark);
  margin: 26px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.r-section-title::before, .r-section-title::after {
  content: "✦"; color: var(--gold); font-size: 12px;
}

.r-text { font-size: 15.5px; color: var(--text); }
.r-text p { margin-bottom: 14px; }

/* 钩子预告文案（免费内容结尾的"撩人"过渡） */
.r-hook {
  margin: 18px 0 6px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: var(--bg-soft);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  font-style: italic;
  color: var(--primary-dark);
  line-height: 1.7;
}

/* 免费预览区（灰化锁定感） */
.preview-blur { position: relative; }
.preview-blur .locked-body { filter: blur(3px); opacity: .55; user-select: none; }
.unlock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 16px;
}
.unlock-overlay .lock-icon { font-size: 34px; }
.unlock-overlay .unlock-note { font-size: 14px; color: var(--text-soft); max-width: 320px; }

/* 解锁按钮区 */
.unlock-box {
  background: linear-gradient(135deg, var(--bg-soft), var(--gold-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin: 18px 0;
}
.unlock-box .price { font-family: var(--font); font-size: 26px; color: var(--primary-dark); }
.unlock-box .price small { font-size: 14px; color: var(--text-soft); }
.unlock-box .perks { list-style: none; margin: 14px 0; font-size: 14px; color: var(--text-soft); }
.unlock-box .perks li { padding: 3px 0; }

/* 付费后完整内容 */
.paid-body { display: none; }
.paid-body.show { display: block; animation: fadeUp .5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.paid-done { display: none; text-align: center; background: var(--bg-soft); border-radius: 14px; padding: 14px; margin-bottom: 18px; color: var(--success); font-size: 15px; }

/* 交叉推荐 */
.related-title { font-family: var(--font); font-size: 20px; color: var(--primary-dark); text-align: center; margin: 34px 0 14px; }
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow);
}
.related-item:hover { border-color: var(--primary-deep); }
.related-item .ri { font-size: 26px; flex-shrink: 0; }
.related-item .rn { display: block; font-family: var(--font); font-size: 16.5px; font-weight: 700; color: var(--primary-dark); line-height: 1.3; }
.related-item .rd { display: block; font-size: 13px; color: var(--text-soft); margin-top: 3px; line-height: 1.45; }
.related-item .ra { margin-left: auto; color: var(--gold); font-size: 20px; flex-shrink: 0; }

/* 首页底部说明 */
.footer-note {
  text-align: center; font-size: 12.5px; color: var(--text-faint);
  padding: 30px 0 10px; line-height: 1.8;
}
.footer-note a { color: var(--text-faint); }
.disclaimer {
  margin: 10px auto 0; max-width: 520px;
  font-size: 11.5px; line-height: 1.7; color: var(--text-faint);
  border-top: 1px solid var(--line); padding-top: 12px;
}

/* 解锁状态提示条 */
.status-banner {
  display: none;
  background: var(--success); color: #fff;
  border-radius: 12px; padding: 12px 16px; font-size: 14.5px;
  margin-bottom: 16px; text-align: center;
}
.status-banner.show { display: block; }

/* 错误提示 */
.error-box { background: #FDE8E8; color: #B34040; border-radius: 12px; padding: 12px 16px; font-size: 14px; margin: 12px 0; }
.error-box:empty { display: none; }

/* 加载中 */
.loading { text-align: center; padding: 60px 0; color: var(--text-soft); }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border: 3px solid var(--line); border-top-color: var(--primary-deep);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .brand h1 { font-size: 27px; }
  .quiz-header h1 { font-size: 22px; }
  .q-block .q-text { font-size: 18px; }
}

/* ============================================================
   着陆页（SEO/GEO 静态页）样式
   ============================================================ */
.back-home { font-size: 13.5px; margin: 6px 0 4px; }
.back-home a { color: var(--primary-deep); text-decoration: none; }
.back-home a:hover { text-decoration: underline; }

.landing-hero { text-align: center; padding: 28px 0 12px; }
.landing-icon { font-size: 56px; margin-bottom: 6px; }
.landing-h1 { font-size: 30px; margin: 0 0 8px; color: var(--text-main); }
.landing-sub { font-size: 16.5px; color: var(--text-soft); margin: 0 0 14px; }
.landing-intro { font-size: 15.5px; line-height: 1.65; color: var(--text-main); max-width: 560px; margin: 0 auto 18px; }
.landing-cta { display: block; max-width: 420px; margin: 0 auto 10px; font-size: 17px; padding: 15px; }
.landing-price { font-size: 13px; color: var(--text-soft); margin: 0 0 8px; }

.landing-howto, .landing-preview, .landing-faq, .landing-related { margin-top: 18px; }
.landing-steps { padding-left: 20px; margin: 8px 0 0; line-height: 1.6; font-size: 15px; color: var(--text-main); }
.landing-steps li { margin-bottom: 8px; }

.landing-preview-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.landing-preview-item:last-of-type { border-bottom: none; }
.landing-preview-name { font-weight: 700; color: var(--primary-deep); margin: 0 0 6px; font-size: 15.5px; }
.landing-preview-text { margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: var(--text-main); }
.landing-preview-lock { margin: 0; font-size: 12.5px; color: var(--gold); font-weight: 600; }
.landing-preview-note { font-size: 13.5px; color: var(--text-soft); margin: 10px 0 0; font-style: italic; }

.landing-faq-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.landing-faq-item:last-child { border-bottom: none; }
.landing-faq-item h3 { font-size: 15.5px; margin: 0 0 6px; color: var(--text-main); }
.landing-faq-item p { font-size: 14.5px; line-height: 1.6; margin: 0; color: var(--text-main); }

@media (max-width: 480px) {
  .landing-h1 { font-size: 25px; }
  .landing-intro { font-size: 15px; }
}

/* 着陆页：全部结果列表（GEO 内容加深） */
.landing-results { margin-top: 18px; }
.landing-results-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.landing-result-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 14px; flex: 1 1 200px; max-width: 100%;
}
.landing-result-icon { font-size: 20px; }
.landing-result-name { font-weight: 700; color: var(--text-main); font-size: 14.5px; white-space: nowrap; }
.landing-result-tag { font-size: 12.5px; color: var(--text-soft); line-height: 1.4; }
