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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #1a1a2e;
  font-family: 'Arial', sans-serif;
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 400px;
  height: 600px;
  max-width: 100vw;
  max-height: 100vh;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Overlay Screens */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.screen-content {
  text-align: center;
  color: white;
}

.game-title {
  font-size: 2.5rem;
  color: #ffd700;
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  margin-bottom: 20px;
  animation: bounce 1s ease infinite;
}

.gameover-title {
  font-size: 2rem;
  color: #ff6b6b;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 20px;
}

.instructions {
  font-size: 1rem;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000;
  animation: pulse 1.5s ease infinite;
}

.score-display {
  margin: 20px 0;
  padding: 15px 30px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.score-display p {
  font-size: 1.2rem;
  margin: 10px 0;
}

#final-score {
  color: #ffd700;
  font-weight: bold;
  font-size: 1.5rem;
}

#high-score {
  color: #4ecdc4;
  font-weight: bold;
  font-size: 1.3rem;
}

/* Animations */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 450px) {
  #game-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  #game-canvas {
    border-radius: 0;
  }

  .overlay {
    border-radius: 0;
  }

  .game-title {
    font-size: 2rem;
  }

  .gameover-title {
    font-size: 1.5rem;
  }
}
