/* Aurora drift background animation */
@keyframes aurora-drift {
  0% { filter: hue-rotate(0deg); opacity: 0.6; }
  50% { opacity: 0.9; }
  100% { filter: hue-rotate(45deg); opacity: 0.6; transform: scale(1.05); }
}

/* Subtle screen flicker for terminal */
@keyframes screen-flicker {
  0% { opacity: 0.98; }
  50% { opacity: 1; }
  100% { opacity: 0.99; }
}

/* Floating damage numbers */
@keyframes damage-float {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-40px) scale(1); }
}

.damage-float {
  position: absolute;
  color: var(--accentCrimson);
  font-family: var(--fontHeading);
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 5px #000, 0 0 10px rgba(220, 20, 60, 0.8);
  pointer-events: none;
  animation: damage-float 1.5s ease-out forwards;
  z-index: 100;
}
.damage-float.heal {
  color: var(--accentSuccess);
  text-shadow: 0 0 5px #000, 0 0 10px rgba(40, 255, 120, 0.8);
}

/* Level up pulsing */
@keyframes level-up-pulse {
  0% { text-shadow: 0 0 5px var(--accentGold); transform: scale(1); }
  100% { text-shadow: 0 0 20px var(--accentGold), 0 0 40px #fff; transform: scale(1.05); }
}

/* Rarity shimmer for legendary items */
@keyframes rarity-shimmer {
  0% { filter: brightness(1) drop-shadow(0 0 2px var(--accentGold)); }
  50% { filter: brightness(1.5) drop-shadow(0 0 8px #fff); }
  100% { filter: brightness(1) drop-shadow(0 0 2px var(--accentGold)); }
}

/* Ghost bar drain effect */
@keyframes bar-drain {
  from { width: var(--prev-width, 100%); }
  to { width: var(--new-width, 100%); }
}

.bar-ghost {
  position: absolute;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  z-index: 0;
  transition: width 1s ease-out 0.2s;
}

.bar-fill {
  position: relative;
  z-index: 1;
}

/* Mob spawn flash */
@keyframes mob-spawn {
  0% { background-color: rgba(220, 20, 60, 0.3); }
  100% { background-color: transparent; }
}
.flash-combat {
  animation: mob-spawn 0.5s ease-out;
}

/* Panel slide-in on load */
@keyframes panel-slide-in-left {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes panel-slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.view.active #panel-stats {
  animation: panel-slide-in-left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.view.active #panel-right {
  animation: panel-slide-in-right 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Input Cursor */
@keyframes input-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Aurora text effect */
@keyframes aurora-text {
  0% { color: hsl(150, 70%, 50%); text-shadow: 0 0 10px hsl(150, 70%, 50%); }
  33% { color: hsl(200, 70%, 60%); text-shadow: 0 0 10px hsl(200, 70%, 60%); }
  66% { color: hsl(270, 70%, 65%); text-shadow: 0 0 10px hsl(270, 70%, 65%); }
  100% { color: hsl(150, 70%, 50%); text-shadow: 0 0 10px hsl(150, 70%, 50%); }
}
.aurora-event {
  font-family: var(--fontHeading);
  font-size: 1.2rem;
  animation: aurora-text 4s infinite linear;
}
