* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1a0f2e; font-family: 'Bungee', sans-serif; }
#scene-container { position: fixed; inset: 0; }

.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 16px; gap: 10px;
}
.hud-box {
  background: rgba(20,10,40,0.55); backdrop-filter: blur(6px);
  border: 2px solid rgba(255,190,60,0.7); border-radius: 14px;
  padding: 8px 14px; color: #fff; font-size: 18px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25);
}
#score-box { font-family: 'Luckiest Guy', cursive; font-size: 32px; color: #ffd54a; text-shadow: 2px 3px 0 #b3400e; padding: 6px 18px; }
.hud-icon { font-size: 20px; }

#lives { position: absolute; bottom: 16px; left: 16px; display: flex; gap: 6px; font-size: 26px; filter: drop-shadow(0 3px 0 rgba(0,0,0,0.3)); }

#combo {
  position: absolute; top: 90px; left: 50%; transform: translateX(-50%);
  font-family: 'Luckiest Guy', cursive; font-size: 40px; color: #ff5ecd;
  text-shadow: 3px 3px 0 #4a007a; animation: pop 0.4s ease;
}
@keyframes pop { 0%{transform:translateX(-50%) scale(0.3);} 60%{transform:translateX(-50%) scale(1.25);} 100%{transform:translateX(-50%) scale(1);} }

#banner {
  position: absolute; top: 40%; left: 50%; transform: translateX(-50%);
  font-family: 'Luckiest Guy', cursive; font-size: 46px; color: #4affd0;
  text-shadow: 3px 4px 0 #063; text-align: center; animation: bannerAnim 1.6s ease forwards;
}
@keyframes bannerAnim { 0%{opacity:0;transform:translateX(-50%) scale(0.5);} 20%{opacity:1;transform:translateX(-50%) scale(1.1);} 80%{opacity:1;} 100%{opacity:0;transform:translateX(-50%) translateY(-40px);} }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px; gap: 18px;
  background: radial-gradient(circle at 50% 30%, rgba(255,140,20,0.25), rgba(20,8,45,0.92) 70%);
  backdrop-filter: blur(3px);
}
.title {
  font-family: 'Luckiest Guy', cursive; font-size: clamp(48px, 14vw, 100px);
  color: #ff8a1e; line-height: 0.9;
  text-shadow: 0 0 8px #ffca28, 4px 6px 0 #7a1900, 8px 12px 0 rgba(0,0,0,0.3);
  animation: wobble 3s ease-in-out infinite;
}
.title .sub { color: #ffd54a; }
@keyframes wobble { 0%,100%{transform:rotate(-2deg);} 50%{transform:rotate(2deg);} }
.over-title { font-size: clamp(40px, 11vw, 80px); color: #ff4d6d; text-shadow: 0 0 8px #ff8fa3, 4px 6px 0 #4a0016; }
.tagline { color: #6bffb8; font-size: clamp(18px, 5vw, 28px); letter-spacing: 2px; }

.big-btn {
  pointer-events: auto; cursor: pointer;
  font-family: 'Bungee', sans-serif; font-size: clamp(20px, 5vw, 30px);
  padding: 16px 46px; border: none; border-radius: 50px; color: #3a1500;
  background: linear-gradient(180deg, #ffe14a, #ff9c1c);
  box-shadow: 0 6px 0 #b3500a, 0 10px 18px rgba(0,0,0,0.4);
  animation: pulse 1.1s ease-in-out infinite;
  transition: transform 0.08s;
}
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b3500a; }
@keyframes pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.06);} }

.controls-legend { color: #d9c8ff; font-family: 'Bungee', sans-serif; font-size: clamp(11px, 3vw, 15px); line-height: 1.9; opacity: 0.9; }
.controls-legend b { color: #ffd54a; }
.hi { color: #ffd54a; font-size: clamp(14px, 4vw, 20px); }
.stats { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; color: #e6dcff; font-size: clamp(14px, 4vw, 20px); }
.stats b { display: block; font-family: 'Luckiest Guy', cursive; font-size: clamp(26px, 7vw, 40px); color: #ffd54a; }
#new-hi { color: #4affd0; font-family: 'Luckiest Guy', cursive; font-size: clamp(22px, 6vw, 34px); animation: pulse 0.7s infinite; }

.remix { color: rgba(255,255,255,0.55); font-size: 12px; text-decoration: none; font-family: 'Bungee', sans-serif; margin-top: 8px; }
.remix:hover { color: #ffd54a; }

.mute {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 30; background: rgba(20,10,40,0.5); border: 2px solid rgba(255,190,60,0.6);
  border-radius: 50%; width: 42px; height: 42px; font-size: 18px; cursor: pointer; display: none;
}
</style>