@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
  margin: 0;
  background: #563829;
  color: #d0ffb3;
  font-family: 'Press Start 2P', monospace;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  overflow-x: hidden;
}

header {
  margin-top: 10px;
}

.logo-img {
  width: 480px;
  max-width: 90%;
  image-rendering: pixelated;
}

.subtitle {
  font-size: 14px;
  color: #c7fca5;
}

.subtitle2 {
  font-size: 14px;
  color: #c7fca5;
}

#serverStatus {
  background: rgba(49, 31, 6, 0.8);
  border: 3px solid #3b2f1e;
  border-radius: 10px;
  padding: 10px;
  margin: 20px auto;
  width: 360px;
  max-width: 90%;
  color: #d0ffb3;
}

#serverStatus h2 {
  font-size: 14px;
  margin-bottom: 8px;
}

#statusText {
  font-size: 10px;
  margin: 4px 0;
}

#playerCount {
  font-size: 10px;
  color: #c7fca5;
}

#playerList {
  list-style: none;
  padding: 0;
  font-size: 10px;
  margin: 5px 0;
}

.map-button {
            display: inline-block;
            padding: 12px 24px;
            font-size: 16px;
            color: #fff;
            background-color: #a62d2d;
            border: none;
            border-radius: 6px;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s ease;
}

.map-button:hover {
            background-color: #dd1313;
}

canvas {
  background: linear-gradient(#8f8f8f, #595959);
  border: 3px solid #3b2f1e;
  border-radius: 6px;
  image-rendering: pixelated;
  width: 95vw; /* Skaliert mit Bildschirmbreite */
  height: auto;
  max-width: 720px; /* Obergrenze bleibt */
  touch-action: none; /* verhindert Scrollen beim Wischen */
  user-select: none;
}

.controls {
  display: none;
}

#gameOverScreen {
  margin-top: 15px;
}

.hidden {
  display: none;
}

button {
  background: #9c7c48;
  border: 2px solid #3b2f1e;
  border-radius: 6px;
  font-size: 12px;
  padding: 8px 14px;
  color: #fff;
  text-shadow: 1px 1px 0 #3b2f1e;
  box-shadow: 0 0 8px #3b2f1e;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  margin: 5px;
}

input {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 5px;
  border-radius: 4px;
  border: 2px solid #3b2f1e;
  text-align: center;
}

#highscoreBoard {
  background: rgba(49, 31, 6, 0.8);
  color: #d0ffb3;
  padding: 10px;
  margin: 20px auto 0 auto;
  border-radius: 8px;
  width: 320px;
  max-width: 90%;
}

#highscoreBoard h2 {
  font-size: 14px;
  margin-bottom: 10px;
}

#scoreList {
  list-style: none;
  padding: 0;
  font-size: 10px;
}

#scoreList li {
  margin: 4px 0;
  text-align: left;
}

/* Mobile buttons */
@media (max-width: 600px) {
  .controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 20px;
  }

  button {
    background: #9c7c48;
    border: 2px solid #3b2f1e;
    border-radius: 6px;
    font-size: 18px;
    padding: 10px 20px;
    color: #fff;
    text-shadow: 1px 1px 0 #3b2f1e;
    box-shadow: 0 0 8px #3b2f1e;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
  }

  button:active {
    transform: scale(0.95);
  }

  input {
    font-size: 12px;
  }
}

body, button, canvas {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}