/* ===== CSS 变量（暖杏奶油配色） ===== */
:root {
  --bg-warm: #F5E6D3;
  --accent-caramel: #D4A574;
  --text-brown: #8B4513;
  --bg-light: #E8C9A0;
  --night-dark: #0a0a2e;
  --night-mid: #1a1a4e;
  --star-gold: #FFD700;
  --rose: #C71585;
  --white: #FFFFFF;

  --font-hand: 'ZCOOL XiaoWei', 'Ma Shan Zheng', serif;
  --font-body: 'Ma Shan Zheng', 'KaiTi', serif;
}

/* ===== 全局重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--night-dark);
  color: var(--text-brown);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#app {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
}

#scene-container {
  position: absolute; inset: 0;
  z-index: 1;
}

#canvas-layer {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
}

#audio-toggle {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 100;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  font-size: 1.2em;
  cursor: pointer;
  transition: transform 0.3s, opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
#audio-toggle:hover { transform: scale(1.15); }

/* ===== 通用工具类 ===== */
.scene { display: none; }
.scene.active { display: flex; }

/* ===== 动画 Keyframes ===== */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes petalFall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

@keyframes eggPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0.85; }
  50% { transform: translate(-50%,-50%) scale(3.9); opacity: 1; }
}

@keyframes floatDecor {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  50% { transform: translateY(-18px) rotate(8deg); opacity: 0.9; }
}
