.animated-border {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 34px;
  transition: box-shadow 0.25s ease;
}

.animated-border::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.95),
    0 0 12px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 999px;
}

.animated-border:hover {
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.22),
    0 0 12px rgba(255, 255, 255, 0.14),
    0 0 22px rgba(255, 255, 255, 0.10),
    inset 0 0 6px rgba(255, 255, 255, 0.10);
}

.animated-border:hover::after {
  opacity: 1;
  animation: animatedBorderPath 0.9s linear infinite;
}

@keyframes animatedBorderPath {
  0% {
    top: 0;
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  24.99% {
    top: 0;
    left: calc(100% - 80px);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  25% {
    top: 0;
    left: calc(100% - 1px);
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  49.99% {
    top: calc(100% - 80px);
    left: calc(100% - 1px);
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  50% {
    top: calc(100% - 1px);
    left: calc(100% - 80px);
    width: 80px;
    height: 1px;
    background: linear-gradient(270deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  74.99% {
    top: calc(100% - 1px);
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(270deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  75% {
    top: calc(100% - 80px);
    left: 0;
    width: 1px;
    height: 80px;
    background: linear-gradient(0deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }

  100% {
    top: 0;
    left: 0;
    width: 1px;
    height: 80px;
    background: linear-gradient(0deg, transparent 0%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  }
}




.animated-border-red-neon {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 0, 0, 0.22);
  border-radius: 34px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.animated-border-red-neon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  box-shadow:
    0 0 6px rgba(255, 0, 0, 0.95),
    0 0 12px rgba(255, 0, 0, 0.85),
    0 0 18px rgba(255, 0, 0, 0.65),
    0 0 28px rgba(255, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 999px;
}

.animated-border-red-neon:hover {
  border-color: rgba(255, 0, 0, 0.65);
  box-shadow:
    0 0 6px rgba(255, 0, 0, 0.30),
    0 0 12px rgba(255, 0, 0, 0.22),
    0 0 22px rgba(255, 0, 0, 0.18),
    0 0 34px rgba(255, 0, 0, 0.12),
    inset 0 0 6px rgba(255, 0, 0, 0.14);
}

.animated-border-red-neon:hover::after {
  opacity: 1;
  animation: animatedBorderPathRedNeon 0.9s linear infinite;
}

@keyframes animatedBorderPathRedNeon {
  0% {
    top: 0;
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  24.99% {
    top: 0;
    left: calc(100% - 80px);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  25% {
    top: 0;
    left: calc(100% - 1px);
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  49.99% {
    top: calc(100% - 80px);
    left: calc(100% - 1px);
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  50% {
    top: calc(100% - 1px);
    left: calc(100% - 80px);
    width: 80px;
    height: 1px;
    background: linear-gradient(270deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  74.99% {
    top: calc(100% - 1px);
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(270deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  75% {
    top: calc(100% - 80px);
    left: 0;
    width: 1px;
    height: 80px;
    background: linear-gradient(0deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }

  100% {
    top: 0;
    left: 0;
    width: 1px;
    height: 80px;
    background: linear-gradient(0deg, transparent 0%, rgba(255, 0, 0, 1) 50%, transparent 100%);
  }
}


