html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "zabars";
  scroll-behavior: smooth;
}

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

:root {
  --backgroundsnohover: #ff9500c2;
  --backgroundshover: #ff9500;
}

.game-location {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-position: center;
  background-image: url("img/5_background/game_background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  margin: 0;
}

.start-button {
  width: 150px;
  height: 80px;
  border-radius: 50px;
  background-color: var(--backgroundsnohover);
  font-family: "zabars";
  font-size: 24px;
}

.start-button:hover {
  cursor: pointer;
  background-color: var(--backgroundshover);
  transform: scale(120%);
}

.main-content {
  display: flex;
  flex-direction: column;
}

.start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

.start-screen-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
}

.bottom-button {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 350px;
  gap: 10px;
}

.start-screen-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

.start-screen-position {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.start-screen-position img {
  width: 722px;
  height: 480px;
  border: 5px solid black;
  border-radius: 20px;
}

.end-screen-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

.end-screen-position {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
}

@keyframes popIn {
  0% {
    transform: scale(0.1); /* Start ganz klein */
  }
  70% {
    transform: scale(1.2); /* Schnell groß werden (leicht größer als Zielgröße) */
  }
  90% {
    transform: scale(0.95); /* Etwas kleiner zurückschwingen */
  }
  100% {
    transform: scale(0.75); /* Endgröße */
  }
}

.end-screen-position img {
  width: 422px;
  height: 350px;
  border-radius: 20px;
  z-index: 1;
  animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.end-screen-background {
  position: absolute;
  width: 720px;
  height: 480px;
  border-radius: 15px;
  background-color: #f4a322;
  z-index: 0;
}

.end-screen-buttons {
  position: absolute;
  margin-top: 300px;
  z-index: 200;
}

.end-screen-buttons-positions {
  display: flex;
  gap: 40px;
}

@keyframes fadeInButton {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.end-screen-button {
  width: 140px;
  height: 70px;
  border-radius: 40px;
  background-color: var(--backgroundsnohover);
  font-family: "zabars";
  font-size: 24px;
  opacity: 0; /* Start transparent */
  animation: fadeInButton 1.2s ease-in forwards; /* Dauer und Animation */
}

.end-screen-button:hover {
  cursor: pointer;
  background-color: var(--backgroundshover);
}

.top-buttons {
  display: flex;
  justify-content: end;
  width: 650px;
  gap: 20px;
}

.top-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 75px;
  height: 75px;
  border-radius: 50px;
  background-color: var(--backgroundsnohover);
}

.top-button:hover {
  cursor: pointer;
  background-color: var(--backgroundshover);
  transform: scale(120%);
}

.top-button img {
  width: 45px;
  height: 45px;
}

.top-button h2 {
  font-size: 12px;
}

canvas {
  background-color: black;
  border-radius: 20px;
  display: block;
}

.canvas-location {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.game-background {
  height: 100%;
  width: 100%;
  z-index: 0;
}




.overlay-impressum {
  width: 650px;
  height: 400px;
  border-radius: 30px;
  padding: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  margin: 20px;
  margin-left: 0;
  margin-top: 10px;
}

.overlay-impressum::-webkit-scrollbar {
  width: 4px;
  background: var(--backgroundsnohover);
}
.overlay-impressum::-webkit-scrollbar-thumb {
  background: rgb(124, 82, 2);
  border-radius: 40px;
}

.overlay-impressum::-webkit-scrollbar-thumb:hover {
  background: #ffffff;
}

.overlay-header-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overlay-header-area button {
  width: 30px;
  height: 30px;
  border-radius: 30px;
  border: 2px solid black;
  background-color: var(--backgroundsnohover);
  margin-bottom: 50px;
}

.overlay-header-area button:hover {
  background-color: var(--backgroundshover);
  cursor: pointer;
}

.overlay-story-header {
  margin-right: 10px;
}

.overlay-control-header {
  margin-right: 10px;
}

.control-buttons {
  width: 60px;
  height: 60px;
}

.game-control-buttons {
  width: 40px !important;
  height: 40px !important;
}

.control-buttons:hover {
  transform: scale(120%);
}

.control-buttons-space {
  width: 80px;
  height: 60px;
}

.control-buttons-space:hover {
  transform: scale(120%);
}

.game-control-buttons-space {
  width: 60px !important;
  height: 40px !important;
}

.svg-bg {
  fill: white;
  border-radius: 20px;
}

.d-none {
  display: none;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.681);
}

.overlay-location {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.overlay-info {
  width: 680px;
  height: 430px;
  background-color: #ff9500cb;
  border-radius: 30px;
  padding: 10px;
}

.overlay-content {
  padding-left: 20px;
}

.overlay-content h1 {
  font-size: 40px;
}

.overlay-content p {
  font-size: 24px;
}

.overlay-content a {
  font-size: 20px;
}

.overlay-header {
  font-size: 28px;
  font-weight: 800;
  font-style: italic;
  text-decoration: underline;
}

.overlay-layer {
  display: flex;
}

.overlay-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 30px;
  gap: 10px;
}

.mobile-overlay {
  display: none;
}

.overlay-cross {
  width: 40px;
  height: 40px;
}

.overlay-jump {
  width: 40px !important;
  height: 40px !important;
}

.overlay-bottle {
  width: 40px !important;
  height: 40px !important;
}

.overlay-txt {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 50px;
  gap: 5px;
}

.story-text {
  font-size: 28px;
}

.turn-device-overlay {
  display: none;
}

.turn-device {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: black;
  z-index: 100;
}

.turn-device-img {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

.turn-device-img svg {
  width: 100px;
  animation: turn-and-hold 2s ease-in-out infinite;
  transform-origin: 50% 50%;
}

@keyframes turn-and-hold {
  0% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(90deg);
  }
  80% {
    transform: rotate(90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.game-pad-visibility {
  display: none;
}

@media only screen and (max-width: 900px) {
  .canvas-location {
    margin-top: 0;
  }

  canvas {
    width: 100%;
    background-color: transparent;
    border-radius: 0;
  }

  .start-screen-position img {
    width: 100%;
    border: 0;
    border-radius: 0;
  }

  .end-screen-position img {
    width: 500px;
    height: 480px;
    border: 0;
    border-radius: 0;
  }

  .end-screen-background {
    width: 100%;
    border: 0;
    border-radius: 0;
  }

  .game-pad-position {
    margin-top: 0 !important;
  }
}

@media (max-width: 1400px) {

  .game-pad-responsiv {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
  }

  .game-pad-position {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 470px;
    margin-top: 150px;
  }

  .game-pad-actions {
    display: flex;
    justify-content: space-around;
    width: 720px;
    margin: 1px;
    gap: 300px;
  }

  .game-pad-action-button {
    width: 60px;
    height: 60px;
    border: 1.8px solid black;
    border-radius: 55px;
    background-color: var(--backgroundshover);
    box-sizing: border-box;
    padding: 8px;
  }

  .game-pad-movement {
    display: flex;
    justify-content: space-between;
    width: 710px;
    margin: 20px;
    margin-top: 0;
  }

  .game-pad-movement svg {
    width: 55px;
    height: 55px;
    background-color: rgb(0, 0, 0);
    border: 1.8px solid rgb(3, 3, 3);
    border-radius: 70px;
    fill: var(--backgroundshover);
  }

  .game-pad-position {
    height: 470px;
  }

  .game-pad-visibility {
    display: block;
  }

  .mobile-overlay {
    display: flex;
  }

  .browser-overlay {
    display: none !important;
  }

  .overlay-txt {
    gap: 2px;
  }
}

@media (max-width: 900px) {
  .start-screen-position {
    margin-top: 0;
    height: 480px;
  }

  .end-screen-position {
    height: 480px;
  }

  .canvas-location {
    height: 480px;
  }

  .end-screen-position {
    margin-top: 0;
  }

  .overlay-location {
    margin-top: 0;
    height: 100vh;
  }

  .overlay-info {
    height: 100vh;
    padding: 0;
    margin: 50px;
  }

  .overlay-impressum {
    width: 90%;
    height: 90vh;
  }

  .overlay-content p {
    font-size: 20px;
  }

  .overlay-content a {
    font-size: 16px;
  }

  .story-text {
    font-size: 25px;
  }

  .game-pad-responsiv {
    margin-top: 0;
  }

  .game-pad-actions {
    width: 100%;
  }
  .game-pad-movement {
    width: 100%;
  }

  canvas {
    border-radius: 0;
    border: 0 !important;
  }

  .start-screen-button {
    margin-top: 0;
    height: 400px;
  }

  .end-screen-buttons-positions {
    margin-top: 0;
    height: 130px;
  }

  .top-buttons {
    width: 550px;
    margin-top: 80px;
  }

  .bottom-button {
    align-items: center;
    height: 20px;
    margin-top: 270px;
  }

  .top-button {
    width: 65px;
    height: 65px;
  }

  .top-button img {
    width: 35px;
  }

  .start-button {
    width: 140px;
    height: 70px;
  }

  .game-pad-actions {
    gap: 350px !important;
  }

  .game-pad-action-button {
    width: 45px !important;
    height: 45px !important;
  }

  .game-pad-movement svg {
    width: 45px !important;
    height: 45px !important;
  }
}

@media (max-width: 750px) {
  .top-buttons {
    margin-top: 50px;
  }

      .story-text {
       padding-right: 20px ;
    }
}

@media (max-width: 580px) {
  .top-button {
    width: 55px;
    height: 55px;
    margin-top: 20px;
  }

  .top-button img {
    width: 30px;
  }

  .start-button {
    width: 130px;
    height: 60px;
  }

  .top-buttons {
    width: 460px;
  }

  .bottom-button {
    align-items: center;
    height: 150px !important;
    margin-top: 70px;
  }

  .game-pad-actions {
    gap: 200px !important;
  }

  .game-pad-action-button {
    width: 45px !important;
    height: 45px !important;
  }

  .game-pad-movement svg {
    width: 45px !important;
    height: 45px !important;
  }
}

@media (max-width: 460px) {
  .top-button {
    width: 55px;
    height: 55px;
    margin-top: 20px;
  }

  .top-button img {
    width: 30px;
  }

  .start-button {
    width: 130px;
    height: 60px;
  }

  .top-buttons {
    width: 380px;
  }

  .bottom-button {
    align-items: center;
    height: 280px;
    margin-top: 70px;
  }

  .end-screen-position img {
    width: 250px;
    height: 200px !important;
  }

  .end-screen-button {
    width: 120px;
    height: 50px;
    font-size: 20px;
  }

  .game-pad-action-button {
    width: 35px !important;
    height: 35px !important;
  }

  .game-pad-movement svg {
    width: 35px !important;
    height: 35px !important;
  }

  .story-text {
    font-size: 18px;
  }

  .overlay-content p {
  font-size: 18px;
}

.overlay-content a {
  font-size: 18px;
}
}

@media (max-width: 390px) {
  .top-buttons {
    width: 280px;
  }

  .game-pad-actions {
    gap: 150px !important;
  }
}

@media (max-height: 1100px) {
  .game-pad-position {
    margin-top: 280px;
  }

}

@media (max-height: 1000px) {
  .game-pad-position {
    margin-top: 250px;
  }
}

@media (max-height: 950px) {
  .game-pad-position {
    margin-top: 190px;
  }
}

@media (max-height: 910px) {
  .control-buttons {
    width: 40px;
    height: 40px;
  }

  .control-buttons-space {
    width: 60px;
    height: 40px;
  }

  .overlay-txt {
    gap: 2px;
  }

  h2 {
    font-size: 18px;
  }
}

@media (max-height: 800px) {
  .top-buttons {
    margin-top: 20px !important;
  }

  .game-pad-action-button {
    width: 55px;
    height: 55px;
  }

  .game-pad-movement img {
    width: 55px;
    height: 55px;
  }

  canvas {
    height: 480px;
  }

  .game-pad-position {
    margin-top: 120px;
  }
}

@media (max-height: 700px) {
  .game-pad-position {
    margin-top: 90px;
  }
}

@media (max-height: 585px) {
  .bottom-button {
    align-items: center;
    height: 260px !important;
    margin-top: 250px;
  }

  .top-buttons {
    margin-top: 170px !important;
  }

  .game-pad-actions {
    gap: 200px;
  }

  .game-pad-action-button {
    width: 55px;
    height: 55px;
  }

  .game-pad-movement svg {
    width: 45px;
    height: 45px;
  }

  .start-button {
    margin-top: 50px;
  }

  .top-buttons {
    margin-top: 60px;
  }

  .overlay-location {
    margin-top: 0;
    height: 97vh;
  }

  .overlay-info {
    height: 97vh;
    padding: 0;
    margin: 50px;
  }

  
  .overlay-impressum {
    height: 83vh;
  }


}

@media (max-height: 480px) {
  .bottom-button {
    align-items: center;
    height: 20px;
    margin-top: 230px;
  }

  .top-buttons {
    margin-top: 80px !important;
  }

  .start-button {
    margin-top: 0px;
  }
}

@media (max-height: 410px) {
  .top-buttons {
    margin-top: 40px !important;
  }

  .bottom-button {
    margin-top: 190px;
  }
}

@media (max-height: 380px) {
  .bottom-button {
    align-items: center;
    height: 250px;
    margin-top: 110px;
  }

  .start-screen-button {
    height: 310px;
  }

  .end-screen-position img {
    width: 300px !important;
  }

  .end-screen-button {
    width: 100px;
    height: 50px;
    font-size: 14px;
  }

  .start-screen-button {
    height: 100vh !important;
  }
}

@media only screen and (max-height: 605px) {
  canvas {
    height: 100vh;
  }

  .canvas-location {
    height: 100vh;
  }

  .start-screen-position {
    height: 100vh;
    margin-top: 0;
  }

  .start-screen-position img {
    height: 100vh;
  }

  .end-screen-position {
    height: 100vh;
    margin-top: 0;
  }

  .end-screen-button {
    margin-top: 0;
  }

  .start-screen-button {
    height: 350px;
    margin-top: 0;
  }

  .end-screen-position img {
    height: 100vh;
  }

  .end-screen-background {
    height: 100vh;
  }

  .game-pad-position {
    height: 100vh !important;
  }

  .game-pad-actions {
    gap: 350px;
  }

  .canvas-location {
    margin-top: 0;
  }

  canvas {
    width: 100%;
    background-color: transparent;
    border-radius: 0;
    border: 0 !important;
  }

  .game-pad-position {
    margin-top: 0 !important;
  }

  .start-screen-position img {
    width: 100%;
    border: 0;
    border-radius: 0;
  }
  .end-screen-position img {
    width: 500px;
    height: 480px;
    border: 0;
    border-radius: 0;
  }
  .end-screen-background {
    width: 100%;
    border: 0;
    border-radius: 0;
  }
}

@media (orientation: portrait) {
  .turn-device-overlay {
    display: block;
  }

  .end-screen {
    display: none;
  }
}
