/* LIST OF FURTHER IMPROVEMENTS */
/*
currently working on :
calculation draft for keyframes steps

$scan-moving-duration: 3s;
$scan-moving-delay: 7s;

total time = 10s (duration + delay)
keyframes :
    0%: wait
    15%: start moving
    85%: end moving & start waiting
    100% : wait

(the rest later)

*/
/* REGULAR SCANLINES SETTINGS */
/* MOVING SCANLINE SETTINGS */
/* MIXINS */
/* CSS .scanlines CLASS */
.scanlines {
  position: relative;
  overflow: hidden;
  z-index : 0;
}
.scanlines:before, .scanlines:after {
  display: block;
  pointer-events: none;
  content: '';
  position: absolute;
}
.scanlines:before {
  width: 100%;
  height: 4px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0.75;
/*   -moz-animation: scanline 1s linear infinite;
  -webkit-animation: scanline 1s linear infinite;
          animation: scanline 1s linear infinite;*/
	  
}
.scanlines:after {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  background: -webkit-linear-gradient(top, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
  background-size: 100% 4px;

}

.screen_border {
	-moz-animation: scanlines 1s steps(60) infinite;
  -webkit-animation: scanlines 1s steps(60) infinite;
          animation: scanlines 1s steps(60) infinite;
		  
	-webkit-box-shadow: inset 0 0 50px black,inset 0 0 80px black,0 0 10px rgba(0,0,0,0.4);
	box-shadow: inset 0 0 50px black,inset 0 0 80px black,0 0 10px rgba(0,0,0,0.4);
	
z-index: 50;

}	

/* ANIMATE UNIQUE SCANLINE */
@-webkit-keyframes scanline {
  0% {
    -webkit-transform: translate3d(0, 200000%, 0);
	-moz-transform: translate3d(0, 200000%, 0);
    transform: translate3d(0, 200000%, 0);
  }
}
@keyframes scanline {
  0% {
    -webkit-transform: translate3d(0, 200000%, 0);
	-moz-transform: translate3d(0, 200000%, 0);
    transform: translate3d(0, 200000%, 0);
  }
}
@-webkit-keyframes scanlines {
  0% {
    background-position: 0 50%;
  }
}
@keyframes scanlines {
  0% {
    background-position: 0 50%;
  }
}
@-moz-keyframes scanlines {
  0% {
    background-position: 0 50%;
  }
}

.scan,
.scan:before,
.scan:after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3%;
  background-color: hsla(0, 0%, 0%, .13);
  box-shadow: 0 0 10px hsla(0, 0%, 0%, .25);
  animation: scan 12s linear infinite;
  -webkit-animation: scan 12s linear infinite;
  -moz-animation: scan 12s linear infinite;
}

.scan:before,
.scan:after {
  content: '';
  display: block;
  height: 30%;
}

.scan:before {
  top: -350%;
}

.scan:after {
  top: -1100%;
}

@keyframes scan {
    0% { top: -20%; }
  100% { top: 250%; }
}

@-webkit-keyframes scan {
    0% { top: -20%; }
  100% { top: 250%; }
}

@-moz-keyframes scan {
    0% { top: -20%; }
  100% { top: 250%; }
}


.scanlines2 {
  width: 100%;
  height: 100%;
  position: fixed;
  overflow: hidden;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background: repeating-linear-gradient( 0deg, rgba(0, 255, 0, .2), transparent 1px, rgba(0, 0, 255, .3) 10px, transparent 10px );
  opacity: .25;
  filter: blur(1px) contrast(110%) brighness(5) saturation(8);
  animation: jitter 5s ease-in-out infinite;
  animation-delay: 2s;
  transform-origin: center center;
}

.scanlines2:before {
  content: '';
  top: -5px;
  left: -5px;
  position: fixed;

  background: repeating-linear-gradient( 0deg, rgba(0, 0, 255, .2), transparent 1px, rgba(0, 0, 255, .3) 10px, transparent 10px );
  filter: brighness(10) saturation(10);
  transform-origin: center center;
}

/*.scanlines2:after {
  content: '';
  top: -2px;
  left: -2px;
  position: fixed;

  animation: jitter 2s ease-in-out infinite;
  background: repeating-linear-gradient( 0deg, rgba(255, 0, 255, .2), transparent 1px, rgba(0, 255, 255, .3) 10px, transparent 10px );
  transform-origin: center center;
}*/

@keyframes jitter {
  0% {
    margin-top: 10px;
    margin-left: 5px;
  }

  20% {
    margin-top: -10px;
    margin-left: -5px;
  }

  25% {
    margin-top: 2px;
    margin-left: 3px;
  }

  26% {
    margin-top: 4px;
    margin-left: -1px;
  }

  27% {
    margin-top: 0px;
    margin-left: 0px;
  }

  30% {
    margin-top: 10px;
    margin-left: 5px;
  }

  50% {
    margin-top: -1px;
    margin-left: 1px;
  }

  61% {
    margin-top: 1px;
    margin-left: -1px;
  }

  63% {
    margin-top: -30px;
    left: -70%;
    transform: skewX(-5deg) translateZ(0);
	-webkit-transform: skewY(-5deg) translateZ(0);
	-moz-transform: skewY(-5deg) translateZ(0);
	-o-transform: skewY(-5deg) translateZ(0);
    width: 250%;
    height: 250%;
  }

  67% {
    margin-top: -10px;
    margin-left: -15px;
  }

  69% {
    margin-top: 5px;
    margin-left: 5px;
  }

  70% {
    top: -100px;
    margin-left: 5px;
    transform: skewY(5deg) translateZ(0);
	-webkit-transform: skewY(5deg) translateZ(0);
	-moz-transform: skewY(5deg) translateZ(0);
	-o-transform: skewY(5deg) translateZ(0);
    width: 250%;
    height: 250%;
  }

  80% {
  }

  81% {
    margin-top: 0px;
    margin-left: 0px;
  }

  100% {
    margin-top: 10px;
    margin-left: 5px;
  }
}
