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

body,
#gameScreen {
  overflow: hidden;
  touch-action: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-family: "zabras", Arial, Helvetica, sans-serif;
  background-image: url(./img/10_start_background/01.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#gameScreen {
  position: relative;
  max-height: 480px;
}

h1 {
  font-size: 64px;
  letter-spacing: 3px;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
  /* position: absolute; */
}

canvas {
  background-color: black;
  display: block;
}

#game-over-screen {
  width: 720px;
  height: 480px;
  position: absolute;

  .game-over-background,
  .game-over-write {
    width: 100%;
    height: 100%;
  }

  .game-over-write {
    z-index: 10;
    position: absolute;
  }
}

#start-screen,
#victory-screen {
  width: 720px;
  height: 480px;
  position: absolute;
  z-index: 10;
}

.game_over_background,
.start-background,
.victory-background {
  position: absolute;
  width: 720px;
  height: 480px;
  object-fit: cover;
}

.victory-background {
  z-index: -1;
  justify-content: center;
  align-items: center;
}

.victory-write {
  width: 100%;
  max-width: 400px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.restart-btn {
  position: absolute;
  z-index: 11;
  bottom: 20%;
  text-align: center;
  border: none;
  background-color: #ffc707;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  font-family: "zabras", Arial, Helvetica, sans-serif;
  font-size: 32px;
  color: black;
  border: solid transparent;
  border-radius: 10px;
  padding: 6px;
}

.restart-btn:hover {
  background-color: #ffd740;
  transition: background-color 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  transition: box-shadow 0.3s ease;
}

.description {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  font-size: 22px;
  background-color: #ffc707;
  z-index: 11;

  p {
    margin-block-start: 0;
    margin-block-end: 0;
  }
}

.impressum-description {
  position: absolute;
  top: 0;
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  font-size: 22px;
  background-color: transparent;
  z-index: 11;

  button {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-family: "zabras", Arial, Helvetica, sans-serif;
    font-size: 22px;
  }
  button:hover {
    background-color: #ffd740;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    transition: box-shadow 0.3s ease;
  }
}

.impressum-text,
.game-description {
  font-family: sans-serif;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 70%;
  max-height: 480px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 20px;
  box-sizing: border-box;
  font-size: 22px;
  overflow-x: auto;
  z-index: 12;
  scrollbar-color: #ffc707 #00000006;
  scrollbar-width: thin;

  button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffc707;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 22px;
  }

  button:hover {
    background-color: #ffd740;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    transition: box-shadow 0.3s ease;
  }
}

.description-mobile {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  font-size: 22px;
  background-color: transparent;
  z-index: 11;

  button {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px 4px;
    cursor: pointer;
  }
}

@media only screen and (max-width: 720px) {
  canvas,
  #gameScreen,
  #start-screen,
  #victory-screen,
  #game-over-screen {
    width: 100%;
  }

  h1 {
    display: none;
  }
}

@media only screen and (max-height: 480px) {
  canvas,
  #gameScreen,
  #start-screen,
  #victory-screen,
  #game-over-screen {
    /* height: 100vh; */
    height: 100%;
    width: 100vw;
  }

  .game_over_background,
  .start-background,
  .victory-background {
    width: 100vw;
    height: 100vh;
  }

  h1 {
    display: none;
  }
}

.sound-btn {
  position: absolute;
  top: 30px;
  right: 10px;
  z-index: 20;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.sound-btn:hover {
  background-color: #ffd740;
}

/* Overlays Animation */
.overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  position: absolute; /* wichtig: damit es nicht den Klick blockiert */
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Aktiver Button */
.button-active {
  background-color: #ffc740 !important; /* Oder eine andere schöne Farbe */
}

#btn-left,
#btn-right,
#btn-jump,
#btn-throw {
  touch-action: none;
  -ms-touch-action: none;
}
