/* ============================================================
 * 黑客潜质测试 · 赛博暗色主题（移动优先）
 * ============================================================ */
:root {
  --bg: #05070f;
  --panel: rgba(18, 24, 42, 0.72);
  --panel-solid: #101627;
  --line: rgba(120, 160, 255, 0.14);
  --text: #e8eeff;
  --muted: #8b96b3;
  --accent: #38e1ff;
  --accent-2: #b06bff;
  --good: #3ddc84;
  --warn: #ffc53d;
  --danger: #ff3b6b;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 背景氛围 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 130, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 130, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow { position: fixed; z-index: -2; border-radius: 50%; filter: blur(90px); opacity: 0.35; pointer-events: none; }
.bg-glow-1 { width: 340px; height: 340px; top: -120px; left: -100px; background: #1b4dff; }
.bg-glow-2 { width: 300px; height: 300px; top: 30%; right: -140px; background: #7a1bd6; }

#app { max-width: 520px; margin: 0 auto; padding: 0 18px 40px; }
.screen { display: none; animation: fadein 0.35s ease; }
.screen.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 ---------- */
.site-head {
  display: flex; align-items: baseline; gap: 10px; padding: 22px 2px 8px;
  letter-spacing: 0.12em;
}
.brand-mark { font-weight: 800; font-size: 0.95rem; color: var(--accent); }
.brand-cn { color: var(--muted); font-size: 0.78rem; }

.hero { padding: 46px 6px 10px; text-align: center; }
.hero-tag {
  display: inline-block; font-size: 0.78rem; color: var(--accent);
  border: 1px solid rgba(56, 225, 255, 0.35); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 18px; letter-spacing: 0.05em;
}
.hero-title { font-size: 2.5rem; font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(120deg, #e8eeff 20%, var(--accent) 55%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin-top: 14px; color: var(--muted); line-height: 1.8; font-size: 0.95rem; }
.hero-facts { display: flex; justify-content: center; gap: 34px; margin: 34px 0 30px; }
.fact b { display: block; font-size: 1.7rem; color: var(--text); }
.fact span { font-size: 0.75rem; color: var(--muted); }

.btn-main {
  display: inline-block; width: 100%; border: none; cursor: pointer;
  background: linear-gradient(120deg, #1f6dff, #7a2bff);
  color: #fff; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 16px 0; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(60, 90, 255, 0.4);
  text-align: center; text-decoration: none;
}
.btn-main:active { transform: scale(0.98); }

/* 测试矩阵 */
.test-matrix { margin-top: 46px; text-align: left; }
.matrix-title { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.2em; margin-bottom: 12px; }
.matrix-title span { color: var(--accent); }
.matrix-list { display: flex; flex-direction: column; gap: 10px; }
.matrix-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.matrix-item .mi-title { font-weight: 700; font-size: 0.92rem; }
.matrix-item .mi-desc { color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.mi-badge { font-size: 0.7rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.mi-badge.live { color: var(--good); border: 1px solid rgba(61, 220, 132, 0.4); }
.mi-badge.soon { color: var(--muted); border: 1px solid var(--line); }

.site-foot { margin-top: 44px; text-align: center; color: #566179; font-size: 0.72rem; line-height: 1.9; }

/* ---------- 答题 ---------- */
.quiz-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 12px; }
.progress-num { font-weight: 700; color: var(--accent); letter-spacing: 0.1em; font-size: 0.9rem; }
.progress-track { height: 6px; background: rgba(120, 160, 255, 0.12); border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #1f6dff, #38e1ff); transition: width 0.3s ease; }

.q-card { margin-top: 30px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px 22px; }
.q-idx { color: var(--accent); font-weight: 800; letter-spacing: 0.15em; font-size: 0.85rem; }
.q-text { font-size: 1.22rem; line-height: 1.65; margin: 12px 0 24px; min-height: 76px; }
.q-options { display: flex; flex-direction: column; gap: 12px; }
.q-opt {
  text-align: left; cursor: pointer; font-size: 0.95rem; line-height: 1.55; color: var(--text);
  background: rgba(30, 40, 70, 0.5); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; transition: all 0.15s ease;
}
.q-opt:active, .q-opt:hover { border-color: var(--accent); background: rgba(56, 225, 255, 0.08); }

.ghost-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 8px 14px; font-size: 0.82rem; cursor: pointer;
}
.ghost-btn.big { padding: 13px 20px; font-size: 0.9rem; }
.ghost-btn:disabled { opacity: 0.35; }

/* ---------- 结果页 ---------- */
.result-wrap { padding-top: 26px; }
.rank-card {
  position: relative; text-align: center; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px 20px 26px;
}
.rank-card::before {
  content: ""; position: absolute; inset: -40%;
  background: radial-gradient(circle at 50% 0%, var(--ac, #38e1ff) 0%, transparent 55%);
  opacity: 0.22; pointer-events: none;
}
.rank-label { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.3em; }
.rank-big {
  font-size: 4.6rem; font-weight: 900; line-height: 1.15; margin: 4px 0;
  color: var(--ac, #38e1ff);
  text-shadow: 0 0 34px color-mix(in srgb, var(--ac, #38e1ff) 60%, transparent);
}
.rank-score { color: var(--muted); font-size: 0.9rem; }
.rank-score b { color: var(--text); font-size: 1.15rem; }
.rank-desc { margin-top: 6px; font-size: 0.8rem; color: var(--muted); }

.arch-name { font-size: 1.45rem; font-weight: 800; margin-top: 18px; }
.arch-en { color: var(--ac, #38e1ff); font-size: 0.75rem; letter-spacing: 0.3em; margin-top: 4px; }
.arch-slogan { margin-top: 12px; color: var(--muted); font-size: 0.9rem; }
.arch-free {
  margin-top: 16px; text-align: left; font-size: 0.9rem; line-height: 1.85; color: #c6d1ea;
  border-top: 1px dashed var(--line); padding-top: 16px;
}

/* 雷达 + 维度条 */
.radar-box { margin-top: 22px; text-align: center; }
#radar-canvas { width: 260px; height: 260px; }
.dim-bars { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.dim-row { display: grid; grid-template-columns: 84px 1fr 40px; align-items: center; gap: 10px; }
.dim-name { font-size: 0.82rem; color: var(--muted); text-align: right; }
.dim-track { height: 8px; background: rgba(120, 160, 255, 0.12); border-radius: 6px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #1f6dff, var(--ac, #38e1ff)); width: 0; transition: width 0.8s ease; }
.dim-val { font-size: 0.8rem; color: var(--text); font-weight: 700; }

.codename-chip {
  margin-top: 20px; display: inline-block; font-size: 0.8rem; letter-spacing: 0.08em;
  border: 1px dashed var(--ac, #38e1ff); color: var(--ac, #38e1ff);
  border-radius: 999px; padding: 8px 18px;
}

.result-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }

/* ---------- 付费解锁卡 ---------- */
.pay-card {
  margin-top: 26px; border-radius: 22px; padding: 24px 20px;
  background: linear-gradient(160deg, rgba(122, 43, 255, 0.16), rgba(31, 109, 255, 0.10));
  border: 1px solid rgba(176, 107, 255, 0.35);
}
.pay-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pay-title { font-size: 1.08rem; font-weight: 800; }
.pay-price { color: var(--warn); font-weight: 800; }
.pay-lock-list { list-style: none; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 9px; }
.pay-lock-list li { font-size: 0.86rem; color: #c6d1ea; line-height: 1.5; padding-left: 1.4em; position: relative; }
.pay-lock-list li::before { content: "🔒"; position: absolute; left: 0; font-size: 0.8em; top: 0.2em; }

.pay-steps { background: rgba(10, 14, 26, 0.6); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.pay-steps-title { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; letter-spacing: 0.1em; }
.pay-steps ol { padding-left: 1.3em; }
.pay-steps li { font-size: 0.82rem; line-height: 1.9; color: #c6d1ea; }

.redeem-row { display: flex; gap: 10px; }
.redeem-input {
  flex: 1; background: rgba(10, 14, 26, 0.8); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 13px 14px; font-size: 1rem;
  letter-spacing: 0.12em; text-transform: uppercase; outline: none; min-width: 0;
}
.redeem-input:focus { border-color: var(--accent); }
.redeem-btn { border: none; border-radius: 12px; padding: 0 20px; cursor: pointer;
  background: linear-gradient(120deg, #1f6dff, #7a2bff); color: #fff; font-weight: 700; font-size: 0.9rem; }
.redeem-msg { margin-top: 10px; font-size: 0.8rem; min-height: 1.2em; }
.redeem-msg.ok { color: var(--good); }
.redeem-msg.err { color: var(--danger); }
.pay-contact { margin-top: 12px; color: #566179; font-size: 0.74rem; text-align: center; }

/* ---------- 完整版报告 ---------- */
.report { margin-top: 26px; }
.report-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem;
  color: var(--warn); border: 1px solid rgba(255, 197, 61, 0.4); border-radius: 999px; padding: 5px 12px; letter-spacing: 0.05em; }
.r-section { margin-top: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px; }
.r-sec-title { font-size: 0.95rem; font-weight: 800; color: var(--ac, #38e1ff); margin-bottom: 12px; letter-spacing: 0.05em; }
.r-p { font-size: 0.88rem; line-height: 1.9; color: #c6d1ea; margin-bottom: 10px; }
.r-p:last-child { margin-bottom: 0; }
.r-stage { margin-top: 14px; padding: 14px 16px; background: rgba(10, 14, 26, 0.55); border-radius: 12px; border: 1px solid var(--line); }
.r-stage-title { font-size: 0.85rem; font-weight: 700; color: var(--warn); margin-bottom: 8px; }
.r-stage ul { padding-left: 1.2em; }
.r-stage li { font-size: 0.82rem; line-height: 1.9; color: #c6d1ea; }
.r-match { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; line-height: 1.8; color: #c6d1ea; }
.r-toast {
  margin-top: 20px; text-align: center; font-size: 0.85rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 14px; padding: 16px 14px; line-height: 1.8;
}

/* ---------- 分享弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(3, 5, 12, 0.85); backdrop-filter: blur(6px);
  overflow-y: auto; padding: 24px 16px;
}
.overlay.open { display: flex; align-items: flex-start; justify-content: center; }
.share-sheet { width: 100%; max-width: 400px; }
.share-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 0.82rem; }
#share-img { width: 100%; max-height: 66vh; object-fit: contain; border-radius: 16px; border: 1px solid var(--line); display: block; }
.share-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
}

/* ---------- 关注引导（公众号/小红书） ---------- */
.follow-section { margin: 26px auto 6px; max-width: 420px; text-align: center; }
.follow-title { font-size: 0.92rem; color: var(--text); margin-bottom: 14px; font-weight: 600; }
.follow-cards { display: flex; gap: 12px; justify-content: center; }
.follow-card {
  flex: 1; max-width: 190px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 10px 12px; backdrop-filter: blur(8px);
}
.follow-qr { width: 100%; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden;
  background: rgba(10, 14, 26, 0.6); margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center; }
.follow-qr img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.qr-placeholder { text-align: center; padding: 8px; }
.qr-placeholder span { display: block; font-size: 0.7rem; color: var(--muted); letter-spacing: 2px; }
.qr-placeholder b { display: block; font-size: 0.95rem; color: var(--accent); margin: 6px 0 4px; }
.qr-placeholder i { display: block; font-style: normal; font-size: 0.68rem; color: var(--muted); }
.follow-qr.no-qr { border: 1px dashed rgba(120, 160, 255, 0.35); animation: qrBreath 2.4s ease-in-out infinite; }
@keyframes qrBreath { 0%,100% { border-color: rgba(120,160,255,0.2); } 50% { border-color: rgba(56,225,255,0.55); } }
.follow-name { font-size: 0.72rem; color: var(--muted); }

.follow-inline {
  margin: 18px auto 0; font-size: 0.78rem; color: var(--muted);
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); max-width: 420px;
}
.follow-inline b { color: var(--accent); font-weight: 700; }
