.rain {
  position: absolute;
  top: -50%;
  background: white;
  height: 100px;
  width: 6px;
  border-radius: 15px;
  z-index: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
  will-change: transform, top, left;
  -webkit-animation-name: rains-fall, rains-shake;
  animation-name: rains-fall, rains-shake;
  -webkit-animation-duration: 20s, 8s;
  animation-duration: 20s, 8s;
  -webkit-animation-timing-function: linear, linear;
  animation-timing-function: linear, linear;
  -webkit-animation-iteration-count: infinite, infinite;
  animation-iteration-count: infinite, infinite;
  -webkit-animation-play-state: running, running;
  animation-play-state: running, running;
  display: none;
}

@media (min-width: 768px) {
  .rain {
    display: block;
  } 
}

.rain:nth-of-type(3n+0) {
  background: rgba(13, 13, 109, 0.4);
}

.rain:nth-of-type(3n+1) {
  background: rgba(244, 31, 122, 0.4);
}

.rain:nth-of-type(3n+2) {
  background: rgba(74, 235, 168, 0.4);
}

.rain.grey {
  background: rgba(241,225,255,0.2);
}	

.rain.purple {	
  background-color: rgba(13,7,100, 0.2);	
}

@-webkit-keyframes rains-fall {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

@keyframes rains-fall {
  0% {
    top: -100%;
  }
  100% {
    top: 100%;
  }
}

@-webkit-keyframes rains-shake {
  0% {
    -webkit-transform: rotate(45deg) translate(0, -100vw);
    transform: rotate(45deg) translate(0, -100vw);
  }
  100% {
    -webkit-transform: rotate(45deg) translate(0, 100vw);
    transform: rotate(45deg) translate(0, 100vw);
  }
}

@keyframes rains-shake {
  0% {
    -webkit-transform: rotate(45deg) translate(0, -100vw);
    transform: rotate(45deg) translate(0, -100vw);
  }
  100% {
    -webkit-transform: rotate(45deg) translate(0, 100vw);
    transform: rotate(45deg) translate(0, 100vw);
  }
}

.rain:nth-of-type(10) {
  left: 1%;
  -webkit-animation-delay: 0s, 0s;
  animation-delay: 0s, 0s;
  width: 10px;
  height: 100px;
}

.rain:nth-of-type(1) {
  left: 10%;
  -webkit-animation-delay: 6s, 6s;
  animation-delay: 6s, 6s;
  width: 8px;
  height: 80px;
}

.rain:nth-of-type(2) {
  left: 20%;
  -webkit-animation-delay: 6s, 0.5s;
  animation-delay: 6s, 0.5s;
  width: 15px;
  height: 120px;
}

.rain:nth-of-type(3) {
  left: 30%;
  -webkit-animation-delay: 4s, 2s;
  animation-delay: 4s, 2s;
  width: 12px;
  height: 95px;
}

.rain:nth-of-type(4) {
  left: 40%;
  -webkit-animation-delay: 2s, 2s;
  animation-delay: 2s, 2s;
  width: 8px;
  height: 100px;
}

.rain:nth-of-type(5) {
  left: 50%;
  -webkit-animation-delay: 8s, 3s;
  animation-delay: 8s, 3s;
  width: 14px;
  height: 110px;
}

.rain:nth-of-type(6) {
  left: 60%;
  -webkit-animation-delay: 6s, 2s;
  animation-delay: 6s, 2s;
  width: 8px;
  height: 90px;
}

.rain:nth-of-type(7) {
  left: 70%;
  -webkit-animation-delay: 2.5s, 1s;
  animation-delay: 2.5s, 1s;
  width: 16px;
  height: 100px;
}

.rain:nth-of-type(8) {
  left: 80%;
  -webkit-animation-delay: 1s, 0s;
  animation-delay: 1s, 0s;
  width: 10px;
  height: 100px;
}

.rain:nth-of-type(9) {
  left: 90%;
  -webkit-animation-delay: 3s, 1.5s;
  animation-delay: 3s, 1.5s;
}
