@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  background: #061b31;
}

.box {
  position: relative;
  width: 600px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

h2 {
  color: #fff;
  font-size: 5em;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px #00b3ff, 0 0 20px #00b3ff, 0 0 40px #00b3ff,
    0 0 80px #00b3ff, 0 0 120px #00b3ff;
}

.lightbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px #00b3ff, 0 0 20px #00b3ff, 0 0 40px #00b3ff,
    0 0 80px #00b3ff, 0 0 120px #00b3ff;
  animation: lightbar 5s linear infinite;
  z-index: 2;
}

@keyframes lightbar {
  0% {
    transform: scaleY(0) translateX(0);
  }
  10% {
    transform: scaleY(1) translateX(0);
  }
  90% {
    transform: scaleY(1) translateX(calc(600px - 10px));
  }
  100% {
    transform: scaleY(0) translateX(calc(600px - 10px));
  }
}

.toplayer {
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 300px;
  background: #061b31;
  animation: toplayer 10s linear infinite;
}

@keyframes toplayer {
  5% {
    transform: translateX(0);
  }
  45%,
  50% {
    transform: translateX(100%);
  }
  50.001%,
  55% {
    transform: translateX(-100%);
  }
  95% {
    transform: translateX(0);
  }
}
