* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e8eaf6;
  overflow-x: hidden;
  /* 深空底色：多层径向渐变叠加出宇宙纵深 */
  background:
    radial-gradient(ellipse at 70% 15%, rgba(70, 50, 130, 0.22), transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(25, 50, 110, 0.20), transparent 55%),
    linear-gradient(180deg, #020208 0%, #050512 30%, #0a0a1e 65%, #0d0d26 100%);
  min-height: 100vh;
}

/* ================= 天空容器 ================= */
.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* ================= 星云 ================= */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.nebula-a {
  width: 55vw;
  height: 55vw;
  top: -15%;
  right: -12%;
  background: radial-gradient(circle, rgba(125, 85, 210, 0.16), transparent 65%);
  animation: nebula-drift 40s ease-in-out infinite alternate;
}

.nebula-b {
  width: 45vw;
  height: 45vw;
  bottom: 0;
  left: -10%;
  background: radial-gradient(circle, rgba(45, 95, 210, 0.14), transparent 65%);
  animation: nebula-drift 50s ease-in-out infinite alternate-reverse;
}

@keyframes nebula-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-4vw, 3vh) scale(1.12); }
}

/* ================= 银河系 ================= */
/* 一条斜跨全屏的光带：居中后旋转 -30°，两端伸出视口 */
.galaxy {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 230vmax;
  height: 70vmax;
  transform: translate(-50%, -50%) rotate(-30deg);
  pointer-events: none;
}

/* 最外层宽大光晕 */
.galaxy-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 26% at 50% 50%,
    rgba(150, 140, 220, 0.10), transparent 70%);
  filter: blur(30px);
}

/* 主亮带：银白核心 + 淡紫边缘 */
.galaxy-band {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 11% at 50% 50%,
      rgba(235, 230, 255, 0.22), transparent 75%),
    radial-gradient(ellipse 30% 7% at 50% 50%,
      rgba(255, 250, 242, 0.20), transparent 70%);
  filter: blur(14px);
}

/* 银河亮斑：沿带分布的恒星云团，明暗不一 */
.galaxy-clumps {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 8% 5.5% at 30% 48%, rgba(255, 240, 228, 0.20), transparent 70%),
    radial-gradient(ellipse 10% 6.5% at 45% 52%, rgba(205, 192, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 7% 4.5% at 60% 47%, rgba(255, 255, 255, 0.17), transparent 70%),
    radial-gradient(ellipse 9% 5.5% at 72% 51%, rgba(190, 200, 255, 0.15), transparent 70%),
    radial-gradient(ellipse 6% 4%   at 22% 52%, rgba(255, 228, 240, 0.14), transparent 70%),
    radial-gradient(ellipse 5% 3.5% at 83% 49%, rgba(230, 225, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 6% 4%   at 52% 44%, rgba(255, 244, 230, 0.15), transparent 70%);
  filter: blur(8px);
  animation: clumps-breathe 14s ease-in-out infinite alternate;
}

@keyframes clumps-breathe {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

/* 银河尘埃暗缝：横贯亮带中央的一道暗影，还原真实银河结构 */
.galaxy-dust-lane {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 38% 2.2% at 50% 53%,
    rgba(3, 3, 12, 0.55), transparent 80%);
  filter: blur(6px);
}

/* 银河带内密星：JS 播种，集中于带中央 */
.galaxy-stars {
  position: absolute;
  inset: 0;
}

.galaxy-star {
  position: absolute;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: #fff;
}

.galaxy-star.twinkle {
  animation: twinkle var(--tw-duration, 4s) ease-in-out var(--tw-delay, 0s) infinite;
}

/* ================= 繁星 ================= */
.stars {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--tw-duration, 3s) ease-in-out var(--tw-delay, 0s) infinite;
}

.star.small {
  width: 1px;
  height: 1px;
}

.star.medium {
  width: 2px;
  height: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.star.large {
  width: 3px;
  height: 3px;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(200, 220, 255, 0.45);
}

/* 亮星的十字光芒：两条渐变细线 */
.star.large::before,
.star.large::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.star.large::before {
  left: 50%;
  top: -7px;
  width: 1px;
  height: 17px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.65), transparent);
}

.star.large::after {
  top: 50%;
  left: -7px;
  width: 17px;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

/* ================= 月亮（自转） ================= */
.moon {
  position: absolute;
  top: 11%;
  right: 11%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  box-shadow:
    0 0 40px rgba(255, 250, 230, 0.35),
    0 0 110px rgba(255, 250, 230, 0.16),
    0 0 220px rgba(255, 250, 230, 0.07);
  animation: moon-glow 8s ease-in-out infinite alternate;
}

/* 球体：圆形容器裁切内部滚动的月面纹理 */
.moon-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 38% 32%,
    #fffef5 0%, #f5f0e0 45%, #d9d3c1 80%, #b6b09e 100%);
}

/* 月面纹理：宽度为球体两倍，横向平铺后整体平移，
   纹理不断从左向右流过，形成月球自转的视错觉 */
.moon-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  will-change: transform;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  background-image:
    /* 月海：大面积暗色区域 */
    radial-gradient(ellipse 16% 20% at 14% 34%, rgba(146, 140, 122, 0.42), transparent 100%),
    radial-gradient(ellipse 11% 15% at 34% 68%, rgba(152, 146, 128, 0.38), transparent 100%),
    radial-gradient(ellipse 14% 12% at 63% 24%, rgba(142, 136, 118, 0.36), transparent 100%),
    radial-gradient(ellipse 10% 13% at 86% 62%, rgba(148, 142, 124, 0.34), transparent 100%),
    /* 环形山：暗坑 + 亮环 */
    radial-gradient(ellipse 6.5% 6.5% at 25% 46%, rgba(118, 110, 94, 0.55) 0%, rgba(118, 110, 94, 0.28) 45%, rgba(255, 251, 238, 0.32) 72%, transparent 100%),
    radial-gradient(ellipse 4.5% 4.5% at 47% 30%, rgba(122, 114, 97, 0.50) 0%, rgba(122, 114, 97, 0.24) 45%, rgba(255, 251, 238, 0.28) 72%, transparent 100%),
    radial-gradient(ellipse 8% 8% at 72% 52%, rgba(114, 106, 90, 0.52) 0%, rgba(114, 106, 90, 0.26) 45%, rgba(255, 251, 238, 0.30) 72%, transparent 100%),
    radial-gradient(ellipse 3.5% 3.5% at 88% 38%, rgba(126, 118, 100, 0.48) 0%, rgba(126, 118, 100, 0.22) 45%, rgba(255, 251, 238, 0.26) 72%, transparent 100%),
    radial-gradient(ellipse 5% 5% at 40% 78%, rgba(120, 112, 95, 0.46) 0%, rgba(120, 112, 95, 0.20) 45%, rgba(255, 251, 238, 0.24) 72%, transparent 100%),
    radial-gradient(ellipse 3% 3% at 58% 62%, rgba(128, 120, 102, 0.42) 0%, rgba(128, 120, 102, 0.18) 45%, rgba(255, 251, 238, 0.22) 72%, transparent 100%),
    radial-gradient(ellipse 2.5% 2.5% at 18% 62%, rgba(130, 122, 104, 0.40) 0%, rgba(130, 122, 104, 0.16) 45%, rgba(255, 251, 238, 0.20) 72%, transparent 100%),
    radial-gradient(ellipse 6% 6% at 6% 30%, rgba(116, 108, 92, 0.44) 0%, rgba(116, 108, 92, 0.20) 45%, rgba(255, 251, 238, 0.24) 72%, transparent 100%);
  animation: moon-rotate 70s linear infinite;
}

/* 平移一个平铺宽度后图案完全重合，循环无缝 */
@keyframes moon-rotate {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 固定光照：高光与边缘变暗不随纹理转动，保持球体立体感 */
.moon-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 36% 30%,
      rgba(255, 255, 250, 0.22) 0%, rgba(255, 255, 250, 0.06) 38%, transparent 62%),
    radial-gradient(circle at 50% 50%,
      transparent 48%, rgba(70, 62, 48, 0.20) 76%, rgba(34, 29, 22, 0.52) 100%);
}

@keyframes moon-glow {
  from {
    box-shadow:
      0 0 40px rgba(255, 250, 230, 0.30),
      0 0 110px rgba(255, 250, 230, 0.13),
      0 0 220px rgba(255, 250, 230, 0.06);
  }
  to {
    box-shadow:
      0 0 50px rgba(255, 250, 230, 0.42),
      0 0 130px rgba(255, 250, 230, 0.20),
      0 0 260px rgba(255, 250, 230, 0.09);
  }
}

/* ================= 流星 ================= */
/* rotate(135deg) 使局部 +x 轴指向左下，即飞行方向；尾巴位于反方向 */
.meteor {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.45);
  opacity: 0;
  transform: rotate(135deg);
  animation: meteor-fall var(--fall-duration, 8s) linear var(--fall-delay, 0s) infinite;
}

.meteor::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 150px;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85));
}

.meteor-1 { top: 12%; left: 68%; --fall-duration: 7s;  --fall-delay: 1s; }
.meteor-2 { top: 32%; left: 88%; --fall-duration: 9s;  --fall-delay: 4.5s; }
.meteor-3 { top: 6%;  left: 42%; --fall-duration: 11s; --fall-delay: 8s; }

@keyframes meteor-fall {
  0%        { opacity: 0; transform: rotate(135deg) translateX(0); }
  4%        { opacity: 1; }
  14%       { opacity: 1; }
  22%, 100% { opacity: 0; transform: rotate(135deg) translateX(75vmin); }
}

/* ================= 远山剪影 ================= */
.mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34vh;
  pointer-events: none;
}

.mountains svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ridge-back  { fill: #131230; }
.ridge-mid   { fill: #0b0b20; }
.ridge-front { fill: #050510; }

/* ================= 地面雾气 ================= */
.mist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30vh;
  background: linear-gradient(0deg, rgba(90, 110, 170, 0.12), transparent);
  pointer-events: none;
}

/* ================= 中央文案 ================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6vw;
  transform: translateY(-4vh);
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  color: rgba(200, 205, 240, 0.55);
  margin-bottom: 28px;
  animation: fade-in 1.6s ease both;
}

/* ================= 调皮小猪（纯 CSS） ================= */
.pig-wrap {
  margin-bottom: 26px;
  animation: fade-in 1.6s ease 0.25s both;
}

.pig {
  position: relative;
  width: 200px;
  height: 200px;
  filter: drop-shadow(0 0 28px rgba(255, 170, 200, 0.22));
  animation: pig-bob 3.5s ease-in-out infinite;
}

/* 整体轻轻摇摆 + 上下浮动，显俏皮 */
@keyframes pig-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-10px) rotate(3deg); }
}

/* 圆脸 */
.pig-head {
  position: absolute;
  inset: 18px 0 0 0;
  border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle at 38% 30%,
    #ffd9e2 0%, #ffb9cb 55%, #ff9fb8 100%);
  box-shadow: inset -8px -10px 24px rgba(230, 110, 140, 0.22);
}

/* 耳朵：右耳折下并偶尔抖动，调皮感来源之一 */
.pig-ear {
  position: absolute;
  top: -4px;
  width: 52px;
  height: 62px;
  background: linear-gradient(160deg, #ffc3d3, #ff9fb8);
  border-radius: 65% 65% 30% 30% / 85% 85% 30% 30%;
  z-index: -1;
}

/* 内耳 */
.pig-ear::after {
  content: "";
  position: absolute;
  inset: 12px 12px 18px;
  border-radius: inherit;
  background: linear-gradient(160deg, #ff9fb8, #f27d9d);
}

.pig-ear-left {
  left: 22px;
  transform: rotate(-22deg);
}

.pig-ear-right {
  right: 22px;
  transform-origin: 30% 90%;
  animation: ear-wiggle 3.5s ease-in-out infinite;
}

@keyframes ear-wiggle {
  0%, 100% { transform: rotate(38deg); }
  50%      { transform: rotate(58deg); }
}

/* 头顶一撮呆毛 */
.pig-hair {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 26px;
  height: 18px;
  border: 3px solid transparent;
  border-top-color: #ff9fb8;
  border-radius: 50%;
  transform: translateX(-50%) rotate(-15deg);
}

/* 左眼：圆眼带高光 */
.pig-eye-left {
  position: absolute;
  top: 80px;
  left: 50px;
  width: 14px;
  height: 17px;
  border-radius: 50%;
  background: #4a2b3a;
}

.pig-eye-left::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

/* 右眼：wink 眯眼笑，一条上弯弧线 */
.pig-eye-right {
  position: absolute;
  top: 78px;
  right: 46px;
  width: 22px;
  height: 14px;
  border: 3px solid transparent;
  border-top-color: #4a2b3a;
  border-radius: 50%;
}

/* 腮红 */
.pig-blush {
  position: absolute;
  top: 112px;
  width: 26px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 110, 145, 0.55), transparent 70%);
}

.pig-blush-left  { left: 24px; }
.pig-blush-right { right: 24px; }

/* 猪鼻子 */
.pig-snout {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ff9eb8, #f27d9d);
  box-shadow:
    inset 0 -4px 8px rgba(210, 90, 120, 0.35),
    0 2px 4px rgba(230, 120, 150, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.pig-nostril {
  width: 8px;
  height: 14px;
  border-radius: 50%;
  background: #c2506f;
  transform: rotate(12deg);
}

.pig-nostril:last-child {
  transform: rotate(-12deg);
}

/* 歪嘴笑 */
.pig-mouth {
  position: absolute;
  top: 150px;
  left: 50%;
  width: 42px;
  height: 22px;
  transform: translateX(-50%) rotate(-8deg);
  border: 3px solid transparent;
  border-bottom-color: #b34a63;
  border-radius: 50%;
}

/* 吐出的小舌头：调皮感来源之二 */
.pig-tongue {
  position: absolute;
  top: 164px;
  left: calc(50% + 4px);
  width: 18px;
  height: 22px;
  border-radius: 35% 35% 60% 60%;
  background: linear-gradient(180deg, #ff8ba0, #ff6e88);
  transform: rotate(-12deg);
  box-shadow: inset 0 -3px 5px rgba(200, 60, 90, 0.4);
}

.hero-sub {
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.12em;
  color: rgba(205, 210, 240, 0.65);
  animation: fade-in 1.6s ease 0.5s both;
}

.hero-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 64px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: rgba(190, 195, 230, 0.35);
  animation: fade-in 1.6s ease 0.85s both;
}

.hint-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 195, 230, 0.35));
}

.hint-line:last-child {
  background: linear-gradient(90deg, rgba(190, 195, 230, 0.35), transparent);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================= 响应式 ================= */
@media (max-width: 768px) {
  .moon {
    width: 64px;
    height: 64px;
    top: 9%;
    right: 9%;
  }
  .meteor::before { width: 90px; }
  .hero-hint { letter-spacing: 0.2em; gap: 12px; }
  .hint-line { width: 28px; }
}

/* 尊重系统的减弱动效设置 */
@media (prefers-reduced-motion: reduce) {
  .star, .galaxy-star.twinkle, .meteor,
  .nebula-a, .nebula-b, .moon, .moon-surface, .galaxy-clumps,
  .pig, .pig-ear-right {
    animation: none;
  }
  .star { opacity: 0.75; }
  .meteor { display: none; }
}
