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

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

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.game-header {
  text-align: center;
}

.game-title {
  color: white;
  font-size: 2.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.scoreboard {
  display: flex;
  gap: 30px;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.player-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.player-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.score-value {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.canvas-container {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

#game-canvas {
  display: block;
  border-radius: 20px;
  cursor: pointer;
}

.controls {
  display: flex;
  justify-content: center;
}

.btn {
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-restart {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 5px 20px rgba(240, 147, 251, 0.4);
}

.btn-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240, 147, 251, 0.6);
}

.btn-restart:active {
  transform: translateY(0);
}

.instructions {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-align: center;
  max-width: 400px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-title {
    font-size: 2rem;
  }

  .scoreboard {
    gap: 15px;
    padding: 10px 20px;
  }

  .btn {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .instructions {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .game-title {
    font-size: 1.5rem;
  }

  .scoreboard {
    gap: 10px;
    padding: 8px 15px;
  }

  .score-value {
    font-size: 1.5rem;
  }

  .btn {
    padding: 10px 25px;
    font-size: 0.9rem;
  }

  .canvas-container {
    border-radius: 15px;
  }
}
