/* ---- reset ---- */
@import url('https://fonts.googleapis.com/css2?family=Caveat&family=Dancing+Script&display=swap');

html {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
*,
*:before,
*:after {
  -webkit-box-sizing: inherit;
  box-sizing: inherit;
}

textarea:focus, input:focus{
  outline: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #5f5f5f;
  font-weight: bold;
}


/* ---- layout ---- */
/* ---- splashScreen1 ---- */
.splashScreen1 {
  width: 100%;
  height: 100vh;
  background: url(../img/splash-1-background.gif);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  text-align: center;
}

.splashScreen1 h2 {
  margin-top: 0;
  margin-bottom: 10%;
  font-size: 40px;
}

.text-box {
  margin-left: 44vw;
  margin-top: 42vh;
}

.btn:link,
.btn:visited {
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 40px;
  display: inline-block;
  border-radius: 100px;
  transition: all 0.2s;
  position: absolute;
  left: 43%;
  bottom: 25%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.btn-white {
  background-color: rgb(139, 131, 131);
  color: rgb(255, 255, 255);
}

.btn::after {
  content: "";
  display: inline-block;
  height: 100%;
  width: 100%;
  border-radius: 100px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  transition: all 0.4s;
}

.btn-white::after {
  background-color: rgb(139, 131, 131);
}

.btn:hover::after {
  transform: scaleX(1.4) scaleY(1.6);
  opacity: 0;
}

.btn-animated {
  animation: moveInBottom 5s ease-out;
  animation-fill-mode: backwards;
}

@keyframes moveInBottom {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

/* ---- splashScreen2 ---- */

.splashScreen2 {
  width: 100%;
  height: 100vh;
  background: url(../img/splash-2-background.gif);
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  color: rgb(223, 223, 223);
  text-align: center;
}

.splashScreen2 p {
  background-color: rgba(15, 15, 15, 0.589);
  border-radius: 25px;
  border: 2px solid #000000;
  padding: 20px;
  width: 40%;
  position: absolute;
  left: 55%;
  top: 1%;
  font-family: 'Caveat';
  font-weight: 100;
  font-size: 2vw;
}

.splashScreen2 input {
  font-family: 'Caveat';
  font-size: 28px;
  border-radius: 25px;
  padding: 10px;
  text-align: center;
  position: absolute;
  left: 57%;
  top: 70%;
}

#name-button {
  padding-top: 20px;
  padding-left: 25px;
  padding-right: 25px;
  height: 55px;
  left: 77%;
  top: 70%;
}

/* ---- game ---- */

.game-container {
  width: 100%;
  height: 100vh;
  background-color: black;
  color: white;
  background: url(../img/dungeon.gif);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.canvas-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.canvas-container canvas {
  height: 70%;
  width: 63%;
  margin-bottom: 8%;
  margin-right: 2%;
}

#p-key {
  height: 100px;
  position:absolute;
  left: 5%;
  top: 20%;
}

#wasd-keys {
  height: 200px;
  position:absolute;
  left: 2%;
  top: 40%;
}

#p-text {
  width: 15%;
  position:absolute;
  left: 17%;
  top: 18%;
}

#wasd-text {
  width: 15%;
  position:absolute;
  left: 17%;
  top: 45%;
}

/* ---- Game Over ---- */

.game-over-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.game-over-screen img{
  margin-bottom: 0;
}

#restart-button {
  padding-top: 20px;
  padding-left: 25px;
  padding-right: 25px;
  margin-top: 30px;
  height: 55px;
  position: relative;
  left: 0px;
}
