@font-face {
  font-family: "zabras";
  src: url("fonts/Zabars.ttf") format("truetype");
}

@font-face {
  font-family: "roboto";
  src: url("fonts/Roboto-Italic-VariableFont_wdth,wght.ttf") format("truetype");
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "zabras", Arial, Helvetica, sans-serif;
  background-image: url("assets/img/desert.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0;
  height: 100vh;
}

footer {
  position: fixed;
  left: 0;
  bottom: 16px;
  width: 100%;
  color: white;
  text-align: center;
  font-size: 24px;
  z-index: 10;
}

a {
  text-decoration: none;
  color: black;
}

canvas {
  background-color: black;
  display: block;
}

#position-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 60px;
  position: relative;
  width: 720px;
}

h1 {
  font-size: 64px;
  margin-bottom: 20px;
}

h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

#explain-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

#controls {
  font-size: 32px;
  margin-bottom: 20px;
}

.d-none {
  display: none !important;
}

.d-flex {
  display: flex !important;
}

#start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("assets/img/9_intro_outro_screens/start/startscreen_1.png");
  background-position: center;
  background-size: 100% 100%;
  z-index: 5;
}

#start-screen button {
  position: relative;
  font-size: 18px;
  top: 35px;
  height: 25px;
  width: 120px;
  background-color: #ffca1a;
  border: none;
  border-radius: 25px;
  color: black;
  cursor: pointer;
}

#start-screen button:hover {
  border-color: #ffff00;
  box-shadow: 0 0 20px rgba(255, 212, 13, 0.6);
}

#orientation-warning {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 28px;
  letter-spacing: 1px;
}

#orientation-warning p {
  margin: 0;
}

#mute-btn {
  position: absolute;
  right: 12px;
  top: 18px;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10;
}

#restart-icon {
  position: absolute;
  right: 48px;
  top: 18px;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10;
}

#disable-mobile-controll {
  position: absolute;
  right: 84px;
  top: 18px;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10;
}

#you-win {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 25%;
  left: 25%;
  width: 50%;
  height: 50%;
  background-position: center;
  background-size: cover;
  z-index: 5;
}

#game-over {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 25%;
  left: 25%;
  width: 50%;
  height: 50%;
  background-position: center;
  background-size: cover;
  z-index: 5;
}

:fullscreen #you-win,
:-webkit-full-screen #you-win,
:-moz-full-screen #you-win,
:-ms-fullscreen #you-win {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

:fullscreen #game-over,
:-webkit-full-screen #game-over,
:-moz-full-screen #game-over,
:-ms-fullscreen #game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#restart-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  background-color: #ffca1a;
  border: none;
  border-radius: 25px;
  color: black;
  cursor: pointer;
}

#main-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 86%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  background-color: #ffca1a;
  border: none;
  border-radius: 25px;
  color: black;
  cursor: pointer;
}

#restart-btn:hover {
  border-color: #ffff00;
  box-shadow: 0 0 20px rgba(255, 212, 13, 0.6);
}

#mobile-controll {
  display: none;
  justify-content: space-between;
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 10;
}

#mobile-controll img {
  font-size: 18px;
  height: 40px;
  width: 40px;
  background-color: #ffca1a;
  border: none;
  border-radius: 25px;
  color: black;
}

#left-right {
  display: flex;
  gap: 30px;
  margin-left: 40px;
}

#jump-throw {
  display: flex;
  gap: 30px;
  margin-right: 40px;
}

@media only screen and (max-width: 930px) {
  #position-canvas {
    width: 100%;
    margin-top: 0;
  }

  h1 {
    display: none;
  }
  #explain-controls {
    display: none;
  }
  
  canvas {
    width: 100%;
  }
}

@media only screen and (max-width: 960px) and (orientation: portrait) {
  #orientation-warning {
    display: flex;
  }
}

@media only screen and (max-height: 480px) {
  canvas {
    height: 100vh;
  }
}

@media (pointer: coarse) {
  #mobile-controll {
    display: flex !important;
  }

  #explain-controls {
    display: none;
  }
}
