/* ---- reset ---- */

html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
}



/* ------------------------- MAIN ---------------------- */

html {
  background: #FAFAFA;
}

.container {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

@keyframes Gradient {
	0% {
		background-position: 0% 50%
	}
	50% {
		background-position: 100% 50%
	}
	100% {
		background-position: 0% 50%
	}
}


/* ------------------------ SPLASH SCREEN ----------------------- */


.splash-screen {
  margin-left: 15%;
  margin-top: 10%;
  height: 600px;
  width: 70%;
  border: solid 2px black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: #484747;
  border: 6px solid hsl(0, 100%, 50%);
  border-radius: 10px;
  -webkit-animation: rainbow 5s infinite alternate;
}

.splash-screen h1 {
  font-family: 'Lobster', cursive;
  font-size: 50px;
  color: #FCFCFC;
}

.splash-screen button {
  width: 180px;
  height: 70px;
  text-transform: uppercase;
  margin: 1% auto;
  font-weight: bold;
  background: gray, 0.1;
  border-radius: 10px;
  font-family: 'Open Sans Condensed', sans-serif;
  font-size: 20px;
  color: #FCFCFC;
}

.start-game-button {
  color: #FCFCFC;
  background: #5EFA4F;
  border: 2px solid #5EFA4F;
  transform: translate(0);
  transition-duration: 0.3s;
  font-size: 20px;
}

.start-game-medium {
  color: #FCFCFC;
  background: #FBC910;
  border: 2px solid #FBC910;
  transform: translate(0);
  transition-duration: 0.3s;
  text-shadow: #484747;
  font-size: 20px;
}

.start-game-hard {
  color: #FCFCFC;
  background: #FD2D23;
  border: 2px solid #FD2D23;
  transform: translate(0);
  transition-duration: 0.3s;
  font-size: 20px;
}

.select-player {
  background: #df80ff;
  border: 2px solid #df80ff;

}


.splash-screen button:hover {
  transform: scale(1.1);
}


@-webkit-keyframes rainbow {
  0% {border-color: hsl(0, 100%, 50%);}
  100% {border-color: hsl(255, 100%, 50%);}
}

/* ----------------------------------- SELECT PLAYER ---------------------- */

  .player-container {
  margin: 5% auto;
  height: 600px;
  width: 70%;
  border: solid 2px black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: #484747;
  border: 6px solid hsl(0, 100%, 50%);
  border-radius: 10px;
  -webkit-animation: rainbow 5s infinite alternate;
  }

  .player-container h1 {
    font-family: 'Lobster', sans-serif;
    font-size: 40px;
    color: #FCFCFC;
    padding-bottom: 10%;
    margin: 0 auto;
  }

  .player-container button {
    border-radius: 50%;
    height: 90px;
    background: #8585e0;
    border: none;
    color: #FCFCFC;
    font-family: 'Open Sans Condensed', sans-serif;
    font-size: 20px;
    font-weight: bold;
  }

  .player-container img {
    width: 100px;
    height: 150px;
    padding-bottom: 20px;
    
  }

  .main-div {
    display: flex;
    justify-content: space-between;
    padding-left: 20%;
    padding-right: 20%;
    
  }

  .car-one {
    display: flex;
    flex-direction: column;
    margin: 5% auto;
  }

  .car-two {
    display: flex;
    flex-direction: column;
    margin: 5% auto;
  }

  .player-container button:hover {
    transform: scale(1.1);
  }

/* ----------------------------------- GAME SCREEN ------------------------- */

.game-container {
  display: flex;
  width: 80%;
  height: 70%;
  margin-left: 10%;
  margin-top: 5%;
  margin-bottom: 5%;
  background-image: url('Images/grassOne.jpg');
  border: 2px solid #FAFAFA;
  border-radius: 10px;
  
}


.game-screen {
  width: 430px;
  height: 795px;
  margin: 0 auto;
  
}

.main-canvas {
  background-image: url('Images/carretera.jpg');
}

.game-container h2 {
  font-family: 'Open Sans Condensed', sans-serif;
  text-transform: uppercase;
  font-size: 30px;
  color: #FAFAFA;
  animation: color-change 1s infinite;
  height: 50px;
  width: 230px;
  background: #FAFAFA;
  text-align: center;
  border-radius: 10px;
  padding-top: 5px;
  margin-left: 10%;
  margin-top: 10%;  
}


@-webkit-keyframes color-change {
  0% { 
    color: red;
    box-shadow: 0 0 0 0px rgba(0, 0, 0, 0.2);
   }
  50% { color: blue; }
  100% { color: red;
    box-shadow: 0 0 0 35px rgba(0, 0, 0, 0);
  }
}

/* ------------- GAME OVER SCREEN ----------------- */

.game-over-screen {
  display: flex;
  margin: 10% auto;
  flex-direction: column;
  text-align: center;
  text-transform:  uppercase;
  height: 600px;
  width: 70%;
  background: #484747;
  border: 6px solid hsl(0, 100%, 50%);
  border-radius: 10px;
  -webkit-animation: rainbow 5s infinite alternate;
  
}

.game-over-screen button {
  width: 180px;
  height: 70px;
  text-transform: uppercase;
  margin: 1% auto;
  font-weight: bold;
  font-family: 'Open Sans Condensed', sans-serif;
  
}

.game-over-screen h1 {
  font-family: 'Lobster', sans-serif;
  color: #FAFAFA;
  font-size: 40px;
  margin-top: 10%;
}

.game-over-screen h2 {
  font-family: 'Open Sans Condensed', sans-serif;
}

.game-over-screen {
  color: #FAFAFA;
}

.restart-button {
  background: #8585e0;
  border-radius: 10px;
  border: 2px solid #8585e0;
  color: #FAFAFA;
  font-size: 20px;
  font-weight: bold;
  margin-left: 10px;
  width: 180px;
  height: 70px;
  font-family: 'Open Sans Condensed', sans-serif;
  font-weight: bold;
}

.change-difficulty-button {
  background: #df80ff;
  border-radius: 10px;
  border: 2px solid #df80ff;
  color: #FAFAFA;
  font-size: 20px;
  font-weight: bold;
  margin-left: 10px;
  margin-bottom: 1%;
  width: 180px;
  height: 70px;
  font-family: 'Open Sans Condensed', sans-serif;
  font-weight: bold;
}


.restart-button:hover {
  transform: scale(1.1);
}
.change-difficulty-button:hover {
  transform: scale(1.1);
}

/* ------------- HIGH SCORE SCREEN ----------------- */

.high-score-screen {
  margin-left: 15%;
  margin-top: 10%;
  height: 600px;
  width: 70%;
  border: solid 2px black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: #484747;
  border: 6px solid hsl(0, 100%, 50%);
  border-radius: 10px;
  -webkit-animation: rainbow 5s infinite alternate;
}

.high-score-screen div {
  display: flex;
  flex-direction: column;
}

.high-score-screen h1 {
  font-family: 'Lobster', sans-serif;
  font-size: 50px;
  color: #FAFAFA;
  margin: 0 auto;
}

.high-score-screen ul {
  list-style: none;
  font-family: 'Open Sans Condensed', sans-serif;
  color: #FAFAFA;
  font-size: 30px;
  text-align: center;
  margin: 0 auto;
  padding-top: 5%;
  padding-right: 5%;
}

.high-score-button {
  border: 2px solid hsl(0, 100%, 50%);
  border-radius: 10px;
  -webkit-animation: rainbow 5s infinite alternate;
  font-family: 'Open Sans Condensed', sans-serif;
  color: #FAFAFA;
  background: #484747;
  font-size: 20px;
}

.go-start-screen {
  color: #FAFAFA;
  font-size: 20px;
  font-family: 'Open Sans Condensed', sans-serif;
  margin: 1% auto;
  background: #df80ff;
  border: 2px solid #df80ff;
  border-radius: 10px;
  width: 100px;
  height: 40px;
}

.go-back {
  color: #FAFAFA;
  font-size: 20px;
  font-family: 'Open Sans Condensed', sans-serif;
  background: #8585e0;
  border-radius: 10px;
  border: 2px solid #8585e0;
  width: 100px;
  height: 40px;
  margin: 0 auto;
}



/* ------------------- MEDIA QUERY ---------------------- */


@media (min-width: 600px) and (max-width: 700px) {
  .game-screen {
    width: 190px;
    height: 795px;
    margin: 0 auto;
  }
}

@media (min-width: 705px) and (max-width: 900px) {
  .game-screen {
    width: 220px;
    height: 795px;
    margin: 0 auto;
  }
  .car-one {
    display: flex;
    flex-direction: column;
    margin-right: 20%;
  }

  .car-two {
    display: flex;
    flex-direction: column;
    margin-right: 20%;
  }
}

