html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #f7f7f7;
    font-family: sans-serif;
	display: flex;
    align-items: center;
    justify-content: center;
  }

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: white;
  }
  
#gameFrame {
	position: relative;
	width: 80vw;
    height: 80vh;
	border: 1px solid black;
}

#gameData {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;          /* volle Breite */
    height: 50px;         /* fixe Höhe */
    line-height: 50px;    /* Text vertikal zentrieren */
    background: rgba(255,0,0,0.4);  /* optional */
    color: white;
    font-size: 24px;
    text-align: center;
    z-index: 20;
    pointer-events: auto; /* Klicks nicht blockieren */
	display: none;
	align-items: center;     /* vertikal zentrieren */
    gap: 20px;               /* Abstand zwischen den Boxen */
    box-sizing: border-box;   /* ← verhindert Überschreitung */
    padding: 0 15px;          /* links/rechts Rand passt jetzt */
}

#gameData > div {
    flex-shrink: 0;          /* verhindert, dass Boxen zusammengequetscht werden */
    white-space: nowrap;     /* Text bleibt in einer Zeile */
}

#gameDataScore, #gameDataDifficulty {
	
}

#gameOverScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 60%;              /* oder auto – wie du möchtest */
    max-width: 500px;
    padding: 30px 20px;

    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 24px;
    text-align: center;
    border-radius: 10px;

    z-index: 30;
    display: none;           /* wird per JS eingeblendet */
}

#gameOverScreen button {
  display: block;
  margin: 15px auto 0 auto;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #444;
  color: white;
}

#menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9);
  padding: 2vh 4vw;       /* vorher feste Pixel */
  border-radius: 1vh;
  text-align: center;
  z-index: 15;
}

#menu button {
  display: block;
  margin: 1vh auto;
  width: 100%;
  padding: 1vh 2vw;
  font-size: 2vh;
  cursor: pointer;
}
  
#instructionsContent,
#creditsContent,
#highscoresContent, 
#faqContent, 
#tournamentsContent,
#authContent,
#profileContent {
  background: white;
  padding: 2vh 4vw;
  border-radius: 1vh;
  max-width: 500px;
  text-align: center;
  position: relative;
}

#btnCloseInstructions,
#btnCloseCredits,
#btnCloseHighscores, 
#btnCloseFAQ, 
#btnCloseTournaments,
#btnCloseLoginRegister,
#btnCloseProfile, {
  margin-top: 20px;      /* Abstand nach oben */
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

/* Overlay Basis */
#highscoresOverlay, 
#tournamentsOverlay,
#creditsOverlay,
#faqOverlay,
#instructionsOverlay,
#profileOverlay,
#authOverlay {
  display: none; /* standardmäßig unsichtbar */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 25;
  justify-content: center;
  align-items: center;
}

.highscoreTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.highscoreTable th, .highscoreTable td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
}

.highscoreTable th {
    background-color: #eee;
}

.userRow {
    background-color: #ffd700;
    font-weight: bold;
}

.profileTable {
	text-align: left;
}