:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --primary: #5b8def;
  --primary-dark: #3f6fd0;
  --text: #2c3e50;
  --text-soft: #5a6b7b;
  --border: #e6ebf2;
  --soft: #eef3ff;
  --soft2: #fff6e6;
  --green: #4caf7d;
  --amber: #e0a64a;
  --shadow: 0 4px 20px rgba(90, 120, 160, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 20px;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-mark { font-size: 26px; }
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }
.cat-tag {
  font-size: 12px;
  background: var(--soft);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* Hero */
.hero { padding: 12px 4px 24px; }
.hero h1 { font-size: 28px; letter-spacing: -0.5px; }
.subtitle { color: var(--text-soft); font-size: 14px; margin-top: 8px; }
.intro { color: var(--text-soft); font-size: 15px; margin-top: 14px; background: var(--card); padding: 16px; border-radius: 14px; border: 1px solid var(--border); }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

/* Progress */
.progress { margin-bottom: 20px; }
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #8ab4ff);
  border-radius: 8px;
  transition: width 0.3s ease;
}
.progress-text { font-size: 12px; color: var(--text-soft); display: block; margin-top: 6px; }

/* Question */
.q-number { font-size: 13px; color: var(--primary-dark); font-weight: 700; letter-spacing: 1px; }
.q-text { font-size: 19px; font-weight: 600; margin: 8px 0 20px; line-height: 1.5; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.option:hover { border-color: var(--primary); background: var(--soft); }
.option.selected { border-color: var(--primary); background: var(--soft); }
.option input { position: absolute; opacity: 0; }
.option .radio {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid #c5d2e6; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.option.selected .radio { border-color: var(--primary); }
.option.selected .radio::after {
  content: ""; width: 10px; height: 10px;
  background: var(--primary); border-radius: 50%;
}
.option .opt-text { font-size: 15px; }

.actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.btn {
  border: none; border-radius: 12px; padding: 13px 22px;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #c5d2e6; cursor: not-allowed; }
.btn-ghost { background: var(--bg); color: var(--text-soft); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* Result */
.result { text-align: center; }
.score-circle { position: relative; width: 150px; height: 150px; margin: 8px auto 20px; }
.ring { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1s ease; }
.score-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num { font-size: 44px; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.score-total { font-size: 15px; color: var(--text-soft); }
.level-title { font-size: 22px; margin-bottom: 8px; }
.level-desc { color: var(--text-soft); font-size: 15px; }

.breakdown { display: flex; gap: 12px; margin: 22px 0; }
.breakdown-item { flex: 1; background: var(--bg); border-radius: 12px; padding: 14px; }
.bd-label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 4px; }
.bd-value { font-size: 18px; font-weight: 700; color: var(--text); }

.suggestions { text-align: left; background: var(--bg); border-radius: 14px; padding: 18px 20px; margin-bottom: 22px; }
.suggestions h3 { font-size: 15px; margin-bottom: 10px; }
.suggestions ul { list-style: none; }
.suggestions li { font-size: 14px; color: var(--text-soft); padding: 6px 0 6px 20px; position: relative; }
.suggestions li::before { content: "🌱"; position: absolute; left: 0; }

.result-actions { display: flex; gap: 12px; }
.result-actions .btn { flex: 1; }

/* Info */
.info h2 { font-size: 18px; margin-bottom: 14px; }
.info-list { list-style: none; }
.info-list li { font-size: 14px; color: var(--text-soft); padding: 8px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: none; }
.note { font-size: 13px; color: var(--text-soft); margin-top: 14px; background: var(--soft2); padding: 12px 14px; border-radius: 10px; }

/* Footer */
.footer { text-align: center; padding: 24px 4px 0; font-size: 13px; color: var(--text-soft); }
.disclaimer { font-size: 12px; margin-top: 8px; opacity: 0.85; }

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .card { padding: 18px; }
  .score-circle { width: 130px; height: 130px; }
  .score-num { font-size: 38px; }
}
