



#hide-checkbox {
  opacity: 0;
  height: 0;
  width: 0;
}


.toggle {
  position: relative;
  cursor: pointer;
  display: inline-block;
  width: 90px;
  height: 40px;
  background: #211042;
  border-radius: 50px;
  transition: 500ms;
  overflow: hidden;
}

.toggle-button {
  position: absolute;
  display: inline-block;
  top: 2.5px;
  left: 6px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #FAEAF1;
  overflow: hidden;
  box-shadow: 0 0 35px 4px rgba(255, 255, 255);
  transition: all 500ms ease-out;
}

.crater {
  position: absolute;
  display: inline-block;
  background: #FAEAF1;
  border-radius: 50%;
  transition: 500ms;
}

.crater-1 {
  background: #FFFFF9;
  width: 35px;
  height: 35px;
  left: 5px;
  bottom: 2px;
}

.crater-2 {
  width: 10px;
  height: 10px;
  top: -3px;
  left: 16px;
  
}

.crater-3 {
  width: 8.5px;
  height: 8.5px;
  top: 10px;
  right: -3px;
  
}

.crater-4 {
    width: 6px;
    height: 6px;
    top: 11px;
    left: 11px;
    
}

.crater-5 {
    width: 8px;
    height: 8px;
    top: 16px;
    left: 18px;
    
}

.crater-6 {
    width: 6px;
    height: 6px;
    top: 20px;
    left: 9px;
    
  
}

.crater-7 {
  width: 6px;
  height: 6px;
  bottom: 1px;
  left: 15px;
  

}

.star {
  position: absolute;
  display: inline-block;
  border-radius: 50%;
  background: #FFF;
  box-shadow: 1px 0 2px 2px rgba(255, 255, 255);
}

.star-1 {
  width: 3px;
  height: 3px;
  right: 40px;
  bottom: 14px;
  
}

.star-2 {
  width: 5px;
  height: 5px;
  right: 30px;
  top: 5px;
  
}

.star-3 {
  width: 2px;
  height: 2px;
  right: 27px;
  bottom: 8px;
  
}

.star-4 {
  width: 0px;
  height: 0px;
  right: 22px;
  bottom: 22px;
  
  
}

.star-5 {
  width: 0px;
  height: 0px;
  right: 10px;
  bottom: 15px;
  
}

.star-6, .star-7, .star-8 {
  width: 5px;
  height: 2px;
  border-radius: 2px;
  transform: rotate(-45deg);
  box-shadow: 5px 0px 4px 1px #FFF;
  animation-name: travel;
  animation-duration: 1.5s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.star-6 {
  right: 15px;
  bottom: 10px;
  animation-delay: -2s;
  
}

.star-7 {
  right: 15px;
  bottom: 30px;
  
}

.star-8 {
  right: 45px;
  top: 0px;
  animation-delay: -4s;
  
}

@keyframes travel {
  0% {
    transform: rotate(-45deg) translateX(70px);
  }

  50% {
    transform: rotate(-45deg) translateX(-20px);
    box-shadow: 5px 0px 6px 1px #FFF;
  }

  100% {
    transform: rotate(-45deg) translateX(-30px);
    width: 2px;
    height: 2px;
    opacity: 0;
    box-shadow: none;
  }
}

#hide-checkbox:checked + .toggle {
  background: #24D7F7;
}


#hide-checkbox:checked + .toggle .toggle-button {
  background: #F7FFFF;
  transform: translateX(45px);
  box-shadow: 0 0 35px 5px rgba(255, 255, 255);
}

#hide-checkbox:checked + .toggle .toggle-button .crater {
  transform: rotate(-45deg) translateX(70px);
}

#hide-checkbox:checked + .toggle .star {
  animation: move 2s infinite;
  transform: none;
  box-shadow: none;
}

#hide-checkbox:checked + .toggle .star-1 {
  width: 30px;
  height: 10px;
  border-radius: 10px;
  background: #FFF;
  left: 10px;
  top: 25px;
  box-shadow: none;
  
}

#hide-checkbox:checked + .toggle .star-2 {
  width: 12px;
  height: 12px;
  background: #FFF;
  left: 12px;
  top: 23px;
  
  
}

#hide-checkbox:checked + .toggle .star-3 {
  width: 14px;
  height: 14px;
  background: #FFF;
  left: 20px;
  top: 19px;
  
  
}

#hide-checkbox:checked + .toggle .star-4 {
  width: 13px;
  height: 13px;
  background: #FFF;
  left: 30px;
  top: 21px;
  
  
}

#hide-checkbox:checked + .toggle .star-5 {
  width: 27px;
  height: 7px;
  border-radius: 15px;
  background: #FFF;
  left: 20px;
  bottom: 23px;
  box-shadow: none;
  
}

#hide-checkbox:checked + .toggle .star-6 {
  width: 10px;
  height: 10px;
  background: #FFF;
  border-radius: 50%;
  left: 22px;
  bottom: 23px;
  
  
}

#hide-checkbox:checked + .toggle .star-7 {
  width: 13px;
  height: 13px;
  background: #FFF;
  border-radius: 50%;
  left: 27px;
  bottom: 25px;
  
  
}

#hide-checkbox:checked + .toggle .star-8 {
  width: 10px;
  height: 10px;
  background: #FFF;
  border-radius: 50%;
  left: 37px;
  top: 5px;
  
  
}

@keyframes move {
  0% {
    transform: none;
  }
  
  25% {
    transform: translateX(2px);
  }
  
  100% {
    transform: translateX(-2px);
  }
}

.toggle p {
  text-align: center;
  letter-spacing: 15px;
  background: #34495e;
  color: #FFF;
}

.toggle p.morning {
  background: #e67e22;
}

