:root {
  color-scheme: dark;
  --bg: #08070f;
  --panel: rgba(20, 18, 34, 0.78);
  --panel-solid: #141222;
  --text: #fff8f0;
  --muted: rgba(255, 248, 240, 0.68);
  --line: rgba(255,255,255,0.12);
  --accent: #ff4fd8;
  --accent-2: #8cf5ff;
  --accent-3: #ffd166;
  --danger: #ff7a7a;
  --shadow: 0 26px 80px rgba(0,0,0,0.42);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 15%, rgba(255,79,216,0.25), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(140,245,255,0.22), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255,209,102,0.16), transparent 36%),
    linear-gradient(145deg, #08070f, #111020 52%, #070711);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: .06;
  background-image: linear-gradient(transparent 50%, rgba(255,255,255,.08) 50%);
  background-size: 100% 4px;
  mix-blend-mode: screen;
}

.app-shell {
  width: min(980px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 48px);
  display: grid;
  place-items: center;
}

.screen { display: none; width: 100%; }
.screen.active { display: block; animation: rise .42s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.home-screen, .quiz-screen, .result-screen {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 44px);
}

.badge, .small-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
.home-screen h1 {
  max-width: 760px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: .95;
  letter-spacing: -0.06em;
  margin-bottom: 20px;
}
.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.8;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
  margin: 30px 0;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}
.hero-card h2 { margin: 0 0 10px; font-size: clamp(26px, 5vw, 46px); letter-spacing: -.04em; }
.hero-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.vinyl {
  width: clamp(92px, 20vw, 160px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 5%, #ff4fd8 5% 10%, transparent 10% 13%, #12121c 13% 100%),
    repeating-radial-gradient(circle at center, rgba(255,255,255,.16) 0 1px, transparent 1px 8px);
  position: relative;
  box-shadow: inset 0 0 40px rgba(0,0,0,.7), 0 20px 60px rgba(255,79,216,.16);
}
.vinyl span { position:absolute; inset: 28%; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.text-field { display: block; max-width: 480px; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.text-field span { display: block; margin-bottom: 8px; }
.text-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  outline: none;
}
.text-field input:focus { border-color: rgba(140,245,255,.55); box-shadow: 0 0 0 4px rgba(140,245,255,.10); }

button {
  font: inherit;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, border-color .18s ease;
}
button:active { transform: translateY(1px) scale(.99); }
button:disabled { opacity: .42; cursor: not-allowed; }
.primary-btn, .secondary-btn, .ghost-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
}
.primary-btn {
  color: #090712;
  background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--accent-3));
  box-shadow: 0 14px 36px rgba(255,79,216,.25);
}
.secondary-btn {
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}
.ghost-btn { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.fineprint { margin: 18px 0 0; color: rgba(255,248,240,.48); font-size: 13px; line-height: 1.7; }
.primary-btn:focus-visible, .secondary-btn:focus-visible, .ghost-btn:focus-visible, .option-btn:focus-visible {
  outline: 3px solid rgba(140,245,255,.46);
  outline-offset: 3px;
}


.quiz-topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 32px;
}
.progress-meta { display: flex; justify-content: flex-end; gap: 16px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.progress { width: 100%; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.08); }
.progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .25s ease; }

.question-card h2 {
  font-size: clamp(26px, 5vw, 48px);
  line-height: 1.18;
  letter-spacing: -.04em;
  margin-bottom: 24px;
}
.options { display: grid; gap: 12px; }
.option-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  width: 100%;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,.06);
}
.option-btn:hover { border-color: rgba(140,245,255,.42); transform: translateY(-1px); }
.option-btn.selected {
  border-color: rgba(255,79,216,.72);
  background: linear-gradient(135deg, rgba(255,79,216,.22), rgba(140,245,255,.10));
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
}
.option-index {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  color: var(--accent-2);
  font-weight: 900;
  font-size: 13px;
}
.option-text { line-height: 1.65; }
.quiz-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}
.quiz-footer button { flex: 1; }

.result-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
  padding: clamp(18px, 4vw, 32px);
}
.result-head {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 230px);
  gap: 24px;
  align-items: center;
}
.result-head h1 {
  font-size: clamp(58px, 10vw, 112px);
  line-height: .86;
  margin-bottom: 10px;
  letter-spacing: -.08em;
  background: linear-gradient(135deg, var(--accent-2), var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-head h2 { font-size: clamp(26px, 5vw, 42px); margin-bottom: 10px; letter-spacing: -.04em; }
.tagline { color: var(--accent-3); font-weight: 800; }
.result-head img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
}
.result-desc { color: rgba(255,248,240,.82); line-height: 1.9; font-size: 16px; margin: 24px 0; white-space: pre-line; }
.keyword-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.keyword-row span { border: 1px solid var(--line); background: rgba(255,255,255,.07); color: var(--muted); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.axis-panel { border-top: 1px solid var(--line); padding-top: 22px; }
.axis-panel h3 { margin-bottom: 16px; }
.axis-bars { display: grid; gap: 14px; }
.axis-row { display: grid; grid-template-columns: 64px 1fr 64px; gap: 12px; align-items: center; }
.axis-row .left, .axis-row .right { color: var(--muted); font-weight: 800; font-size: 13px; }
.axis-row .right { text-align: right; }
.axis-track { position: relative; height: 12px; border-radius: 999px; background: rgba(255,255,255,.10); overflow: hidden; }
.axis-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.35); z-index: 2; }
.axis-fill { position: absolute; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; }
.axis-score { grid-column: 2; color: rgba(255,248,240,.58); font-size: 12px; margin-top: -6px; }
.result-actions { display: flex; gap: 12px; margin-top: 18px; }
.result-actions button { flex: 1; }

@media (max-width: 680px) {
  .app-shell { padding: 12px; place-items: stretch; }
  .home-screen, .quiz-screen, .result-screen { min-height: calc(100vh - 24px); border-radius: 24px; }
  .hero-card, .quiz-topbar, .result-head { grid-template-columns: 1fr; }
  .vinyl { justify-self: center; }
  .quiz-topbar { gap: 14px; }
  .quiz-topbar .ghost-btn { width: fit-content; }
  .result-head img { max-height: 230px; }
  .result-actions { flex-direction: column; }
  .axis-row { grid-template-columns: 54px 1fr 54px; }
}
