:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2430;
  --sub: #5b6477;
  --line: #dbe0ec;
  --primary: #4455ff;
  --primary-hover: #3344e8;
  --primary-soft: #edf0ff;
  --accent-left: #4f9fb8;
  --accent-right: #8b67aa;
  --shadow: 0 14px 32px rgba(22, 35, 77, 0.08);
  --content-max: 1160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: radial-gradient(circle at 0% 0%, #eef2ff 0%, #f7f9ff 35%, #eef3ff 100%);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 0 52px;
  display: grid;
  gap: 20px;
}

.hero,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(16px, 2.2vw, 28px);
  box-shadow: var(--shadow);
}

.hero {
  width: min(var(--content-max), calc(100% - 28px));
  margin: 0 auto;
  padding: 24px clamp(12px, 3.2vw, 40px) 28px;
}

.card {
  width: min(var(--content-max), calc(100% - 28px));
  margin: 0 auto;
}

.hero h1 {
  margin: 12px 0 4px;
  font-size: 48px;
  letter-spacing: 0.5px;
}

.hero h2 {
  margin: 0;
  font-size: 20px;
  color: var(--sub);
}

.slogan {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #1c2ab0;
}

.desc {
  color: var(--sub);
  line-height: 1.75;
  max-width: 680px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #4a5375;
  font-weight: 700;
  width: 100%;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: conic-gradient(from 40deg, #6cb98f, #5ca7c6, #6f79de, #a56bbe, #d58f53, #6cb98f);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background-image: url("./img/1.png");
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #dfe6f3;
  min-height: clamp(420px, 62vh, 720px);
  width: 100%;
}

.hero-visual::before {
  content: none;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(27, 62, 110, 0.32) 0%,
    rgba(27, 62, 110, 0.2) 35%,
    rgba(16, 24, 43, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(84px, 12vh, 130px) 18px 0;
}

.hero-content .badge {
  background: rgba(237, 240, 255, 0.88);
}

.hero-content h1,
.hero-content h2,
.hero-content .slogan,
.hero-content .desc {
  color: #f8fcff;
}

.hero-content h1 {
  font-size: clamp(48px, 6vw, 76px);
  margin-top: 10px;
}

.hero-content h2 {
  color: #e7f2f7;
}

.hero-content .slogan {
  font-size: clamp(24px, 3.3vw, 44px);
  margin: 22px 0 12px;
}

.hero-content .desc {
  margin: 0 auto;
  color: #eaf4fa;
  max-width: 620px;
}

.hero-cta {
  margin-top: 18px;
  padding: 12px 28px;
  background: #9c66bd;
  box-shadow: 0 10px 22px rgba(126, 73, 165, 0.35);
}

.hero-cta:hover {
  background: #8f59b2;
}

.hero-scene {
  display: none;
}

.mountain {
  position: absolute;
  bottom: 88px;
  background: #8cc3d8;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.mountain.one {
  width: 270px;
  height: 110px;
  left: 12%;
}

.mountain.two {
  width: 320px;
  height: 130px;
  right: 12%;
}

.mountain.three {
  width: 220px;
  height: 86px;
  left: 42%;
  bottom: 98px;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, #eff3fa 0%, #e2e8f3 100%);
}

.campfire {
  position: absolute;
  left: 50%;
  bottom: 78px;
  width: 34px;
  height: 34px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(180deg, #ffd55f 0%, #ffb545 100%);
  border-radius: 8px 8px 14px 14px;
  box-shadow: 0 0 18px rgba(255, 185, 74, 0.55);
}

.character {
  position: absolute;
  bottom: 58px;
  width: 42px;
  height: 64px;
  border-radius: 14px;
}

.character::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f7d6bc;
  left: 12px;
  top: -12px;
}

.character.c1 {
  left: 22%;
  background: #5ca9bc;
}

.character.c2 {
  left: 50%;
  transform: translateX(-50%);
  background: #6cb98f;
}

.character.c3 {
  right: 20%;
  background: #9f6ca6;
}

.hero-config {
  margin-top: 16px;
  width: 100%;
}

.stage-line {
  margin: 16px 0 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stage {
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--sub);
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
}

.stage.active {
  border-color: #6f7eff;
  background: #eef1ff;
  color: #2433b9;
  font-weight: 700;
}

.mode-selector {
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 14px;
  background: #f7f9ff;
  border: 1px solid #e4e9fb;
}

.mode-selector p {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.mode-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #3241bf;
  font-size: 13px;
  font-weight: 700;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(68, 85, 255, 0.25);
}

.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.secondary {
  background: #eef2fb;
  color: #1c2644;
  border-color: #dde4f5;
}

.secondary:hover {
  background: #e4eaf8;
}

.mode-btn.active {
  background: #dfe5ff;
  color: #2332b7;
  border: 1px solid #6b7aff;
}

.card {
  margin-top: 20px;
}

.hidden {
  display: none;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-top p {
  margin: 0;
  min-width: 104px;
  font-weight: 700;
  color: #2b3760;
}

.auto-next-toggle {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sub);
  font-size: 14px;
  user-select: none;
}

.auto-next-toggle input {
  width: 16px;
  height: 16px;
}

.progress {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: #e6ecfb;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4c5dff, #7181ff);
  transition: width 0.2s ease;
}

#questionTitle {
  margin-top: 14px;
  font-size: 25px;
  line-height: 1.45;
}

.options {
  margin-top: 14px;
}

.question-pair {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  color: var(--sub);
  font-size: 16px;
}

.pair-item {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8ff 100%);
  border-radius: 14px;
  padding: 12px 14px;
}

.scale-wrap {
  margin-top: 16px;
  padding: 14px 12px 10px;
  border: 1px solid #e5eafb;
  border-radius: 14px;
  background: #fcfdff;
}

.scale-help {
  text-align: center;
  margin: 0 0 10px;
  color: var(--sub);
  font-size: 14px;
}

.scale-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.scale-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid #c4cada;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease, box-shadow 0.15s ease;
}

.scale-btn.sm {
  width: 42px;
  height: 42px;
}

.scale-btn.md {
  width: 48px;
  height: 48px;
}

.scale-btn.left {
  border-color: var(--accent-left);
}

.scale-btn.right {
  border-color: var(--accent-right);
}

.scale-btn.neutral {
  border-color: #a2a8b8;
}

.scale-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(48, 67, 119, 0.14);
}

.scale-btn.active.left {
  background: #e8f6fb;
  box-shadow: 0 0 0 4px rgba(79, 159, 184, 0.16);
}

.scale-btn.active.right {
  background: #f2eafb;
  box-shadow: 0 0 0 4px rgba(139, 103, 170, 0.16);
}

.scale-btn.active.neutral {
  background: #eef1f7;
  box-shadow: 0 0 0 4px rgba(150, 160, 180, 0.15);
}

.scale-legend {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--sub);
  font-size: 13px;
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#resultCode {
  margin: 14px 0 2px;
  font-size: 44px;
  letter-spacing: 2px;
  color: #2635c2;
}

.result-head {
  margin-top: 10px;
}

.result-portrait {
  width: min(100%, 360px);
  border-radius: 14px;
  border: 1px solid #dce2f6;
  display: block;
  background: #f6f8ff;
}

#resultName {
  margin: 0;
  font-size: 26px;
}

.result-tagline {
  margin-top: 10px;
  color: var(--sub);
}

.result-accuracy {
  margin-top: 8px;
  color: #45527b;
  font-size: 14px;
  line-height: 1.7;
}

.result-narrative {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dce3fb;
  background: linear-gradient(180deg, #f7f9ff, #eff3ff);
  color: #2d3862;
  line-height: 1.75;
}

.result-blocks {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.result-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.result-block h5 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #2b3868;
}

.result-block p {
  margin: 0 0 8px;
  color: var(--sub);
  line-height: 1.7;
  font-size: 14px;
}

.result-block p:last-child {
  margin-bottom: 0;
}

.result-block p strong,
.scenario-item p strong,
.result-today p strong {
  color: #273a77;
}

.result-scenarios {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.scenario-item {
  border: 1px solid #dfe5f7;
  border-radius: 12px;
  background: #fdfefe;
  padding: 12px;
}

.scenario-item h5 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #2a3766;
}

.scenario-item p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--sub);
  line-height: 1.75;
}

.scenario-item p:last-child {
  margin-bottom: 0;
}

.result-today {
  margin-top: 12px;
  border: 1px solid #d7e0fb;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
  padding: 12px 14px;
}

.result-today h5 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #2433b4;
}

.result-today p {
  margin: 0 0 8px;
  color: #3a466f;
  line-height: 1.75;
  font-size: 14px;
}

.result-today p:last-child {
  margin-bottom: 0;
}

.scores {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.legal-note {
  margin-top: 14px;
  border: 1px solid #d7e0fb;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
  padding: 12px 14px;
}

.legal-note p {
  margin: 0 0 10px;
  color: #3a466f;
  line-height: 1.75;
  font-size: 14px;
}

.legal-note p:last-child {
  margin-bottom: 0;
}

.legal-link {
  color: var(--primary);
  text-decoration: underline;
}

.legal-muted {
  color: var(--sub);
}

.legal-footnote {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.75;
}

.legal-footer {
  width: min(var(--content-max), calc(100% - 28px));
  margin: 0 auto;
  padding: 8px 0 18px;
  color: var(--sub);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.legal-divider {
  color: var(--line);
}

.score-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  background: linear-gradient(180deg, #fbfcff, #f5f8ff);
}

.intro ul {
  margin-bottom: 0;
  line-height: 1.75;
  color: var(--sub);
}

@media (min-width: 1280px) {
  :root {
    --content-max: 1240px;
  }

  .hero-visual {
    min-height: 680px;
  }
}

@media (min-width: 1600px) {
  :root {
    --content-max: 1360px;
  }
}

@media (min-width: 1920px) {
  :root {
    --content-max: 1480px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100%, 100vw);
    padding: 0 0 30px;
    gap: 12px;
  }

  .hero,
  .card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .hero {
    width: calc(100% - 12px);
    margin: 0 auto;
    padding: 14px 10px 18px;
  }

  .card {
    width: calc(100% - 12px);
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-visual {
    min-height: 420px;
    background-size: cover;
    background-position: center center;
  }

  .hero-content {
    padding-top: 84px;
  }

  .hero-content .slogan {
    font-size: 24px;
    line-height: 1.4;
  }

  .hero-content .desc {
    font-size: 14px;
    line-height: 1.65;
  }

  .hero-scene {
    height: 190px;
  }

  .mountain.one {
    width: 160px;
    height: 70px;
    left: 4%;
  }

  .mountain.two {
    width: 180px;
    height: 76px;
    right: 2%;
  }

  .mountain.three {
    width: 120px;
    height: 54px;
    left: 40%;
  }

  #questionTitle {
    font-size: 21px;
  }

  .mode-selector {
    padding: 10px;
  }

  .scale-row {
    gap: 8px;
  }

  .scale-btn {
    width: 48px;
    height: 48px;
  }

  .scale-btn.md {
    width: 42px;
    height: 42px;
  }

  .scale-btn.sm {
    width: 36px;
    height: 36px;
  }

  .scores {
    grid-template-columns: 1fr;
  }

  .actions {
    position: sticky;
    bottom: 10px;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 40%);
  }
}
