/* Base Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes glow {
  0% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)); }
  50% { filter: drop-shadow(0 0 15px rgba(120, 120, 255, 0.7)); }
  100% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease forwards;
}

.animate-fade-in-delay {
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.3s;
}

.animate-fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.6s;
}

.animate-slide-up {
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s ease forwards;
}

.animate-glow {
  animation: glow 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-rotate {
  animation: rotate 10s linear infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Interaction Animations */
.hologram-effect {
  position: relative;
}

.hologram-effect::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
  mix-blend-mode: screen;
  pointer-events: none;
}

.hologram-effect::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  opacity: 0.7;
  animation: scan 2s linear infinite;
}

@keyframes scan {
  from { background-position: 0 0; }
  to { background-position: 0 100px; }
}

.liquid-effect {
  filter: url("#liquid-filter");
}

.glitch-effect {
  position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip: rect(0, 0, 0, 0);
}

.glitch-effect::before {
  left: 2px;
  text-shadow: -1px 0 red;
  animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch-effect::after {
  left: -2px;
  text-shadow: 1px 0 blue;
  animation: glitch-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% { clip: rect(40px, 9999px, 44px, 0); }
  10% { clip: rect(112px, 9999px, 90px, 0); }
  20% { clip: rect(31px, 9999px, 147px, 0); }
  30% { clip: rect(134px, 9999px, 74px, 0); }
  40% { clip: rect(8px, 9999px, 17px, 0); }
  50% { clip: rect(144px, 9999px, 122px, 0); }
  60% { clip: rect(3px, 9999px, 31px, 0); }
  70% { clip: rect(10px, 9999px, 11px, 0); }
  80% { clip: rect(20px, 9999px, 128px, 0); }
  90% { clip: rect(142px, 9999px, 8px, 0); }
  100% { clip: rect(112px, 9999px, 10px, 0); }
}

@keyframes glitch-2 {
  0% { clip: rect(123px, 9999px, 99px, 0); }
  10% { clip: rect(101px, 9999px, 67px, 0); }
  20% { clip: rect(45px, 9999px, 12px, 0); }
  30% { clip: rect(3px, 9999px, 160px, 0); }
  40% { clip: rect(80px, 9999px, 80px, 0); }
  50% { clip: rect(55px, 9999px, 63px, 0); }
  60% { clip: rect(120px, 9999px, 44px, 0); }
  70% { clip: rect(31px, 9999px, 11px, 0); }
  80% { clip: rect(110px, 9999px, 33px, 0); }
  90% { clip: rect(42px, 9999px, 84px, 0); }
  100% { clip: rect(23px, 9999px, 150px, 0); }
}

/* Category-specific animations */
.futuristic-animation {
  animation: pulse 2s ease-in-out infinite, glow 3s ease-in-out infinite;
}

.abstract-animation {
  filter: hue-rotate(0deg);
  animation: hue-rotation 5s linear infinite;
}

@keyframes hue-rotation {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.robotic-animation {
  animation: small-jitter 0.5s ease-in-out infinite;
}

@keyframes small-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1px, 1px); }
  50% { transform: translate(-1px, 0); }
  75% { transform: translate(0, -1px); }
  100% { transform: translate(0, 0); }
}

.cartoonish-animation {
  animation: bounce-slight 2s ease-in-out infinite;
}

@keyframes bounce-slight {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.mystical-animation {
  animation: float 3s ease-in-out infinite, glow 4s ease-in-out infinite;
}

/* SVG Filters */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
