/* ============================================================
   星露谷物语像素风婚礼电子邀请函 — 全局样式表
   纯移动端竖屏 · rem 自适应 · 像素复古风
   ============================================================ */

/* ==================== CSS 变量 & 全局重置 ==================== */
:root {
  --green: #7ec850;
  --brown: #8b6914;
  --dark-brown: #5a3e0b;
  --pink: #f4c2c2;
  --blue: #c2daf4;
  --gold: #f0c040;
  --white: #fefcf0;
  --text: #3e2b1a;
  --shadow: rgba(0, 0, 0, 0.3);
  --pixel-border: 3px;
  --font-pixel: "Press Start 2P", "Zpix", "PixelMplus12", monospace;
  --base-rem: 9vw;
}

@media (min-width: 420px) { :root { --base-rem: 44px; } }
@media (min-width: 750px) { :root { --base-rem: 78px; } }

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

html {
  font-size: var(--base-rem);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-pixel);
  color: var(--text);
  background:
    /* 像素横纹纹理 */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.03) 2px,
      rgba(255,255,255,0.03) 4px
    ),
    /* 主渐变：从暖褐到草绿再到底部粉蓝暖色调 */
    linear-gradient(
      180deg,
      #1a0f05 0%,
      #3e2b1a 8%,
      #5a4a2a 18%,
      #6b8c42 30%,
      #7ec850 42%,
      #8bb860 50%,
      #c2b080 60%,
      #e8d5c0 72%,
      #f4c2c2 82%,
      #c2daf4 92%,
      #fefcf0 100%
    );
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  -webkit-user-select: none;
  user-select: none;
  max-width: 100vw;
  touch-action: manipulation;
}

img { display: block; max-width: 100%; -webkit-user-drag: none; }

/* ==================== PC 端拦截 ==================== */
#pc-block {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #2d1f0e 0%, #5a3e0b 50%, #2d1f0e 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem;
}

.pc-block-inner {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--gold);
  border-radius: 0.08rem;
  padding: 0.5rem 0.3rem;
  max-width: 5rem;
}

.pc-icon { font-size: 0.8rem; margin-bottom: 0.2rem; }

.pc-block-inner h1 {
  font-size: 0.28rem;
  color: var(--gold);
  margin-bottom: 0.15rem;
}

.pc-block-inner p {
  font-size: 0.2rem;
  color: var(--white);
  margin-bottom: 0.1rem;
  line-height: 1.6;
}

.pc-hint {
  margin-top: 0.3rem;
  font-size: 0.18rem;
  color: var(--pink);
}

/* ==================== 加载开机页 ==================== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #1a0f05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-title {
  font-size: 0.4rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
  letter-spacing: 0.04rem;
}

.loading-bar-container {
  width: 2.5rem;
  height: 0.2rem;
  background: #3e2b1a;
  border: 2px solid var(--brown);
  border-radius: 0.04rem;
  overflow: hidden;
  margin-bottom: 0.15rem;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.15s linear;
  border-right: 2px solid var(--gold);
}

.loading-text {
  font-size: 0.3rem;
  color: var(--brown);
}

/* 轻触提示呼吸闪烁 */
.pulse-text {
  animation: pulseText 1.2s ease-in-out infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.05); }
}

/* 成就弹窗 */
.achievement-popup {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.achievement-popup.show {
  display: flex;
}

.achievement-inner {
  background: linear-gradient(180deg, #fefcf0 0%, #f4c2c2 100%);
  border: 3px solid var(--gold);
  border-radius: 0.08rem;
  padding: 0.4rem 0.3rem;
  text-align: center;
  animation: achievementBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  box-shadow: 0 0 0.3rem rgba(240, 192, 64, 0.5);
}

.achievement-star {
  font-size: 0.6rem;
  animation: starSpin 1s ease-in-out infinite;
}

.achievement-title {
  font-size: 0.32rem;
  color: var(--dark-brown);
  margin-top: 0.15rem;
}

.achievement-sub {
  font-size: 0.26rem;
  color: var(--brown);
  margin-top: 0.1rem;
}

@keyframes achievementBounce {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.1); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes starSpin {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.2) rotate(15deg); }
}

/* ==================== 左上角爱心计数器 ==================== */
#heart-counter {
  position: fixed;
  top: 0.08rem;
  left: 0.08rem;
  z-index: 999;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(-110%);
  transition: opacity 0.4s, transform 0.4s;
}

#heart-counter.visible {
  opacity: 1;
  transform: translateX(0);
}

.counter-bg {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--brown);
  border-radius: 0.06rem;
  padding: 0.1rem 0.16rem;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
  backdrop-filter: blur(4px);
  max-width: 3.8rem;
}

.counter-text {
  font-size: 0.22rem;
  color: var(--dark-brown);
  margin-bottom: 0.04rem;
}

#counter-num {
  color: #e04070;
  font-weight: bold;
}

.counter-hearts {
  display: flex;
  gap: 0.04rem;
  justify-content: center;
}

.heart-icon {
  font-size: 0.26rem;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: grayscale(1) opacity(0.4);
}

.heart-icon.lit {
  filter: none;
  cursor: pointer;
  animation: heartPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.heart-icon.lit:active { transform: scale(1.3); }

@keyframes heartPop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.5); }
  60%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

.counter-complete {
  font-size: 0.14rem;
  color: var(--pink);
  margin-top: 0.04rem;
  min-height: 0.16rem;
}

/* ==================== 音频控制 ==================== */
#audio-toggle {
  position: fixed;
  bottom: 0.16rem;
  right: 0.12rem;
  z-index: 998;
  width: 0.56rem;
  height: 0.56rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.32rem;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--brown);
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

#audio-toggle:active { transform: scale(0.9); }

/* ==================== 小魔鬼/小天使触发按钮（左下角彩蛋助手） ==================== */
#devil-trigger {
  position: fixed;
  bottom: 0.14rem;
  left: 0.12rem;
  z-index: 997;
  width: 0.62rem;
  height: 0.62rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.44rem;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid var(--brown);
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
  animation: devilFloat 2.5s ease-in-out infinite;
}

#devil-trigger:active,
#devil-trigger:hover {
  transform: scale(0.85);
}

/* 天使形态 */
#devil-trigger.angel {
  background: rgba(255, 248, 220, 0.9);
  border-color: #c8a84e;
  box-shadow: 0 0 0.12rem rgba(240, 200, 100, 0.5);
}

@keyframes devilFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.06rem); }
}

/* ==================== 主内容区 ==================== */
#main-content {
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

#main-content.visible { opacity: 1; }

/* ==================== 模块2：主视觉封面 ==================== */
#main-scene {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.scene-container {
  position: relative;
  width: 100%;
}

.scene-bg {
  width: 100%;
  display: block;
}

.scene-banner {
  position: absolute;
  top: 12%;
  left: 10%;
  right: 10%;
  background: rgba(139, 105, 20, 0.85);
  border: 2px solid var(--dark-brown);
  border-radius: 0.04rem;
  padding: 0.1rem 0.15rem;
  text-align: center;
  animation: bannerFloat 3s ease-in-out infinite;
}

.banner-text {
  font-size: 0.3rem;
  color: var(--white);
  line-height: 1.8;
  min-height: 0.5rem;
}

@keyframes bannerFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.06rem); }
}

/* 新人双人立绘 — 容器居中，两人并肩站拱门下 */
.scene-player-wrapper {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 0.06rem;
  z-index: 6;
}

.scene-player {
  display: block;
  width: 0.5rem;
  max-width: 14vw;
  animation: playerBreathe 3s ease-in-out infinite;
}

.scene-player-bride {
  animation-delay: 0.5s;
}

@keyframes playerBreathe {
  0%, 100% { margin-bottom: 0; }
  50%      { margin-bottom: 0.04rem; }
}

/* 居民容器 — 栏杆内侧左右分列，中间留出通道 */
.residents-left,
.residents-right {
  position: absolute;
  top: 45%;
  bottom: 22%;
  width: 27%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  align-items: flex-start;
  gap: 0.06rem;
  row-gap: 0.06rem;
  z-index: 5;
  pointer-events: auto;
  padding: 0.02rem;
}

.residents-left  { left: 19%; }
.residents-right { right: 19%; }

.resident-img {
  display: inline-block;
  width: 0.5rem;
  height: auto;
  max-width: 14vw;
  cursor: pointer;
  animation: residentIdle 2s ease-in-out infinite;
  transition: transform 0.15s;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  vertical-align: bottom;
}

.resident-img:active { transform: scale(1.15); }

/* 错落偏移，模拟自然散布 */
.resident-img:nth-child(3n+1) { margin-top: 0.06rem; }
.resident-img:nth-child(3n+2) { margin-top: -0.04rem; }
.resident-img:nth-child(5n+3) { margin-left: 0.04rem; }
.resident-img:nth-child(5n+4) { margin-left: -0.03rem; }

.resident-img:nth-child(odd)  { animation-delay: 0s; }
.resident-img:nth-child(even) { animation-delay: 0.5s; }
.resident-img:nth-child(3n)   { animation-delay: 1s; }
.resident-img:nth-child(5n+1) { animation-delay: 1.5s; }

@keyframes residentIdle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.03rem); }
}

/* 仙女 */
.scene-fairy {
  position: absolute;
  width: 0.5rem;
  z-index: 6;
  animation: fairyFloat 4s ease-in-out infinite;
}
.scene-fairy-left  { top: 15%; left: 3%; }
.scene-fairy-right { top: 12%; right: 3%; animation-delay: 2s; }

@keyframes fairyFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  25%      { transform: translateY(-0.1rem) rotate(3deg); }
  50%      { transform: translateY(-0.05rem) rotate(-2deg); }
  75%      { transform: translateY(-0.12rem) rotate(4deg); }
}

/* 祝尼魔 */
.scene-junimo {
  position: absolute;
  width: 0.4rem;
  z-index: 5;
  animation: junimoHop 2.5s ease-in-out infinite;
}
.scene-junimo-1 { bottom: 26%; left: 20%; animation-delay: 0s; }
.scene-junimo-2 { bottom: 28%; right: 18%; animation-delay: 1.2s; }

@keyframes junimoHop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  30%      { transform: translateY(-0.15rem) scale(1.1, 0.9); }
  50%      { transform: translateY(-0.02rem) scale(0.95, 1.05); }
  80%      { transform: translateY(-0.08rem) scale(1.05, 0.95); }
}

/* 小鸡 */
.scene-chicken {
  position: absolute;
  width: 0.35rem;
  z-index: 3;
  animation: chickenWalk 6s ease-in-out infinite;
}
.scene-chicken-1 { bottom: 22%; left: 14%; }
.scene-chicken-2 { bottom: 20%; right: 10%; animation-delay: 3s; }

@keyframes chickenWalk {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(0.15rem); }
  50%  { transform: translateX(0.05rem); }
  75%  { transform: translateX(0.2rem); }
  100% { transform: translateX(0); }
}

/* 小猫（彩蛋2） — 外层 span 负责定位，内层 img 负责动画 */
.cat-target {
  position: absolute;
  bottom: 24%;
  right: 12%;
  width: 0.4rem;
  z-index: 6;
  cursor: pointer;
}

.scene-cat {
  display: block;
  width: 100%;
  animation: catIdle 3s ease-in-out infinite, eggGlowPulse 2s ease-in-out infinite;
}

@keyframes catIdle {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  15%      { transform: translateY(-0.05rem) scale(1.05, 0.95); }
  30%      { transform: translateY(0) scale(0.95, 1.05); }
  45%      { transform: translateY(-0.03rem) scale(1.03, 0.97); }
  60%      { transform: translateY(0) scale(1, 1); }
}

/* 南瓜（静态装饰，彩蛋已移至新娘头像） */
.scene-pumpkin {
  position: absolute;
  bottom: 23%;
  left: 10%;
  width: 0.45rem;
  z-index: 6;
  animation: pumpkinGlow 2s ease-in-out infinite;
}

@keyframes pumpkinGlow {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.15) drop-shadow(0 0 3px rgba(240, 192, 64, 0.4)); }
}

/* 粒子层 */
.particles-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.heart-particle {
  position: absolute;
  font-size: 0.2rem;
  pointer-events: none;
  animation: particleRise 1.5s ease-out forwards;
}

@keyframes particleRise {
  0%   { opacity: 1; transform: translateY(0) scale(0.5); }
  50%  { opacity: 0.8; transform: translateY(-0.5rem) scale(1); }
  100% { opacity: 0; transform: translateY(-1.2rem) scale(0.2); }
}

/* ==================== 全局粒子爆发特效 ==================== */
.global-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.screen-flash {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  animation: flashBurst 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 1001;
}

@keyframes flashBurst {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.spark-particle {
  position: fixed;
  width: 0.06rem;
  height: 0.06rem;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkBurst 1s ease-out forwards;
  z-index: 1002;
}

@keyframes sparkBurst {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); }
}

/* ==================== 彩蛋触发点增强特效（keyframes） ==================== */
/* 通用脉冲发光环 */
@keyframes eggGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 0.04rem rgba(240, 192, 64, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 0.15rem rgba(240, 192, 64, 0.95))
            drop-shadow(0 0 0.25rem rgba(255, 180, 60, 0.6));
  }
}

/* 星星旋转闪烁指示器 */
@keyframes eggStarSpin {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(60deg); }
  30%  { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(120deg); }
  45%  { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8) rotate(180deg); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(240deg); }
  80%  { opacity: 0.5; transform: translate(-50%, -50%) scale(0.6) rotate(300deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(360deg); }
}

/* 醒目波纹扩散 */
@keyframes eggRipple {
  0%   { box-shadow: 0 0 0 0 rgba(240, 192, 64, 0.7); }
  100% { box-shadow: 0 0 0 0.15rem rgba(240, 192, 64, 0); }
}

/* ==================== 彩蛋发现通知弹窗（打字机木牌风格） ==================== */
.egg-notify {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 2000;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.egg-notify.show {
  transform: translate(-50%, -50%) scale(1);
}
.egg-notify-inner {
  background: linear-gradient(180deg, #fefcf0 0%, #e8d5c0 60%, #c2b080 100%);
  border: 3px solid var(--brown);
  border-radius: 0.08rem;
  padding: 0.3rem 0.4rem;
  text-align: center;
  box-shadow:
    0 0 0.3rem rgba(139, 105, 20, 0.4),
    inset 0 0 0.15rem rgba(255, 255, 255, 0.3);
  /* 木质纹理模拟 */
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(139, 105, 20, 0.06) 3px,
      rgba(139, 105, 20, 0.06) 4px
    ),
    linear-gradient(180deg, #fefcf0 0%, #e8d5c0 60%, #c2b080 100%);
}
.egg-notify-icon {
  font-size: 0.5rem;
  margin-bottom: 0.1rem;
  animation: starSpin 1s ease-in-out infinite;
}
.egg-notify-text {
  font-size: 0.26rem;
  color: var(--dark-brown);
  letter-spacing: 0.02rem;
}

/* ==================== 通用 section 标题 ==================== */
.section-title {
  text-align: center;
  font-size: 0.32rem;
  color: var(--dark-brown);
  padding: 0.15rem 0.2rem 0.12rem;
  letter-spacing: 0.02rem;
}

/* ==================== 模块3：日历 ==================== */
#calendar-section {
  position: relative;
  padding: 0 0.2rem 0.3rem;
  text-align: center;
}

#calendar-section .section-title {
  font-size: 0.3rem;
}

.calendar-wrapper {
  position: relative;
  display: inline-block;
  width: 80vw;
}

.calendar-img {
  width: 100%;
  display: block;
  border-radius: 0.04rem;
  box-shadow: 0 4px 12px var(--shadow);
}

/* 日期23可点击热区 */
.calendar-date-hit {
  position: absolute;
  top: 62%;
  left: 84%;
  width: 0.55rem;
  height: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  animation: eggRipple 2s ease-out infinite;
  border-radius: 0.04rem;
}

.date-pulse {
  display: inline-block;
  font-size: 0.36rem;
  color: #e04070;
  font-weight: bold;
  animation: datePulse 0.8s ease-in-out infinite;
  text-shadow: 0 0 0.1rem rgba(255, 64, 128, 0.9), 0 0 0.2rem rgba(255, 160, 60, 0.6);
}

@keyframes datePulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.2); opacity: 1; }
}

.calendar-label {
  margin-top: 0.1rem;
  font-size: 0.26rem;
  color: var(--brown);
}

/* ==================== 模块4：婚礼详情（xiangqing.png + 覆盖层） ==================== */
#info-board-section {
  position: relative;
  padding: 0.3rem 0 0.4rem;
  display: flex;
  justify-content: center;
}

.info-card-wrapper {
  position: relative;
  width: 80vw;
  /* 高度由图片比例自动撑开 */
}

.info-card-img {
  width: 100%;
  display: block;
  border-radius: 0.04rem;
}

/* ---- 头像区浮动爱心（彩蛋3/5触发目标） ---- */
.info-avatar-heart {
  position: absolute;
  width: 0.56rem;
  height: 0.56rem;
  font-size: 0.28rem;
  color: #e04070;
  cursor: pointer;
  z-index: 5;
  filter: drop-shadow(0 0 4px rgba(224, 64, 112, 0.5));
  transition: transform 0.2s;
  /* 默认位置，根据实际图片微调 */
  top: 8.5%;
}
.info-avatar-heart:active {
  transform: scale(1.3);
}

.info-avatar-groom {
  left: 17%;
}

.info-avatar-bride {
  left: 74%;
}

@keyframes avatarHeartBeat {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  15%      { transform: scale(1.25); opacity: 1; }
  30%      { transform: scale(1); opacity: 0.85; }
}

/* 中间爱心 */
.info-couple-heart {
  position: absolute;
  top: 29%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.3rem;
  z-index: 5;
  transition: all 0.4s;
  pointer-events: none;
}

.info-couple-heart.flash {
  animation: heartFlash 0.6s ease-out;
}

@keyframes heartFlash {
  0%   { transform: translateX(-50%) scale(1); }
  30%  { transform: translateX(-50%) scale(1.8); filter: brightness(2); }
  100% { transform: translateX(-50%) scale(1); }
}

/* ---- 酒店地图覆盖层 ---- */
.info-map-area {
  position: absolute;
  top: 43%;
  left: 10%;
  right: 10%;
  height: 22%;
  z-index: 4;
  cursor: pointer;
  border: 2px dashed rgba(139, 105, 20, 0.5);
  border-radius: 0.06rem;
  overflow: hidden;
  transition: border-color 0.2s;
  background: #d4e8c0;  /* 加载前/失败后的底色 */
}

.info-map-area:active {
  border-color: rgba(139, 105, 20, 0.8);
}

/* 外部静态地图图片 */
.info-map-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* 像素风地图后备（外部地图加载失败时显示） */
.pixel-map-fallback {
  position: absolute;
  inset: 0;
}

/* 像素风地图 */
.pixel-map {
  width: 100%;
  height: 100%;
  position: relative;
  background: #d4e8c0;
  overflow: hidden;
}

/* 网格线 */
.pixel-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 14px, rgba(139,105,20,0.12) 14px, rgba(139,105,20,0.12) 15px),
    repeating-linear-gradient(90deg, transparent, transparent 14px, rgba(139,105,20,0.12) 14px, rgba(139,105,20,0.12) 15px);
}

/* 横马路 */
.pixel-map-road-h {
  position: absolute;
  left: 0; right: 0;
  top: 52%;
  height: 14%;
  background: #e8dcc8;
  border-top: 1px dashed rgba(139,105,20,0.3);
  border-bottom: 1px dashed rgba(139,105,20,0.3);
}

/* 竖马路 */
.pixel-map-road-v {
  position: absolute;
  top: 0; bottom: 0;
  left: 48%;
  width: 12%;
  background: #e8dcc8;
  border-left: 1px dashed rgba(139,105,20,0.3);
  border-right: 1px dashed rgba(139,105,20,0.3);
}

/* 小河 */
.pixel-map-river {
  position: absolute;
  left: 0; right: 0;
  bottom: 8%;
  height: 18%;
  background: #a8d4e6;
  border-radius: 50% 50% 0 0;
  opacity: 0.6;
}

/* 地图图钉 */
.pixel-map-pin {
  position: absolute;
  top: 36%;
  left: 52%;
  font-size: 0.3rem;
  transform: translate(-50%, -100%);
  animation: mapPinBounce 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
  z-index: 2;
}

@keyframes mapPinBounce {
  0%, 100% { transform: translate(-50%, -100%) translateY(0); }
  50%      { transform: translate(-50%, -100%) translateY(-0.08rem); }
}

/* 地图酒店标签 */
.pixel-map-label {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.15rem;
  color: var(--dark-brown);
  background: rgba(255,255,255,0.7);
  padding: 0.02rem 0.06rem;
  border-radius: 0.02rem;
  white-space: nowrap;
  z-index: 2;
}

/* 地址导航热区 */
.info-venue-hit {
  position: absolute;
  bottom: 11%;
  left: 0;
  right: 0;
  height: 12%;
  z-index: 3;
  cursor: pointer;
}

/* ==================== 模块5：种子养成游戏 ==================== */
#seed-game-section {
  padding: 0 0.2rem 0.3rem;
  text-align: center;
}

.seed-game-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0;
}

/* 花盆 */
.flowerpot-area {
  position: relative;
}

.flowerpot-frame {
  width: 3rem;
  max-width: 75vw;
  display: block;
  border-radius: 0.04rem;
}

/* 浇水壶 — 与花盆等宽，置于花盆上方 */
.watercan-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
  cursor: pointer;
  transition: transform 0.15s;
  order: -1;  /* 置于花盆上方 */
  animation: eggGlowPulse 2.2s ease-in-out infinite;
}

.watercan-area:active {
  transform: scale(0.93);
}

.watercan-area.animating {
  pointer-events: none;
  opacity: 0.7;
}

.watercan-frame {
  width: 3rem;
  max-width: 75vw;
  display: block;
}

.watercan-hint {
  font-size: 0.28rem;
  color: var(--brown);
  animation: hintPulse 0.8s ease-in-out infinite;
  text-shadow: 0 0 0.06rem rgba(139, 105, 20, 0.6);
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.watercan-area.done {
  pointer-events: none;
  opacity: 0.5;
}

.watercan-area.done .watercan-hint {
  display: none;
}

.seed-message {
  font-size: 0.3rem;
  color: var(--brown);
  min-height: 0.3rem;
  padding: 0.1rem;
}

/* ==================== 模块6：底部祝福 ==================== */
#footer-section {
  padding: 0.2rem 0.2rem 0.5rem;
  text-align: center;
}

.footer-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  animation: eggGlowPulse 3s ease-in-out infinite;
}

.footer-img {
  width: 3.5rem;
  max-width: 90vw;
  display: block;
  border-radius: 0.04rem;
}

.footer-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  font-size: 0.2rem;
  animation: heartFloat 3s ease-in-out infinite;
}

@keyframes heartFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50%      { transform: translateY(-0.3rem) scale(1.3); opacity: 1; }
}

.footer-credit {
  margin-top: 0.2rem;
  font-size: 0.2rem;
  color: var(--brown);
  opacity: 0.7;
}

/* ==================== 婚纱照弹窗 ==================== */
#photo-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#photo-popup.show {
  display: flex;
}

.popup-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  animation: fadeIn 0.5s ease-out;
}

.popup-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.popup-frame {
  background: var(--white);
  border: 3px solid var(--brown);
  border-radius: 0.06rem;
  padding: 0.1rem;
  box-shadow: 0 0 0.3rem rgba(240, 192, 64, 0.4);
  animation: popupBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 85vw;
}

@keyframes popupBounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.05); }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); opacity: 1; }
}

.popup-photo {
  max-width: 80vw;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 0.03rem;
  display: none;
}

.popup-photo.show { display: block; }

.popup-close-hint {
  font-size: 0.14rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.15rem;
}

/* ==================== 照片进度条（弹窗内8个方框） ==================== */
#photo-progress-bar {
  display: flex;
  justify-content: center;
  gap: 0.06rem;
  margin-top: 0.12rem;
}

.progress-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 0.04rem;
  font-size: 0.16rem;
  font-family: var(--font-pixel);
  font-weight: bold;
  transition: all 0.3s ease;
  user-select: none;
}

.progress-box.current {
  background: linear-gradient(135deg, #f0c040, #ff8c42);
  color: #fff;
  border: 2px solid #e0a020;
  box-shadow: 0 0 0.1rem rgba(240, 192, 64, 0.7);
  transform: scale(1.15);
  animation: progressPulse 1.2s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { box-shadow: 0 0 0.08rem rgba(240, 192, 64, 0.6); }
  50%      { box-shadow: 0 0 0.2rem rgba(240, 192, 64, 1); }
}

.progress-box.unlocked {
  background: transparent;
  color: #e04070;
  border: 2px dashed #e04070;
  cursor: pointer;
}

.progress-box.unlocked:active {
  background: rgba(224, 64, 112, 0.15);
  transform: scale(1.1);
}

.progress-box.locked {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ==================== 彩蛋收集状态面板（计数器弹出） ==================== */
.egg-status-panel {
  position: fixed;
  top: 1.6rem;
  left: 0.08rem;
  z-index: 1000;
  background: linear-gradient(180deg, #fefcf0 0%, #f4e8d8 100%);
  border: 3px solid var(--brown);
  border-radius: 0.08rem;
  padding: 0.15rem;
  width: 3.6rem;
  max-width: 88vw;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-0.1rem) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.egg-status-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.egg-panel-title {
  font-size: 0.24rem;
  color: var(--dark-brown);
  text-align: center;
  margin-bottom: 0.1rem;
  padding-bottom: 0.08rem;
  border-bottom: 1px dashed var(--brown);
}

.egg-panel-count {
  color: #e04070;
  font-weight: bold;
}

.egg-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
}

.egg-panel-item {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  padding: 0.06rem 0.08rem;
  border-radius: 0.04rem;
  transition: background 0.15s;
}

.egg-panel-item.unlocked {
  cursor: pointer;
}

.egg-panel-item.unlocked:active {
  background: rgba(240, 192, 64, 0.2);
}

.egg-panel-item.locked {
  opacity: 0.45;
}

.egg-panel-icon {
  font-size: 0.18rem;
  flex-shrink: 0;
}

.egg-panel-name {
  font-size: 0.18rem;
  color: var(--text);
  flex: 1;
}

.egg-panel-item.locked .egg-panel-name {
  color: #999;
}

.egg-panel-arrow {
  font-size: 0.2rem;
  flex-shrink: 0;
}

.egg-panel-hint {
  text-align: center;
  font-size: 0.14rem;
  color: var(--brown);
  margin-top: 0.08rem;
  padding-top: 0.06rem;
  border-top: 1px dashed rgba(139, 105, 20, 0.3);
}

/* ==================== 淡入淡出 ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ==================== 图片加载失败占位 ==================== */
img[src=""],
img:not([src]) {
  background: rgba(139, 105, 20, 0.15);
  border: 1px dashed var(--brown);
  min-height: 0.5rem;
}

/* ==================== 小魔鬼彩蛋助手弹窗 ==================== */
#devil-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#devil-modal.show {
  display: flex;
}

.devil-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease-out;
}

.devil-modal-container {
  position: relative;
  z-index: 1;
  width: 5.5rem;
  max-width: 88vw;
}

.devil-modal-inner {
  background: linear-gradient(180deg, #fff8f0 0%, #ffe8e0 40%, #fce4ec 100%);
  border: 3px solid var(--brown);
  border-radius: 0.15rem;
  padding: 0.25rem 0.22rem;
  text-align: center;
  box-shadow:
    0 0 0.3rem rgba(240, 192, 64, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.4);
  animation: popupBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* 像素纹理 */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255,182,140,0.04) 3px,
      rgba(255,182,140,0.04) 4px
    ),
    linear-gradient(180deg, #fff8f0 0%, #ffe8e0 40%, #fce4ec 100%);
}

.devil-modal-icon {
  font-size: 0.5rem;
  margin-bottom: 0.12rem;
  animation: devilFloat 2s ease-in-out infinite;
}

.devil-modal-text {
  font-size: 0.18rem;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 0.2rem;
  text-align: left;
  padding: 0 0.04rem;
}

.devil-modal-text p {
  margin-bottom: 0.05rem;
}

.devil-warning {
  color: #d6336c;
  font-weight: bold;
  background: rgba(255, 200, 200, 0.3);
  border-radius: 0.06rem;
  padding: 0.04rem 0.08rem;
  display: inline-block;
}

.devil-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.devil-btn {
  font-family: var(--font-pixel);
  font-size: 0.17rem;
  padding: 0.12rem 0.15rem;
  border: 2px solid var(--brown);
  border-radius: 0.08rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.01rem;
}

.devil-btn:active {
  transform: scale(0.95);
}

.devil-btn-close {
  background: #f5f0e8;
  color: var(--dark-brown);
}

.devil-btn-close:active {
  background: #e8ddd0;
}

.devil-btn-unlock {
  background: linear-gradient(135deg, #f4c2c2 0%, #ff8a80 100%);
  color: #fff;
  border-color: #e04070;
  box-shadow: 0 0 0.12rem rgba(224, 64, 112, 0.4);
}

.devil-btn-unlock:active {
  background: linear-gradient(135deg, #e8a0a0 0%, #f06060 100%);
  box-shadow: 0 0 0.18rem rgba(224, 64, 112, 0.6);
}

.devil-btn-restart-inline {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.15rem;
  padding: 0.04rem 0.10rem;
  margin-left: 0.06rem;
  background: #fff0e0;
  color: #c0392b;
  border: 1px solid #c0392b;
  border-radius: 0.05rem;
  cursor: pointer;
  vertical-align: middle;
}

.devil-btn-restart-inline:active {
  background: #ffd0c0;
  transform: scale(0.95);
}

/* ==================== 轻提示 Toast ==================== */
#toast-notification {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

#toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-inner {
  background: rgba(62, 43, 26, 0.92);
  color: #fefcf0;
  font-family: var(--font-pixel);
  font-size: 0.18rem;
  padding: 0.12rem 0.24rem;
  border-radius: 0.08rem;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  text-align: center;
  white-space: nowrap;
}

/* ==================== 统一彩蛋指示器（跳动桃心 + 旋转星光） ==================== */
/* 所有彩蛋触发点共用此 class，显示一致的大号 ❤️ + ✨ 浮动特效 */
.egg-target::before {
  content: '✨';
  position: absolute;
  font-size: 0.18rem;
  pointer-events: none;
  z-index: 15;
  left: 50%;
  margin-left: -0.12rem;
  top: -0.54rem;
  animation: eggIndicatorSparkle 2.5s ease-in-out infinite;
}

.egg-target::after {
  content: '❤️';
  position: absolute;
  font-size: 0.30rem;
  pointer-events: none;
  z-index: 14;
  left: 50%;
  margin-left: -0.20rem;
  top: -0.34rem;
  animation: eggIndicatorBeat 1.0s ease-in-out infinite, eggGlowPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 64, 128, 0.7));
}

@keyframes eggIndicatorBeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.4); }
  30%      { transform: scale(1); }
}

@keyframes eggIndicatorSparkle {
  0%   { opacity: 0.3; transform: scale(0.5) rotate(0deg); }
  20%  { opacity: 1;   transform: scale(1.15) rotate(72deg); }
  40%  { opacity: 1;   transform: scale(1) rotate(144deg); }
  60%  { opacity: 0.6; transform: scale(0.8) rotate(216deg); }
  80%  { opacity: 1;   transform: scale(1.1) rotate(288deg); }
  100% { opacity: 0.3; transform: scale(0.5) rotate(360deg); }
}

/* 个别彩蛋微调 */
.cat-target::after  { top: -0.38rem; }
.cat-target::before { top: -0.58rem; }

.residents-target::after  { top: -0.28rem; font-size: 0.26rem; margin-left: -0.17rem; }
.residents-target::before { top: -0.44rem; font-size: 0.15rem; margin-left: -0.10rem; }

.footer-target::after  { top: -0.40rem; }
.footer-target::before { top: -0.60rem; }

.watercan-target::after  { top: -0.38rem; }
.watercan-target::before { top: -0.58rem; }

/* 成就弹窗桃心微调 */
.achievement-target::after  { top: -0.36rem; }
.achievement-target::before { top: -0.56rem; }

/* 日历热区桃心微调 */
.calendar-target::after  { top: -0.40rem; }
.calendar-target::before { top: -0.60rem; }

/* 已解锁彩蛋：隐藏指示器 */
.egg-target.egg-found::before,
.egg-target.egg-found::after {
  display: none;
}

/* ==================== 横屏提示 ==================== */
@media (orientation: landscape) {
  body::before {
    content: "请竖屏使用 📱";
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.9);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.3rem;
    font-family: var(--font-pixel);
  }
}
