@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'Press Start 2P', monospace;
  user-select: none;
}

canvas { display: block; }

#startScreen, #victoryScreen, #gameOverScreen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10; background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a1a 70%);
}

.title {
  font-size: 48px; color: #e8d5b7;
  text-shadow: 0 0 30px rgba(232,213,183,0.4), 0 0 60px rgba(100,150,255,0.2);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px; color: #7a8aaa; margin-bottom: 50px;
}

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px; padding: 14px 64px; margin: 8px;
  border: 3px solid #5a7aaa; border-radius: 12px;
  cursor: pointer; transition: all 0.2s;
  background: rgba(30,40,80,0.6); color: #c8d8ff;
  text-shadow: 0 0 15px rgba(100,150,255,0.5);
}
.btn:hover {
  transform: scale(1.1);
  background: rgba(50,70,120,0.8);
  border-color: #8ab0ff;
  box-shadow: 0 0 30px rgba(100,150,255,0.4);
}

.hidden { display: none !important; }

#hud {
  position: fixed; top: 20px; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; z-index: 5; pointer-events: none;
}

.hud-box {
  background: rgba(10,15,30,0.8);
  border: 2px solid #3a4a6a; border-radius: 10px;
  padding: 6px 20px; font-size: 18px; color: #9ab0d0;
}

.level-badge {
  font-size: 22px; font-weight: bold;
}
.level-1 { color: #5ac8fa; text-shadow: 0 0 10px rgba(90,200,250,0.5); }
.level-2 { color: #f0c040; text-shadow: 0 0 10px rgba(240,192,64,0.5); }
.level-3 { color: #ff6b8a; text-shadow: 0 0 10px rgba(255,107,138,0.5); }

.progress-dots { display: flex; gap: 8px; align-items: center; }
.dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #4a5a7a; background: transparent;
  transition: all 0.3s;
}
.dot.filled {
  background: #5ac8fa; border-color: #5ac8fa;
  box-shadow: 0 0 10px rgba(90,200,250,0.6);
}

.powerup-msg {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 28px; color: #f0c040; z-index: 6; pointer-events: none;
  text-shadow: 0 0 20px rgba(240,192,64,0.8);
  opacity: 0; transition: opacity 0.3s;
}

.controls-hint {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-size: 14px; color: #5a6a8a; z-index: 5; pointer-events: none;
  opacity: 0.6;
}

#healthBarContainer {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 24px; z-index: 5; pointer-events: none;
}

#healthBarBg {
  width: 100%; height: 100%;
  background: rgba(10,15,30,0.8);
  border: 2px solid #3a4a6a; border-radius: 14px;
  overflow: hidden;
}

#healthBarFill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #ff4444, #ff8844, #44ff88);
  border-radius: 12px;
  transition: width 0.3s ease;
}

#healthBarText {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
  font-family: 'Press Start 2P', monospace;
}

#grappleHint {
  position: fixed; bottom: 65px; left: 50%; transform: translateX(-50%);
  font-size: 18px; color: #f0c040; z-index: 5; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
  text-shadow: 0 0 10px rgba(240,192,64,0.5);
}
