/**
 * Document defaults
 */
 
  * {
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
  }
  
  
  /* The loader container */
  .loader {
    
    
    left: 50%;
    
    width: 350px;
    height: 50px;
    
    margin-top: 10px;
    margin-left: 10%;
    
    perspective: 1000px;
    transform-style: preserv3d;
  }
  
  .loader--reflect {
    margin-top: 0;
  }
  
  
  
  /* The bar */
  .bar {
    position: absolute;
    bottom: 0;
    left: 0;
  
    width: 50px;
    height: 100px;
  
    background-color: #ec3131;
    
    transform: scaleY(0);
    transform-style: preserve3d;
  
    animation: bar 3s cubic-bezier(.81,.04,.4,.7) infinite;
  }
  
  .bar:nth-child(2) {
    left: 50px;
    
    background-color: #ec6c31;
    
    animation-delay: 50ms;
  }
  
  .bar:nth-child(3) {
    left: 100px;
    
    background-color: #ec9b31;
    
    animation-delay: 100ms;
  }
  
  .bar:nth-child(4) {
    left: 150px;
    
    background-color: #ecc031;
    
    animation-delay: 150ms;
  }
  
  .bar:nth-child(5) {
    left: 200px;
    
    background-color: #e9ec31;
    
    animation-delay: 200ms;
  }
  
  .bar:nth-child(6) {
    left: 250px;
    
    background-color: #caec31;
    
    animation-delay: 250ms;
  }
  
  .bar:nth-child(7) {
    left: 300px;
    
    background-color: #9bec31;
    
    animation-delay: 300ms;
  }
  
  .bar:nth-child(8) {
    left: 350px;
    
    background-color: #56ec31;
    
    animation-delay: 350ms;
  }
  
  .bar:nth-child(9) {
    left: 400px;
    
    background-color: #31ec41;
    
    animation-delay: 400ms;
  }
  
  .bar:nth-child(10) {
    left: 450px;
    
    background-color: #31ec79;
    
    animation-delay: 450ms;
  }
  .bar:nth-child(11) {
    left: 500px;
    
    background-color: #31ecb4;
    
    animation-delay: 500ms;
  }
  .bar:nth-child(12) {
    left: 550px;
    
    background-color: #31dfec;
    
    animation-delay: 550ms;
  }
  .bar:nth-child(13) {
    left: 600px;
    
    background-color: #3188ec;
    
    animation-delay: 600ms;
  }
  .bar:nth-child(14) {
    left: 650px;
    
    background-color: #313eec;
    
    animation-delay: 650ms;
  }
  .bar:nth-child(15) {
    left: 700px;
    
    background-color: #5331ec;
    
    animation-delay: 700ms;
  }
  .bar:nth-child(16) {
    left: 750px;
    
    background-color: #7231ec;
    
    animation-delay: 750ms;
  }
  .bar:nth-child(17) {
    left: 800px;
    
    background-color: #9831ec;
    
    animation-delay: 800ms;
  }
  .bar:nth-child(18) {
    left: 850px;
    
    background-color: #a731ec;
    
    animation-delay: 450ms;
  }
  
  .loader--reflect .bar {
    animation-name: bar-reflect;
  }
  
  @keyframes bar {
    0% {
      transform: rotateZ(-180deg) rotateX(-360deg);
    }
    75%,100% {
      transform: rotateZ(0) rotateX(0);
    }
  }
  
  @keyframes bar-reflect {
    0% {
      transform: rotateZ(180deg) rotateX(360deg);
    }
    75%,100% {
      transform: rotateZ(0) rotateX(0);
    }
  }