/* ============================
   玩法1：呼噜噜云端飞飞乐
   ============================ */
#scene-flight {
  background: #ffd9ec;
}

#flight-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.flight-energy-bar {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 4px solid #fff;
  background: rgba(255, 248, 252, 0.9);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

.energy-track {
  width: clamp(110px, 22vw, 190px);
  height: 18px;
  border-radius: 999px;
  background: #ffe0ef;
  overflow: hidden;
  border: 2px solid #ffc2df;
}

.energy-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7eb8, #ffcf4b, #7ee8fa, #ff7eb8);
  background-size: 200% 100%;
  animation: rainbowSlide 2.2s linear infinite;
  transition: width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rainbowSlide {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.flight-controls {
  position: absolute;
  right: max(18px, 3.5vw);
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 30;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.big-skill-btn {
  width: clamp(82px, 14vw, 108px);
  height: clamp(82px, 14vw, 108px);
  border-radius: 50%;
  border: 5px solid #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 9px 0 rgba(205, 65, 130, 0.38), 0 16px 32px rgba(235, 70, 145, 0.38);
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.big-skill-btn .skill-emoji {
  font-size: clamp(2.1rem, 4.2vw, 2.8rem);
  line-height: 1;
  pointer-events: none;
}

.big-skill-btn .skill-mini-tag {
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(160, 30, 85, 0.6);
  margin-top: 2px;
  pointer-events: none;
}

.inhale-btn {
  background: radial-gradient(circle at 35% 30%, #ff9fd0 0%, #ff4593 100%);
}

.inhale-btn.pressing, .inhale-btn:active {
  transform: scale(0.91) translateY(5px);
  background: radial-gradient(circle at 50% 50%, #ff6eb6 0%, #e02274 100%);
  box-shadow: 0 3px 0 rgba(205, 65, 130, 0.4), 0 0 30px rgba(255, 95, 175, 0.85);
}

.magic-burst-btn {
  width: clamp(76px, 12.5vw, 98px);
  height: clamp(76px, 12.5vw, 98px);
  background: radial-gradient(circle at 35% 30%, #ffe98a 0%, #ff9e2c 100%);
  box-shadow: 0 8px 0 rgba(205, 115, 20, 0.38), 0 14px 28px rgba(245, 145, 30, 0.36);
}

.magic-burst-btn:active {
  transform: scale(0.9) translateY(5px);
}

.magic-burst-btn.cooling {
  opacity: 0.6;
  filter: grayscale(0.3);
}

/* 左下角快速变身体验胶囊（方便宝宝随时挑选喜欢的变身飞翔） */
.flight-form-bar {
  position: absolute;
  left: max(16px, 3vw);
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 30;
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 245, 251, 0.82);
  backdrop-filter: blur(6px);
}

.flight-form-dot {
  width: clamp(44px, 7vw, 54px);
  height: clamp(44px, 7vw, 54px);
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.flight-form-dot.active {
  background: #ffcce5;
  border-color: var(--pink-500);
  transform: scale(1.14);
}

/* ============================
   玩法2：噗噗的梦幻草莓蛋糕屋
   ============================ */
#scene-cake {
  background: url("../assets/images/bg_bakery.webp") center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.cake-steps-bar {
  margin-top: max(18px, calc(env(safe-area-inset-top) + 10px));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 4px solid #fff;
  background: rgba(255, 248, 252, 0.92);
  box-shadow: var(--shadow-soft);
}

.step-dot {
  width: clamp(42px, 6.5vw, 52px);
  height: clamp(42px, 6.5vw, 52px);
  border-radius: 50%;
  border: 3px solid #ffd4e8;
  background: #fff5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.25rem, 2.3vw, 1.55rem);
  opacity: 0.6;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.step-dot.active {
  opacity: 1;
  transform: scale(1.18);
  border-color: var(--pink-500);
  background: linear-gradient(180deg, #fff0f7 0%, #ffc2df 100%);
  box-shadow: 0 4px 12px rgba(255, 80, 155, 0.35);
}

.step-dot.done {
  opacity: 0.95;
  border-color: #69db7c;
  background: #ebfbee;
}

.cake-work-area {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 820px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 蛋糕桌后面眼巴巴期待的噗噗 */
.cake-pufu-guest {
  position: absolute;
  top: clamp(2px, 2vh, 22px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(135px, 23vh, 195px);
  height: clamp(135px, 23vh, 195px);
  z-index: 4;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cake-pufu-guest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(215, 75, 135, 0.28));
}

.cake-pufu-guest.eating {
  transform: translateX(-50%) scale(1.18);
}

#cake-canvas {
  position: relative;
  z-index: 8;
  width: min(500px, 92vw);
  height: min(390px, 52vh);
  margin-top: clamp(54px, 9vh, 88px);
  cursor: pointer;
}

/* 右侧超大主操作行动按钮（下一步 / 吹蜡烛 / 喂噗噗 / 再做一个） */
.cake-action-btn {
  position: absolute;
  right: max(16px, 3vw);
  top: 52%;
  transform: translateY(-50%);
  z-index: 30;
  min-width: clamp(86px, 14vw, 118px);
  height: clamp(86px, 14vw, 118px);
  padding: 0 18px;
  border-radius: 999px;
  border: 5px solid #fff;
  background: linear-gradient(180deg, #6ce597 0%, #2ac769 100%);
  box-shadow: 0 9px 0 #1e994f, 0 16px 30px rgba(42, 199, 105, 0.38);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  animation: pulseAction 1.6s ease-in-out infinite;
}

.cake-action-btn.pink-mode {
  background: linear-gradient(180deg, #ff8ac1 0%, #ff4793 100%);
  box-shadow: 0 9px 0 #cc296c, 0 16px 30px rgba(255, 71, 147, 0.42);
}

.cake-action-btn .act-icon {
  font-size: clamp(2rem, 3.8vw, 2.6rem);
  line-height: 1;
}

.cake-action-btn .act-text {
  font-size: clamp(0.82rem, 1.5vw, 0.98rem);
  font-weight: 900;
}

@keyframes pulseAction {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.07); }
}

/* 底部食材工具托盘 */
.cake-tray {
  position: relative;
  z-index: 25;
  margin-bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 16px);
  padding: 10px 20px;
  max-width: 94vw;
  border-radius: 32px;
  border: 4px solid #ffffff;
  background: rgba(255, 246, 251, 0.94);
  box-shadow: 0 10px 28px rgba(215, 75, 135, 0.25);
}

.tray-item {
  width: clamp(58px, 10vw, 76px);
  height: clamp(58px, 10vw, 76px);
  border-radius: 22px;
  border: 4px solid #fff;
  background: linear-gradient(180deg, #ffffff 0%, #ffe6f2 100%);
  box-shadow: 0 5px 0 rgba(220, 95, 150, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tray-item.selected {
  transform: translateY(-6px) scale(1.12);
  border-color: var(--pink-500);
  background: linear-gradient(180deg, #fff2f8 0%, #ffbad9 100%);
  box-shadow: 0 7px 0 rgba(230, 55, 130, 0.36), 0 10px 20px rgba(255, 75, 150, 0.34);
}

.tray-item:active {
  transform: scale(0.9);
}

/* ============================
   玩法3：月亮湖音乐泡泡烟花秀
   ============================ */
#scene-bubble {
  background: url("../assets/images/bg_starlight_lake.webp") center center / cover no-repeat;
}

#bubble-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.bubble-song-dock {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  background: rgba(68, 36, 98, 0.56);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(45, 18, 78, 0.38);
}

.song-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 240, 250, 0.9);
  color: var(--pink-600);
  font-weight: 900;
  font-size: clamp(0.9rem, 2vw, 1.08rem);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.song-btn.active {
  background: linear-gradient(180deg, #ffe985 0%, #ffb938 100%);
  color: #7c3d00;
  border-color: #fff;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 195, 65, 0.5);
}

.firework-party-btn {
  width: clamp(54px, 8.5vw, 66px);
  height: clamp(54px, 8.5vw, 66px);
  border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 35% 30%, #ff99cc 0%, #ff3d8b 100%);
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(255, 61, 139, 0.5);
}

.firework-party-btn:active {
  transform: scale(0.9);
}

@media (max-width: 640px) {
  .cake-action-btn {
    top: auto;
    bottom: 106px;
    right: 12px;
    transform: none;
    animation: none;
  }
  .song-btn span.song-title {
    display: none;
  }
}
