:root{
    --bg: #e0e0e0;
  }
  body{
    background-color: #e0e0e0;
    -webkit-transition: .4s;
    transition: .4s;
  }
  input{
    outline: none;
    border:none;
  }
  body#dark{
    background-color: #030205;
    -webkit-transition: .4s;
    transition: .4s;
  }
  .switch {
    position: relative;
    display: inline-block;
    left: 50%;
    top: 40%;
    transform: translateX(-50%) translateY(400%);
    width: 140px;
    height: 70px;
    
  }
  
  .switch input { 
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #27173a;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 60px;
    width: 60px;
    left: 4px;
    bottom: 4px;
    background-color: #f9c20a;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:after {
    background-color: #27173a;
    content: "";
    position: absolute;
    border-radius: 50%;
    left: -20px;
    bottom: 9px;
    width: 50px;
    opacity: 0;
    height: 50px;
    -webkit-transition:.2s;
    transition: .2s;
  }
  
  input:checked + .slider:after {
    left: auto;
    opacity: 1;
    -webkit-transform: translateX(60px);
    -ms-transform: translateX(60px);
    transform: translateX(60px);
    -webkit-transition: .5s;
    transition: .5s;
  }
  
  input:checked + .slider {
    background-color: #27173a;
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
  }
  
  input:checked + .slider:before {
    /*background: transparent;
    box-shadow: 25px 0px 0px 0px #f9c20a;*/
    -webkit-transform: translateX(66px);
    -ms-transform: translateX(66px);
    transform: translateX(66px);
  }
  
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }