/* Aceternity UI Inspired Animations & Effects */

/* Remove any global overlays that might be blocking */
body::before,
body::after {
  display: none !important;
}

/* Animated Gradient Background */
.animated-gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: linear-gradient(
    135deg,
    hsl(0, 0%, 4%) 0%,
    hsl(0, 0%, 8%) 25%,
    hsl(0, 0%, 4%) 50%,
    hsl(0, 0%, 8%) 75%,
    hsl(0, 0%, 4%) 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Orb Effect */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  animation: floatOrb 20s infinite ease-in-out;
  pointer-events: none;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, hsla(217, 91%, 60%, 0.3) 0%, transparent 70%);
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, hsla(262, 83%, 58%, 0.2) 0%, transparent 70%);
  bottom: -200px;
  right: -200px;
  animation-delay: 5s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, hsla(344, 84%, 71%, 0.2) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* Enhanced Glass Cards with Glow */
.glass-card-enhanced {
  position: relative;
  background: hsla(0, 0%, 8%, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsla(0, 0%, 25%, 0.3);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.glass-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    hsla(217, 91%, 60%, 0.1) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.glass-card-enhanced:hover::before {
  transform: translateX(100%);
}

.glass-card-enhanced:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 40px -10px hsla(217, 91%, 60%, 0.3),
    0 0 60px -20px hsla(217, 91%, 60%, 0.2);
}

/* Magnetic Buttons */
.magnetic-button {
  position: relative;
  transition: all 0.3s ease;
}

.magnetic-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: hsla(217, 91%, 60%, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.magnetic-button:hover::after {
  width: 300px;
  height: 300px;
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: hsla(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:hover::before {
  width: 500px;
  height: 500px;
}

/* Text Reveal Animation */
.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    hsl(0, 0%, 4%) 45%,
    hsl(0, 0%, 4%) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: textReveal 2s ease-out forwards;
  pointer-events: none;
}

@keyframes textReveal {
  to {
    transform: translateX(100%);
  }
}

/* Glitch Effect */
.glitch {
  position: relative;
  color: hsl(0, 0%, 98%);
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: hsla(217, 91%, 60%, 0.8);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: hsla(262, 83%, 58%, 0.8);
  z-index: -2;
}

@keyframes glitch {
  0%, 100% { text-shadow: 0 0 0 hsl(0, 0%, 98%); }
  20% { text-shadow: -2px 0 hsla(217, 91%, 60%, 0.8), 2px 0 hsla(262, 83%, 58%, 0.8); }
  40% { text-shadow: -2px 0 hsla(217, 91%, 60%, 0.8), 2px 0 hsla(262, 83%, 58%, 0.8); }
  60% { text-shadow: 2px 0 hsla(217, 91%, 60%, 0.8), -2px 0 hsla(262, 83%, 58%, 0.8); }
  80% { text-shadow: 2px 0 hsla(217, 91%, 60%, 0.8), -2px 0 hsla(262, 83%, 58%, 0.8); }
}

@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px); }
  40% { clip-path: inset(50% 0 20% 0); transform: translate(2px); }
  60% { clip-path: inset(10% 0 60% 0); transform: translate(2px); }
  80% { clip-path: inset(80% 0 5% 0); transform: translate(-2px); }
}

@keyframes glitch-2 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(60% 0 10% 0); transform: translate(2px); }
  40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px); }
  60% { clip-path: inset(30% 0 40% 0); transform: translate(-2px); }
  80% { clip-path: inset(5% 0 80% 0); transform: translate(2px); }
}

/* Pulse Animation */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(217, 91%, 60%);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Wavy Text */
.wavy-text {
  display: inline-block;
}

.wavy-text span {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
  animation-delay: calc(0.1s * var(--i));
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Staggered Animation */
.stagger-in > * {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerIn 0.6s ease-out forwards;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover Lift Effect */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px) scale(1.02);
}

/* Glow on Scroll */
.glow-on-scroll {
  transition: all 0.5s ease;
}

.glow-on-scroll.in-view {
  animation: glowPulse 2s ease-in-out;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px hsla(217, 91%, 60%, 0.3); }
  50% { box-shadow: 0 0 40px hsla(217, 91%, 60%, 0.6); }
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsla(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  to {
    left: 100%;
  }
}

/* Modal Enhancements */
.modal-content-enhanced {
  position: relative;
  background: hsla(0, 0%, 8%, 0.8);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid hsla(0, 0%, 25%, 0.3);
  border-radius: 1.5rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 100px -20px hsla(217, 91%, 60%, 0.2);
  max-width: 500px;
  width: 100%;
  padding: 2.5rem;
  animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Input Focus Effects */
.input-glow:focus {
  box-shadow:
    0 0 0 3px hsla(217, 91%, 60%, 0.2),
    0 0 20px hsla(217, 91%, 60%, 0.3);
}

/* Loading Dots */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(217, 91%, 60%);
  animation: loadingDot 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDot {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .floating-orb {
    display: none;
  }

  .glitch {
    font-size: 2.5rem;
  }
}