/* Zusätzliche CSS für responsive Anpassungen */

/* Feste Größe des Canvas aufheben für responsive Darstellung */
canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(189, 178, 72, 0.81);
  border-radius: 10px;
  margin-top: 10px;
  max-width: 1200px;
}

/* Game Container anpassen */
.game {
  width: 100%;
  height: auto;
  max-width: 1200px;
  max-height: 500px;
  margin: 0 auto;
  position: relative;
}

/* Startbildschirm anpassen */
#start-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 1200px;
  max-height: 500px;
  width: 100%;
  height: 100%;
  background: url(../img/9_intro_outro_screens/start/startscreen_1.png) center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border: 3px solid rgba(189, 178, 72, 0.81);
  border-radius: 10px;
}

/* Game Container für responsive Layout */
.game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  margin: 15px;
  padding: 0;
  position: relative;
}

/* Touch Controls für mobile Geräte */
.touch-controls {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
}

.touch-button {
  width: 8%;
  height: 8%;
  background-color: rgba(255, 152, 0, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  border: 2px solid white;
}

.touch-button:active {
  background-color: rgba(255, 152, 0, 1);
  transform: scale(0.95);
}

/* Medienabfragen für unterschiedliche Geräte */
@media (max-width: 1250px) {
  .game, #start-screen, #game-over-screen, #you-win-screen, canvas {
    max-width: 85vw;
    max-height: calc(100vh / 1.3); /* Seitenverhältnis beibehalten */
  }
}

@media (max-width: 768px) {
  .touch-controls {
    display: flex;
  }
  
  button#start-button, button#restart-button, button#restart-button-win {
    width: auto;
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
  
  .win-title, .game-over-title {
    font-size: 2.5rem;
  }
  
  .game-ui-element {
    font-size: 0.9rem !important; /* UI Elemente kleiner machen */
  }
}

@media (max-width: 576px) {
  .game, #start-screen, canvas {
    max-width: 95vw;
    max-height: calc(95vw / 2.4);
  }
  
  .touch-button {
    width: 5%;
    height: 5%;
    font-size: 20px;
  }
  
  .mui-appbar {
    min-height: 50px;
  }
  
  body {
    padding-top: 50px;
  }
}