/* ===================================================================
   XILXIL TOOLS HUB - ANIMATIONS
   Cyberpunk / Futuristic effects
   =================================================================== */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.15); }
  50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.7), 0 0 60px rgba(0, 240, 255, 0.3); }
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

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

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* ---------- ANIMATION UTILITY CLASSES ---------- */
.animate-fadeIn { animation: fadeIn 0.5s var(--ease-out) both; }
.animate-fadeInUp { animation: fadeInUp 0.6s var(--ease-out) both; }
.animate-scaleIn { animation: scaleIn 0.4s var(--ease-spring) both; }
.animate-float { animation: float 4s var(--ease-in-out) infinite; }
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }
.animate-glitch:hover { animation: glitch 0.3s linear; }

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ---------- PARTICLE BACKGROUND ---------- */
.particle-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--neon-cyan);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 6px currentColor;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) translateX(0); }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-100px) translateX(50px); }
}

/* ---------- SCAN LINE EFFECT ---------- */
.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0.3;
  z-index: var(--z-bg);
  pointer-events: none;
  animation: scan 8s linear infinite;
}

/* ---------- GLOW BORDER ---------- */
.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-cyan), transparent 30%, transparent 70%, var(--neon-magenta));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-base);
}

.glow-border:hover::before { opacity: 1; }

/* ---------- HOLOGRAPHIC EFFECT ---------- */
.holographic {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(0, 240, 255, 0.05),
    rgba(168, 85, 247, 0.05),
    rgba(255, 0, 229, 0.05),
    rgba(0, 240, 255, 0.05)
  );
  background-size: 400% 400%;
  animation: holoShift 8s var(--ease-in-out) infinite;
}

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

/* ---------- TYPING TERMINAL ---------- */
.terminal-cursor::after {
  content: '_';
  color: var(--neon-green);
  animation: blink 1s step-end infinite;
}

/* ---------- GRADIENT BORDER CARD ---------- */
.gradient-border {
  position: relative;
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- NUMBER COUNTER ---------- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ---------- LIVE INDICATOR ---------- */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse 1.5s var(--ease-in-out) infinite;
}

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- 3D TILT ---------- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease-out);
}

/* ---------- NEON TEXT ---------- */
.neon-text-cyan {
  color: var(--neon-cyan);
  text-shadow:
    0 0 5px var(--neon-cyan),
    0 0 10px var(--neon-cyan),
    0 0 20px rgba(0, 240, 255, 0.5);
}

.neon-text-magenta {
  color: var(--neon-magenta);
  text-shadow:
    0 0 5px var(--neon-magenta),
    0 0 10px var(--neon-magenta),
    0 0 20px rgba(255, 0, 229, 0.5);
}

/* ---------- GRID PULSE ---------- */
.grid-pulse {
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: gridPulse 4s var(--ease-in-out) infinite;
}

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