@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;800&family=Orbitron:wght@400;700&display=swap');

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  font-family: 'Oxanium', 'Orbitron', sans-serif;
  color: #fff;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

canvas {
  border: 4px solid rgba(0, 225, 255, 0.9);
  border-radius: 12px;
  box-shadow: 
    0 0 30px rgba(0, 225, 255, 0.8),
    0 0 60px rgba(0, 128, 255, 0.5),
    inset 0 0 20px rgba(255, 255, 255, 0.15);
  background-color: #000;
  transition: all 0.3s ease;
}

canvas:focus {
  outline: none;
  border-color: rgba(255, 0, 150, 0.9);
  box-shadow: 
    0 0 35px rgba(255, 0, 150, 0.7),
    0 0 70px rgba(255, 0, 255, 0.4),
    inset 0 0 25px rgba(255, 255, 255, 0.2);
}

.game-title {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 5px;
  color: #00e1ff;
  text-shadow: 
    0 0 10px #00e1ff,
    0 0 25px rgba(0, 225, 255, 0.7),
    0 0 50px rgba(0, 225, 255, 0.5);
  margin: 0;
  text-transform: uppercase;
  animation: glowPulse 3s infinite ease-in-out;
}

@keyframes glowPulse {
  0% { text-shadow: 0 0 10px #00e1ff, 0 0 25px rgba(0, 225, 255, 0.7); }
  50% { text-shadow: 0 0 20px #ff007a, 0 0 40px rgba(255, 0, 122, 0.8); }
  100% { text-shadow: 0 0 10px #00e1ff, 0 0 25px rgba(0, 225, 255, 0.7); }
}

.controls {
  background: rgba(0, 0, 0, 0.75);
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1rem;
  display: flex;
  gap: 20px;
  box-shadow: 0 0 15px rgba(0, 225, 255, 0.4);
  backdrop-filter: blur(5px);
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.control-key {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(0, 225, 255, 0.3));
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  box-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.6),
    inset 0 1px 3px rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Canvas glow pulse */
.game-active canvas {
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { box-shadow: 0 0 30px rgba(0, 225, 255, 0.7), 0 0 60px rgba(0, 128, 255, 0.4); }
  50% { box-shadow: 0 0 40px rgba(255, 0, 150, 0.8), 0 0 80px rgba(255, 0, 255, 0.5); }
  100% { box-shadow: 0 0 30px rgba(0, 225, 255, 0.7), 0 0 60px rgba(0, 128, 255, 0.4); }
}

/* Responsive adjustments */
@media (max-width: 850px) {
  canvas {
    width: 95vw;
    height: auto;
  }

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

  .controls {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
