/*
  Project Name : Directin
  Author Company : Ewebcraft
  Project Date: 01 Aug , 2016
  Author Website : http://www.ewebcraft.com
  Author Email : ewebcraft@gmail.com
*/

#loader {
    background: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index:99999;
}
.book {
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  position: relative;
  margin: 0 auto;
  border: 5px solid #ecf0f1;
  width: 100px;
  height: 60px;
}

.book__page {
  position: absolute;
  left: 50%;
  top: -5px;
  margin: 0 auto;
  border-top: 5px solid #ecf0f1;
  border-bottom: 5px solid #ecf0f1;
  border-right: 5px solid #ecf0f1;
  background: #FFBD00;
  width: 50px;
  height: 60px;
  -webkit-transform-origin: 0% 50%;
          transform-origin: 0% 50%;
  -webkit-animation: flip 1.2s infinite linear;
          animation: flip 1.2s infinite linear;
  -webkit-animation-fill-mode: forwards;
          animation-fill-mode: forwards;
}
.book__page:nth-child(1) {
  z-index: -1;
  -webkit-animation-delay: 1.4s;
          animation-delay: 1.4s;
}
.book__page:nth-child(2) {
  z-index: -2;
  -webkit-animation-delay: 2.8s;
          animation-delay: 2.8s;
}
.book__page:nth-child(3) {
  z-index: -3;
  -webkit-animation-delay: 4.2s;
          animation-delay: 4.2s;
}

@-webkit-keyframes flip {
  0% {
    -webkit-transform: perspective(600px) rotateY(0deg);
            transform: perspective(600px) rotateY(0deg);
  }
  20% {
    background: #ffca32;
  }
  29.9% {
    background: #ffca32;
  }
  30% {
    -webkit-transform: perspective(200px) rotateY(-90deg);
            transform: perspective(200px) rotateY(-90deg);
    background: #FFBD00;
  }
  54.999% {
    opacity: 1;
  }
  55% {
    opacity: 0;
  }
  60% {
    -webkit-transform: perspective(200px) rotateY(-180deg);
            transform: perspective(200px) rotateY(-180deg);
    background: #FFBD00;
  }
  100% {
    -webkit-transform: perspective(200px) rotateY(-180deg);
            transform: perspective(200px) rotateY(-180deg);
    background: #FFBD00;
  }
}

@keyframes flip {
  0% {
    -webkit-transform: perspective(600px) rotateY(0deg);
            transform: perspective(600px) rotateY(0deg);
  }
  20% {
    background: #ffca32;
  }
  29.9% {
    background: #ffca32;
  }
  30% {
    -webkit-transform: perspective(200px) rotateY(-90deg);
            transform: perspective(200px) rotateY(-90deg);
    background: #FFBD00;
  }
  54.999% {
    opacity: 1;
  }
  55% {
    opacity: 0;
  }
  60% {
    -webkit-transform: perspective(200px) rotateY(-180deg);
            transform: perspective(200px) rotateY(-180deg);
    background: #FFBD00;
  }
  100% {
    -webkit-transform: perspective(200px) rotateY(-180deg);
            transform: perspective(200px) rotateY(-180deg);
    background: #FFBD00;
  }
}
