:root {
  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: linear-gradient(to top right, var(--slate-50), #ffffff 45%, #eff6ff);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.beian-footer {
  text-align: center;
  padding: 14px 16px 22px;
  font-size: 12px;
  line-height: 1.9;
  color: #94a3b8;
}
.beian-footer a {
  color: #94a3b8;
  text-decoration: none;
}
.beian-footer a:hover { color: #64748b; text-decoration: underline; }
.beian-footer .sep { margin: 0 8px; color: #cbd5e1; }
.beian-footer .police {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card {
  width: 100%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

.intro { max-width: 520px; padding: 40px 32px; text-align: center; }
.quiz-card { max-width: 680px; padding: 28px; }
.result-card { max-width: 720px; padding: 28px; }

.title-gradient {
  font-size: 30px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, var(--blue), var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { color: var(--slate-600); font-size: 14px; margin: 12px 0 0; }

.dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}
.dim-tile {
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: 12px;
  padding: 14px 6px;
  text-align: center;
}
.dim-tile .emoji { font-size: 20px; }
.dim-tile p { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--slate-700); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  padding: 0 20px;
  height: 48px;
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
  font-family: inherit;
}
.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(to right, var(--blue), var(--indigo));
}
.btn-primary:hover { transform: scale(1.03); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24); }
.btn-outline {
  background: #fff;
  border: 1px solid #bfdbfe;
  color: var(--blue);
  height: 44px;
  font-size: 14px;
}
.btn-outline:hover { background: #eff6ff; }
.btn-ghost {
  background: transparent;
  color: var(--slate-500);
  height: 40px;
  font-size: 14px;
}
.btn-ghost:hover { color: var(--slate-700); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Quiz */
.quiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.quiz-step { font-size: 13px; color: var(--slate-500); font-weight: 600; }
.quiz-dim { font-size: 13px; color: var(--indigo); font-weight: 600; }
.progress {
  height: 8px;
  background: var(--slate-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 26px;
}
.progress > div {
  height: 100%;
  background: linear-gradient(to right, var(--blue), var(--indigo));
  border-radius: 999px;
  transition: width 0.35s ease;
}
.q-emoji { font-size: 26px; }
.q-title { font-size: 13px; color: var(--indigo); font-weight: 700; margin: 8px 0 4px; }
.q-text { font-size: 19px; font-weight: 700; line-height: 1.5; margin: 0 0 22px; color: var(--slate-800); }
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  text-align: left;
  border: 1.5px solid var(--slate-200);
  background: #fff;
  border-radius: 12px;
  padding: 15px 16px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.5;
  color: var(--slate-700);
  transition: all 0.18s ease;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-family: inherit;
}
.option:hover { border-color: #a5b4fc; background: #f5f3ff; transform: translateX(2px); }
.option.selected { border-color: var(--indigo); background: #eef2ff; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }
.option .dot {
  flex: 0 0 20px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--slate-300, #cbd5e1);
  margin-top: 1px;
  display: grid; place-items: center;
}
.option.selected .dot { border-color: var(--indigo); }
.option.selected .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--indigo); }
.quiz-nav { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; }

/* Result */
.result-head { text-align: center; margin-bottom: 8px; }
.result-badge { font-size: 46px; line-height: 1; }
.result-title { font-size: 22px; font-weight: 800; margin: 10px 0 2px; }
.result-score { font-size: 15px; color: var(--slate-500); }
.result-score b { font-size: 30px; color: var(--indigo); font-weight: 800; }
.section { margin-top: 26px; }
.section h3 { font-size: 15px; font-weight: 700; color: var(--slate-800); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.radar-wrap { display: flex; justify-content: center; }
.panel {
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
}
.profile-text { font-size: 14.5px; line-height: 1.75; color: var(--slate-700); margin: 0; }
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.7; color: var(--slate-700); }
.list li .num {
  flex: 0 0 22px; height: 22px; border-radius: 50%;
  background: #eef2ff; color: var(--indigo);
  font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.course {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--slate-200);
  margin-bottom: 10px;
}
.course .cid { font-weight: 800; color: var(--violet); font-size: 13px; background: #f5f3ff; border-radius: 8px; padding: 3px 8px; }
.course .cname { font-weight: 600; color: var(--slate-800); font-size: 14.5px; }
.course .cout { font-size: 12.5px; color: var(--slate-500); margin-top: 3px; }

.lead-box { margin-top: 14px; }
.lead-box input, .lead-box textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--slate-200); border-radius: 10px;
  font-size: 14px; font-family: inherit; margin-bottom: 10px; background: #fff;
}
.lead-box textarea { resize: vertical; min-height: 60px; }
.qr-block { text-align: center; margin-top: 14px; }
.qr-block img, .qr-placeholder {
  width: 180px; height: 180px; object-fit: contain; border-radius: 12px; border: 1px solid var(--slate-200); background: #fff;
}
.qr-placeholder { display: grid; place-items: center; color: var(--slate-400); font-size: 13px; margin: 0 auto; }
.qr-text { font-size: 13px; color: var(--slate-600); line-height: 1.7; margin: 12px auto 0; max-width: 460px; }

.result-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; min-width: 160px; }

.tier-accent { border-width: 1.5px; }
.hidden { display: none !important; }
.fade-in { animation: fade 0.4s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  .title-gradient { font-size: 26px; }
  .q-text { font-size: 17px; }
  .result-actions .btn { min-width: 100%; }
}
