body {
  background: #000 none repeat scroll 0 0;
  margin: 0;
  overflow: hidden;
}

#canvas {
  z-index: -1;
}

@font-face {
  src: url(../fonts/terminal_copy.ttf);
  font-family: "Terminal";
}
@font-face {
  src: url(../fonts/sys.ttf) format("truetype");
  font-family: "Sys";
}

@font-face {
  src: url(../fonts/vcr.ttf) format("truetype");
  font-family: "VCR";
}

@font-face {
  src: url(../fonts/dos.ttf) format("truetype");
  font-family: "DOS";
}
.screen::before {
  background: transparent linear-gradient(to bottom, #85908c 0%, #323431 100%) repeat scroll 0 0;
  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: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scanlines .overlay::after {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/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(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
}

.picture {
  height: 100%;
  overflow: hidden;
  width: 100%;
  z-index: -1;
  transform: scale(0, 0);
  background: transparent linear-gradient(to bottom, #85908c 0%, #323431 100%) repeat scroll 0 0;
}

.channel {
  color: lime;
  opacity: 1;
  filter: blur(0.5px);
  font-family: Sys;
  font-size: 6vmin;
  left: 5%;
  position: absolute;
  text-shadow: 0 0 3px lime;
  top: 5%;
  width: 200px;
}

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

.channel span:nth-child(1) {
  color: red;
  margin-left: -2px;
  filter: blur(2px);
}

.channel span:nth-child(2) {
  color: lime;
  margin-left: 2px;
  filter: blur(2px);
}

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

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

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

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

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

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

@keyframes jerkup {
  0% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(0);
  }
}
.channel span:nth-child(2) {
  animation: jerkup 1s infinite;
}

.overlay .channel {
  animation: 5s ease 2000ms normal none infinite running;
}


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

#tv {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

  background:
  repeating-radial-gradient(#000 0 0.0001%,#fff 0 0.0002%) 50% 0/2500px 2500px,
  repeating-conic-gradient(#000 0 0.0001%,#fff 0 0.0002%) 60% 60%/2500px 2500px;
  background-blend-mode: difference;
  animation: snow .2s infinite alternate;
}

@keyframes snow {
  100% {background-position: 50% 0, 60% 50%}
}

@keyframes fade-in {
  0% { opacity: 0; transform: scale(0), translate(-50%, -50%); display: block }
  100% { opacity: 1; transform: scale(1), translate(-50%, -50%); display: block }
}

.fade-in {
  animation: fade-in 250ms steps(3, end) forwards;
  transform-origin: center;
}

@keyframes fade-out {
  0%   { opacity: 1; transform: scale(1), translate(-50%, -50%); display: block; }
  100% { opacity: 0; transform: scale(0), translate(-50%, -50%); display: none; }
}

.fade-out {
  animation: fade-out 250ms steps(3, end) forwards;
}

#player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
}

iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh; /* 16:9 aspect ratio for height reference */
  height: 100vh;
  transform: translate(-50%, -50%);
}
