/* --- Grundlayout FullHD --- */
html, body {
  margin: 0; padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('bg.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  color: white;
  user-select: none;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

h1 {
  font-size: 4rem;
  margin-bottom: 30px;
  text-shadow: 0 0 10px black;
}

#gameContainer, #setup, footer {
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  box-shadow: 0 0 30px #0f7a39;
  padding: 30px;
  width: fit-content;
  max-width: 90vw;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

canvas {
  border: 3px solid #28a745;
  background: #111;
  display: block;
  width: 100%;
  border-radius: 10px;
}

#levelMessage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  padding: 1rem 2rem;
  border-radius: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
}
#levelMessage.show {
  opacity: 1;
}

#pauseOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 48px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  border-radius: 15px;
}

#skinSelector {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1001;
  font-size: 16px;
  background: #222;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

label {
  font-size: 1.5rem;
}
input[type="text"], input[type="number"], input[type="password"] {
  font-size: 1.2rem;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  width: 250px;
  margin-left: 12px;
  outline: none;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
button#loginBtn {
  font-size: 1.6rem;
  margin: 25px 15px 0 15px;
  padding: 14px 35px;
  border-radius: 15px;
  border: none;
  background: linear-gradient(45deg, #28a745, #1e7e34);
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Highscore Tabelle */
#highscores {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  box-shadow: 0 0 30px #0f7a39;
  padding: 30px 40px;
  width: 960px;
  max-width: 90vw;
  margin-bottom: 40px;
}

#highscores h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  text-shadow: 0 0 8px black;
  text-align: center;
}

#highscoreTableBody {
  width: 100%;
  border-collapse: collapse;
}

#highscoreTableBody th {
  padding: 12px;
  background-color: #28a745;
  text-align: left;
}

#highscoreTableBody td {
  padding: 10px 12px;
  border-bottom: 1px solid #333;
}

#highscoreTableBody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

#highscoreTableBody tr:hover {
  background-color: rgba(40, 167, 69, 0.2);
}

/* Highscore Liste */
#highscoreList {
	color: black;
}

table {
  width: 70%;
  border-collapse: collapse;
  font-size: 1.15rem;
}
th, td {
  border: 2px solid #4e54c8;
  padding: 10px 15px;
  text-align: center;
}
th {
  background: #6c73e6;
}
td.kategorie {
  font-weight: 700;
  text-align: left;
}
td.punkte {
  cursor: pointer;
  transition: background 0.3s ease;
}
td.punkte:hover {
  background: #e0e4ff;
}
td.punkte.bereits-getippt {
  background: #d4d4d4;
  cursor: default;
  color: #666;
}

table#highscoreTableBody tr:not(.rank-1):not(.rank-2):not(.rank-3):nth-child(even) {
    background-color: #e8fde8;
}

table#highscoreTableBody tr:not(.rank-1):not(.rank-2):not(.rank-3):nth-child(odd) {
    background-color: #defffc;
}

table#highscoreTableBody tr.rank-1 {
    background-color: #ffe680; /* Gold */
}

table#highscoreTableBody tr.rank-2 {
    background-color: #c0c0c0; /* Silver */
}

table#highscoreTableBody tr.rank-3 {
    background-color: #cd7f32; /* Bronze */
}


footer {
  margin-top: 20px;
  font-size: 1.2rem;
  color: #aaa;
  text-shadow: 0 0 4px black;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  #gameContainer {
    padding: 15px;
  }
  
  canvas {
    width: 95vw;
    height: auto;
    aspect-ratio: 16/9;
  }
  
  #skinSelector {
    font-size: 16px;
    padding: 8px 12px;
  }
}