/* ============================================================
 * 你的情绪底色 —— 审美层
 * 三套配色，改 <html data-theme="..."> 即可切换
 * blue（雾蓝）/ pink（雾粉）/ coffee（奶咖）
 * ============================================================ */

:root {
  /* 默认：雾蓝 */
  --bg:        #F7F8F9;
  --bg-card:   #FFFFFF;
  --text:      #24282B;
  --text-sub:  #62696E;
  --text-mute: #A3A9AE;
  --accent:    #7E94A3;
  --accent-soft: rgba(126, 148, 163, 0.12);
  --line:      rgba(36, 40, 43, 0.08);
  --line-strong: rgba(36, 40, 43, 0.14);

  /* 背景光晕三色（雾蓝） */
  --aura-1: rgba(126, 148, 163, 0.52);
  --aura-2: rgba(174, 196, 210, 0.46);
  --aura-3: rgba(252, 248, 244, 0.88);

  --font-title: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body:  "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num:   "Cormorant Garamond", "EB Garamond", Georgia, "Songti SC", serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="pink"] {
  --bg:        #FAF7F4;
  --text:      #2A2724;
  --text-sub:  #6B6660;
  --text-mute: #A8A29C;
  --accent:    #C08B7D;
  --accent-soft: rgba(192, 139, 125, 0.12);
  --line:      rgba(42, 39, 36, 0.08);
  --line-strong: rgba(42, 39, 36, 0.14);

  /* 背景光晕三色（雾粉） */
  --aura-1: rgba(192, 139, 125, 0.46);
  --aura-2: rgba(228, 198, 192, 0.42);
  --aura-3: rgba(253, 248, 245, 0.88);
}

[data-theme="coffee"] {
  --bg:        #FAF7F1;
  --text:      #2B2620;
  --text-sub:  #6D6459;
  --text-mute: #AAA196;
  --accent:    #A68B6B;
  --accent-soft: rgba(166, 139, 107, 0.12);
  --line:      rgba(43, 38, 32, 0.08);
  --line-strong: rgba(43, 38, 32, 0.14);

  /* 背景光晕三色（奶咖） */
  --aura-1: rgba(166, 139, 107, 0.44);
  --aura-2: rgba(216, 200, 180, 0.40);
  --aura-3: rgba(253, 250, 244, 0.88);
}

/* ---------------- 基础 ---------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  position: relative;
  z-index: 2;
  /* 不铺底色：底色在 body 上，光晕层夹在中间，这里必须透明才能看见 */
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 0 28px 48px;
  flex-direction: column;
}

.screen.active {
  display: flex;
  animation: fadeUp 0.5s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- 入口页 ---------------- */

.intro {
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100dvh;
  padding-top: 44px;
  padding-bottom: 36px;
}

.intro-eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.28em;
  color: var(--text-mute);
  margin-bottom: 22px;
  text-indent: 0.28em;
}

.intro-title {
  font-family: var(--font-title);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  text-indent: 0.06em;
}

.intro-sub {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--text-sub);
  max-width: 300px;
  margin-bottom: 6px;
}

.intro-meta {
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  margin-bottom: 0;
}

.intro-count {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  margin-bottom: 30px;
  margin-top: 6px;
}

.intro-count strong {
  font-size: 19px;
  color: var(--text-sub);
  font-weight: 500;
}

.intro-note {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* 细线分隔 */
.rule {
  width: 30px;
  height: 1px;
  background: var(--line-strong);
  margin: 26px auto;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: 3px;
  padding: 16px 56px;
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  cursor: pointer;
  transition: opacity 0.3s var(--ease), transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.985); }

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm {
  padding: 11px 28px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}

/* ---------------- 答题页 ---------------- */

.quiz-head {
  padding-top: 40px;
  margin-bottom: 44px;
}

.progress-track {
  height: 2px;
  background: rgba(120, 132, 145, 0.18);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 20px;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.45s var(--ease);
  width: 0%;
}

.quiz-index {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

.quiz-index .num {
  font-family: var(--font-num);
  font-size: 17px;
  color: var(--text-sub);
}

.quiz-index .num em {
  font-style: normal;
  color: var(--text-mute);
  font-size: 14px;
}

.quiz-body { flex: none; }

.question {
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1.75;
  font-weight: 500;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
  min-height: 3.5em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  /* 半透明 + 毛玻璃：让选项"长在"背景上，而不是贴在上面。
   * 用白色描边代替灰色描边——灰线在柔和底色上会显脏、显硬。 */
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  padding: 18px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(10px) saturate(1.06);
  -webkit-backdrop-filter: blur(10px) saturate(1.06);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

/* 不支持毛玻璃的浏览器：退回稍实一点的半透明，字依然清楚 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .option {
    background: rgba(255, 255, 255, 0.72);
  }
}

.option:hover {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(255, 255, 255, 0.82);
}

.option.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.quiz-foot {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}

.skip {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-sub);
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.25s var(--ease);
}

.skip:hover { color: var(--text-sub); }

/* ---------------- 报告页 ---------------- */

.report {
  padding-top: 56px;
}

.report-label {
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--text-mute);
  margin-bottom: 14px;
  text-indent: 0.24em;
}

.report-name {
  font-family: var(--font-title);
  font-size: 64px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-indent: 0.08em;
}

/* 铺了丝缎背景后，底色名改用「加深压暗」的颜色，
   避免主题 accent（默认雾蓝）和背景撞色、也保证在浅底上依然清晰。 */
body.report-active .report-name {
  color: var(--result-ink, #3A4247);
  text-shadow: 0 1px 18px rgba(255, 255, 255, 0.55);
}

/* 八种底色各自的墨色：和对应背景的色调同族，但压得更暗，
   保证在浅色留白区上清晰可读。焰是夜景，不走这套。 */
html[data-result-name="雾"] { --result-ink: #5A6872; }
html[data-result-name="潮"] { --result-ink: #35636E; }
html[data-result-name="苔"] { --result-ink: #55634C; }
html[data-result-name="霜"] { --result-ink: #4E6272; }
html[data-result-name="焰"] { --result-ink: #8A3A1E; }
html[data-result-name="露"] { --result-ink: #A26B5E; }
html[data-result-name="岩"] { --result-ink: #5F5044; }
html[data-result-name="光"] { --result-ink: #8A6A3A; }

.report-line {
  font-family: var(--font-title);
  font-size: 19px;
  line-height: 1.8;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

/* 丝缎背景上，正文加一点白色柔光，保证可读 */
body.report-active .report-line,
body.report-active .report-label,
body.report-active .report-sub,
body.report-active .reading h3,
body.report-active .reading p {
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.75);
}

body.report-active .reading p {
  color: #4A5157;
}

/* 丝缎背景上，弱化色的文字（占比、锁定条目、页脚）要补一点对比度才看得清 */
body.report-active .report-sub,
body.report-active .reading.locked h3,
body.report-active .reading.locked p,
body.report-active .foot-mark,
body.report-active .restart {
  color: #6B7278;
}

body.report-active .reading.locked h3,
body.report-active .reading.locked p {
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.85);
}

.report-sub {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}

/* 雷达图 */
.radar-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  margin-bottom: 12px;
}

.radar svg { overflow: visible; }

.radar-label {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--text-mute);
  letter-spacing: 1px;
}

/* 解读 */
.readings {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.reading {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.reading h3 {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.reading p {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--text-sub);
}

/* 锁住的那条 */
.reading.locked h3 {
  color: var(--text-mute);
  user-select: none;
}

.reading.locked p {
  color: var(--text-mute);
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.lock-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* 分享区 */
.share-block {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.share-title {
  font-family: var(--font-title);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
  letter-spacing: 0.03em;
}

.share-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.foot-mark {
  margin-top: 44px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 0.16em;
}

/* 重做 */
.restart {
  display: block;
  margin: 28px auto 0;
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 8px;
}

.restart:hover { color: var(--text-sub); }

/* ---------------- 提示条 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(36, 40, 43, 0.88);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 22px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 99;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- 小屏微调 ---------------- */

@media (max-width: 380px) {
  .screen { padding-left: 22px; padding-right: 22px; }
  .intro-title { font-size: 34px; }
  .report-name { font-size: 54px; }
  .question { font-size: 20px; }
}

/* ============================================================
 * 背景氛围层
 * 三个超模糊光斑 + 一层极细噪点，纯 CSS —— 不用外部图片，
 * 好处是换主题配色时背景自动跟着变，离线也不会加载失败。
 * 要调整浓淡就改各主题里的 --aura-*，要更明显就把 blur 调小、
 * 要更淡就把色值的 alpha 降到 0.15 左右。
 * ============================================================ */

.bg-aura {
  position: fixed;
  inset: -12%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-aura i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

/* 左上：主色调的大光斑 */
.bg-aura i:nth-child(1) {
  width: 80vmax;
  height: 80vmax;
  top: -28%;
  left: -26%;
  background: radial-gradient(circle at 42% 42%, var(--aura-1), transparent 62%);
  animation: drift-a 64s ease-in-out infinite alternate;
}

/* 右下：第二个冷/暖光 */
.bg-aura i:nth-child(2) {
  width: 64vmax;
  height: 64vmax;
  bottom: -24%;
  right: -22%;
  background: radial-gradient(circle at 56% 50%, var(--aura-2), transparent 64%);
  animation: drift-b 78s ease-in-out infinite alternate;
}

/* 中部：一点提亮的暖白，避免整片发灰 */
.bg-aura i:nth-child(3) {
  width: 44vmax;
  height: 44vmax;
  top: 40%;
  left: 44%;
  background: radial-gradient(circle at 50% 50%, var(--aura-3), transparent 60%);
  animation: drift-c 92s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(5%, 4%) scale(1.07); }
}

@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.05); }
  to   { transform: translate(-5%, -4%) scale(1); }
}

@keyframes drift-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-4%, 3%) scale(1.1); }
}

/* 丝缎褶皱：斜向的明暗交替 + 大模糊，模拟缎面被光扫过的感觉。
 * 参考图里那种质感靠 AI 生图，这里用纯 CSS 逼近：
 * 白色条给高光，淡淡的冷灰条给折痕，整体再糊开。
 */
.bg-silk {
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    112deg,
    rgba(255, 255, 255, 0.85) 0px,
    rgba(146, 158, 170, 0.075) 42px,
    rgba(255, 255, 255, 0.85) 96px,
    rgba(146, 158, 170, 0.062) 150px,
    rgba(255, 255, 255, 0.85) 204px
  );
  filter: blur(34px);
  opacity: 0.55;
}

/* 细颗粒，给一点丝缎的质感，压掉渐变的塑料感 */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* 尊重系统的「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  .bg-aura i { animation: none; }
}

/* ============================================================
 * 通用页背景（入口 / 答题）
 * 一张丝缎照片铺底，报告页淡出，交给下面的 .bg-result
 * ============================================================ */

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("bg.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  transition: opacity 0.8s var(--ease);
}

/* 薄雾：照片本身有明暗起伏，不压一层的话小字会陷进背景里。
 * 上下厚、中间薄，因为标题区需要更多支撑，而中部留给画面呼吸。 */
.bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(250, 250, 252, 0.60) 0%,
    rgba(250, 250, 252, 0.44) 26%,
    rgba(250, 250, 252, 0.38) 56%,
    rgba(250, 250, 252, 0.64) 100%
  );
}

/* 报告页：照片让位给底色图 */
body.report-active .bg-photo {
  opacity: 0;
}

/* ============================================================
 * 结果底色背景
 * 八种底色各有一张 AI 生成的照片，测出结果后铺到报告页。
 * 每张图的构图都是「上 2/3 浅色留白 + 下 1/3 主体意象」，
 * 文字压在上半部，意向沉在下半部，两者互不干扰。
 * 用 cover 铺满屏幕，只在报告页显示。
 * ============================================================ */

.bg-result {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.9s var(--ease);
}

/* 报告页激活时才显示 */
body.report-active .bg-result {
  opacity: 1;
}

/* 极轻的雾罩：新图上部本身就是干净的浅色留白区，
   只需要一点点柔化，避免压掉影像本身的层次。 */
body.report-active .bg-result::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.46) 30%,
    rgba(255, 255, 255, 0.44) 58%,
    rgba(255, 255, 255, 0.18) 100%
  );
}

/* ---------------- 夜间模式：焰 ----------------
 * 焰的意象是夜晚的篝火，上半部是深色夜空。
 * 这时深色字读不了，整页翻转成浅色文字，
 * 夜晚该有的样子本来就该是浅字压在夜色上。 */
html[data-result-tone="night"] body.report-active .bg-result::after {
  background: linear-gradient(
    180deg,
    rgba(10, 14, 24, 0.50) 0%,
    rgba(10, 14, 24, 0.44) 34%,
    rgba(10, 14, 24, 0.58) 62%,
    rgba(10, 14, 24, 0.42) 100%
  );
}

/* 夜间模式下的文字 */
html[data-result-tone="night"] body.report-active .report-name {
  color: #F3E3D2;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.55);
}

html[data-result-tone="night"] body.report-active .report-line,
html[data-result-tone="night"] body.report-active .report-label {
  color: #E8DCD2;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6);
}

html[data-result-tone="night"] body.report-active .report-sub {
  color: #BFB4AA;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6);
}

html[data-result-tone="night"] body.report-active .reading h3 {
  color: #EDE3D9;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6);
}

html[data-result-tone="night"] body.report-active .reading p {
  color: #CFC5BB;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

html[data-result-tone="night"] body.report-active .reading.locked h3,
html[data-result-tone="night"] body.report-active .reading.locked p {
  color: #9A8F86;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

html[data-result-tone="night"] body.report-active .foot-mark,
html[data-result-tone="night"] body.report-active .restart {
  color: #A79C93;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

html[data-result-tone="night"] body.report-active .radar-label {
  fill: #BFB4AA;
}

html[data-result-tone="night"] body.report-active .rule,
html[data-result-tone="night"] body.report-active .reading {
  border-color: rgba(255, 255, 255, 0.16);
}