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

body {
  overflow: hidden;
  background: #4c4cd1;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
}

#ui {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

#hud {
  position: absolute;
  top: 12px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  z-index: 10;
}

#startScreen, #deathScreen, #winScreen, #gameOverScreen {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  pointer-events: all;
  z-index: 20;
}

.hidden { display: none !important; }

h1 {
  font-size: 48px;
  color: #ffb6c1;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.6);
  margin-bottom: 16px;
}

p {
  font-size: 20px;
  color: #ddd;
  margin-bottom: 12px;
  text-align: center;
  max-width: 500px;
}

.controls-info {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 16px 0;
}

.controls-info p {
  font-size: 22px;
  color: #0cadc29f;
  line-height: 1.8;
}

button {
  margin-top: 20px;
  padding: 16px 48px;
  font-size: 22px;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #ff6b9d, #ff3366);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px rgba(255,51,102,0.4);
  pointer-events: all;
}

button:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(255,51,102,0.6);
}

button:active {
  transform: scale(0.95);
}
