@font-face {
  font-family: "digitalDisco";
  src: url("fonts/DigitalDisco.ttf") format("truetype");
  font-display: swap;
}

body {
  background-image: url(./img/body_bg/body_bg.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: digitalDisco, Arial, Helvetica, sans-serif;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: url("img/cursor/cursor_1.png"), auto;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

h1 {
  font-size: 60px;
  letter-spacing: 5px;
  text-shadow: 2px 3px 5px rgba(0, 0, 0, 0.5);
}

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

.start_game_btn {
  width: 90%;
  border: none;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.589);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0px 25px 80px rgba(0, 0, 0, 0.5);
}

.start_game_btn:disabled {
  pointer-events: none;
}

.start_game_btn img {
  width: 100%;
}

.start_game_btn:hover {
  cursor: url("img/cursor/cursor_2.png"), auto;
  background-color: rgba(0, 0, 0, 0.801);
  border-color: rgba(255, 255, 255, 0.774);

  p {
    color: rgb(255, 255, 255);
  }
}

.in_game_buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.in_game_buttons:disabled {
  pointer-events: none;
}

.in_game_buttons.visible {
  visibility: visible !important;
  opacity: 1 !important;
}

.in_game_buttons button {
  background-color: transparent;
  border: none;
  transition: all 0.2s ease-in-out;
}

.in_game_buttons img {
  height: 45px;
}

.controls {
  background-color: transparent;
  border: none;
  position: absolute;
  top: 30px;
  right: 30px;
  animation: float 2s ease-in-out infinite;
}

.howto {
  background-color: transparent;
  border: none;
  position: absolute;
  top: 30px;
  left: 30px;
  animation: float 2s ease-in-out infinite;
}

.impressum {
  background-color: transparent;
  border: none;
  position: absolute;
  bottom: 45px;
  left: 20px;
  padding: 10px 15px;
  border-radius: 10px;
  background-color: rgba(20, 18, 18, 0.644);
  transition: all 0.2s ease-in-out;
}

.impressum:hover {
  background-color: rgba(37, 37, 37, 0.856);
}

.copyright {
  color: white;
  position: absolute;
  bottom: 0;
  left: 30px;
  border-radius: 10px;
}

.howto_container {
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.705);
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  height: 720px;
  width: 1280px;
}

.howto_content {
  display: flex;
  position: relative;
  border-radius: 40px;
  padding: 50px 100px;
  background-color: rgba(0, 0, 0, 0.966);
  gap: 30px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 55%;
  font-size: 38px;
  letter-spacing: 3px;
  text-align: center;
  box-shadow: rgba(185, 189, 190, 0.582) 0px 2px 4px 0px,
    rgba(151, 164, 170, 0.637) 0px 2px 16px 0px;
}

.howto_content p {
  margin: 0;
}

.impressum_container {
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.705);
  position: absolute;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  height: 720px;
  width: 1280px;
}

.impressum_content {
  display: flex;
  position: relative;
  border-radius: 40px;
  padding: 90px 100px;
  background-color: rgba(0, 0, 0, 0.966);
  gap: 100px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 60%;
  font-size: 30px;
  letter-spacing: 3px;
  text-align: center;
  box-shadow: rgba(185, 189, 190, 0.582) 0px 2px 4px 0px,
    rgba(151, 164, 170, 0.637) 0px 2px 16px 0px;
}

.impressum_content h5 {
  color: rgb(253, 213, 213);
  letter-spacing: 5px;
  margin: 0 0 20px 0;
  font-size: 40px;
}

.impressum_content p {
  margin: 0;
}

.close_button {
  position: absolute;
  top: 30px;
  right: 30px;
  transition: all 0.2s ease-in-out;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.controls:hover,
.howto:hover,
.impressum:hover,
.close_button:hover,
.endscreen_buttons:hover button,
.endscreen_social:hover a,
.in_game_buttons:hover button,
#mobile_buttons button {
  cursor: url("img/cursor/cursor_2.png"), auto;
}

.controls:hover::after {
  content: "Controls";
  position: absolute;
  top: 50%;
  left: -230px;
  transform: translateY(-50%);
  background-color: rgba(20, 18, 18, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 40px;
  letter-spacing: 2px;
  font-family: digitalDisco;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  opacity: 1;
  pointer-events: none;
}

.howto:hover::after {
  content: "How to play";
  position: absolute;
  top: 50%;
  right: -300px;
  transform: translateY(-50%);
  background-color: rgba(20, 18, 18, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 40px;
  letter-spacing: 2px;
  font-family: digitalDisco;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  opacity: 1;
  pointer-events: none;
}

.impressum p {
  color: white;
  font-family: digitalDisco, Arial, Helvetica, sans-serif;
  font-size: 25px;
  margin: 0;
}

.controls img {
  transition: transform 0.3s ease;
  height: 80px;
  width: 80px;
}

.howto img {
  transition: transform 0.3s ease;
  height: 80px;
  width: 80px;
}

.controls:hover img,
.howto:hover img,
.impressum:hover,
.close_button:hover {
  transform: scale(1.1);
}

canvas {
  transition: opacity 1.5s ease-in-out;
  opacity: 0;
  background-color: black;
  display: block;
}

#start_screen {
  background-image: url(./img/start_screen/start_city.png);
  opacity: 1;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  margin-bottom: 100px;
  height: 720px;
  width: 1280px;
  transition: opacity 2s ease-in-out, visibility 2s ease-in-out;
  background-color: rgba(0, 0, 0, 0);
  visibility: visible;
}

#end_screen {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.95);
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 100px;
  margin-bottom: 100px;
  height: 720px;
  width: 1280px;
  visibility: hidden;
  transition: opacity 2s ease-in-out;
}

#win_screen {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.95);
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 100px;
  margin-bottom: 100px;
  height: 720px;
  width: 1280px;
  visibility: hidden;
  transition: opacity 2s ease-in-out;
}

.game_over,
.you_win,
.trophy {
  height: 350px;
}

.trophy {
  animation: float 2s ease-in-out infinite;
}

#end_screen button {
  border: none;
  background-color: transparent;
  color: white;
}

.endscreen_buttons {
  display: flex;
  gap: 150px;
  justify-content: space-between;
}

.endscreen_buttons button {
  position: relative;
  border: none;
  background-color: transparent;
  color: white;
  transition: transform 0.3s ease;
}

.endscreen_buttons button img.arrow {
  position: absolute;
  left: -60px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  height: 40px;
  animation: pulse 1s infinite ease-in-out;
}

.endscreen_buttons button:hover img.arrow {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(0.9);
  }
  50% {
    transform: translateY(-50%) scale(1);
  }
}

.in_game_buttons button:hover {
  transform: scale(1.2);
}

.endscreen_buttons button:hover {
  transform: scale(1.05);
}

.endscreen_buttons img {
  height: 60px;
}

.endscreen_social {
  position: absolute;
  gap: 15px;
  left: 30px;
  top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.endscreen_social img {
  transition: transform 0.3s ease;
  height: 50px;
}

.endscreen_social img:hover {
  transform: scale(1.1);
}

@media only screen and (max-height: 1050px) {
  h1 {
    font-size: 40px;
    margin-bottom: 0px;
  }

  #start_screen,
  #end_screen,
  #win_screen {
    margin-bottom: 100px;
  }

  .instructions {
    margin-top: 20px !important;
  }

  .description {
    height: 150px;
  }

  .description img {
    height: 60px !important;
    width: 60px !important;
  }

  .description .spacebar {
    width: 180px !important;
  }

  .description p {
    font-size: 30px !important;
  }
}

@media only screen and (max-height: 900px) {
  .instructions {
    display: none !important;
  }

  #start_screen,
  #end_screen,
  #win_screen {
    margin-bottom: 0 !important;
  }

  .canvas_wrapper {
    margin-top: -70px;
  }

  .mobile_instructions {
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.705);
    position: absolute;
    justify-content: center;
    align-items: center;
    color: white;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .instructions_content {
    display: flex;
    position: relative;
    border-radius: 40px;
    padding: 8vw 3vw;
    background-color: rgba(0, 0, 0, 0.966);
    gap: 10px;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    width: 80%;
    box-shadow: rgba(185, 189, 190, 0.582) 0px 2px 4px 0px,
      rgba(151, 164, 170, 0.637) 0px 2px 16px 0px;
  }
}

@media only screen and (max-width: 1280px) {
  canvas,
  #start_screen,
  #end_screen,
  #win_screen {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  h1 {
    margin: 0 0 45px 0;
  }

  .game_over,
  .you_win,
  .trophy {
    height: 30vw;
  }

  .endscreen_buttons {
    gap: 10vw;
  }

  .endscreen_buttons img {
    height: 4vw;
  }

  .endscreen_social {
    left: 2vw;
    top: 2vw;
  }

  .endscreen_social img {
    height: 4vw;
  }

  .howto_container,
  .impressum_container {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .howto_content,
  .impressum_content {
    width: 60%;
    padding: 5vw;
    font-size: 3vw;
  }

  .impressum_content h5 {
    font-size: 4vw;
  }

  .controls img,
  .howto img {
    width: 65px;
    height: 65px;
  }

  .instructions {
    margin-top: 15px !important;
  }

  .description {
    margin-top: 20px;
    min-width: 150px !important;
  }

  .description p {
    font-size: 2.5vw !important;
  }

  .description img {
    height: 7vw !important;
    width: 7.8vw !important;
  }

  .description .spacebar {
    width: 25vw !important;
  }
}

@media only screen and (max-width: 920px) {
  #start_screen,
  #end_screen,
  #win_screen {
    display: none;
    margin: 0;
    aspect-ratio: 19/9;
    gap: 50px;
  }

  .canvas_wrapper {
    margin-top: 0 !important;
  }

  .endscreen_buttons button {
    border: solid 2px rgb(243, 183, 72) !important;
    border-radius: 20px;
    padding: 15px;
  }

  .game_over,
  .you_win,
  .trophy {
    height: 25vw;
  }

  canvas {
    aspect-ratio: 19/9;
  }

  #fullscreen_button {
    display: none;
  }

  .howto_content {
    padding: 2vw;
  }

  .close_button {
    height: 50px;
    top: 20px;
    right: 25px;
  }

  .mobile_instructions {
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.705);
    position: absolute;
    justify-content: center;
    align-items: center;
    color: white;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .instructions_content {
    display: flex;
    position: relative;
    border-radius: 40px;
    padding: 8vw 3vw;
    background-color: rgba(0, 0, 0, 0.966);
    gap: 10px;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    width: 80%;
    box-shadow: rgba(185, 189, 190, 0.582) 0px 2px 4px 0px,
      rgba(151, 164, 170, 0.637) 0px 2px 16px 0px;
  }

  .instructions {
    display: none !important;
  }

  .impressum {
    bottom: 30px;
  }

  .impressum_content {
    padding: 2vw;
    gap: 50px;
  }

  h1 {
    display: none !important;
  }
}

.mobile_instructions {
  display: none;
}

.instructions {
  opacity: 0;
  margin-top: 50px;
  display: flex;
  gap: 50px;
  transition: opacity 0.5s ease-in-out;
}

.description {
  min-width: 180px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.description img {
  height: 90px;
  width: 100px;
}

.description p {
  font-size: 35px;
}

.spacebar {
  width: 500px !important;
}

#rotate_screen_overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 25px;
  font-weight: bold;
  z-index: 9999;
}

#mobile_buttons {
  position: absolute;
  bottom: 10px;
  width: 98%;
  display: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#mobile_buttons button {
  background: rgba(255, 255, 255, 0.144);
  border: solid 2px rgba(77, 77, 77, 0.664);
  border-radius: 500px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#mobile_buttons img {
  height: 28px;
  width: 25px;
  padding: 10px;
}

.right_side,
.left_side {
  display: flex;
  flex-direction: row;
  gap: 15px;
  align-items: center;
  justify-content: center;
}
