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

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.game-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.game-header {
  margin-bottom: 20px;
}

.game-header h1 {
  font-size: 2.5em;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.score, .high-score {
  font-size: 1.2em;
  margin: 5px 0;
  font-weight: bold;
}

#gameCanvas {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: #2a2a2a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin: 20px 0;
}

.game-controls {
  margin-top: 20px;
}

.control-instructions {
  margin-bottom: 15px;
  opacity: 0.8;
}

.control-instructions p {
  margin: 5px 0;
  font-size: 0.9em;
}

.game-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.game-buttons button {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.game-buttons button:active {
  transform: translateY(0);
}

.mobile-controls {
  display: none;
}

.control-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 5px 0;
}

.control-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 40px;
  border-radius: 15px;
  display: none;
  z-index: 100;
}

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

.game-over p {
  font-size: 1.3em;
  margin-bottom: 20px;
}

#playAgainBtn {
  padding: 15px 30px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  color: white;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#playAgainBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
  .game-container {
    padding: 20px;
    margin: 20px;
  }
  
  #gameCanvas {
    width: 300px;
    height: 300px;
  }
  
  .mobile-controls {
    display: block;
  }
  
  .game-header h1 {
    font-size: 2em;
  }
  
  .game-buttons {
    flex-wrap: wrap;
  }
}
