/* ===== 64Personality · 共享样式 ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f6fc;
  --bg-dark: #1b1430;
  --ink: #1f1a2e;
  --ink-soft: #5b5470;
  --brand: #6E40C9;
  --brand-2: #9B6BD4;
  --brand-soft: #efe9fb;
  --accent: #21B573;
  --line: #e9e6f2;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(58, 32, 110, .10);
  --shadow-sm: 0 8px 24px rgba(58, 32, 110, .08);
  --maxw: 1120px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* —— 顶部导航 —— */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .2px; }
.logo .dot { width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 0 4px var(--brand-soft); }
.nav-links { display: flex; gap: 26px; font-size: 15px; color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--brand); }
.nav .btn { margin-left: 18px; }

/* —— 按钮 —— */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 26px rgba(110,64,201,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(110,64,201,.45); }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-ghost:hover { background: #e3d8fb; }
.btn-lg { padding: 16px 38px; font-size: 17px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; }

/* —— Hero —— */
.hero { position: relative; overflow: hidden; padding: 84px 0 70px; background: radial-gradient(1200px 600px at 80% -10%, #efe6ff 0%, #ffffff 55%); }
.hero::before { content:""; position:absolute; inset:0; background:
  radial-gradient(420px 420px at 12% 30%, rgba(155,107,212,.18), transparent 70%),
  radial-gradient(380px 380px at 92% 70%, rgba(33,181,115,.12), transparent 70%); pointer-events:none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 1.12; letter-spacing: -.5px; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 22px 0 30px; font-size: 18px; color: var(--ink-soft); max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 30px;
  box-shadow: var(--shadow); position: relative;
}
.hero-card .big-type { font-size: 64px; font-weight: 800; letter-spacing: 1px; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-card .role { font-size: 20px; font-weight: 700; margin-top: 4px; }
.hero-card .desc { color: var(--ink-soft); font-size: 14px; margin-top: 10px; }
.bars { margin-top: 22px; display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.bar-track { height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar-val { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* —— 统计条 —— */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.stat .num { font-size: 34px; font-weight: 800; color: var(--brand); }
.stat .lbl { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }

/* —— 区块标题 —— */
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 46px; }
.section-head h2 { font-size: 34px; font-weight: 800; letter-spacing: -.3px; }
.section-head p { color: var(--ink-soft); margin-top: 12px; font-size: 17px; }

/* —— 价值卡片 —— */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-soft); margin-bottom: 16px; }
.card h3 { font-size: 20px; font-weight: 700; }
.card p { color: var(--ink-soft); margin-top: 10px; font-size: 15px; }
.card ul { margin: 14px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 14px; }
.card ul li { margin: 6px 0; }

/* —— 评价 —— */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.review .quote { font-size: 15px; color: var(--ink); }
.review .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.review .av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.review .name { font-weight: 700; font-size: 15px; }
.review .tag { font-size: 13px; color: var(--ink-soft); }

/* —— 世界地图占位 —— */
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 10px; }
.map-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.map-box h4 { font-size: 17px; margin-bottom: 14px; }
.map-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.map-row:last-child { border-bottom: none; }
.map-rank { color: var(--ink-soft); font-weight: 700; }
.map-pct { color: var(--accent); font-weight: 700; }

/* —— 页脚 —— */
.footer { background: var(--bg-dark); color: #cfc6e6; padding: 54px 0 30px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer h5 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer a { color: #b7abd6; display: block; font-size: 14px; margin: 8px 0; }
.footer a:hover { color: #fff; }
.footer .copy { border-top: 1px solid #2e2548; margin-top: 36px; padding-top: 18px; font-size: 13px; color: #8e83ad; }

/* ===== 测试页 ===== */
.quiz-wrap { max-width: 720px; margin: 0 auto; padding: 40px 22px 80px; }
.quiz-progress { height: 10px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; margin-bottom: 10px; }
.quiz-progress .fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s ease; }
.quiz-meta { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 14px; margin-bottom: 30px; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 36px; box-shadow: var(--shadow); min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.q-index { color: var(--brand); font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.q-text { font-size: 24px; font-weight: 700; line-height: 1.4; margin: 12px 0 28px; }
.scale { display: grid; gap: 12px; }
.scale label { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: all .15s ease; font-size: 15px; }
.scale label:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.scale input { display: none; }
.scale label.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(110,64,201,.12); }
.scale .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9bee6; flex: none; }
.scale label.sel .dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 26px; }

/* —— 结果页 —— */
.result-hero { text-align: center; padding: 50px 0 10px; }
.result-type { font-size: 72px; font-weight: 800; letter-spacing: 2px; }
.result-role { font-size: 26px; font-weight: 700; margin-top: 4px; }
.result-tag { color: var(--ink-soft); font-size: 17px; margin-top: 8px; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.chip { background: var(--brand-soft); color: var(--brand); padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.result-body { max-width: 860px; margin: 36px auto 0; display: grid; gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 20px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel h3 .ic { font-size: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list .t { background: var(--bg-soft); border: 1px solid var(--line); padding: 8px 14px; border-radius: 12px; font-size: 14px; }
.tag-list .t.good { background: #e7f7ef; border-color: #b9e6d2; color: #147a4f; }
.tag-list .t.bad { background: #fdeaea; border-color: #f3c9c9; color: #b23a3a; }
.result-actions { display: flex; gap: 14px; justify-content: center; margin: 30px 0 10px; flex-wrap: wrap; }
.share-box { text-align: center; margin-top: 8px; }
.share-box input { width: 100%; max-width: 460px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; text-align: center; background: var(--bg-soft); }

.type-banner { height: 8px; border-radius: 999px; background: var(--brand); margin: 0 auto 6px; max-width: 120px; }

/* —— 适配 —— */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .cards, .reviews, .stats { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .two { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .result-type { font-size: 56px; }
}
