/* Enhanced Animations and Effects */

/* Glowing elements */
.glow-effect {
  position: relative;
}

.glow-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  z-index: -1;
  filter: blur(20px);
  opacity: 0.7;
  transform: scale(1.05);
  animation: glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  from { opacity: 0.4; transform: scale(1.02); }
  to { opacity: 0.8; transform: scale(1.08); }
}

/* Floating cards animation */
.floating-card {
  animation: float-card 6s ease-in-out infinite;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(0.5deg); }
  66% { transform: translateY(5px) rotate(-0.3deg); }
}

/* Text shimmer effect */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--accent-color) 0%,
    var(--text-white) 50%,
    var(--accent-color) 100%
  );
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease-in-out infinite;
}

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

/* Particle effect background */
.particle-bg {
  position: relative;
  overflow: hidden;
}

.particle-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(0, 212, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 107, 53, 0.3), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(0, 212, 255, 0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 107, 53, 0.4), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(0, 212, 255, 0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 20s linear infinite;
  pointer-events: none;
}

@keyframes sparkle {
  from { transform: translateX(0); }
  to { transform: translateX(200px); }
}

/* Hover ripple effect */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

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

.ripple-effect:hover::before {
  width: 300px;
  height: 300px;
}

/* Loading bar animation */
.loading-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 212, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loading-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--accent-color);
  white-space: nowrap;
  animation: typing 4s steps(40, end), blink-caret 0.75s step-end infinite;
}

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

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent-color); }
}

/* 3D card effect */
.card-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card-3d:hover {
  transform: rotateY(10deg) rotateX(5deg);
}

/* Magnetic button effect */
.magnetic-btn {
  position: relative;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.magnetic-btn:hover {
  transform: translate3d(0, -8px, 0);
}

.magnetic-btn::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transform: translate(-50%, 0);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.magnetic-btn:hover::after {
  width: 80%;
  height: 8px;
  filter: blur(8px);
}