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

html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', monospace;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0033 50%, #000a1a 100%);
  background-attachment: fixed;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 0, 128, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
  animation: pulseBackground 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes pulseBackground {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes neonGlow {
  0%, 100% { 
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, 0 0 20px currentColor;
    transform: scale(1);
  }
  50% { 
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
    transform: scale(1.02);
  }
}

@keyframes slideInGlow {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatAnimation {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#game-container {
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 10;
}

h1 {
  color: #00ff88;
  margin: 20px 0;
  font-size: 3em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: neonGlow 2s ease-in-out infinite, floatAnimation 3s ease-in-out infinite;
  background: linear-gradient(45deg, #00ff88, #00ccff, #ff0088);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonGlow 2s ease-in-out infinite, floatAnimation 3s ease-in-out infinite, gradientShift 4s ease-in-out infinite;
}

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

p {
  margin: 10px 0;
  color: #ffff00;
  font-size: 1.1em;
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
  animation: slideInGlow 1s ease-out;
}



#round-status {
  font-size: 1.4em;
  color: #00ff00;
  font-weight: bold;
  margin: 5px 0;
  display: none;
  text-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
  animation: slideInGlow 0.8s ease-out;
  text-align: center;
}

#current-word {
  font-size: 2em;
  color: #ff6600;
  font-weight: bold;
  margin: 10px 0;
  min-height: 50px;
  display: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

#lives {
  font-size: 1.3em;
  font-weight: bold;
  display: none;
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInGlow 1s ease-out;
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.7);
  text-align: center;
  margin: 10px auto;
  width: fit-content;
}

#words-correct, #vocab-count {
  position: absolute;
  top: 15px;
  font-size: 1.3em;
  font-weight: bold;
  display: none;
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInGlow 1s ease-out;
}

#words-correct {
  left: 15px;
  color: #00ffff;
  background: rgba(0, 255, 255, 0.1);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
}

#vocab-count {
  left: 15px;
  top: 65px;
  color: #00ff00;
  background: rgba(0, 255, 0, 0.1);
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
}

canvas {
  border: 3px solid transparent;
  background: linear-gradient(45deg, #00ff88, #00ccff, #ff0088, #ffff00) padding-box,
              linear-gradient(45deg, #00ff88, #00ccff, #ff0088, #ffff00) border-box;
  border-radius: 15px;
  margin-top: 20px;
  box-shadow: 
    0 0 30px rgba(0, 255, 136, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
  animation: canvasGlow 3s ease-in-out infinite;
}

@keyframes canvasGlow {
  0%, 100% {
    box-shadow: 
      0 0 30px rgba(0, 255, 136, 0.3),
      inset 0 0 30px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      0 0 50px rgba(0, 255, 136, 0.5),
      inset 0 0 30px rgba(0, 0, 0, 0.3);
  }
}

/* Mobile Controls */
#mobile-controls {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: none;
  justify-content: space-between;
  align-items: end;
  padding: 0 20px;
  pointer-events: none;
  z-index: 1000;
}

#movement-controls {
  display: flex;
  gap: 15px;
  pointer-events: auto;
}

#action-controls {
  pointer-events: auto;
}

.control-btn {
  width: 60px;
  height: 60px;
  border: 2px solid #00ff88;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  font-size: 24px;
  font-family: 'Orbitron', monospace;
  font-weight: bold;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}

.control-btn:hover,
.control-btn:active {
  background: rgba(0, 255, 136, 0.4);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.control-btn:active {
  transform: scale(0.95);
}

#shoot-btn {
  width: 80px;
  height: 80px;
  font-size: 32px;
  border-color: #ffff00;
  color: #ffff00;
  background: rgba(255, 255, 0, 0.2);
}

#shoot-btn:hover,
#shoot-btn:active {
  background: rgba(255, 255, 0, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
}

/* Show mobile controls on touch devices or small screens */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  #mobile-controls {
    display: flex;
  }
}

/* Creator Credit */
#creator-credit {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #00ff88;
  font-size: 14px;
  font-family: 'Orbitron', monospace;
  font-style: italic;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  z-index: 1001;
  pointer-events: none;
}

/* Adjust game container for mobile */
@media (max-width: 768px) {
  canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100vw;
    max-height: 60vh;
  }
  
  #game-container {
    padding: 10px;
  }
  
  h1 {
    font-size: 2em;
    margin: 10px 0;
  }
  
  p {
    font-size: 1em;
  }
}