:root {
  --bg: #fff5f7;
  --ink: #2b2230;
  --ink-2: #6b5f70;
  --ink-3: #a398a8;
  --line: #f1e4ea;
  --card: #ffffff;
  --brand: #ff5c8a;
  --brand-soft: #fff0f4;
  --radius: 20px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, #ffdde8 0, rgba(255, 221, 232, 0) 45%),
    radial-gradient(circle at 100% 35%, #ffeede 0, rgba(255, 238, 222, 0) 40%);
  background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(36px + env(safe-area-inset-bottom));
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.screen { animation: fade-up 0.35s ease both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 通用 ---------- */
.card {
  margin-top: 16px;
  padding: 22px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(120, 40, 70, 0.06);
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 17px;
}

.card h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--c, var(--brand));
}

.card p { color: var(--ink-2); font-size: 15px; }

.list { list-style: none; }
.list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 15px;
}
.list li + li { margin-top: 8px; }
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--brand));
  opacity: 0.7;
}
.list-small { margin-top: 12px; }
.list-small li { font-size: 14px; }

.btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--c, var(--brand)), #ff8a6b);
  box-shadow: 0 8px 22px rgba(255, 92, 138, 0.28);
}
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
}
.btn-link {
  display: block;
  margin: 14px auto 0;
  padding: 6px 12px;
  color: var(--ink-3);
  font-size: 14px;
}

.disclaimer {
  margin-top: 24px;
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

/* ---------- 首页 ---------- */
.intro { padding-top: 24px; text-align: center; }
.intro-emoji { font-size: 72px; line-height: 1.2; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.intro-title { margin-top: 8px; font-size: 32px; letter-spacing: 1px; }
.intro-sub { margin-top: 6px; color: var(--ink-2); font-size: 16px; }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.badges span {
  padding: 4px 12px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 13px;
}

.intro-card { margin-top: 24px; text-align: left; }
.intro-tip { margin-top: 18px; color: var(--ink-3); font-size: 14px; }

/* ---------- 答题页 ---------- */
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
}
.quiz-back { padding: 6px 4px; color: var(--ink-2); font-size: 15px; }
.quiz-count { color: var(--ink-3); font-size: 14px; }
.quiz-count b { color: var(--brand); font-size: 18px; }

.progress {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  background: #f6e3ea;
  border-radius: 999px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #ff8a6b);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.q-card { margin-top: 24px; padding: 28px 20px 24px; }
.q-no { color: var(--brand); font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.q-card .q-text { display: block; margin: 6px 0 0; font-size: 21px; line-height: 1.5; }
.q-card .q-text::before { display: none; }

.options { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.option {
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.option.is-picked {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-soft);
  border-color: var(--brand);
}

/* ---------- 加载 ---------- */
.loading { padding-top: 30vh; text-align: center; color: var(--ink-2); }
.loading-emoji { font-size: 64px; animation: pulse 0.9s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }
.loading p { margin-top: 12px; }

/* ---------- 结果页 ---------- */
.hero {
  padding: 28px 20px 26px;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%), var(--c);
  border-radius: 28px;
  box-shadow: 0 10px 30px var(--c-soft);
}
.hero-label { font-size: 14px; opacity: 0.85; }
.hero-emoji { margin-top: 8px; font-size: 76px; line-height: 1.2; }
.hero-name { margin-top: 6px; font-size: 34px; letter-spacing: 2px; }
.hero-code { margin-top: 2px; font-size: 13px; opacity: 0.85; }
.hero-tagline { margin-top: 12px; font-size: 17px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chips span {
  padding: 3px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.dim + .dim { margin-top: 14px; }
.dim-head {
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 13px;
}
.dim-head .win { color: var(--c); font-weight: 600; }
.dim-name { color: #c4bac8; }
.dim-bar {
  display: flex;
  height: 10px;
  margin-top: 6px;
  overflow: hidden;
  background: #f4eef1;
  border-radius: 999px;
}
.dim-bar.is-right { justify-content: flex-end; }
.dim-fill { height: 100%; background: var(--c); border-radius: 999px; }

.match {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--c-soft);
  border-radius: 16px;
}
.match:first-of-type { margin-top: 0; }
.match-emoji { font-size: 36px; line-height: 1; }
.match-body { display: flex; flex-direction: column; }
.match-label { color: var(--c); font-size: 12px; font-weight: 600; }
.match-body b { font-size: 17px; }
.match-body small { color: var(--ink-3); font-size: 12px; }

.result .btn-primary { background: var(--c); box-shadow: 0 8px 22px var(--c-soft); }

.advice { background: var(--c-soft); box-shadow: none; }
.advice p { color: var(--ink); font-size: 17px; font-weight: 500; }

.review {
  margin-top: 16px;
  padding: 14px 16px;
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
  background: #fff;
  border: 1.5px dashed var(--line);
  border-radius: 16px;
}

/* ---------- 分享卡片弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(25, 12, 20, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-up 0.25s ease both;
}
.modal img {
  max-width: 86vw;
  max-height: 68vh;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.modal p { margin-top: 16px; color: #fff; font-size: 15px; }
.modal .btn { width: auto; min-width: 160px; margin-top: 14px; padding: 12px 24px; font-size: 15px; }
.modal .btn-link { color: rgba(255, 255, 255, 0.75); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
