@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');

@font-face {
  font-family: Pixelada;
  src: url(./fonts/VCR_OSD_MONO_1.001.ttf);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

body {
  background: #222;
  font-family: 'Press Start 2P', monospace;
  font-smooth: never;
  height: 98vh;
}

.topUI {
  position: absolute;
  z-index: 1000;
  transform: translate(-50%, 25px);
  text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
  letter-spacing: 2px;
  color: #fff;
  font-size: 17px;
}

.topUI::before {
  display: inline-block;
  height: 17px;
  padding: 1px 2px;
  line-height: 19px;
  font-size: 17px;
  background: #fff;
  text-shadow: none;
  font-weight: 900;
  letter-spacing: 0;
  border-radius: 6px;
  margin-right: 30px;
  border: 2px solid #7dd8c9;
}

#time {
  left: 13%;
  color: #da0eec;
}

#time::before {
  content: 'TEMPO';
  color: #da0eec;
}

#score {
  left: 45%;
}

#score::before {
  content: 'PONTOS';
  color: #da0eec;
}

#lap {
  left: 88%;
  width: 45%;
}

#lap::before {
  content: 'VOLTA';
  color: #da0eec;
}

#tacho {
  position: absolute;
  text-align: right;
  width: 23%;
  bottom: 5%;
  z-index: 2000;
  color: #e62e13;
  text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
  letter-spacing: 2px;
  font-size: 23px;
}

#tacho::after {
  content: 'km/h';
  color: #fab453;
  font-size: 18px;
  margin-left: 5px;
}

#game {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: #222;
  user-select: none;
  transition: opacity 10s;
}

#road {
  transition: opacity 2s;
  transition-timing-function: steps(8, end);
}

#road * {
  position: absolute;

}

#hero {
  background-repeat: no-repeat;
  background-position: -110px 0;
  z-index: 2000;
  transform: scale(1.4)
}

#cloud {
  background-size: auto 100%;
  width: 100%;
  height: 100%;
}


#road {
  position: absolute;
  width: 100%;
  height: 100%;
}

#home {
  position: absolute;
  color: #fff;
  width: 100%;
  height: 100%;

  z-index: 1000;
}

#home h1,
h2 {
  margin-top: 60px;
}

#highscore {
  position: absolute;
  width: 100%;
  height: 20%;
  bottom: 0;
  column-count: 3;
  column-fill: auto;
}

#highscore * {
  color: #9e95a8;
  margin: 0 0 6px 27px;
}

.nomeJogo {
  font-family: "Pixelify Sans", sans-serif;
  font-style: normal;
  font-size: 45px;
  color: #fff;
  text-shadow:2px 0 20px #d64bc4, 0 2px 8px black, 2px 0 black, 0 -2px black;
}

#text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: #d9bbf3;
  text-shadow: 0 0 black, 0 2px black, 2px 0 black, 0 0 black;
}

.blink {
  animation: blinker 2s steps(4, end) infinite
}

@keyframes blinker {
  50% {
    opacity: 0
  }
}

#controls {
  color: #868686;
  font-size: 13px;
  line-height: 13px;
  margin: 10px;
  text-align: center;
}

#controls>span {
  margin-left: 20px;
  font-family: 'Pixelada';
}

#controls>span>span {
  border: 2px solid #868686;
  border-radius: 5px;
  padding: 7px;
  margin-right: 10px;
  display: inline-block;
}

#controls>span:last-child>span {
  transform: rotate(90deg);
}

#botaoVoltar {
  position: relative;
  /*display: inline-block;*/
  margin-left: 120px;
  /*transform: translate(0%, -75%);*/
  font-size: 1.1em;
  text-decoration: none;
  z-index: 2000;
  font-weight: bold;
  font-family: 'Pixelada';
  background: #fff;
  border-radius: 10px;
  padding: 5px;
  cursor: pointer;
  color: #2e063e;
  box-shadow: 2px 0 20px #d64bc4, 0 2px 8px black, 2px 0 black, 0 -2px black;
}

#alinharGame {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  top: 23%;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* TELA INICIAL */
#alinhar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -25%;
  padding: 50px
}

#story {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(101, 52, 119, 1) 80%, rgba(115, 64, 134, 1) 100%);
  background-size: auto 100%;
  user-select: none;
  transition: opacity 10s;
  width: 1100px;
  height: 650px;
  display: flex;
}

#nomeUsuario {

  position: absolute;
  left: 45%;
  top: 45%;
  width: 25%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: #2e063e;
  z-index: 2000;
  background: #ffffff;
  height: 40px;
  border-radius: 10px;
  font-weight: bold;
  font-family: 'Nunito', sans-serif;
  box-shadow: 2px 0 20px #d64bc4, 0 2px 8px black, 2px 0 black, 0 -2px black;

}

#nomeUsuario::placeholder {
  font-size: 0.7em;
  color:  #2e063e;
  text-shadow: none;
  font-weight: bold;
  font-family: 'Pixelada';
}

#botaoInicial {
  position: absolute;
  left: 64%;
  top: 45%;
  transform: translate(-50%, -50%);
  font-size: 0.9em;
  z-index: 2000;
  font-weight: bold;
  font-family: 'Pixelada';
  background: white;
  border-radius: 10px;
  transition: all 0.3s ease-in-out 0s;
  cursor: pointer;
  height: 40px;
  border: none;
  color: #2e063e;
  box-shadow: 2px 0 20px #d64bc4, 0 2px 8px black, 2px 0 black, 0 -2px black;
}

#loadButton {
  position: absolute;
  left: 80%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: #d9bbf3;
  text-shadow: 0 0 black, 0 2px black, 2px 0 black, 0 0 black;
  z-index: 2000;
}

#output {
  position: absolute;
  left: 58%;
  top: 55%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: #d9bbf3;
  text-shadow: 0 0 black, 0 2px black, 2px 0 black, 0 0 black;
  z-index: 2000;
}

.botaoProsseguir {
  position: absolute;
  min-width: 100px;
  min-height: 30px;
  display: inline-flex;
  font-family: 'Pixelada';
  font-size: 22px;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.3px;
  font-weight: 700;
  background: #fff;
  border: none;
  border-radius: 1000px;
  box-shadow: 2px 0 20px #d64bc4, 0 2px 8px black, 2px 0 black, 0 -2px black;
  transition: all 0.3s ease-in-out 0s;
  cursor: pointer;
  outline: none;
  padding: 10px;
  left: 46%;
  top: 85%;
  color: #2c002c;
  z-index: 2000;
  text-decoration: none;
}

.botaoProsseguir::before {
  content: '';
  border-radius: 1000px;
  min-width: calc(120px + 12px);
  min-height: calc(50px + 12px);
  border: 4px solid #dacbd6;
  box-shadow: 0 0 60px rgb(230, 129, 208);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all .3s ease-in-out 0s;
}

.botaoProsseguir:hover,
.botaoProsseguir:focus {
  transform: translateY(-6px);
}

.botaoProsseguir:hover::before,
.botaoProsseguir:focus::before {
  opacity: 1;
}

.botaoProsseguir::after {
  content: '';
  width: 30px;
  height: 30px;
  border-radius: 100%;
  border: 4px solid #dacbd6;
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ring 1.5s infinite;
}

.botaoProsseguir:hover::after,
.botaoProsseguir:focus::after {
  animation: none;
  display: none;
}

@keyframes ring {
  0% {
    width: 30px;
    height: 30px;
    opacity: 1;
  }

  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

h2 {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  font-size: x-large;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  background: -webkit-linear-gradient(#695c69, #0b1991);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

#leadboard {
  background: transparent;
  border-radius: 10px;
  transition: all 0.3s ease-in-out 0s;
  cursor: pointer;
  width: 100%;
  font-family: "Pixelify Sans", sans-serif;
  height: 35px;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
  font-weight: bold;
  color: white;
  font-size: medium;
  border: none;
  text-shadow: -2px 0 20px #eed211, 0 2px 8px black, 2px 0 black, 0 -2px black;

}

#leadboard:hover,
#leadboard:focus {
  transform: translateY(-2px);
}

#highscoreMenu {
  margin-left: 10px;
  width: 100%;
  height: 100%;
  bottom: 0;
  column-count: 3;
  column-fill: auto;
  font-family: 'Pixelada';
}

#highscoreMenu p {
  width: 300px;
  font-weight: bolder;
  font-size: smaller;
  opacity: 1;
  text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
  color: #fff;
}

#comandantes {
  margin-left: 10px;
  margin-top: 10px;
  width: 25%;
  height: 70%;
  z-index: 2000;
}

#areaHigh {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  z-index: 2000;
  opacity: 0.8;
}

#creditos {
  text-align: center;
  color: #cb9bde;
  text-shadow: 3px 3px 2px rgb(112, 8, 112);
}

#creditos p {
  font-family: 'Pixelada';
}

.menu-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin-left: 20%;
  padding: 0 40px;
  border: 3px solid #ae74c9;
  background-color: #0000008c;
  border-radius: 16px;
  height: 200px;
  width: 600px;
  bottom: 110px;
  position: absolute;
}


@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: black; }
}

.typed-text {
  font-family: 'Pixelada';
  margin-top: 5%;
  font-size: 17px;
  overflow: hidden;
  border-right: .15em solid transparent;
  color: white;
  max-width: 100%;
}