/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #12081f;
  color: #efe6ff;
  overflow-x: hidden;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100%;
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============ 首页 ============ */
#screen-home {
  background: radial-gradient(ellipse at 50% 0%, #2b1445 0%, #12081f 60%, #0a0512 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 14vh 24px 40px;
}
.stars { position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #ffe9a8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 20%, #cbb2ff 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 60%, #ffe9a8 50%, transparent 51%),
    radial-gradient(2px 2px at 40% 70%, #cbb2ff 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 45%, #ffe9a8 50%, transparent 51%);
  animation: twinkle 3s infinite alternate;
}
@keyframes twinkle { from { opacity: .4; } to { opacity: 1; } }

.home-inner { position: relative; z-index: 1; }
.tag {
  display: inline-block; font-size: 12px; letter-spacing: 2px;
  color: #d8b4ff; border: 1px solid rgba(216,180,255,.35);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 26px;
}
.big-title { font-size: 34px; line-height: 1.35; font-weight: 800; text-shadow: 0 4px 24px rgba(160,80,255,.45); }
.big-title .hl { color: #ff5f6d; text-shadow: 0 0 18px rgba(255,95,109,.65); }
.sub-title { font-size: 16px; color: #b9a3e0; margin-top: 10px; letter-spacing: 6px; }
.divider { color: #6b4fa0; margin: 24px 0; letter-spacing: 2px; }
.hook-line { font-size: 19px; color: #ffd98a; font-weight: 600; margin-bottom: 18px; }
.hook-list { list-style: none; display: inline-block; text-align: left; margin-bottom: 34px; }
.hook-list li { font-size: 14px; color: #cfc0ec; line-height: 2; }

.btn-huge {
  display: block; width: 100%; padding: 20px 0;
  font-size: 21px; font-weight: 800; letter-spacing: 4px;
  color: #fff; border: none; border-radius: 50px; cursor: pointer;
  background: linear-gradient(135deg, #ff2d55, #d90429);
  box-shadow: 0 10px 34px rgba(255,45,85,.55), inset 0 1px 0 rgba(255,255,255,.25);
  animation: breathe 1.8s infinite ease-in-out;
}
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.foot-note { margin-top: 18px; font-size: 12px; color: #7a68a3; }

/* ============ 答题页 ============ */
.quiz-header { position: sticky; top: 0; padding: 16px 20px 14px; background: rgba(18,8,31,.92); backdrop-filter: blur(8px); z-index: 5; }
#quiz-progress-text { font-size: 13px; color: #b9a3e0; }
.progress-track { margin-top: 10px; height: 8px; background: rgba(255,255,255,.09); border-radius: 999px; overflow: hidden; }
#progress-bar { height: 100%; width: 10%; border-radius: 999px; background: linear-gradient(90deg, #ff2d55, #b23aff); transition: width .3s ease; }

.quiz-body { padding: 36px 24px 60px; }
.q-label { font-size: 13px; color: #ffd98a; letter-spacing: 3px; margin-bottom: 14px; }
.question { font-size: 22px; font-weight: 700; line-height: 1.5; margin-bottom: 30px; min-height: 66px; }
#options { display: flex; flex-direction: column; gap: 14px; }
.opt {
  padding: 17px 18px; border-radius: 16px; cursor: pointer;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 16px; line-height: 1.5; color: #efe6ff;
  transition: transform .12s ease, background .2s, border-color .2s;
}
.opt:active { transform: scale(.97); background: rgba(178,58,255,.25); border-color: #b23aff; }
.opt .opt-letter { color: #ff7b8f; font-weight: 800; margin-right: 8px; }

/* ============ 结果页 ============ */
.result-inner { padding: 40px 20px 30px; text-align: center;
  background: radial-gradient(ellipse at 50% -10%, #33124d 0%, #12081f 55%); }
.result-label { font-size: 13px; letter-spacing: 3px; color: #d8b4ff; }
.score-circle {
  width: 170px; height: 170px; margin: 22px auto 18px;
  border-radius: 50%; display: flex; align-items: baseline; justify-content: center;
  background: conic-gradient(#ff2d55 0 100%, rgba(255,255,255,.08) 0);
  box-shadow: 0 0 60px rgba(255,45,85,.35), inset 0 0 0 10px #12081f;
  padding: 10px;
}
.score-circle > span { display: block; }
#score-number { font-size: 76px; font-weight: 900; color: #fff; line-height: 150px; text-shadow: 0 0 30px rgba(255,45,85,.8); }
.score-unit { font-size: 20px; color: #ff7b8f; }
.free-line { font-size: 20px; font-weight: 800; color: #ffd98a; margin: 14px 0 6px; line-height: 1.6; }

/* ============ 截图传播卡（总分+雷达+短评） ============ */
.shot-card {
  border-radius: 22px; padding: 26px 16px 20px; margin-bottom: 18px;
  background: linear-gradient(175deg, rgba(178,58,255,.14) 0%, rgba(255,45,85,.07) 100%);
  border: 1px solid rgba(216,180,255,.35);
  box-shadow: 0 12px 40px rgba(120,40,220,.25);
  text-align: center;
}
.radar { width: 100%; height: 300px; }
.radar-fallback { font-size: 14px; line-height: 2.2; color: #e5d9fb; padding: 30px 0; }
.shot-hint { font-size: 12px; color: #9b86c9; margin-top: 4px; letter-spacing: 1px; }

/* 关卡标签（答题页顶部） */
.level-tag { float: right; font-size: 12px; color: #ff9db0; }

/* ============ 关卡过渡弹层 ============ */
.trans-box { text-align: center; padding: 30px 26px 26px; }
.trans-badge { display: inline-block; font-size: 12px; letter-spacing: 1px; color: #7ce7a2;
  border: 1px solid rgba(124,231,162,.4); border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; }
.trans-title { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.trans-text { font-size: 14px; line-height: 1.9; color: #cfc0ec; margin-bottom: 22px; }
.trans-progress { font-size: 16px; color: #ffd98a; letter-spacing: 2px; margin-bottom: 26px; }
.trans-sunk { margin-top: 14px; font-size: 12px; color: #7a68a3; }

/* 分享按钮独立区 */
.btn-share { margin-bottom: 26px; }

/* 付费区 + 模糊 */
.paid-area { position: relative; border-radius: 20px; overflow: hidden; text-align: left;
  background: linear-gradient(180deg, rgba(178,58,255,.10), rgba(255,45,85,.08));
  border: 1px solid rgba(216,180,255,.25); }
.paid-content { padding: 22px 18px 30px; }
/* 未解锁时报告还没生成（服务端只在 paid=1 才返回正文），所以隐藏内容区、让遮罩自己撑开高度 */
.paid-area.locked .paid-content { display: none; }
.paid-area.locked .blur-mask { position: static; }
.paid-area.unlocked .blur-mask { display: none; }
.paid-area.unlocked .paid-content { animation: fadeIn .5s ease; }

/* 免费结果页：六维分数条 + 补充说明 */
.dim-bars { width: 100%; margin: 14px 0 6px; }
.dim-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.dim-name { width: 58px; flex: 0 0 58px; font-size: 12px; color: #cbb2ff; text-align: right; }
.dim-track { flex: 1; height: 8px; border-radius: 4px; background: rgba(178,120,255,.18); overflow: hidden; }
.dim-fill { display: block; height: 100%; border-radius: 4px; }
.dim-fill.low { background: linear-gradient(90deg, #ff5f6d, #ff8c96); }
.dim-fill.mid { background: linear-gradient(90deg, #ffb302, #ffd98a); }
.dim-fill.high { background: linear-gradient(90deg, #4ade80, #a7f3d0); }
.dim-val { width: 26px; flex: 0 0 26px; font-size: 12px; color: #e5d9fb; }
.free-lines { width: 100%; margin: 10px 0 2px; }
.free-lines p { font-size: 13.5px; line-height: 1.8; color: #cfc0ec; margin-bottom: 6px; }

/* 支付弹窗里的合规说明 */
.pay-note { margin-top: 10px; font-size: 11px; line-height: 1.6; color: #8f7bb5; }

/* 未解锁区：专属目录预览（真实维度/分数 + 上锁的做法） */
.locked-outline { width: 100%; max-width: 360px; margin: 2px 0 18px; }
.lock-item { text-align: left; background: rgba(255,255,255,.05); border: 1px solid rgba(216,180,255,.2);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 9px; }
.lock-item-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.lock-badge { font-size: 11px; font-weight: 700; color: #2a1240; background: #ffd98a; border-radius: 4px; padding: 1px 6px; }
.lock-dim { font-size: 12.5px; color: #e5d9fb; }
.lock-dim b { color: #ff8c96; font-size: 13.5px; }
.lock-teaser { font-size: 12.5px; line-height: 1.7; color: #cfc0ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-more { font-size: 11.5px; color: #a892cf; margin-top: 6px; }
#lock-summary { font-size: 12.5px; color: #b9a3e0; margin-bottom: 12px; }
.lock-sub { font-size: 11.5px; line-height: 1.7; color: #9d8bc0; margin: 0 0 14px; max-width: 340px; }
.tier-badge { display: inline-block; margin: 0 0 8px; font-size: 13px; font-weight: 700;
  color: #ffd98a; border: 1px solid rgba(255,217,138,.45); border-radius: 20px; padding: 2px 12px; }
.foot-contact { margin-top: 14px; font-size: 11px; color: #8f7bb5; }
.foot-contact a { color: #b9a3e0; text-decoration: none; }

.report-block { margin-bottom: 24px; }
.report-title { font-size: 16px; color: #ffd98a; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(216,180,255,.3); }
.report-block p { font-size: 14.5px; line-height: 1.9; color: #e5d9fb; margin-bottom: 10px; }
.report-block ul { padding-left: 18px; }
.report-block li { font-size: 14.5px; line-height: 1.9; color: #e5d9fb; margin-bottom: 10px; }

.blur-mask {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 24px; text-align: center;
  background: linear-gradient(180deg, rgba(18,8,31,.25) 0%, rgba(18,8,31,.72) 40%, rgba(18,8,31,.92) 100%);
}
.lock-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.lock-items { font-size: 14px; color: #ffd98a; }
.lock-list { list-style: none; margin: 8px 0 24px; }
.lock-list li { font-size: 13.5px; color: #cfc0ec; line-height: 2; }

.btn-pay {
  width: 100%; max-width: 340px; padding: 17px 0;
  font-size: 17px; font-weight: 800; color: #fff;
  border: none; border-radius: 50px; cursor: pointer;
  background: linear-gradient(135deg, #ffb302, #ff5f6d);
  box-shadow: 0 8px 26px rgba(255,95,109,.5);
  animation: breathe 2s infinite ease-in-out;
}
.pay-hint { margin-top: 12px; font-size: 12px; color: #b9a3e0; }

/* 分享区 */
.share-area { margin-top: 40px; text-align: center; }
.share-title { font-size: 16px; color: #d8b4ff; margin-bottom: 14px; }
.btn-share {
  width: 100%; padding: 15px 0; font-size: 16px; font-weight: 700;
  color: #efe6ff; background: rgba(178,58,255,.16);
  border: 1px solid rgba(178,58,255,.5); border-radius: 50px; cursor: pointer;
}
.backup { margin-top: 22px; font-size: 12px; color: #7a68a3; line-height: 2; }
.backup a { color: #b9a3e0; text-decoration: underline; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(6,2,12,.8); backdrop-filter: blur(4px); }
.modal.hidden { display: none; }
.modal-box { position: relative; width: 86%; max-width: 360px; background: #1d1030; border: 1px solid rgba(216,180,255,.3); border-radius: 22px; padding: 28px 22px; text-align: center; animation: fadeIn .3s ease; }
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.qr-wrap { width: 210px; height: 210px; margin: 0 auto; background: #fff; border-radius: 14px; padding: 10px; }
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.modal-amount { font-size: 26px; font-weight: 900; color: #ff5f6d; margin: 14px 0 4px; }
.modal-hint { font-size: 13px; color: #b9a3e0; margin-bottom: 18px; }
.card-row { display: flex; gap: 8px; }
#card-input { flex: 1; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(216,180,255,.35); background: rgba(255,255,255,.06); color: #fff; font-size: 14px; outline: none; }
#card-input::placeholder { color: #7a68a3; }
#btn-redeem { padding: 0 20px; border: none; border-radius: 12px; background: linear-gradient(135deg, #ff2d55, #d90429); color: #fff; font-weight: 800; cursor: pointer; }
.redeem-msg { min-height: 18px; margin-top: 12px; font-size: 13px; color: #ff7b8f; }
.redeem-msg.ok { color: #7ce7a2; }
.btn-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: #7a68a3; font-size: 18px; cursor: pointer; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 12vh; transform: translateX(-50%); z-index: 200;
  background: rgba(0,0,0,.85); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; max-width: 80vw; }
.toast.hidden { display: none; }
