/* Grundlayout für FullHD */
body {
  margin: 0; padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url(bg.jpg) no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  color: #222;
  display: flex; flex-direction: column; align-items: center;
  min-height: 50vh;
  user-select: none;
  opacity: .9;
}
#main {
  text-align: center;
}

h1, p {
  color: #64c2f5;
}

.container {
  background: #fff;
  border-radius: 15px;
  margin-top: 20px;
  padding: 1px 30px 30px 30px;
  max-width: max-content;
  box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

.spieler-name-container {
  margin-bottom: 25px;
}

input#spieler-name-0 {
  font-size: 1.4rem;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid #4e54c8;
  width: 250px;
  font-weight: 600;
  transition: border-color 0.3s ease;
}
input#spieler-name-0:focus {
  outline: none;
  border-color: #8f94fb;
  box-shadow: 0 0 6px #8f94fb;
}

button#start-button {
  background: #4e54c8;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 12px 30px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-left: 20px;
}
button#start-button:hover {
  background: #6c73e6;
}

.spielbereich {
  margin-top: 20px;
  display: none;
}

.würfel-container {
  display: flex;
  justify-content: center;
  margin: 20px 0 35px;
  gap: 15px;
}

.würfel {
  width: 90px;
  height: 90px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  font-weight: 900;
  color: #4e54c8;
}
.würfel.gehalten {
  box-shadow: 0 0 12px 4px #8f94fb inset;
  transform: scale(1.1);
}

#würfel-button {
  display: block;
  margin: 0 auto 30px;
  background: #4e54c8;
  color: white;
  border: none;
  padding: 14px 50px;
  font-size: 1.5rem;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#würfel-button:hover:not(:disabled) {
  background: #6c73e6;
}
#würfel-button:disabled {
  background: #a3a7ee;
  cursor: not-allowed;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.15rem;
}
th, td {
  border: 2px solid #4e54c8;
  padding: 10px 15px;
  text-align: center;
}
th {
  background: #6c73e6;
  color: white;
}
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;
}

.gesamtzeile {
  font-weight: 800;
  background: #c3c7ff;
}

.highscore, footer {
  text-align: center;
  background: #f4f6ff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  margin: 40px auto;
}
.highscore h2 {
  margin-bottom: 15px;
  color: #4e54c8;
}
.highscore-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.highscore-list li {
  font-size: 1.2rem;
  margin: 8px 0;
}

/* Animation Würfeln */
@keyframes würfel-schütteln {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(8deg); }
  100% { transform: rotate(0deg); }
}
.würfel.schütteln {
  animation: würfel-schütteln 0.5s ease-in-out;
}

@media (max-width: 768px) {
.würfel {
  width: 60px;
  height: 60px;
  font-size: 2.5rem;
}
input#spieler-name-0 {
  width: 180px;
  font-size: 1rem;
}
button#start-button {
  padding: 8px 20px;
  font-size: 1rem;
}
}

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 */
}
