/* --- Grundlayout FullHD --- */
body {
    font-family: 'Arial', sans-serif;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 60px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 900;
}

#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 – FIX: war color:black auf dunklem Hintergrund */
#highscoreList tr td {
	color: #000;
}

/* ── Game-Over-Overlay ── */
#gameOverOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: goFadeIn 0.4s ease;
}
@keyframes goFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.go-box {
    background: rgba(0,0,0,0.9);
    border: 2px solid #28a745;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(40,167,69,0.6);
    padding: 50px 60px;
    text-align: center;
    color: #fff;
}
.go-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 12px red;
}
.go-score {
    font-size: 2rem;
    color: #ffd700;
    margin: 10px 0;
}
.go-level {
    font-size: 1.3rem;
    color: #aaa;
    margin-bottom: 30px;
}
.go-box button {
    font-size: 1.6rem;
    padding: 14px 40px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(45deg, #28a745, #1e7e34);
    color: white;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}
.go-box button:hover {
    transform: translateY(-2px);
}

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;
  }
}