:root {
  --bg: #090d16;
  --card: rgba(20, 29, 47, 0.78);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent2: #a855f7;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --border: rgba(148, 163, 184, 0.2);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}
body::before, body::after {
  content: "";
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(110px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
body::before { background: #6366f1; top: -120px; left: -100px; }
body::after { background: #0ea5e9; bottom: -140px; right: -100px; animation-delay: -6s; }
@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.12); }
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.app {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: fadeSlideIn 0.35s ease;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--muted);
}
.back-link { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.back-link:hover { color: var(--text); }
.progress-wrap {
  height: 8px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
h1 {
  font-size: clamp(22px, 3.5vw, 27px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.subtitle { color: var(--muted); margin-bottom: 24px; font-size: 15px; line-height: 1.65; }
.question-title {
  font-size: 19.5px;
  font-weight: 700;
  margin-bottom: 22px;
  line-height: 1.55;
  animation: fadeSlideIn 0.22s ease;
}
.options { display: flex; flex-direction: column; gap: 11px; }
.opt-btn {
  text-align: left;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  line-height: 1.5;
}
.opt-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.14);
}
.opt-btn:active { transform: scale(0.985); }
.actions { display: flex; flex-wrap: wrap; justify-content: space-between; margin-top: 24px; gap: 10px; }
.btn {
  padding: 11px 18px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.3); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  border-color: transparent;
  color: #090d16;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
#result-view { animation: fadeSlideIn 0.35s ease; }
.res-badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.res-title {
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #f8fafc, #bae6fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.res-desc {
  color: #cbd5e1;
  line-height: 1.75;
  margin-bottom: 22px;
  font-size: 15px;
  background: rgba(15, 23, 42, 0.45);
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.dim-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 22px; }
.dim-item {
  background: rgba(15, 23, 42, 0.55);
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.dim-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 7px;
  color: #cbd5e1;
  font-weight: 500;
}
.dim-bar-bg {
  height: 9px;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}
.hidden { display: none; }
