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

:root {
  --text: #1A1B1C;
  --text-2: #6B7280;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #EAA7B2;
  --accent-2: #9BBBF4;
  --card: #FFFFFF;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  padding: 20px 16px 48px;
  background:
    radial-gradient(1200px 800px at 15% 10%, rgba(255,214,231,.7) 0%, rgba(255,214,231,0) 55%),
    radial-gradient(1100px 900px at 85% 18%, rgba(194,233,251,.75) 0%, rgba(194,233,251,0) 60%),
    linear-gradient(135deg, #fff7f1 0%, #f7fbff 45%, #fff6fb 100%);
  background-attachment: fixed;
}

.container { max-width: 1080px; margin: 0 auto; }

h1.site-title { font-size: 1.5rem; margin: 8px 0 4px; }
p.site-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 22px; }

/* ---------- 卡片列表 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.55)) padding-box,
              linear-gradient(120deg, rgba(255,170,210,.6), rgba(160,210,255,.6), rgba(255,220,170,.6)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 18px 45px rgba(31,41,55,.10);
}

.card .icon { font-size: 2.2em; }
.card h3 { font-size: 1.15rem; }
.card p { color: rgba(17,24,39,.72); font-size: .92rem; line-height: 1.6; }

.card .meta {
  display: flex; gap: 14px; color: rgba(17,24,39,.55); font-size: .85rem; margin-top: auto;
}

.badge {
  align-self: flex-start;
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(155,187,244,.18); color: #3b5ea8;
}
.badge.free { background: rgba(162,221,170,.22); color: #2f8a3e; }

.btn {
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px; font-weight: 700;
  color: #0b1220;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72)) padding-box,
              linear-gradient(120deg, rgba(255,140,190,.85), rgba(120,200,255,.85), rgba(255,210,150,.85)) border-box;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 授权弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; justify-content: center; align-items: center; z-index: 1000; padding: 16px;
}
.modal.open { display: flex; }
.modal-content {
  background: #fff; border-radius: 20px; max-width: 420px; width: 100%;
  padding: 24px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; top: 8px; right: 14px; font-size: 28px; color: #999; cursor: pointer; line-height: 1;
}
.modal-content h3 { text-align: center; margin-bottom: 12px; }
.modal-hint {
  background: #f4f7ff; border: 1px solid #d0e3ff; border-radius: 14px;
  padding: 14px; font-size: .88rem; color: #555; line-height: 1.7; margin-bottom: 16px; text-align: center;
}
.modal-content input {
  width: 100%; padding: 13px 16px; border: 1.5px solid #dbe4f0; border-radius: 12px;
  font-size: 16px; margin-bottom: 14px;
}
.error-text { color: #e74c3c; font-size: 13px; text-align: center; min-height: 18px; }

/* ---------- 答题页 ---------- */
.test-container {
  max-width: 640px; margin: 12px auto 0; background: rgba(255,255,255,.78);
  border: 1px solid var(--border); border-radius: 18px; padding: 22px 18px;
  box-shadow: 0 12px 30px rgba(31,41,55,.10);
}
.progress-bar-bg { height: 8px; background: #eceff3; border-radius: 5px; overflow: hidden; margin-bottom: 16px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #ff8ab8, #78c8ff); transition: width .25s; }
.question-info { color: var(--text-2); font-size: .85rem; margin-bottom: 8px; }
.question-title { font-size: 1.08rem; line-height: 1.65; margin-bottom: 18px; }
.options-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 20px; }
.option-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px;
  border: 1.5px solid #e6e9ee; border-radius: 12px; cursor: pointer; background: #fff;
}
.option-card.selected { border-color: #78c8ff; background: #f2f8ff; }
.option-card input { accent-color: #78c8ff; }
.test-btns { display: flex; gap: 12px; }
.nav-btn { flex: 1; padding: 13px 0; border: none; border-radius: 12px; background: #eef1f5; font-size: 15px; cursor: pointer; }
.nav-btn.main-btn { background: linear-gradient(120deg, #f77da8, #6e5fff); color: #fff; }
.nav-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 结果页 ---------- */
.result-container { max-width: 640px; margin: 12px auto 0; }
.section-title { font-size: 1.05rem; font-weight: 700; margin: 22px 0 12px; }
.viz-block {
  background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: 16px; padding: 18px; text-align: center;
}
.radar-container { display: flex; justify-content: center; }
.radar-chart { width: 280px; height: 280px; max-width: 100%; }
.viz-note { color: var(--text-2); font-size: .78rem; margin-top: 8px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.score-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.score-card .title { color: var(--text-2); font-size: .82rem; }
.score-card .score { font-size: 1.5rem; font-weight: 700; margin: 4px 0; }
.result-type { font-size: 1.25rem; font-weight: 700; margin: 10px 0; }
.result-desc { color: rgba(17,24,39,.75); line-height: 1.7; }
.disclaimer { margin-top: 24px; color: var(--text-2); font-size: .8rem; line-height: 1.7; text-align: center; }

@media (max-width: 600px) {
  body { padding: 14px 12px 40px; }
  .card { padding: 18px; }
}
