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

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(to bottom, #5c94fc, #8bc6ff);
  font-family: 'Arial', sans-serif;
}

#game-container {
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  background: #5c94fc;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#ui {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  color: white;
}

#game-over h2 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #ff6b6b;
}

#game-over p {
  font-size: 24px;
  margin-bottom: 30px;
}

#restart-btn {
  padding: 15px 40px;
  font-size: 20px;
  background: #4ecdc4;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

#restart-btn:hover {
  background: #45b7aa;
  transform: scale(1.05);
}

.hidden {
  display: none !important;
}

#controls {
  margin-top: 20px;
  color: white;
  font-size: 16px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
