* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-width: 800px;
  width: 100%;
}

.header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 20px;
  text-align: center;
}

.header h1 {
  color: white;
  font-size: 2.5em;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.stat-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9em;
  display: block;
  margin-bottom: 5px;
}

.stat-value {
  color: white;
  font-size: 1.5em;
  font-weight: bold;
  display: block;
}

.game-wrapper {
  position: relative;
  background: #2c3e50;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
}

#gameCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #34495e;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  text-align: center;
  color: white;
  padding: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.overlay-content h2 {
  font-size: 3em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overlay-content p {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.controls-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

.controls-info p {
  font-size: 1em;
  margin: 10px 0;
}

.final-score {
  font-size: 1.5em !important;
  color: #f5576c !important;
  font-weight: bold;
}

.high-score {
  color: #ffd700 !important;
}

.btn {
  padding: 15px 40px;
  font-size: 1.2em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  margin: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 87, 108, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(118, 75, 162, 0.6);
}

.controls {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: #f8f9fa;
}

.control-btn {
  padding: 10px 20px;
  font-size: 1em;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: #667eea;
  color: white;
}

.mobile-controls {
  display: none;
  gap: 20px;
}

.mobile-btn {
  width: 60px;
  height: 60px;
  font-size: 1.5em;
  border: 3px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.mobile-btn:active {
  background: #667eea;
  color: white;
  transform: scale(0.95);
}

.footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9em;
}

.footer strong {
  color: #f5576c;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2em;
  }

  .stats {
    gap: 15px;
  }

  .stat-item {
    padding: 8px 15px;
  }

  .overlay-content {
    padding: 30px 20px;
  }

  .overlay-content h2 {
    font-size: 2em;
  }

  .mobile-controls {
    display: flex;
  }

  .footer {
    font-size: 0.8em;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .game-container {
    border-radius: 15px;
  }

  .header {
    padding: 15px;
  }

  .header h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  .stat-value {
    font-size: 1.2em;
  }

  .game-wrapper {
    min-height: 400px;
  }
}
