/* Base styles */
body {
  font-family: 'Nunito', sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Game container and background */
#game-container {
  background-color: #f0f5ff;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 90% 80%, rgba(220, 230, 255, 0.8) 0%, rgba(220, 230, 255, 0) 30%);
  position: relative;
}

/* Font class for monospace elements */
.font-geist-mono {
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.05em;
}

/* Player and enemy styling */
#player {
  width: 80px;
  height: 80px;
  z-index: 20;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease-out;
}

.enemy {
  position: absolute;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%);
  z-index: 10;
  transition: all 0.2s ease-out;
}

.enemy.highlighted {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
  transform: translate(-50%, -50%) scale(1.1);
}

.enemy.angry {
  filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
}

.treasure {
  position: absolute;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  z-index: 10;
  animation: float 2s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 10px)); }
}

/* Word labels */
.word-label {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 14px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: center;
  z-index: 15;
}

.word-label.current {
  background-color: rgba(59, 130, 246, 0.9);
  font-weight: bold;
}

.word-label.error {
  background-color: rgba(239, 68, 68, 0.9);
}

/* Input field effects */
#word-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6);
}

#word-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(-50%); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(calc(-50% - 4px)); }
  20%, 40%, 60%, 80% { transform: translateX(calc(-50% + 4px)); }
}

/* Wave notification animation */
@keyframes fadeInOut {
  0%, 100% { opacity: 0; transform: translate(-50%, -20px); }
  20%, 80% { opacity: 1; transform: translate(-50%, 0); }
}

.wave-animation {
  animation: fadeInOut 3s forwards;
}

/* Shield effect */
.shield-effect {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  border: 3px solid rgba(59, 130, 246, 0.5);
  z-index: 15;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

/* Explosion animation */
.explosion {
  position: absolute;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  z-index: 25;
  pointer-events: none;
}

@keyframes explode {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.exploding {
  animation: explode 0.5s forwards;
}
