* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #222;
}

.container {
  display: flex;
  gap: 150px;
  flex-wrap: wrap;
}

a {
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  padding: 20px 35px;
  border: 2px solid #1e9bff;
  color: #1e9bff;
  font-size: 20px;
  letter-spacing: 4px;
  transition: 0.5s;
}

a:hover {
  color: #fff;
  border: 2px solid transparent;
}

span {
  position: absolute;
  background: #1e9bff;
  box-shadow: 0 0 10px #1e9bff, 0 0 20px #1e9bff, 0 0 30px #1e9bff,
    0 0 50px #1e9bff, 0 0 100px #1e9bff;
}

span:nth-child(1),
span:nth-child(3) {
  width: 40px;
  height: 4px;
}

span:nth-child(2),
span:nth-child(4) {
  width: 4px;
  height: 40px;
}

span:nth-child(1) {
  top: calc(50% - 2px);
  left: -50px;
  transition: 0.5s ease-in-out;
  transform-origin: left;
  transition-delay: 0.25s;
}

a:hover span:nth-child(1) {
  left: 50%;
  transform: scaleX(0);
  transition-delay: 0s;
}

span:nth-child(3) {
  top: calc(50% - 2px);
  right: -50px;
  transition: 0.5s ease-in-out;
  transform-origin: right;
  transition-delay: 0.25s;
}

a:hover span:nth-child(3) {
  right: 50%;
  transform: scaleX(0);
  transition-delay: 0s;
}

span:nth-child(2) {
  left: calc(50% - 2px);
  top: -50px;
  transition: 0.5s ease-in-out;
  transform-origin: top;
  transition-delay: 0.25s;
}

a:hover span:nth-child(2) {
  top: 50%;
  transform: scaleY(0);
  transition-delay: 0s;
}

span:nth-child(4) {
  left: calc(50% - 2px);
  bottom: -50px;
  transition: 0.5s ease-in-out;
  transform-origin: bottom;
  transition-delay: 0.25s;
}

a:hover span:nth-child(4) {
  bottom: 50%;
  transform: scaleY(0);
  transition-delay: 0s;
}

a:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1e9bff;
  transform: scale(0);
  transition: 0.5s;
  z-index: -1;
}

a:hover:before {
  transform: scale(1);
  transition-delay: 0.5s;
  box-shadow: 0 0 10px #1e9bff, 0 0 30px #1e9bff, 0 0 60px #1e9bff;
}
