@import 'https://fonts.googleapis.com/css?family=Inconsolata';

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inconsolata', monospace;
  background-color: #000;
  background-image: radial-gradient(#11581E, #041607), url("https://media.giphy.com/media/oEI9uBYSzLpBK/giphy.gif");
  background-repeat: no-repeat;
  background-size: cover;
  color: rgba(128, 255, 128, 0.8);
  text-shadow: 0 0 1ex #33ff33, 0 0 2px rgba(255,255,255,0.8);
  overflow: hidden;
}

/* шум */
.noise {
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("https://media.giphy.com/media/oEI9uBYSzLpBK/giphy.gif");
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 5;
  opacity: 0.02;
}

/* сканирующая линия */
.overlay {
  pointer-events: none;
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
  background-size: auto 4px;
  z-index: 6;
}

.overlay::before {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(0deg, transparent 0%, rgba(32,128,32,0.2) 2%, rgba(32,128,32,0.8) 3%, rgba(32,128,32,0.2) 3%, transparent 100%);
  background-repeat: no-repeat;
  animation: scan 7.5s linear infinite;
}

@keyframes scan {
  0% { background-position: 0 -100vh; }
  35%, 100% { background-position: 0 100vh; }
}

.terminal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1000px;
  padding: 2rem;
  text-transform: uppercase;
  z-index: 4;
  mix-blend-mode: screen;
}

/* заголовок */
h1 {
  font-size: 3rem;
  margin: 0 0 1rem 0;
}

.highlight {
  color: #fff;
  text-shadow: 0 0 1ex #fff, 0 0 2px rgba(255,255,255,0.8);
}

#game {
  position: relative;
  width: 100%;
  height: 200px;
  border-top: 2px solid rgba(128,255,128,0.5);
  margin-top: 1rem;
  overflow: hidden;
}

#player {
  position: absolute;
  bottom: 0;
  left: 50px;
  width: 30px;
  height: 30px;
  background-color: rgba(128,255,128,0.8);
  border: 1px solid rgba(128,255,128,0.6);
  box-shadow: 0 0 5px rgba(128,255,128,0.7);
  z-index: 7;
}

#obstacle {
  position: absolute;
  bottom: 0;
  width: 30px;
  height: 30px;
  background-color: rgba(0,200,0,0.8);
  border: 1px solid rgba(0,255,0,0.6);
  box-shadow: 0 0 5px rgba(0,255,0,0.7);
  z-index: 7;
}

.output {
  margin-top: 10px;
  mix-blend-mode: screen;
}

/* Мобильные стили */
@media (max-width: 600px) {
  .terminal {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  #game {
    height: 150px;
  }

  #player, #obstacle {
    width: 25px;
    height: 25px;
  }

  #player {
    left: 30px;
  }
}
