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

* {
  margin: 0;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url(img/background.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  backdrop-filter: blur(7px);
  font-family: "zabras", Arial, Helvetica, sans-serif;
  overflow: hidden;
}

canvas {
  background-color: black;
  border-radius: 15px;
  display: none;
  z-index: 1;
}

h1 {
  font-size: 75px;
  letter-spacing: 10px;
  text-shadow: 5px 1px 1px rgba(250, 92, 0, 0.596);
  margin-bottom: 55px;
}

h2 {
  letter-spacing: 5px;
  font-size: 35px;
  text-shadow: 3px 1px 1px rgb(255, 255, 255);
}

.start-screen {
  width: 720px;
  height: 480px;
  border-radius: 15px;
  z-index: 2;
  overflow: hidden;
}

.play-btn,
.play-again-btn {
  position: absolute;
  z-index: 3;
  background-image: linear-gradient(45deg, #ffa500, #ffd700);
  border: none;
  color: black;
  padding: 15px 30px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  font-size: 40px;
  cursor: pointer;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  font-family: "zabras", Arial, Helvetica, sans-serif;
  letter-spacing: 5px;
}

.play-btn {
  margin-top: 20px;
}

.play-btn:hover,
.play-again-btn:hover {
  background-color: #ffa500;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.play-btn:active,
.play-again-btn:active {
  background-color: #ff8c00;
  transform: translateY(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.play-keys {
  display: flex;
  width: 720px;
  justify-content: space-between;
  flex-wrap: wrap;
  align-content: flex-end;
  align-items: center;
  margin-top: 40px;
}

.play-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
}

.game-controls {
  position: fixed;
  width: 100%;
  justify-content: space-between;
  z-index: 2;
  display: none;
}

.control-button {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.2); /* Transparent white */
  border: 2px solid rgba(255, 255, 255, 0.4); /* Semi-transparent white border */
  border-radius: 50%;
  margin: 5px;
  cursor: pointer;
}

.left-controls,
.right-controls {
  position: absolute;
  width: 150px;
}

.right-controls {
  margin-left: 70%;
}

.left-controls {
  margin-right: 70%;
}

.control-button:hover {
  background-color: rgba(255, 255, 255, 0.4); /* Lighten on hover */
}

.control-button:active {
  background-color: rgba(255, 255, 255, 0.6); /* Darken when pressed */
}

.left,
.right,
.jump,
.throw {
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
}

.left {
  background-image: url("img/mobile-btns/left.png");
}

.right {
  background-image: url("img/mobile-btns/right.png");
}

.jump {
  background-image: url("img/mobile-btns/up.png");
}

.throw {
  background-image: url("img/mobile-btns/bottle.png");
}

.turn-screen-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #ff4500, #ff8c00, #ffd700, #ff4500);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  display: none;
}

.turn-text {
  margin-left: 10px;
  margin-right: 10px;
}

.turn-text h2 {
  font-size: 50px;
  text-align: center;
}

.finished-game-overlay {
  position: fixed;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.1);
  width: 720px;
  height: 480px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  margin-top: 50px;
  transition: background-color 2s ease;
}

.finished-game-overlay.visible {
  background-color: rgba(0, 0, 0, 0.795); /* Transition to a darker black */
}

.finished-game-overlay h2 {
  position: absolute;
  margin-bottom: 20px;
  font-size: 80px;
  color: white;
  text-shadow: 6px 1px 1px rgb(0, 0, 0);
}

.play-again-btn {
  margin-top: 150px;
}

.options {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 3;
}

.music-btn-container,
.sound-btn-container,
.fullscreen-btn-container {
  position: absolute;
  margin-top: 20px;
}

.sound-btn-container {
  margin-right: 100px;
}

.music-btn-container {
  margin-left: 100px;
}

.music-btn,
.sound-btn,
.fullscreen-btn {
  width: 40px;
  height: 40px;
}

.impressum {
  position: fixed;
  bottom: 10px;
}

p {
  font-size: 30px;
  text-align: center;
}

a {
  color: black;
  font-size: 25px;
  border: 2px solid rgba(255, 255, 255, 0.4); /* Semi-transparent white border */
}

.kontakt {
  text-align: center;
}

.impressum-container {
  display: flex;
  justify-content: space-between;
  height: 45%;
  flex-direction: column;
}

.back-logo {
  position: fixed;
  top: 10px;
  left: 10px;
}

.back-logo a {
  border: none;
}

.impressum-title {
  font-size: 65px;
  letter-spacing: 8px;
}

.kontakt h2 {
  margin-bottom: 10px;
}

@media (pointer: coarse) {
  .game-controls {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 480px;
    align-items: center;
  }

  .left-controls {
    margin-right: 55%;
  }

  .right-controls {
    margin-left: 55%;
  }
}

@media screen and (min-height: 900px) and (max-height: 1050px) {
  .game-controls {
    width: 70%;
  }
}

@media screen and (min-height: 800px) and (max-height: 900px) {
  .game-controls {
    width: 80%;
  }
}

@media only screen and (max-width: 1200px) {
  .left-controls {
    margin-right: 55%;
  }

  .right-controls {
    margin-left: 55%;
  }

  * {
    overflow: auto;
  }
}

@media only screen and (max-width: 720px) {
  * {
    overflow: hidden;
  }

  canvas,
  .start-screen {
    width: 100%;
  }

  .turn-screen-warning {
    display: flex;
  }
}

@media only screen and (max-height: 480px) {
  .game-controls {
    height: 360px;
  }

  h1,
  .play-keys {
    display: none;
  }

  canvas,
  .start-screen,
  .finished-game-overlay {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    object-fit: fill;
  }

  .play-container {
    justify-content: center;
  }

  .play-btn {
    margin-top: 100px;
  }

  .turn-screen-warning {
    display: none;
  }

  .left-controls {
    margin-right: 70%;
  }

  .right-controls {
    margin-left: 70%;
  }

  .impressum-container {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    width: 90%;
  }

  .impressum-title {
    display: block;
    margin-bottom: 0px;
    font-size: 50px;
  }

  .impressum-container p {
    font-size: 25px;
  }

  .kontakt {
    margin-left: 50px;
  }

  .impressum {
    display: none;
  }
}

@media (max-width: 480px) {
  .impressum-container {
    height: 50%;
  }

  .impressum-container p {
    font-size: 25px;
  }

  .impressum-title {
    font-size: 50px;
    margin-bottom: 32px;
    display: block;
  }
}

@media (max-width: 380px) {
  .impressum-title {
    margin-bottom: 25px;
    margin-top: 15px;
  }
}

@media (max-width: 400px) {
  h1 {
    display: none;
  }
}
