.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: var(--primary-color);
  border-radius: var(--radius-full);
  opacity: 0.1;
  animation: float-particle 20s infinite linear;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  left: 20%;
  animation-delay: 2s;
  animation-duration: 30s;
}

.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  left: 30%;
  animation-delay: 4s;
  animation-duration: 22s;
}

.particle:nth-child(4) {
  width: 5px;
  height: 5px;
  left: 40%;
  animation-delay: 6s;
  animation-duration: 28s;
}

.particle:nth-child(5) {
  width: 4px;
  height: 4px;
  left: 50%;
  animation-delay: 8s;
  animation-duration: 26s;
}

.particle:nth-child(6) {
  width: 7px;
  height: 7px;
  left: 60%;
  animation-delay: 10s;
  animation-duration: 24s;
}

.particle:nth-child(7) {
  width: 3px;
  height: 3px;
  left: 70%;
  animation-delay: 12s;
  animation-duration: 32s;
}

.particle:nth-child(8) {
  width: 5px;
  height: 5px;
  left: 80%;
  animation-delay: 14s;
  animation-duration: 27s;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.1;
  }

  90% {
    opacity: 0.1;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}


.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.stagger-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item:nth-child(1).animate {
  transition-delay: 0.1s;
}

.stagger-item:nth-child(2).animate {
  transition-delay: 0.2s;
}

.stagger-item:nth-child(3).animate {
  transition-delay: 0.3s;
}

.stagger-item:nth-child(4).animate {
  transition-delay: 0.4s;
}

.stagger-item:nth-child(5).animate {
  transition-delay: 0.5s;
}

.stagger-item:nth-child(6).animate {
  transition-delay: 0.6s;
}


.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-full);
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}


.bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}


.fade-in {
  animation: fadeIn 1s ease;
}

.fade-in-up {
  animation: fadeInUp 1s ease;
}

.fade-in-down {
  animation: fadeInDown 1s ease;
}

.fade-in-left {
  animation: fadeInLeft 1s ease;
}

.fade-in-right {
  animation: fadeInRight 1s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


.slide-in-up {
  animation: slideInUp 0.8s ease;
}

.slide-in-down {
  animation: slideInDown 0.8s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}


.scale-in {
  animation: scaleIn 0.8s ease;
}

.scale-out {
  animation: scaleOut 0.8s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleOut {
  from {
    transform: scale(1);
    opacity: 1;
  }

  to {
    transform: scale(0);
    opacity: 0;
  }
}


.rotate-in {
  animation: rotateIn 1s ease;
}

@keyframes rotateIn {
  from {
    transform: rotate(-360deg) scale(0);
    opacity: 0;
  }

  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}


.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}


.glow {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
  }

  to {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
  }
}


.typing {
  overflow: hidden;
  border-right: 2px solid var(--primary-color);
  white-space: nowrap;
  animation: typing 3s 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(--primary-color);
  }
}


.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform var(--transition-normal);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}


@media (prefers-reduced-motion: reduce) {
  .particle {
    animation: none;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .stagger-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pulse,
  .bounce,
  .glow {
    animation: none;
  }

  .hover-lift:hover,
  .hover-scale:hover,
  .hover-rotate:hover {
    transform: none;
  }
}