/* Grundlegende Styles für die Seite */
/* body, html { */
/*   margin: 0; */
/*   padding: 0; */
/*   width: 100%; */
/*   height: 100%; */
/*   font-family: Arial, sans-serif; */
/*   background-color: #333; */
/*   color: white; */
/*   overflow: hidden; */ /* Verhindert Scrollbalken */
/* } */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: black; /* Hintergrund schwarz */
  font-family: Arial, sans-serif;
  color: white;
  overflow: hidden; /* Verhindert Scrollbalken */
}

/* Der Container, der das Spiel und die UI umschließt */
#game-wrapper {
  position: relative;
  width: 100%;
  /* max-width: 1000px; */ /* Maximale Breite auf großen Bildschirmen - REMOVED */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* UI-Leiste für Punkte, Munition und Zeit */
#ui-bar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 5px 10px;
  margin-bottom: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  box-sizing: border-box;
}

/* Container für den Canvas, damit er das Seitenverhältnis beibehält */
#gameContainer {
  position: relative;
  width: 800px; /* Fixed width */
  height: 600px; /* Fixed height */
}

canvas {
  display: block; /* Entfernt den kleinen Abstand unter dem Canvas */
  width: 100%;
  height: auto;
  border-radius: 8px;
  background-image: url('images/background.png'); /* Corrected path */
  background-size: cover;
  background-position: center;
  cursor: crosshair;
}

/* Overlays (Startbildschirm, Leaderboard, etc.) */
.screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  display: none; /* Standardmäßig ausgeblendet */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
}

#startScreen {
  display: flex; /* Startbildschirm ist anfangs sichtbar */
}

.screen-overlay h1 {
  margin-top: 0;
  font-size: 2.5em;
}
.screen-overlay p {
  font-size: 1.2em;
}

.screen-overlay input {
  padding: 10px;
  font-size: 1em;
  margin: 20px 0;
  border-radius: 5px;
  border: none;
  text-align: center;
}

.screen-overlay button {
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
  transition: background-color 0.3s;
}

.screen-overlay button:hover {
  background-color: #45a049;
}

/* ENTFERNT: Die alte #leaderboardList wird nicht mehr gebraucht. */

/* --- NEU: Stile für die Leaderboard-Tabelle --- */
#leaderboardTable {
  width: 80%;
  max-width: 500px;
  margin-top: 20px;
  border-collapse: collapse; /* Sorgt für saubere Linien */
  font-size: 1.2em;
}

#leaderboardTable th, #leaderboardTable td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#leaderboardTable th {
  color: #4CAF50; /* Grüne Überschriften */
  font-size: 1.1em;
}

/* Die erste Spalte (Platz) schmaler machen */
#leaderboardTable td:first-child, #leaderboardTable th:first-child {
  width: 15%;
  font-weight: bold;
}

/* Die letzte Spalte (Punkte) rechtsbündig */
#leaderboardTable td:last-child, #leaderboardTable th:last-child {
  text-align: right;
  font-weight: bold;
}

/* Coole Farben für die Top 3 Plätze */
.place-1 { background-color: rgba(255, 215, 0, 0.3); } /* Gold */
.place-2 { background-color: rgba(192, 192, 192, 0.3); } /* Silber */
.place-3 { background-color: rgba(205, 127, 50, 0.3); } /* Bronze */
/* --- ENDE DER NEUEN STILE --- */


/* Benutzerdefiniertes Alert-Fenster */
#customAlert {
  z-index: 100;
}

/* --- Stile für den "Back to Home"-Link (angepasst an Hauptseite) --- */
.back-link {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #1a1a1a;
  color: #00eaff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  border: 1px solid #00eaff;
  font-family: 'Orbitron', sans-serif; /* Gleiche Schriftart wie Hauptmenü */
  text-transform: uppercase;
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.back-link:hover {
  background-color: #00eaff;
  color: #000;
  box-shadow: 0 0 15px #00eaff, 0 0 25px #00eaff;
}