/* css/zombies.css - Zombie Character Styles */

/* Zombie Base Styles */
.zombie-character {
  position: absolute;
  transform-origin: center bottom;
  transition: transform 0.2s ease;
  cursor: grab;
  user-select: none;
}

.zombie-character:active {
  cursor: grabbing;
}

.zombie-character.grabbed {
  z-index: 1000;
  transform: scale(1.1);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Zombie Types */
.zombie-ghoul {
  filter: drop-shadow(0 0 10px #00ff00);
}

.zombie-punk {
  filter: drop-shadow(0 0 15px #ff0080);
}

.zombie-cyborg {
  filter: drop-shadow(0 0 20px #00ffff);
}

/* Zombie Parts */
.zombie-body {
  position: relative;
  width: 100%;
  height: 100%;
}

.zombie-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: zombie-head-bob 2s ease-in-out infinite;
}

.zombie-torso {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
}

.zombie-arms {
  position: absolute;
  top: 40%;
  width: 150%;
  left: -25%;
  animation: zombie-arms-swing 1.5s ease-in-out infinite;
}

.zombie-legs {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: zombie-walk 0.8s ease-in-out infinite;
}

/* Zombie States */
.zombie-character.idle .zombie-body {
  animation: zombie-idle 3s ease-in-out infinite;
}

.zombie-character.walking {
  animation: zombie-move 0.5s linear infinite;
}

.zombie-character.attacking .zombie-arms {
  animation: zombie-attack 0.3s ease-out;
}

.zombie-character.dying {
  animation: zombie-death 1s ease-out forwards;
}

.zombie-character.projectile {
  animation: zombie-spin 0.5s linear infinite;
}

/* Ghoul Zombie Specific */
.zombie-ghoul .zombie-skull {
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #00ff00 0%, #006600 100%);
  border-radius: 50% 50% 40% 40%;
  border: 2px solid #00ff00;
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 20px #00ff00;
}

.zombie-ghoul .zombie-eyes {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  display: flex;
  justify-content: space-between;
}

.zombie-ghoul .zombie-eye {
  width: 6px;
  height: 6px;
  background: #ff0000;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff0000;
  animation: eye-glow 2s ease-in-out infinite;
}

.zombie-ghoul .zombie-teeth {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 5px;
  background: repeating-linear-gradient(90deg,
      #ffffff 0px,
      #ffffff 2px,
      transparent 2px,
      transparent 4px);
}

/* Punk Zombie Specific */
.zombie-punk .zombie-mohawk {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 15px;
  background: linear-gradient(90deg, #00ffff 0%, #ff00ff 50%, #00ffff 100%);
  clip-path: polygon(10% 100%, 30% 0%, 50% 100%, 70% 0%, 90% 100%);
  box-shadow: 0 0 15px currentColor;
  animation: mohawk-glow 1s ease-in-out infinite;
}

.zombie-punk .zombie-jacket {
  width: 35px;
  height: 25px;
  background: linear-gradient(135deg, #ff0080 0%, #880044 100%);
  border: 2px solid #ff0080;
  border-radius: 5px 5px 0 0;
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.3),
    0 0 20px #ff0080;
}

.zombie-punk .zombie-spikes {
  position: absolute;
  top: 5px;
  width: 100%;
  display: flex;
  justify-content: space-around;
}

.zombie-punk .spike {
  width: 4px;
  height: 4px;
  background: #888888;
  border-radius: 50%;
  box-shadow: 0 0 5px #888888;
}

/* Cyborg Zombie Specific */
.zombie-cyborg .zombie-helmet {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #00ffff 0%, #0088ff 100%);
  border-radius: 50%;
  border: 3px solid #00ffff;
  box-shadow:
    inset 0 0 15px rgba(0, 0, 0, 0.3),
    0 0 25px #00ffff;
  overflow: hidden;
}

.zombie-cyborg .zombie-visor {
  position: absolute;
  top: 10px;
  left: 5px;
  right: 5px;
  height: 8px;
  background: linear-gradient(90deg, #ff0000 0%, #ffff00 50%, #ff0000 100%);
  border-radius: 4px;
  box-shadow: 0 0 10px currentColor;
  animation: visor-scan 2s linear infinite;
}

.zombie-cyborg .zombie-antenna {
  position: absolute;
  top: -8px;
  right: 5px;
  width: 2px;
  height: 12px;
  background: #888888;
}

.zombie-cyborg .zombie-antenna::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -2px;
  width: 6px;
  height: 6px;
  background: #ff0000;
  border-radius: 50%;
  box-shadow: 0 0 5px #ff0000;
  animation: antenna-blink 0.5s ease-in-out infinite;
}

/* Zombie Effects */
.zombie-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150%;
  height: 150%;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.zombie-ghoul .zombie-glow {
  background: radial-gradient(circle, rgba(0, 255, 0, 0.3) 0%, transparent 70%);
}

.zombie-punk .zombie-glow {
  background: radial-gradient(circle, rgba(255, 0, 128, 0.3) 0%, transparent 70%);
}

.zombie-cyborg .zombie-glow {
  background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
}

/* Damage Effects */
.zombie-character.damaged {
  animation: zombie-flash 0.2s ease;
}

.zombie-damage-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: bold;
  color: #ff0000;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  animation: damage-rise 1s ease-out forwards;
}

/* Particle Effects */
.zombie-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-fade 1s ease-out forwards;
}

.zombie-decay-particle {
  background: #00ff00;
  box-shadow: 0 0 4px #00ff00;
}

.zombie-speed-particle {
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff0080, transparent);
  border-radius: 0;
}

.zombie-steam-particle {
  width: 10px;
  height: 10px;
  background: rgba(200, 200, 200, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes zombie-idle {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.02);
  }
}

@keyframes zombie-head-bob {

  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateX(-50%) translateY(-2px) rotate(2deg);
  }
}

@keyframes zombie-arms-swing {

  0%,
  100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

@keyframes zombie-walk {

  0%,
  100% {
    transform: translateX(-50%) scaleX(1);
  }

  50% {
    transform: translateX(-50%) scaleX(0.9);
  }
}

@keyframes zombie-move {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes zombie-attack {
  0% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.3) rotate(-10deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes zombie-death {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.5;
  }

  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

@keyframes zombie-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes zombie-flash {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(2) hue-rotate(180deg);
  }
}

@keyframes damage-rise {
  0% {
    transform: translateX(-50%) translateY(0) scale(0.5);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(-50px) scale(1);
    opacity: 0;
  }
}

@keyframes particle-fade {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(var(--dx, 0), var(--dy, -20px)) scale(0);
    opacity: 0;
  }
}

@keyframes eye-glow {

  0%,
  100% {
    opacity: 0.8;
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 15px #ff0000;
  }
}

@keyframes mohawk-glow {

  0%,
  100% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(180deg);
  }
}

@keyframes visor-scan {
  from {
    background-position: -100% 0;
  }

  to {
    background-position: 200% 0;
  }
}

@keyframes antenna-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Electric Effect for Cyborg */
.zombie-electric-arc {
  position: absolute;
  stroke: #00ffff;
  stroke-width: 2;
  fill: none;
  filter: drop-shadow(0 0 5px #00ffff);
  opacity: 0;
  animation: electric-flash 0.3s ease-out;
}

@keyframes electric-flash {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .zombie-character {
    transform: scale(0.8);
  }

  .zombie-character.grabbed {
    transform: scale(1);
  }
}

/* Performance Mode */
.low-performance .zombie-character {
  animation: none !important;
}

.low-performance .zombie-glow,
.low-performance .zombie-particle,
.low-performance .zombie-electric-arc {
  display: none !important;
}

.low-performance .zombie-character * {
  animation: none !important;
  box-shadow: none !important;
  filter: none !important;
}