* {
  margin: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "zabras";
  src: url("fonts/zabars.ttf") format("truetype");
}

@font-face {
  font-family: "electrolize";
  src: url(fonts/electrolize-v18-latin-regular.woff2) format("woff2");
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: "zabras", monospace, "Segoe UI", Tahoma, Verdana, sans-serif;
  min-height: 100vh;
  max-height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  animation: backgroundSwap 100s infinite;
}

@keyframes backgroundSwap {
  0% {
    background-image: url("img/orientation_images/background-image1.webp");
  }
  25% {
    background-image: url("img/orientation_images/background-image2.webp");
  }
  50% {
    background-image: url("img/orientation_images/background-image3.webp");
  }
  100% {
    background-image: url("img/orientation_images/background-image1.webp");
  }
}

h1 {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 4vh;
  font-size: 60px;
  letter-spacing: 5px;
  text-shadow: 4px 4px 2px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

h2 {
  font-size: 30px;
  letter-spacing: 5px;
  text-shadow: 4px 4px 2px rgba(0, 0, 0, 0.8);
  margin-top: 5vh;
}

#rotate-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 30px;
  font-family: "Courier New", Courier, monospace;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 5;
}

#rotate-warning-image {
  animation: photo-animation 5s infinite;
  width: 70px;
  height: 130px;
  background-color: white;
  border-radius: 10px;
  margin-top: 100px;
}

@keyframes photo-animation {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-45deg);
  }
}

canvas {
  display: none;
  max-height: 100vh;
  border-radius: 16px;
}

#mute-sound,
#unmute-sound {
  position: absolute;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

#full-screen-image {
  position: absolute;
  width: 25px;
  height: 25px;
  cursor: pointer;
}

#game-controls-div {
  display: none;
  z-index: 2;
  max-width: 720px;
  width: 100%;
  justify-content: space-between;
}

.control-small-div-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

#Jump-high {
  height: 40px;
  width: 40px;
  cursor: pointer;
  background-color: rgb(189, 135, 88);
  border-radius: 50%;
}
#throw-bottle {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;
  cursor: pointer;
  background-color: rgb(189, 135, 88);
  border-radius: 50%;
  border: solid 2px white;
  margin-left: 16px;
  box-sizing: border-box;
  padding-right: 8px;
  padding-left: 4px;
}

.throw-bottle-image {
  width: 20px;
  height: 20px;
}

#stop-game,
#play-game {
  margin-top: 4px;
  font-size: 24px;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  background-color: rgb(234, 125, 30);
  margin-left: 16px;
}

#go-left {
  height: 40px;
  width: 40px;
  cursor: pointer;
  background-color: rgb(189, 135, 88);
  border-radius: 50%;
  margin-right: 16px;
}

#go-right {
  height: 40px;
  width: 40px;
  cursor: pointer;
  background-color: rgb(189, 135, 88);
  border-radius: 16px;
  border-radius: 50%;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
}

#restartButton {
  position: absolute;
  display: none;
  padding: 10px 20px;
  font-size: 20px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  z-index: 1;
  top: 20vh;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse 8s infinite;
}

#startButton {
  position: absolute;
  padding: 10px 20px;
  font-size: 20px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  z-index: 1;
  top: 20vh;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse 8s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    background-color: transparent;
  }
  50% {
    transform: translateX(-50%) scale(1.5);
    background-color: rgb(234, 125, 30);
  }
}

#endImage {
  position: fixed;
  max-width: 1400px;
  top: 25%;
  width: 80%;
  height: 60vh;
  background-color: rgba(103, 98, 98, 0.8);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
}

footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  font-size: 24px;
  background-color: rgb(55, 54, 53);
  position: absolute;
  bottom: 0;
}

#games-explanation {
  display: none;
  position: fixed;
  top: 0;
  max-width: 720px;
  width: 100%;
  height: 100%;
  font-size: 30px;
  font-family: "Courier New", Courier, monospace;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1;
  overflow: auto;
}

#show-games-explanation-div {
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 50%;
  background-color: rgb(183, 132, 87);
}

#show-games-explanation-div:hover {
  background-color: rgb(234, 125, 30);
  scale: 0.8;
}

#games-explanation {
  display: none;
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  font-size: 30px;
  padding-top: 100px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1;
}

.hide-games-explanation-div {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 15%;
  top: 20px;
  right: 20px;
  cursor: pointer;
}

.explanation-text {
  font-size: 20px;
  font-family: "electrolize", sans-serif;
  margin-top: 38px;
  padding: 8px;
  overflow: auto;
  border: 0px solid rgb(27, 24, 24);
  scroll-behavior: smooth;
  scrollbar-color: rgb(234, 125, 30) rgb(27, 24, 24);
}

a {
  color: white;
  font-family: "electrolize", sans-serif;
  font-size: 32px;
}

a:hover {
  color: rgb(234, 125, 30);
  text-decoration: none;
}

@media only screen and (max-width: 720px) {
  body {
    max-width: 100%;
  }
  canvas {
    width: -webkit-fill-available; 
    max-width: 100% !important;
    height: 100vh !important;
    border-radius: none;
  }

  #game-controls-div {
    position: absolute;
    bottom: 0;
  }
}

@media screen and (max-width: 480px) {
  body {
    max-height: 100vh;
  }

  a {
    font-size: 20px;
  }

  #startButton {
    top: 14vh;
  }
}
