:root {
  --bg-1: #f8d694;
  --bg-2: #ffe7bf;
  --bg-3: #fff8ef;
  --paper: rgba(255, 249, 241, 0.9);
  --line: rgba(110, 66, 35, 0.12);
  --ink: #171717;
  --brown: #8d5a33;
  --warm: #f2ba66;
  --warm-deep: #d68444;
  --shadow: 0 22px 60px rgba(100, 58, 28, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  overflow-x: hidden;
  font-family: "SimHei", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 248, 227, 0.72), transparent 18%),
    radial-gradient(circle at 84% 12%, rgba(255, 235, 194, 0.48), transparent 14%),
    linear-gradient(180deg, #f7d586 0%, var(--bg-1) 20%, var(--bg-2) 56%, var(--bg-3) 100%);
}

.screen-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 22px 22px;
}

.app-shell {
  position: relative;
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.intro-card,
.question-panel,
.result-wrap {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.intro-card {
  overflow: hidden;
}

.intro-scene {
  position: relative;
  min-height: 430px;
  background: linear-gradient(180deg, #89d6ff 0%, #c6f1ff 44%, #d7efb8 72%, #f1d48c 100%);
}

.intro-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.65), transparent 12%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.52), transparent 10%);
}

.intro-cloud {
  position: absolute;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.intro-cloud::before,
.intro-cloud::after {
  content: "";
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
}

.intro-cloud::before {
  left: 10px;
  width: 34px;
  height: 34px;
}

.intro-cloud::after {
  right: 14px;
  width: 26px;
  height: 26px;
}

.cloud-a {
  top: 54px;
  left: 82px;
  width: 96px;
}

.cloud-b {
  top: 90px;
  right: 120px;
  width: 104px;
}

.intro-ground {
  position: absolute;
  inset: auto 0 0;
  height: 112px;
  background:
    repeating-linear-gradient(90deg, #77b14e 0 22px, #82bc57 22px 44px, #699d43 44px 66px),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.06));
  border-top: 4px solid rgba(77, 117, 50, 0.36);
}

.intro-stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  height: 236px;
}

.pixel-chicken-shadow,
.small-egg-shadow {
  position: absolute;
  border-radius: 999px;
  background: rgba(54, 30, 13, 0.18);
  filter: blur(4px);
}

.pixel-chicken-shadow {
  left: calc(50% - 116px);
  bottom: 14px;
  width: 168px;
  height: 22px;
  animation: intro-shadow 4s ease-out forwards;
}

.pixel-chicken {
  position: absolute;
  left: calc(50% - 360px);
  bottom: 24px;
  width: 210px;
  height: auto;
  image-rendering: pixelated;
  animation: chicken-walk 4s linear forwards;
}

.lay-egg-zone {
  position: absolute;
  left: calc(50% - 34px);
  bottom: 18px;
  width: 96px;
  height: 120px;
}

.small-egg-shadow {
  left: 16px;
  bottom: 4px;
  width: 56px;
  height: 12px;
  opacity: 0;
  transform: translateX(0);
  animation: egg-shadow-appear 4s ease-out forwards;
}

.small-egg {
  position: absolute;
  left: 20px;
  bottom: 10px;
  width: 48px;
  image-rendering: pixelated;
  opacity: 0;
  transform: translateY(18px) scale(0.84);
  transform-origin: center bottom;
  animation: egg-lay 4s ease-out forwards;
}

.intro-copy {
  padding: 2px 28px 40px;
  text-align: center;
}

.pixel-title,
.pixel-name,
.panel-title {
  margin: 0;
  font-weight: 900;
  color: #111;
}

.pixel-title,
.pixel-name {
  text-shadow:
    3px 0 0 #fbefd9,
    -3px 0 0 #fbefd9,
    0 3px 0 #fbefd9,
    0 -3px 0 #fbefd9,
    5px 5px 0 rgba(111, 61, 31, 0.12);
}

.pixel-title {
  font-size: clamp(4.4rem, 11.6vw, 6.8rem);
  line-height: 1;
  letter-spacing: 0.08em;
  color: #6c4022;
  margin-top: -24px;
}

.sub-title {
  margin: 10px 0 0;
  font-size: clamp(1.38rem, 3.4vw, 2rem);
  font-weight: 800;
}

.primary-btn,
.ghost-btn,
.option-btn {
  font: inherit;
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.primary-btn,
.ghost-btn {
  margin-top: 22px;
  padding: 14px 22px;
  border-radius: 16px;
  font-weight: 800;
}

.primary-btn {
  color: #111;
  background: linear-gradient(180deg, #ffe08c 0%, #f0b95a 100%);
  box-shadow: 0 12px 24px rgba(141, 83, 39, 0.16);
}

.ghost-btn {
  color: #111;
  background: rgba(111, 67, 39, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.option-btn:hover {
  transform: translateY(-2px);
}

.question-panel {
  position: relative;
  padding: 26px;
}

.question-panel-full {
  max-width: 980px;
  margin: 0 auto;
}

.panel-top {
  margin-bottom: 18px;
}

.panel-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.04em;
}

.progress-copy {
  display: block;
  margin-left: auto;
  width: min(430px, 100%);
}

.progress-label {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5f3922;
  white-space: nowrap;
}

.progress-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 290px;
}

.egg-inline {
  position: relative;
  width: 82px;
  flex: 0 0 82px;
}

.hatching-egg {
  position: relative;
}

.egg-inline img,
.hatching-egg img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 12px rgba(112, 60, 31, 0.12));
  transition: transform 220ms ease;
}

.egg-inline.stage-2 img,
.egg-inline.stage-3 img,
.egg-inline.stage-4 img {
  transform: scale(1.03);
}

.hatching img,
.egg-inline.hatching img {
  animation: egg-shake 0.18s linear infinite;
}

.progress-block {
  flex: 1;
}

.progress-block span {
  display: block;
  margin-bottom: 8px;
  text-align: right;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(107, 63, 33, 0.12);
}

#progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffe27f 0%, #f1bb67 55%, #d98049 100%);
  transition: width 240ms ease;
}

.question-card {
  min-height: 520px;
  padding: 24px;
  border-radius: 24px;
  border: 2px solid rgba(92, 53, 29, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 247, 234, 0.8)),
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(100, 61, 35, 0.03) 34px 35px);
}

.question-index {
  display: none;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.9vw, 1.9rem);
  line-height: 1.45;
  font-weight: 900;
}

.options-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 18px 18px 18px 20px;
  border-radius: 20px;
  border: 2px solid rgba(95, 57, 31, 0.1);
  background: rgba(255, 252, 245, 0.95);
  color: #111;
  font-weight: 700;
  line-height: 1.75;
}

.option-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 12px;
  border-radius: 8px;
  background: rgba(236, 166, 95, 0.2);
  font-weight: 900;
}

.option-btn.selected {
  background: rgba(255, 229, 189, 0.92);
  border-color: rgba(211, 129, 62, 0.48);
}

.card-actions {
  margin-top: 20px;
}

.hatching-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 247, 234, 0.76);
  border-radius: 28px;
  z-index: 8;
}

.hatching-overlay.active {
  display: flex;
}

.hatching-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 24px;
}

.hatching-egg {
  width: min(150px, 28vw);
}

.hatching-text {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.result-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}

.result-actions .ghost-btn,
.result-actions .primary-btn {
  margin-top: 0;
}

.result-btn {
  color: #111;
  background: linear-gradient(180deg, #ffe08c 0%, #f0b95a 100%);
  box-shadow: 0 12px 24px rgba(141, 83, 39, 0.16);
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  border-radius: 28px;
  border: 2px solid rgba(95, 57, 31, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 247, 234, 0.92)),
    radial-gradient(circle at top left, rgba(255, 232, 189, 0.55), transparent 38%);
}

.result-hero {
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 240, 215, 0.88), rgba(255, 251, 245, 0.94)),
    linear-gradient(135deg, rgba(242, 187, 102, 0.18), transparent 55%);
  border: 2px solid rgba(95, 57, 31, 0.08);
}

.result-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.result-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.result-eyebrow {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown);
}

.pixel-name {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.result-summary,
.result-description {
  margin: 0;
  color: #4f301e;
}

.result-summary {
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  line-height: 1.7;
  font-weight: 800;
}

.result-description {
  font-size: clamp(0.98rem, 1.9vw, 1.08rem);
  line-height: 1.95;
  font-weight: 700;
}

.result-note {
  margin: 4px 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  text-align: center;
  color: #7a563e;
}

@keyframes chicken-walk {
  0% {
    transform: translateX(-220px) translateY(0);
  }
  22% {
    transform: translateX(-122px) translateY(-6px);
  }
  46% {
    transform: translateX(110px) translateY(0);
  }
  60% {
    transform: translateX(228px) translateY(0);
  }
  72% {
    transform: translateX(384px) translateY(8px);
  }
  100% {
    transform: translateX(620px) translateY(0);
  }
}

@keyframes intro-shadow {
  0% {
    transform: translateX(-220px) scaleX(1);
  }
  22% {
    transform: translateX(-122px) scaleX(0.95);
  }
  46% {
    transform: translateX(110px) scaleX(1);
  }
  60% {
    transform: translateX(228px) scaleX(1);
  }
  72% {
    transform: translateX(384px) scaleX(1);
  }
  100% {
    transform: translateX(620px) scaleX(1);
  }
}

@keyframes egg-lay {
  0%,
  64% {
    opacity: 0;
    transform: translateX(-16px) translateY(18px) scale(0.84);
  }
  72% {
    opacity: 1;
    transform: translateX(-16px) translateY(24px) scale(0.8);
  }
  80% {
    opacity: 1;
    transform: translateX(-16px) translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateX(-16px) translateY(0) scale(1);
  }
}

@keyframes egg-shadow-appear {
  0%,
  66% {
    opacity: 0;
    transform: translateX(-16px);
  }
  74%,
  100% {
    opacity: 1;
    transform: translateX(-16px);
  }
}

@keyframes egg-shake {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-3px) rotate(-1deg);
  }
  50% {
    transform: translateX(3px) rotate(1deg);
  }
  75% {
    transform: translateX(-2px) rotate(-1deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

@media (max-width: 860px) {
  .progress-cluster {
    min-width: 0;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-hero {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 18px, 1120px);
    padding-top: 14px;
  }

  .intro-copy,
  .question-panel,
  .result-wrap,
  .question-card,
  .result-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .intro-scene {
    min-height: 360px;
  }

  .intro-card {
    min-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
  }

  .intro-copy {
    margin-top: auto;
    padding-top: 36px;
    padding-bottom: 74px;
  }

  .pixel-chicken {
    width: 170px;
    left: calc(50% - 260px);
  }

  .pixel-chicken-shadow {
    left: calc(50% - 88px);
    width: 138px;
  }

  .progress-cluster {
    gap: 12px;
  }

  .egg-inline {
    width: 68px;
    flex-basis: 68px;
  }

  .question-card {
    min-height: 470px;
  }

  .result-hero {
    min-height: 260px;
  }

  .progress-copy {
    width: 100%;
  }

  .progress-cluster {
    gap: 10px;
  }

  .progress-label {
    font-size: 0.9rem;
  }
}
