/* ========== 七宗罪 VS 七美德 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --ink: #2c1c21;
  --ink-soft: #6b5258;
  --paper: #f8ecec;
  --paper-deep: #f2d8d8;
  --red: #8e1f30;
  --red-bright: #c63b52;
  --gold: #b3894a;
  --gold-light: #d9b98c;
  --night: #0e0a0b;
  --night-panel: #181114;
  --night-line: #32242b;
  --night-text: #e8dcdd;
  --night-dim: #9b8b90;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

html, body { height: 100%; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }

.screen { display: none; flex: 1; flex-direction: column; animation: fadeIn .5s ease; }
.screen.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 首页（浅） ---------- */
#screen-intro {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.9), transparent 60%),
    linear-gradient(165deg, #faf0ef 0%, #f6e3e3 45%, #f1d7d7 100%);
  padding: 44px 24px 32px;
}

.brand-en { text-align: center; letter-spacing: .42em; font-size: 11px; color: var(--gold); text-indent: .42em; }
.brand-title { text-align: center; font-size: 34px; font-weight: 700; letter-spacing: .12em; margin-top: 10px; color: var(--ink); }
.brand-title .vs { font-size: 18px; color: var(--red); vertical-align: middle; margin: 0 6px; letter-spacing: 0; }

.duality {
  display: flex; align-items: stretch; justify-content: center; gap: 0;
  margin: 26px auto 4px; max-width: 380px;
}
.duality .side { flex: 1; text-align: center; padding: 14px 8px; }
.duality .side + .side { border-left: 1px solid rgba(44,28,33,.18); }
.duality .label { font-size: 12px; color: var(--ink-soft); letter-spacing: .3em; text-indent: .3em; }
.duality .name { font-size: 24px; font-weight: 700; margin-top: 8px; letter-spacing: .2em; text-indent: .2em; }
.duality .sin .name { color: var(--ink); }
.duality .virtue .name { color: var(--red); }

.stats { display: flex; gap: 10px; margin: 24px 0 18px; }
.stat {
  flex: 1; background: rgba(255,255,255,.65); border: 1px solid rgba(142,31,48,.12);
  border-radius: 12px; padding: 12px 6px; text-align: center;
}
.stat .k { font-size: 11px; color: var(--ink-soft); }
.stat .v { font-size: 14px; font-weight: 700; margin-top: 5px; color: var(--ink); }

.intro-text {
  background: rgba(255,255,255,.55); border-radius: 12px; padding: 16px 18px;
  font-size: 14px; line-height: 1.9; color: var(--ink);
  border: 1px solid rgba(142,31,48,.08);
}

.btn-main {
  display: block; width: 100%; margin-top: 22px; padding: 16px;
  background: #1c1215; color: #f5eaea; font-family: var(--serif);
  font-size: 17px; letter-spacing: .35em; text-indent: .35em; font-weight: 700;
  border: none; border-radius: 10px; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn-main:active { transform: scale(.98); opacity: .9; }
.btn-main[disabled] { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  display: block; width: 100%; margin-top: 12px; padding: 13px;
  background: transparent; color: var(--ink); border: 1px solid rgba(44,28,33,.3);
  font-family: var(--serif); font-size: 14px; letter-spacing: .15em; border-radius: 10px; cursor: pointer;
}

.more-toggle { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-soft); cursor: pointer; user-select: none; }
.more-body { overflow: hidden; max-height: 0; transition: max-height .4s ease; }
.more-body.open { max-height: 400px; }
.more-inner {
  margin-top: 14px; background: rgba(255,255,255,.5); border-radius: 12px;
  padding: 14px 16px; font-size: 13px; line-height: 1.9; color: var(--ink-soft);
  border: 1px solid rgba(142,31,48,.08);
}

.quota {
  margin-top: 18px; text-align: center; font-size: 13px; color: var(--ink-soft);
}
.quota b { color: var(--red); }

.past-results { margin-top: 10px; }
.past-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.6); border: 1px solid rgba(142,31,48,.1);
  padding: 10px 14px; border-radius: 10px; margin-top: 8px; font-size: 13px; cursor: pointer;
}
.past-item .arrow { color: var(--gold); }

.disclaimer { margin-top: 22px; text-align: center; font-size: 12px; color: var(--ink-soft); line-height: 1.8; }

/* ---------- 答题页（浅） ---------- */
#screen-quiz { background: linear-gradient(180deg, #faf0ef, #f4e0e0); padding: 0 24px 32px; }
.quiz-top { padding: 18px 0 8px; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); }
.quiz-back { cursor: pointer; color: var(--ink-soft); font-size: 14px; padding: 4px 8px 4px 0; }
.progress { height: 3px; background: rgba(44,28,33,.12); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--red); border-radius: 2px; transition: width .3s ease; }

.q-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; }
.q-text { font-size: 21px; line-height: 1.75; font-weight: 700; text-align: center; min-height: 120px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.q-text.slide-in { animation: qIn .28s ease; }
@keyframes qIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }

.options { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.opt {
  padding: 14px 16px; text-align: center; font-family: var(--serif); font-size: 15px;
  background: rgba(255,255,255,.7); color: var(--ink);
  border: 1px solid rgba(44,28,33,.16); border-radius: 12px; cursor: pointer;
  transition: all .18s ease;
}
.opt:hover { border-color: var(--red); }
.opt.picked { background: var(--red); color: #fff; border-color: var(--red); transform: scale(.985); }
.opt .sub { display: block; font-size: 11px; opacity: .55; margin-top: 3px; }

/* ---------- 结果页（暗） ---------- */
#screen-result { background: var(--night); color: var(--night-text); padding: 40px 22px 36px; }
.result-en { text-align: center; letter-spacing: .42em; text-indent: .42em; font-size: 11px; color: var(--gold); }
.result-title { text-align: center; font-size: 26px; font-weight: 700; line-height: 1.6; margin-top: 12px; }

.crown { display: flex; gap: 12px; margin-top: 26px; }
.crown .card {
  flex: 1; border: 1px solid var(--night-line); border-radius: 14px;
  padding: 18px 10px 16px; text-align: center; background: var(--night-panel);
}
.crown .card.sin { border-color: rgba(198,59,82,.4); }
.crown .card.virtue { border-color: rgba(217,185,140,.4); }
.crown .k { font-size: 12px; color: var(--night-dim); letter-spacing: .2em; }
.crown .n { font-size: 26px; font-weight: 700; margin-top: 10px; }
.crown .card.sin .n { color: #e0798a; }
.crown .card.virtue .n { color: var(--gold-light); }
.crown .s { font-size: 13px; color: var(--night-dim); margin-top: 6px; }

.diff-line { text-align: center; margin-top: 18px; font-size: 13px; color: var(--night-dim); }
.diff-line b { color: var(--night-text); }

.section-title { margin-top: 34px; font-size: 18px; font-weight: 700; color: var(--night-text); }
.section-sub { margin-top: 6px; font-size: 12px; color: var(--night-dim); }
.section-title::before { content: ""; display: inline-block; width: 4px; height: 16px; background: var(--red-bright); margin-right: 8px; vertical-align: -2px; border-radius: 2px; }

.radar-box { margin-top: 10px; display: flex; justify-content: center; }
#radar { width: 100%; max-width: 480px; height: auto; }

.dim-list { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.dim-item { background: var(--night-panel); border: 1px solid var(--night-line); border-radius: 12px; padding: 14px 16px; }
.dim-head { display: flex; align-items: center; gap: 10px; }
.dim-name { font-size: 15px; font-weight: 700; min-width: 42px; }
.dim-tag { font-size: 10px; padding: 2px 7px; border-radius: 20px; letter-spacing: .1em; }
.dim-tag.sin { color: #e0798a; border: 1px solid rgba(198,59,82,.45); }
.dim-tag.virtue { color: var(--gold-light); border: 1px solid rgba(217,185,140,.45); }
.dim-score { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--night-text); }
.dim-bar { height: 4px; background: #2a1f24; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.dim-bar > i { display: block; height: 100%; border-radius: 2px; width: 0; transition: width 1s ease .2s; }
.dim-item.sin .dim-bar > i { background: linear-gradient(90deg, #7e3341, #c63b52); }
.dim-item.virtue .dim-bar > i { background: linear-gradient(90deg, #8d7342, #d9b98c); }
.dim-text { margin-top: 10px; font-size: 13px; line-height: 1.9; color: var(--night-dim); }

.summary-card {
  margin-top: 14px; background: linear-gradient(160deg, #1d1216, #171114);
  border: 1px solid var(--night-line); border-radius: 14px; padding: 18px;
  font-size: 14px; line-height: 2.0; color: var(--night-text);
}
.balance-text { margin-top: 12px; font-size: 13px; line-height: 1.9; color: var(--night-dim); }

.result-actions { margin-top: 26px; }
.result-actions .btn-main { background: #f0e3e3; color: #1c1215; }
.result-actions .btn-ghost { color: var(--night-text); border-color: var(--night-line); }

.result-foot { margin-top: 26px; text-align: center; font-size: 12px; color: var(--night-dim); line-height: 2; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,6,8,.55);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 30px;
}
.modal-mask.show { display: flex; animation: fadeIn .25s ease; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 340px; overflow: hidden;
}
.modal-title { text-align: center; font-size: 17px; font-weight: 700; padding: 22px 20px 6px; color: var(--ink); }
.modal-body { padding: 10px 24px 20px; font-size: 14px; line-height: 1.9; color: var(--ink-soft); text-align: center; }
.modal-btns { border-top: 1px solid #eee; display: flex; }
.modal-btns button {
  flex: 1; padding: 14px; border: none; background: #fff; font-family: var(--serif);
  font-size: 15px; color: var(--ink); cursor: pointer;
}
.modal-btns button.primary { color: #fff; background: #1c1215; }
.modal-btns button + button { border-left: 1px solid #eee; }
