/**
 * Neon Animations - Ultra Modern Dynamic Effects
 * Pure CSS3 Animations + Micro-interactions
 * No compilation required - cPanel ready
 */

/* ============================================
   1. ANIMATED BACKGROUNDS
   ============================================ */

/* Animated Grid Background */
@keyframes grid-drift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 44px 44px;
  }
}

.bg-animated-grid {
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 5%) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 5%) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: grid-drift 20s linear infinite;
}

/* Pulsing Neon Orbs */
@keyframes pulse-glow-cyan {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
    filter: blur(120px);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
    filter: blur(140px);
  }
}

@keyframes pulse-glow-violet {
  0%, 100% {
    opacity: 0.25;
    transform: scale(1);
    filter: blur(110px);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.15);
    filter: blur(130px);
  }
}

@keyframes pulse-glow-pink {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
    filter: blur(100px);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.2);
    filter: blur(120px);
  }
}

.animated-orb-cyan {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(6, 182, 212, 0.2) 40%, transparent 70%);
  animation: pulse-glow-cyan 8s ease-in-out infinite;
}

.animated-orb-violet {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0.15) 40%, transparent 70%);
  animation: pulse-glow-violet 10s ease-in-out infinite;
}

.animated-orb-pink {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, rgba(236, 72, 153, 0.12) 40%, transparent 70%);
  animation: pulse-glow-pink 12s ease-in-out infinite;
}

/* Floating Animation for Orbs */
@keyframes float-drift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
}

.animated-orb-float {
  animation: float-drift 25s ease-in-out infinite;
}

/* ============================================
   2. MICRO-INTERACTIONS
   ============================================ */

/* Button Hover Effects */
.neon-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.neon-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.neon-btn:hover::before {
  width: 300px;
  height: 300px;
}

.neon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px oklch(0.82 0.16 197 / 50%), 0 0 30px oklch(0.82 0.16 197 / 40%), 0 10px 25px rgba(0, 0, 0, 0.3);
}

.neon-btn:active {
  transform: translateY(0);
}

/* Menu Item Hover */
.menu-item-animated {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item-animated::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #8b5cf6);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item-animated:hover {
  transform: translateY(-2px);
  color: var(--primary);
}

.menu-item-animated:hover::before {
  width: 100%;
}

/* Card Hover Effect */
.neon-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.neon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px oklch(0.82 0.16 197 / 50%), 0 0 40px oklch(0.82 0.16 197 / 30%), 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Input Focus Glow */
.neon-input,
.neon-select,
.neon-textarea {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.neon-input:focus,
.neon-select:focus,
.neon-textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px oklch(0.82 0.16 197 / 25%), 0 0 20px oklch(0.82 0.16 197 / 20%);
}

/* Glowing Border on Hover */
.glow-border-hover {
  position: relative;
  transition: all 0.3s ease;
}

.glow-border-hover::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #06b6d4, #8b5cf6, #d946ef);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* ============================================
   3. MODAL & DROPDOWN ANIMATIONS
   ============================================ */

/* Modal Entrance */
@keyframes modal-entrance {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.modal-animated {
  animation: modal-entrance 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dropdown Slide & Fade */
@keyframes dropdown-slide {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-animated {
  animation: dropdown-slide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Slide */
@keyframes sidebar-slide-in {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.sidebar-animated {
  animation: sidebar-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   4. ANIMATED GRADIENT TEXT
   ============================================ */

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

@keyframes gradient-rotate {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 100% 100%;
  }
  75% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.text-animated-gradient {
  background: linear-gradient(
    135deg,
    #06b6d4 0%,
    #8b5cf6 25%,
    #d946ef 50%,
    #8b5cf6 75%,
    #06b6d4 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

.text-animated-gradient-fast {
  background: linear-gradient(
    90deg,
    #06b6d4 0%,
    #0891b2 20%,
    #8b5cf6 40%,
    #7c3aed 60%,
    #d946ef 80%,
    #06b6d4 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s linear infinite;
}

.text-animated-rainbow {
  background: linear-gradient(
    90deg,
    #06b6d4,
    #8b5cf6,
    #d946ef,
    #f59e0b,
    #10b981,
    #06b6d4
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s linear infinite;
}

/* Pulsing Glow Text */
@keyframes text-pulse-glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.3), 0 0 20px rgba(6, 182, 212, 0.2);
  }
  50% {
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.6), 0 0 40px rgba(6, 182, 212, 0.4), 0 0 60px rgba(6, 182, 212, 0.2);
  }
}

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

/* ============================================
   5. NUMBER COUNTER ANIMATION
   ============================================ */

@keyframes number-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.number-animated {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.number-animated:hover {
  animation: number-pop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   6. LOADING & SKELETON ANIMATIONS
   ============================================ */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton-loading {
  background: linear-gradient(
    90deg,
    oklch(0.25 0.035 268) 0%,
    oklch(0.3 0.04 268) 50%,
    oklch(0.25 0.035 268) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Spinner Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid oklch(0.25 0.035 268);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   7. ICON & ELEMENT ANIMATIONS
   ============================================ */

/* Bounce on Hover */
@keyframes bounce-hover {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.icon-bounce:hover {
  animation: bounce-hover 0.6s ease;
}

/* Rotate on Hover */
.icon-rotate {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-rotate:hover {
  transform: rotate(360deg);
}

/* Scale Pulse */
@keyframes scale-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

/* ============================================
   8. PAGE TRANSITIONS
   ============================================ */

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up-delay-1 {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.fade-in-up-delay-2 {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.fade-in-up-delay-3 {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

/* Stagger Children Animation */
.stagger-children > * {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   9. BADGE & NOTIFICATION ANIMATIONS
   ============================================ */

@keyframes badge-ping {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  75%, 100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.badge-animated {
  position: relative;
}

.badge-animated::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: badge-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ============================================
   10. CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: oklch(0.19 0.03 268);
}

::-webkit-scrollbar-thumb {
  background: oklch(0.82 0.16 197 / 40%);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(0.82 0.16 197 / 60%);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: oklch(0.82 0.16 197 / 40%) oklch(0.19 0.03 268);
}

/* ============================================
   11. RIPPLE EFFECT
   ============================================ */

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.ripple:active::after {
  animation: ripple 0.6s ease-out;
}

/* ============================================
   12. UTILITY ANIMATION CLASSES
   ============================================ */

.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-bounce {
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow:hover {
  box-shadow: 0 0 0 2px var(--primary), 0 0 30px oklch(0.82 0.16 197 / 40%);
}
