body {
  margin: 0;
  overflow: hidden;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("./img/background_el_pollo_loco/El_Pollo_Loco_Canvas_BckGround img.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Canvas */
canvas {
  background-color: black;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  width: 100%;
  height: auto;
  max-height: 100vh;
  max-width: 100vw;
  display: none;
}

/* Wrapper hält Canvas + Screens */
#game-wrapper {
  position: relative;
  width: 720px;
  height: 480px;
  max-width: 100vw;
  max-height: 100vh;
}

#pause-btn,
#fullscreen-btn,
#sound-toggle-btn{
  display: none;
}

.menu-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  padding: 30px 50px;
  border-radius: 15px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

.menu-box button {
  font-size: 22px;
  font-family: "Bungee", cursive;
  padding: 12px 30px;
  border: none;
  border-radius: 10px;
  color: black;
  cursor: pointer;
  transition: all 0.2s;
}

.menu-box button:hover {
  transform: scale(1.1);
  background: #ffd633;
}

#fullscreen-btn {
  position: absolute;
  top: 0;
  right: 10px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  touch-action: none;
}



/* Startscreen */
#start-screen {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("./img/9_intro_outro_screens/start/startscreen_1.png");
  background-size: contain;
  background-position: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  border-radius: 20px;
}

/* Game Over + Victory */
#game-over-screen,
#victory-screen {
  position: absolute;
  top: 0;
  left: 0;
   width: 100%;
  height: 100%;
  display: none;

  justify-content: center;
  align-items: center;
  flex-direction: column;
}
#game-over-screen img,
#victory-screen img {
  width: 80%;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
}
#game-over-screen button,
#victory-screen button {
  position: absolute;
  bottom: 40px;

  padding: 12px 30px;
  font-size: 20px;

  border-radius: 10px;
  border: none;
  background: #ffcc00;

  cursor: pointer;
}

/* Start Button */
.start-settings-btn {
  margin-bottom: 40px;
  padding: 15px 40px;
  font-size: 22px;
  font-family: "Bungee", cursive;
  border-radius: 10px;
  border: none;
  background-color: #ffcc0000;
  cursor: pointer;
  transition: transform 0.2s;
}

.start-settings-btn:hover {
  transform: scale(1.1);
}

.settings-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 20px;
}

.settings-left,
.settings-right {
  width: 45%;
}

.settings-left p,
.settings-right p {
  margin: 10px 0;
}

#settings-window {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  border-radius: 20px;
  overflow-y: auto;
  z-index: 30;
}

#settings-window button {
  margin-top: 30px;
  padding: 12px 30px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  background: #ffcc00;
  color: black;
  cursor: pointer;
  font-family: "Bungee", cursive;
  transition: all 0.2s;
}

#settings-window button:hover {
  transform: scale(1.1);
  background: #ffd633;
}

#pause-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
}

.pause-panel {
  width: 300px;
  background: #1c1c1c;
  border: 3px solid #ffcc00;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  color: white;
}

.pause-panel button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #ffcc00;
  cursor: pointer;
}

.pause-panel button:hover {
  transform: scale(1.05);
}

#pause-btn {
  position: absolute;
  top: 0;
  right: 110px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  touch-action: none;
}

#impressum-window {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  display: none;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  z-index: 50;
  overflow-y: auto;
}

.impressum-content {
  text-align: center;
  padding: 20px;
}

.impressum-content button {
  margin-top: 20px;
  padding: 10px 20px;
  font-family: "Bungee", cursive;
  background: #ffcc00;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

#mobile-controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  display: none;
  justify-content: space-between;
  padding: 0 40px;
  box-sizing: border-box;
}

#mobile-controls button {
  width: 55px;
  height: 55px;
  font-size: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 204, 0, 0.9);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.mobile-left,
.mobile-right {
  display: flex;
  gap: 10px;
}

#rotate-device {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  color: white;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Box */
.rotate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Handy */
.phone {
  width: 70px;
  height: 130px;
  border: 4px solid white;
  border-radius: 15px;
  position: relative;
  animation: rotatePhone 2s infinite ease-in-out;
}

/* Home-Button */
.phone::after {
  content: "";
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

/* Animation */
@keyframes rotatePhone {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(90deg);
  }
  50% {
    transform: rotate(90deg);
  }
  75% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Text */
.rotate-box p {
  font-size: 22px;
  align-items: center;
  text-align: center;
}

#sound-toggle-btn {
  position: absolute;
  top: 0;
  right: 60px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  touch-action: none;
}

@media (max-width: 980px) and (pointer: coarse) {
  #mobile-controls {
    display: flex;
    display: none;
  }

  #sound-toggle-btn {
    display: block;
    display: none;
  }

  #pause-btn {
    display: block;
    display: none;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  #rotate-device {
    display: flex;
  }

  canvas {
    display: none;
  }
}
@media only screen and (max-width: 720px) {
  #game-wrapper {
    width: 100%;
    height: 100%;
  }

  canvas {
    width: 100%;
    height: auto;
  }
}

@media only screen and (max-width: 720px) {
  canvas {
    width: 100%;
  }
}

@media only screen and (max-height: 480px) {
  canvas {
    height: 100vh;
  }
}
