:root {
  --bg: #f7f6fb;
  --surface: #ffffff;
  --ink: #201c2b;
  --muted: #746f81;
  --line: #e9e5f0;
  --primary: #6c53dc;
  --primary-dark: #553bc4;
  --primary-soft: #eee9ff;
  --accent: #ff8f66;
  --success: #23876c;
  --shadow: 0 20px 60px rgba(53, 38, 100, .10);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.container { width: min(1060px, calc(100% - 40px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(247, 246, 251, .88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(233,229,240,.7); }
.topbar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.5px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: linear-gradient(145deg, #8069ed, #583aca); border-radius: 12px; box-shadow: 0 7px 18px rgba(108,83,220,.26); }
.topbar-note { color: var(--muted); font-size: 13px; }
.footer { width: min(1060px, calc(100% - 40px)); margin: 48px auto 0; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: #928b9e; font-size: 12px; }
.loading { min-height: 52vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid #dcd5f2; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero { position: relative; overflow: hidden; margin: 40px 0 32px; padding: 56px; border-radius: 32px; color: #fff; background: linear-gradient(120deg, #2d2347 0%, #5b42bd 60%, #8b68e5 100%); box-shadow: var(--shadow); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); }
.hero::before { width: 280px; height: 280px; right: -60px; top: -120px; }
.hero::after { width: 170px; height: 170px; right: 120px; bottom: -120px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(255,255,255,.1); font-size: 13px; }
.hero h1 { position: relative; max-width: 620px; margin: 22px 0 16px; font-size: clamp(34px, 5vw, 56px); line-height: 1.16; letter-spacing: -2px; }
.hero p { position: relative; max-width: 580px; margin: 0; color: rgba(255,255,255,.75); font-size: 17px; line-height: 1.8; }
.hero-highlights { position: relative; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; font-size: 13px; color: rgba(255,255,255,.86); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 34px 0 18px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.5px; }
.section-heading span { color: var(--muted); font-size: 13px; }
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.test-card { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 26px rgba(53,38,100,.04); transition: transform .2s, box-shadow .2s; }
.test-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.test-emoji { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--primary-soft); font-size: 30px; }
.test-card h3 { margin: 22px 0 10px; font-size: 22px; line-height: 1.4; }
.test-card p { flex: 1; margin: 0 0 24px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-meta span { color: var(--muted); font-size: 12px; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; border: 0; color: var(--primary); background: transparent; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; font-weight: 700; transition: transform .15s, background .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 8px 22px rgba(108,83,220,.24); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: var(--ink); background: #efedf4; }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-block { width: 100%; }
.test-intro { max-width: 760px; margin: 54px auto; padding: 44px; text-align: center; border: 1px solid var(--line); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); }
.intro-emoji { font-size: 54px; }
.test-intro h1 { margin: 20px 0 14px; font-size: clamp(28px, 5vw, 42px); line-height: 1.3; }
.test-intro .subtitle { max-width: 540px; margin: 0 auto; color: var(--muted); line-height: 1.8; }
.intro-facts { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.intro-facts span { padding: 8px 12px; border-radius: 10px; background: #f5f2fb; color: #625b71; font-size: 13px; }
.intro-price { margin: 22px 0 8px; color: var(--muted); font-size: 13px; }
.intro-price strong { color: var(--primary); }
.quiz-shell { max-width: 780px; margin: 38px auto 0; }
.progress-row { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.progress-track { flex: 1; height: 8px; overflow: hidden; border-radius: 10px; background: #e8e3f1; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #9b7cf0); transition: width .25s; }
.progress-text { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.question-card { padding: 36px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.question-label { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.question-card h1 { margin: 12px 0 28px; font-size: clamp(24px, 4vw, 32px); line-height: 1.45; }
.options { display: grid; gap: 12px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 16px; text-align: left; color: var(--ink); background: #fff; transition: border .15s, background .15s, transform .15s; }
.option:hover { border-color: #ad9bea; background: #fbf9ff; transform: translateX(3px); }
.option.selected { border-color: var(--primary); background: var(--primary-soft); }
.option-letter { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 13px; font-weight: 800; }
.option.selected .option-letter { color: #fff; background: var(--primary); }
.option-text { line-height: 1.55; }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 20px; }
.result-shell { max-width: 820px; margin: 38px auto 0; }
.result-hero { position: relative; overflow: hidden; padding: 38px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #33284e, #7254d8); box-shadow: var(--shadow); }
.result-hero::after { content: "✦"; position: absolute; right: 28px; top: 12px; color: rgba(255,255,255,.13); font-size: 130px; }
.result-eyebrow { color: rgba(255,255,255,.65); font-size: 13px; }
.result-hero h1 { position: relative; margin: 10px 0; font-size: clamp(32px, 5vw, 46px); }
.result-badge { position: relative; display: inline-block; padding: 7px 11px; border-radius: 10px; background: rgba(255,255,255,.13); font-size: 13px; }
.result-summary { position: relative; margin: 22px 0 0; max-width: 650px; color: rgba(255,255,255,.82); line-height: 1.85; }
.result-actions { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.result-actions .btn-primary { color: #5540b7; background: #fff; box-shadow: none; }
.result-actions .btn-secondary { color: #fff; background: rgba(255,255,255,.14); }
.panel { margin-top: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.panel h2 { margin: 0 0 20px; font-size: 20px; }
.dimension { display: grid; grid-template-columns: 130px 1fr 42px; align-items: center; gap: 14px; margin: 16px 0; font-size: 13px; }
.dimension-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dimension-track { height: 8px; border-radius: 10px; background: #eeeaf4; }
.dimension-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8c72e7, #ff9b77); }
.dimension-value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.lock-panel { position: relative; overflow: hidden; text-align: center; padding: 38px 30px; }
.lock-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 18px; background: var(--primary-soft); font-size: 25px; }
.lock-panel h2 { margin-bottom: 10px; }
.lock-panel p { max-width: 520px; margin: 0 auto 22px; color: var(--muted); line-height: 1.8; }
.lock-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 24px; }
.lock-features span { padding: 7px 10px; border-radius: 9px; background: #f5f2fa; color: #655e71; font-size: 12px; }
.price { margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.price strong { color: var(--primary); font-size: 30px; }
.report-section { margin-top: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.report-section h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 20px; }
.report-section h2::before { content: ""; width: 5px; height: 20px; border-radius: 5px; background: var(--primary); }
.report-section ol { margin: 0; padding-left: 22px; }
.report-section li { margin: 12px 0; padding-left: 4px; color: #504a5c; line-height: 1.75; }
.report-source { margin-top: 20px; color: var(--muted); text-align: center; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(25,20,35,.55); backdrop-filter: blur(6px); }
.modal { width: min(440px, 100%); max-height: 90vh; overflow: auto; padding: 28px; border-radius: 24px; background: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal h2 { margin: 0; font-size: 22px; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: #f1eef5; font-size: 20px; }
.modal p { color: var(--muted); line-height: 1.7; }
.qr-image { display: block; width: 240px; height: 240px; margin: 18px auto; }
.demo-notice { margin: 18px 0; padding: 14px; border-radius: 12px; color: #78551d; background: #fff6dd; font-size: 13px; line-height: 1.6; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 30px; transform: translate(-50%, 20px); max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 12px; color: #fff; background: rgba(32,28,43,.92); opacity: 0; pointer-events: none; transition: .2s; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
/* 管理后台 */
.admin-body { background: #f5f4f8; }
.admin-topbar { background: #282131; color: #fff; }
.admin-topbar .topbar-note { color: #c3bbcd; }
.admin-wrap { width: min(1240px, calc(100% - 36px)); margin: 30px auto; }
.login-card { width: min(430px, calc(100% - 32px)); margin: 10vh auto; padding: 34px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 12px 0 8px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
.field { display: grid; gap: 8px; margin: 16px 0; }
.field label { color: #5d5668; font-size: 13px; font-weight: 700; }
.input, .textarea, .select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #dcd7e4; border-radius: 11px; outline: none; color: var(--ink); background: #fff; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.textarea { resize: vertical; line-height: 1.55; }
.code-area { min-height: 440px; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 9px; font-size: 30px; }
.admin-layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.admin-sidebar, .admin-main { border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.admin-sidebar { padding: 14px; }
.admin-sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 12px; }
.admin-sidebar-head h2 { margin: 0; font-size: 16px; }
.small-btn { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 700; }
.test-list { display: grid; gap: 6px; }
.test-list button { width: 100%; padding: 12px; border: 0; border-radius: 11px; text-align: left; background: transparent; line-height: 1.5; }
.test-list button.active { color: var(--primary); background: var(--primary-soft); }
.test-list small { display: block; color: var(--muted); }
.admin-main { padding: 26px; }
.admin-main-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.admin-main-head h1 { margin: 0; font-size: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger { color: #b43c4c; background: #fff0f2; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #faf9fb; font-weight: 600; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 8px; color: var(--success); background: #e8f7f2; }
.status-pill.unpaid { color: #8a7180; background: #f1edf2; }
.tab-row { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-row button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; color: var(--muted); background: #eae7ef; }
.tab-row button.active { color: #fff; background: var(--primary); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1060px); }
  .topbar-inner { min-height: 62px; }
  .topbar-note { display: none; }
  .hero { margin-top: 22px; padding: 32px 24px; border-radius: 24px; }
  .hero h1 { letter-spacing: -1px; }
  .hero p { font-size: 15px; }
  .section-heading { align-items: start; flex-direction: column; gap: 5px; }
  .test-intro { margin: 26px auto; padding: 30px 20px; }
  .quiz-shell, .result-shell { margin-top: 22px; }
  .question-card, .result-hero { padding: 26px 20px; }
  .option { min-height: 62px; padding: 13px; }
  .panel, .report-section { padding: 24px 20px; }
  .dimension { grid-template-columns: 105px 1fr 38px; gap: 9px; }
  .footer { flex-direction: column; gap: 5px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .admin-main { padding: 20px; }
  .admin-main-head { align-items: flex-start; flex-direction: column; }
}
