#loader {
    width: 10rem;
    height: 6rem;
    position: absolute;
    z-index: 1000;
}

.lightsaber {
    position: absolute;
    width: 0.1rem;
    height: 3rem;
    background-color: #666;
    bottom: 0;
}

.lightsaber.ls-left {
    left: 0;
}

.lightsaber.ls-right {
    right: 0;
}

.lightsaber:before {
    position: absolute;
    content: ' ';
    display: block;
    width: 0.2rem;
    height: 4rem;
    max-height: 1px;
    background-color: #fff;
    border-radius: 3%;
    transform: rotateZ(180deg);
    transform-origin: center top;
}

.lightsaber.ls-green:before {
    animation: showlightgreen 2s ease-in-out; 
}

.lightsaber.ls-red:before {
    animation: showlightred 2s ease-in-out; 
}


.lightsaber.ls-left {
    animation: fightleft 2s ease-in-out; 
}

.lightsaber.ls-right {
   animation: fightright 2s ease-in-out; 
}


@keyframes showlightgreen {
    0% {
        max-height: 0;
        box-shadow: 0 0 0 0 #5BAFFF;
    }
  
    5% {
        box-shadow: 0 0 4px 2px #5BAFFF;
    }
    
    10% {
        max-height: 4rem;
    }
  
    80% {
        max-height: 4rem;
    }
    
    85% {
        box-shadow: 0 0 4px 2px #5BAFFF;
    }
    
    100% {
        max-height: 0;
        box-shadow: 0 0 0 0 #5BAFFF;
    }
}

@keyframes showlightred {
    0% {
        max-height: 0;
        box-shadow: 0 0 0 0 #f06363;
    }
  
    20% {
        box-shadow: 0 0 4px 2px #f06363;
    }
    
    25% {
        max-height: 4rem;
    }
  
    80% {
        max-height: 4rem;
    }
    
    85% {
        box-shadow: 0 0 4px 2px #f06363;
    }
    
    100% {
        max-height: 0;
        box-shadow: 0 0 0 0 #f06363;
    }
}

@keyframes fightleft {
    0% {
        transform: rotateZ(0deg);
        left: 0;
        bottom: 0;
    }
    
    30% {
        transform: rotateZ(0deg);
        bottom: 0;
    }
    
    40% {
        transform: rotateZ(45deg);
        left: 0;
        bottom: 2px;
    }
    
    45%{
        transform: rotateZ(65deg);
        left: 0;
    }
    
    65%{
        transform: rotateZ(410deg);
        left: 30px;
        bottom: 10px;
    }
    
    95% {
        transform: rotateZ(410deg);
        left: 0;
        bottom: 0;
    }
    
    100% {
        transform: rotateZ(360deg);
        left: 0;
        bottom: 0;
    }
}

@keyframes fightright {
    0% {
        transform: rotateZ(0deg);
        right: 0;
        bottom: 0;
    }
    
    30% {
        transform: rotateZ(0deg);
        bottom: 0;
    }
    
    45% {
        transform: rotateZ(-45deg);
        right: 0;
        bottom: 2px;
    }
    
    50%{
        transform: rotateZ(-65deg);
        right: 0;
    }
    
    68%{
        transform: rotateZ(-410deg);
        right: 27px;
        bottom: 13px;
    }
    
    95% {
        transform: rotateZ(-410deg);
        right: 0;
        bottom: 0;
    }
    
    100% {
        transform: rotateZ(-360deg);
        right: 0;
        bottom: 0;
    }
}
