:root {
  --bg: #f7efe3;
  --bg-deep: #f1dfc7;
  --card: rgba(255, 251, 245, 0.74);
  --text: #2d241d;
  --muted: #74685f;
  --accent: #f48b62;
  --accent-deep: #da6840;
  --accent-soft: #ffd9bb;
  --line: rgba(76, 54, 37, 0.12);
  --shadow: 0 24px 60px rgba(111, 73, 38, 0.15);
  --scene-top: linear-gradient(180deg, #fff5dd 0%, #f7dfb7 100%);
  --scene-ground: #d6bf8f;
  --pet-fur: #fff6ec;
  --pet-fur-dark: #f0dac3;
  --pet-ear: #ffc7ba;
  --night-bg: #1f2438;
  --night-card: rgba(31, 36, 56, 0.48);
  --night-text: #fff8ef;
  --night-muted: #d8cfc2;
  --night-scene-top: linear-gradient(180deg, #2f3553 0%, #5b6b8f 100%);
  --night-scene-ground: #7081a2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(135deg, var(--bg) 0%, #f4e5ce 48%, var(--bg-deep) 100%);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
}

body.night {
  color: var(--night-text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 25%),
    linear-gradient(135deg, #15192a 0%, #20263c 45%, #32415f 100%);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 32px;
  isolation: isolate;
}

.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.55;
  z-index: -1;
}

.bg-orb-left {
  top: 6%;
  left: -80px;
  width: 220px;
  height: 220px;
  background: rgba(255, 203, 161, 0.7);
}

.bg-orb-right {
  right: -30px;
  bottom: 8%;
  width: 280px;
  height: 280px;
  background: rgba(248, 137, 100, 0.26);
}

.hero {
  max-width: 1220px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
}

.hero-copy {
  padding: 12px 8px 12px 0;
}

.eyebrow {
  margin: 0 0 18px;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-deep);
}

h1 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.06;
  letter-spacing: 0.02em;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}

body.night .lead,
body.night .status-label {
  color: var(--night-muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.action-btn {
  border: 1px solid rgba(85, 61, 42, 0.1);
  background: rgba(255, 255, 255, 0.65);
  color: inherit;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(99, 73, 52, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(99, 73, 52, 0.14);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #ffb073 100%);
  color: #fffaf4;
  border: none;
}

body.night .action-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
}

body.night .action-btn.primary {
  background: linear-gradient(135deg, #ffb36f 0%, #fb7d71 100%);
}

.status-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 22px 24px;
  max-width: 500px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

body.night .status-card {
  background: var(--night-card);
  border-color: rgba(255, 255, 255, 0.08);
}

.status-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.status-card strong {
  font-size: 20px;
}

.play-stage {
  position: relative;
}

.scene {
  position: relative;
  min-height: 720px;
  border-radius: 40px;
  background: var(--scene-top);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: background 0.35s ease;
}

body.night .scene {
  background: var(--night-scene-top);
}

.sun-moon {
  position: absolute;
  top: 42px;
  right: 54px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7d8, #ffc95d 70%);
  box-shadow: 0 0 0 18px rgba(255, 217, 128, 0.14);
  transition: all 0.35s ease;
}

body.night .sun-moon {
  background: radial-gradient(circle at 30% 30%, #f9fbff, #c7d4ff 68%);
  box-shadow: 0 0 0 16px rgba(199, 212, 255, 0.08);
}

.cloud {
  position: absolute;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  filter: blur(0.2px);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  width: 34px;
  height: 34px;
  left: 8px;
  bottom: 10px;
}

.cloud::after {
  width: 28px;
  height: 28px;
  right: 12px;
  bottom: 12px;
}

.cloud-a {
  top: 110px;
  left: 54px;
  width: 112px;
  animation: drift 8s ease-in-out infinite;
}

.cloud-b {
  top: 176px;
  right: 112px;
  width: 94px;
  opacity: 0.8;
  animation: drift 10s ease-in-out infinite reverse;
}

body.night .cloud {
  background: rgba(231, 239, 255, 0.12);
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  animation: twinkle 2.8s ease-in-out infinite;
}

.pet-wrap {
  position: absolute;
  left: 50%;
  bottom: 128px;
  transform: translateX(-50%);
}

.pet-shadow {
  position: absolute;
  left: 50%;
  top: 290px;
  width: 220px;
  height: 42px;
  transform: translateX(-50%);
  background: rgba(85, 57, 31, 0.14);
  border-radius: 50%;
  filter: blur(12px);
}

.pet {
  position: relative;
  width: 260px;
  height: 320px;
  transform-origin: center bottom;
  transition: transform 0.18s ease;
}

.pet.is-petting {
  animation: bounce 0.7s ease;
}

.pet.is-fed {
  animation: spinHappy 0.95s ease;
}

.tail {
  position: absolute;
  right: 10px;
  top: 116px;
  width: 86px;
  height: 28px;
  border-radius: 999px;
  background: var(--pet-fur-dark);
  transform-origin: 12px 14px;
  animation: tailWag 2.2s ease-in-out infinite;
}

.tail::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 3px;
  width: 34px;
  height: 22px;
  border-radius: 999px;
  background: #ffcb9a;
}

.ear {
  position: absolute;
  top: 24px;
  width: 74px;
  height: 94px;
  background: var(--pet-fur-dark);
  border-radius: 24px 24px 8px 8px;
}

.ear.left {
  left: 30px;
  transform: rotate(-16deg);
}

.ear.right {
  right: 30px;
  transform: rotate(16deg);
}

.ear::after {
  content: "";
  position: absolute;
  inset: 15px 18px 18px;
  border-radius: 20px 20px 8px 8px;
  background: var(--pet-ear);
}

.body {
  position: absolute;
  left: 50%;
  top: 44px;
  width: 230px;
  height: 254px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--pet-fur) 0%, #fff1df 100%);
  border-radius: 44% 44% 36% 36%;
  box-shadow: inset 0 -16px 0 rgba(240, 214, 184, 0.7);
}

.face {
  position: absolute;
  left: 50%;
  top: 96px;
  width: 174px;
  height: 130px;
  transform: translateX(-50%);
}

.eyes {
  display: flex;
  justify-content: space-between;
  padding: 0 18px;
  margin-top: 4px;
}

.eye {
  position: relative;
  width: 42px;
  height: 42px;
  background: #3a2b25;
  border-radius: 50%;
  overflow: hidden;
}

.pupil {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.08s linear;
}

.blush {
  position: absolute;
  top: 60px;
  width: 22px;
  height: 12px;
  background: rgba(255, 170, 157, 0.65);
  border-radius: 999px;
  filter: blur(0.6px);
}

.blush-left {
  left: 10px;
}

.blush-right {
  right: 10px;
}

.nose {
  position: absolute;
  left: 50%;
  top: 58px;
  width: 18px;
  height: 12px;
  transform: translateX(-50%);
  background: #ff957f;
  border-radius: 40% 40% 60% 60%;
}

.mouth {
  position: absolute;
  left: 50%;
  top: 74px;
  width: 34px;
  height: 20px;
  transform: translateX(-50%);
}

.mouth::before,
.mouth::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 16px;
  height: 13px;
  border-bottom: 3px solid #6f4e43;
  border-radius: 0 0 20px 20px;
}

.mouth::before {
  left: 1px;
  transform: rotate(10deg);
}

.mouth::after {
  right: 1px;
  transform: rotate(-10deg);
}

.paw {
  position: absolute;
  bottom: 6px;
  width: 62px;
  height: 68px;
  background: var(--pet-fur);
  border-radius: 46% 46% 24px 24px;
}

.paw-left {
  left: 54px;
  transform: rotate(6deg);
}

.paw-right {
  right: 54px;
  transform: rotate(-6deg);
}

.fish-zone {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fish {
  position: absolute;
  width: 48px;
  height: 24px;
  background: linear-gradient(90deg, #ffb77e 0%, #ff8c7d 100%);
  border-radius: 60% 40% 40% 60%;
  animation: floatDown 1.2s ease forwards;
  box-shadow: 0 12px 24px rgba(208, 108, 76, 0.26);
}

.fish::before {
  content: "";
  position: absolute;
  right: -12px;
  top: 2px;
  border-left: 14px solid #ff9c7d;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.fish::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background:
    radial-gradient(circle at 20% 120%, #b9d785 0, #b9d785 22%, transparent 23%),
    radial-gradient(circle at 38% 120%, #9dc669 0, #9dc669 19%, transparent 20%),
    radial-gradient(circle at 58% 120%, #bddf88 0, #bddf88 22%, transparent 23%),
    radial-gradient(circle at 74% 120%, #9dc669 0, #9dc669 20%, transparent 21%),
    linear-gradient(180deg, transparent 0%, transparent 18%, var(--scene-ground) 18%, var(--scene-ground) 100%);
  transition: background 0.35s ease;
}

body.night .grass {
  background:
    radial-gradient(circle at 20% 120%, #6ca36f 0, #6ca36f 22%, transparent 23%),
    radial-gradient(circle at 38% 120%, #588963 0, #588963 19%, transparent 20%),
    radial-gradient(circle at 58% 120%, #7bb183 0, #7bb183 22%, transparent 23%),
    radial-gradient(circle at 74% 120%, #588963 0, #588963 20%, transparent 21%),
    linear-gradient(180deg, transparent 0%, transparent 18%, var(--night-scene-ground) 18%, var(--night-scene-ground) 100%);
}

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}

@keyframes tailWag {
  0%, 100% { transform: rotate(10deg); }
  50% { transform: rotate(-18deg); }
}

@keyframes bounce {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-12px) scale(1.02); }
  60% { transform: translateY(0) scale(0.995); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes spinHappy {
  0% { transform: rotate(0deg) scale(1); }
  40% { transform: rotate(10deg) scale(1.04); }
  80% { transform: rotate(-8deg) scale(1.03); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes floatDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotate(-10deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(180px) rotate(12deg);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 0.95;
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .page-shell {
    padding: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-copy {
    padding-right: 0;
  }

  .scene {
    min-height: 620px;
  }

  .status-card {
    max-width: none;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 16px;
  }

  .status-card {
    flex-direction: column;
  }

  .scene {
    min-height: 540px;
    border-radius: 30px;
  }

  .pet {
    transform: scale(0.86);
  }

  .pet-wrap {
    bottom: 92px;
  }
}
