.old-screen::before {
  background: transparent linear-gradient(to bottom, #d1d1d1 0%, #000000 100%)
    repeat scroll 0 0;
}

@font-face {
  src: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/86186/terminal_copy.ttf);
  font-family: "Terminal";
}

@font-face {
  src: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/86186/sys.ttf)
    format("truetype");
  font-family: "Sys";
}

.screen::before {
  background-color: #0033cc;
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 100%;
  height: 100%;
  z-index: -1;
}

.scanlines .overlay {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanlines .overlay::after {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url("../../../s3-us-west-2.amazonaws.com/s.cdpn.io/86186/crt.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  content: "";
}

.scanlines .overlay::before {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  content: " ";
  background:
    linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.08) 50%),
    linear-gradient(
      90deg,
      rgba(0, 0, 255, 0.08),
      rgba(255, 255, 0, 0.03),
      rgba(0, 0, 255, 0.08)
    );
  z-index: 2;
  background-size:
    100% 2px,
    3px 100%;
  pointer-events: none;
}

.picture {
  height: 100vh;
  overflow: hidden;
  width: 100vw;
  z-index: -1;
  transform: scale(0, 0);
  background: transparent linear-gradient(to bottom, #d1d1d1 0%, #000000 100%)
    repeat scroll 0 0;
  opacity: 50%;
}

.vcr-menu {
  position: absolute;
  left: 1vw;
  top: 15vh;
  transform: translate(-50px, 120px);
  opacity: 100;
  background-color: #0033cc;
  box-sizing: border-box;
  font-family: "Sys";
  font-size: 24px;
  height: 40%;
  text-transform: uppercase;
  width: 80%;
  text-shadow:
    1px 1px 0 #000000,
    -1px -1px 0 #000000,
    1px -1px 0 #000000,
    -1px 1px 0 #000000;
  filter: blur(1px);
  color: #ffffff;
  -webkit-animation: jerkup 100ms infinite;
  animation: jerkup 100ms infinite;
}

.vcr-menu header {
  color: #ffff33;
  margin-bottom: 10px;
  padding: 5px 15px;
  -webkit-animation: 5s ease 2000ms normal none infinite running glitch;
  animation: 5s ease 2000ms normal none infinite running glitch;
}

.vcr-menu ul {
  margin: 0;
  padding: 0;
  -webkit-animation: 5s ease 2000ms normal none infinite running glitch;
  animation: 5s ease 2000ms normal none infinite running glitch;
}

.vcr-menu ul li {
  box-sizing: border-box;
  list-style: outside none none;
  padding: 5px 15px;
}

.vcr-menu ul li.active {
  background-color: #ffff33;
  color: #000000;
}

.vcr-menu ul li a {
  color: #ffffff;
  text-decoration: none;
}

.vcr-menu footer {
  background-color: #0033cc;
  margin-top: 10px;
  padding: 5px 15px;
  height: 115%;
  width: 500px;
  -webkit-animation: 5s ease 2000ms normal none infinite running glitch;
  animation: 5s ease 2000ms normal none infinite running glitch;
}

.vcr-menu footer::after {
  clear: both;
  content: " ";
  display: table;
}

.vcr-menu footer .key {
  float: left;
  width: 50%;
}

.vcr-menu footer .key span {
  background-color: #0033cc;
  border: 6px solid #ffff33;
  border-radius: 6px;
  display: inline-block;
  height: 34px;
  line-height: 36px;
  padding-left: 6px;
}

.vcr-menu footer .key:last-child {
  text-align: right;
}

.on .vcr-menu {
  opacity: 1;
  transition: opacity 10ms ease 2000ms;
}

.on .picture {
  -webkit-animation: 3000ms linear 0ms normal forwards 1 running on;
  animation: 3000ms linear 0ms normal forwards 1 running on;
}

.off .picture {
  -webkit-animation: 750ms cubic-bezier(0.23, 1, 0.32, 1) 0ms normal forwards 1
    running off;
  animation: 750ms cubic-bezier(0.23, 1, 0.32, 1) 0ms normal forwards 1 running
    off;
}

.text {
  color: #ffff33;
  content: "AV-1";
  opacity: 0;
  filter: blur(0.5px);
  font-family: Sys;
  font-size: 6vmin;
  left: 5%;
  position: absolute;
  text-shadow: 0 0 3px #000000;
  top: 10%;
  width: 230px;
}

.on .text,
.on .menu {
  opacity: 1;
  transition: opacity 10ms ease 2000ms;
}

.text span {
  filter: blur(1px);
  position: absolute;
}

.text span:nth-child(1) {
  color: #0033cc;
  margin-left: -2px;
  filter: blur(2px);
}

.text span:nth-child(2) {
  color: #ffff33;
  margin-left: 2px;
  filter: blur(2px);
}

.text span:nth-child(3) {
  color: #ffffff;
  position: 20px 0;
  filter: blur(1px);
}

.text span:nth-child(4) {
  color: #ffffff;
  filter: blur(1px);
  text-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
}

.text span:nth-child(5) {
  color: rgba(255, 255, 255, 0.1);
  filter: blur(15px);
}

.text span {
  animation:
    blur 30ms infinite,
    jerk 50ms infinite;
}

@keyframes blur {
  0%,
  100% {
    filter: blur(1px);
    opacity: 0.8;
  }
  50% {
    filter: blur(1px);
    opacity: 1;
  }
}

@keyframes jerk {
  50% {
    transform: translateX(1px);
  }
  51% {
    transform: translateX(0);
  }
}

@keyframes jerkup {
  0% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(0);
  }
}

.text span:nth-child(2) {
  animation:
    glitch2 1s infinite,
    jerkup 1s infinite;
}

.text span:nth-child(3) {
  animation: glitch1 1s infinite;
}

@keyframes glitch1 {
  0%,
  30%,
  32%,
  98% {
    transform: translateX(0);
  }
  31%,
  100% {
    transform: translateX(10px);
  }
}

@keyframes glitch2 {
  0%,
  30%,
  32%,
  98% {
    transform: translateX(0);
  }
  31%,
  100% {
    transform: translateX(-10px);
  }
}

.overlay .text {
  animation: glitch 5s ease 2000ms infinite;
}

@keyframes glitch {
  40% {
    opacity: 1;
    transform: scale(1, 1) skew(0, 0);
  }
  41% {
    opacity: 0.8;
    transform: scale(1, 1.2) skew(80deg, 0);
  }
  42% {
    opacity: 0.8;
    transform: scale(1, 1.2) skew(-50deg, 0);
  }
  43% {
    opacity: 1;
    transform: scale(1, 1) skew(0, 0);
  }
}

@keyframes on {
  0% {
    transform: scale(1, 0.8) translate3d(0, 0, 0);
    filter: brightness(4);
    opacity: 1;
  }
  3.5% {
    transform: scale(1, 0.8) translate3d(0, 100%, 0);
  }
  3.6% {
    transform: scale(1, 0.8) translate3d(0, -100%, 0);
    opacity: 1;
  }
  9% {
    transform: scale(1.3, 0.6) translate3d(0, 100%, 0);
    filter: brightness(4);
    opacity: 0;
  }
  11% {
    transform: scale(1, 1) translate3d(0, 0, 0);
    filter: contrast(0) brightness(0);
    opacity: 0;
  }
  100% {
    transform: scale(1, 1) translate3d(0, 0, 0);
    filter: contrast(1) brightness(1.2) saturate(1.3);
    opacity: 1;
  }
}

@keyframes off {
  0% {
    transform: scale(1, 1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1, 0.005);
    filter: brightness(100);
  }
  70% {
    transform: scale(1, 0.005);
  }
  90% {
    transform: scale(0.005, 0.005);
  }
  100% {
    transform: scale(0, 0);
  }
}
