:root {
  --animation-color: #48e7fc;
}

body {
  display: flex;
  background-color: black;
  min-height: 100vh;
  justify-content: center;
}

a {
  position: relative;
  display: inline-block;
  transition: 0.5s;
  overflow: hidden;
  margin: 5px;
}

a img {
  width: 100px;
  height: 100px;
  object-fit: none;
}

span {
  position: absolute;
  display: block;
}

.character-select {
  position: absolute;
  bottom: 30px;
}

/* Define animations */
@keyframes animation1 {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes animation2 {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

@keyframes animation3 {
  0% {
    right: -100%;
  }
  100% {
    right: 100%;
  }
}

@keyframes animation4 {
  0% {
    bottom: -100%;
  }
  100% {
    bottom: 100%;
  }
}

/* Add animations to the <span> elements */
.animated-span1 {
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--animation-color));
  animation: animation1 0.5s infinite;
}

.animated-span2 {
  top: -100%;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--animation-color));
  animation: animation2 1s infinite;
  animation-delay: 0.25s;
}

.animated-span3 {
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(270deg, transparent, var(--animation-color));
  animation: animation3 0.5s infinite;
  animation-delay: 0s;
}

.animated-span4 {
  bottom: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(360deg, transparent, var(--animation-color));
  animation: animation4 1s infinite;
  animation-delay: 0.25s;
}
