/* ============================================================
 * 《情侣忠诚度测试》 · 暗夜酒金视觉
 * 深墨蓝底 + 酒红 + 香槟金 · 衬线标题制造悬念感
 * ============================================================ */

:root {
  --bg: #12151D;
  --bg-deep: #0C0F16;
  --card: #1B2030;
  --card-2: #202740;
  --line: rgba(255, 255, 255, 0.07);
  --ink: #F0EBE2;
  --ink-soft: #B9B0A4;
  --ink-faint: #8E8579;
  --gold: #D8B98A;
  --gold-hi: #E8D3AE;
  --wine: #C2536A;
  --wine-deep: #8E3A50;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.screen {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: linear-gradient(175deg, #171C29 0%, var(--bg) 42%, #10131C 100%);
  padding: 0 22px 56px;
  position: relative;
  overflow-x: hidden;
}

/* ================= 开始页 ================= */
.welcome { padding-top: 58px; }

.hero { text-align: center; padding: 34px 0 30px; position: relative; }
.hero-rings {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px; pointer-events: none;
}
.hero-rings i {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(216, 185, 138, 0.22);
  transform: translate(-50%, -50%);
  animation: ringPulse 5s ease-in-out infinite;
}
.hero-rings i:nth-child(1) { width: 120px; height: 120px; }
.hero-rings i:nth-child(2) { width: 164px; height: 164px; animation-delay: .8s; }
.hero-rings i:nth-child(3) { width: 208px; height: 208px; animation-delay: 1.6s; }
@keyframes ringPulse {
  0%, 100% { opacity: .25; }
  50% { opacity: .8; }
}

.hero-eyebrow {
  font-size: 12px; letter-spacing: 6px; color: var(--wine);
  font-weight: 600; text-indent: 6px;
}
.hero-title {
  font-family: var(--serif);
  font-size: 34px; font-weight: 700; letter-spacing: 4px;
  color: var(--ink); margin-top: 14px;
}
.hero-quote {
  font-family: var(--serif);
  font-size: 16px; color: var(--gold);
  margin-top: 16px; letter-spacing: 1px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 22px 28px;
}
.intro {
  font-size: 14.5px; color: var(--ink-soft);
  text-align: center; line-height: 2.1;
}
.fact-row {
  display: flex; gap: 10px; margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { flex: 1; text-align: center; }
.fact b {
  display: block; font-size: 24px; font-weight: 700;
  color: var(--gold-hi); font-family: var(--serif);
}
.fact span { font-size: 12px; color: var(--ink-faint); }

.panel-sub {
  margin-top: 20px; font-size: 13px; font-weight: 600;
  color: var(--wine); letter-spacing: 2px;
}
.panel-body {
  font-size: 13.5px; color: var(--ink-soft); margin-top: 8px;
}

.chip-wrap { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  font-size: 12px; color: var(--gold);
  border: 1px solid rgba(216, 185, 138, 0.35);
  border-radius: 999px; padding: 5px 13px;
}

.btn-start {
  display: block; width: 100%;
  margin-top: 26px; border: none; cursor: pointer;
  font-family: var(--serif);
  font-size: 17px; font-weight: 700; letter-spacing: 8px; text-indent: 8px;
  color: #FFF;
  background: linear-gradient(135deg, #D46A6A, var(--wine) 55%, var(--wine-deep));
  border-radius: 16px; padding: 16px 0;
  box-shadow: 0 12px 30px rgba(194, 83, 106, 0.35);
}
.btn-start:active { transform: translateY(1px); opacity: .92; }

.tip { margin-top: 14px; text-align: center; font-size: 12px; color: var(--ink-faint); }

.foot {
  margin-top: 34px; text-align: center;
  font-size: 11.5px; color: #5C6370; line-height: 1.9;
}

/* ================= 答题页 ================= */
.quiz { padding-top: 24px; display: flex; flex-direction: column; }

.quiz-head { padding: 6px 0 22px; }
.back {
  width: 44px; height: 44px; border: none; cursor: pointer;
  background: var(--card); border-radius: 13px;
  color: var(--ink-soft); display: flex; align-items: center; justify-content: center;
}
.back svg { width: 20px; height: 20px; }
.back:active { opacity: .7; }

.prog-label { margin-top: 16px; font-size: 13px; color: var(--ink-faint); }
.prog-label b { color: var(--gold-hi); font-size: 18px; font-family: var(--serif); }
.prog-track {
  height: 3px; background: rgba(255, 255, 255, 0.08);
  border-radius: 99px; margin-top: 10px; overflow: hidden;
}
.prog-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
  transition: width .4s ease;
}

.qcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 24px;
  animation: cardIn .4s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.q-scene {
  font-family: var(--serif);
  font-size: 18px; font-weight: 600;
  line-height: 1.95; color: var(--ink);
  letter-spacing: .5px;
}

.opts { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px; line-height: 1.7;
  transition: border-color .15s, background .15s, transform .12s;
  animation: cardIn .4s ease both;
  animation-delay: .06s;
}
.opt:active { transform: scale(0.985); }
.opt .opt-letter {
  flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(216, 185, 138, 0.1);
  color: var(--gold);
  font-size: 13px; font-weight: 700;
}
.opt.picked {
  border-color: var(--wine);
  background: linear-gradient(135deg, rgba(194, 83, 106, 0.2), rgba(194, 83, 106, 0.08));
}
.opt.picked .opt-letter { background: var(--wine); color: #FFF; }

/* ================= 揭晓页 ================= */
.reveal {
  position: fixed; inset: 0; z-index: 40;
  max-width: none; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, #1C2233, var(--bg-deep) 70%);
  cursor: pointer;
}
.reveal-inner { text-align: center; width: 100%; max-width: 480px; padding: 0 40px; }
.reveal-ring { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.reveal-ring svg { width: 100%; height: 100%; display: block; }
.reveal-pct {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-size: 44px; font-weight: 700; color: var(--gold-hi);
}
.reveal-copy {
  margin-top: 30px;
  font-family: var(--serif); font-size: 17px;
  color: var(--ink-soft); letter-spacing: 3px;
}
.reveal-hint {
  position: absolute; bottom: 48px; left: 0; right: 0;
  font-size: 12px; color: #5C6370; text-align: center;
}
#reveal-arc { transition: stroke-dashoffset .2s linear; }

/* ================= 结果页 ================= */
.result { padding-top: 46px; }
.res-hero { text-align: center; padding-bottom: 8px; }
.res-eyebrow { font-size: 12px; letter-spacing: 4px; color: var(--wine); font-weight: 600; }
.res-type {
  font-family: var(--serif);
  font-size: 40px; font-weight: 700; letter-spacing: 5px;
  color: var(--ink); margin-top: 18px;
  animation: cardIn .6s ease both;
}
.res-oneliner {
  font-family: var(--serif);
  margin-top: 14px; font-size: 15.5px; color: var(--gold);
  letter-spacing: 1px;
}
.res-ring {
  position: relative; width: 168px; height: 168px;
  margin: 30px auto 0;
}
.res-ring svg { width: 100%; height: 100%; display: block; }
.res-ring-txt {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
}
.res-ring-txt b {
  display: block; font-family: var(--serif);
  font-size: 46px; font-weight: 700; color: var(--gold-hi); line-height: 1.1;
}
.res-ring-txt span { font-size: 11px; color: var(--ink-faint); letter-spacing: 2px; }
.res-band { margin-top: 22px; font-size: 13.5px; color: var(--ink-soft); }
.res-band b { color: var(--gold-hi); font-weight: 600; }
.res-band-copy { margin-top: 6px; font-size: 13px; color: var(--ink-faint); line-height: 1.8; }
.res-band-note { margin-top: 10px; font-size: 12px; color: var(--ink-faint); line-height: 1.7; opacity: .85; border-top: 1px dashed rgba(216,185,138,.25); padding-top: 10px; }

.res-card {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
}
.res-card h2 {
  font-size: 15px; font-weight: 600; letter-spacing: 2px;
  color: var(--gold); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.res-card h2::before {
  content: ""; width: 14px; height: 2px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
}
.res-card.good { border-color: rgba(216, 185, 138, 0.3); }
.res-card.comm { border-color: rgba(194, 83, 106, 0.3); }

.radar { width: 100%; max-width: 330px; display: block; margin: 4px auto 0; }

.bar-row { margin-top: 14px; }
.bar-row:first-of-type { margin-top: 4px; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; }
.bar-name { font-size: 13.5px; color: var(--ink-soft); }
.bar-val { font-family: var(--serif); font-size: 17px; color: var(--gold-hi); }
.bar-track {
  height: 7px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  margin-top: 7px; overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
  animation: barIn 1s ease both;
}
@keyframes barIn { from { width: 0 !important; } }

.res-body { font-size: 14px; color: var(--ink-soft); line-height: 2; }
.strong-line {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(216, 185, 138, 0.07);
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
}
.res-list { list-style: none; margin-top: 4px; }
.res-list li {
  position: relative;
  padding: 9px 0 9px 20px;
  font-size: 14px; color: var(--ink-soft); line-height: 1.9;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.res-list li:last-child { border-bottom: none; }
.res-list li::before {
  content: ""; position: absolute; left: 2px; top: 19px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wine);
}
.res-list li.hl { color: var(--gold-hi); }
.res-list li.hl::before { background: var(--gold); }
.res-note { margin-top: 12px; font-size: 11.5px; color: #5C6370; }

.mini-card {
  background: var(--card-2);
  border-radius: 14px;
  padding: 16px 16px;
  margin-top: 12px;
}
.mini-card:first-of-type { margin-top: 0; }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; }
.mini-head h3 { font-size: 14px; font-weight: 600; color: var(--ink); }
.mini-score { font-family: var(--serif); font-size: 20px; color: var(--gold-hi); }
.mini-score i { font-style: normal; font-size: 11px; color: var(--ink-faint); font-family: var(--sans); }
.mini-card p { margin-top: 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.9; }

.res-quote-card {
  margin-top: 24px;
  text-align: center;
  background: linear-gradient(160deg, rgba(194, 83, 106, 0.14), rgba(216, 185, 138, 0.06));
  border: 1px solid rgba(194, 83, 106, 0.3);
  border-radius: 20px;
  padding: 34px 26px 30px;
  position: relative;
}
.res-quote-mark {
  font-family: var(--serif);
  font-size: 54px; color: var(--wine); line-height: .6; opacity: .8;
}
.res-quote {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 20px; font-weight: 600;
  color: var(--ink); letter-spacing: 2px; line-height: 1.9;
}

.res-actions { margin-top: 28px; }
.btn-main {
  display: block; width: 100%; border: none; cursor: pointer;
  font-family: var(--sans);
  font-size: 16px; font-weight: 700; letter-spacing: 4px; text-indent: 4px;
  color: #FFF;
  background: linear-gradient(135deg, #D46A6A, var(--wine) 55%, var(--wine-deep));
  border-radius: 15px; padding: 15px 0;
  box-shadow: 0 12px 30px rgba(194, 83, 106, 0.32);
}
.btn-main:active { transform: translateY(1px); opacity: .92; }
.btn-ghost {
  display: block; width: 100%; margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent; cursor: pointer;
  font-family: var(--sans);
  font-size: 14px; font-weight: 500; letter-spacing: 3px;
  color: var(--ink-soft);
  border-radius: 15px; padding: 13px 0;
}
.btn-ghost:active { opacity: .7; }

/* ================= 分享弹层 ================= */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 10, 16, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.share-wrap { width: 100%; max-width: 340px; text-align: center; }
.share-tip { font-size: 13px; color: var(--gold); margin-bottom: 14px; letter-spacing: 1px; }
.share-img {
  width: 100%; display: block;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.share-wrap .btn-ghost { margin-top: 16px; }

/* 桌面端 */
@media (min-width: 520px) {
  body { padding: 0; }
  .screen { box-shadow: 0 0 80px rgba(0, 0, 0, 0.4); }
}
