body {
  margin: 0;
  padding: 20px;
  font-family: sans-serif;
}

h1 a {
    text-decoration: none;
    color: inherit;
}

h1 a:hover {
    color: #007bff;
    text-decoration: underline;
}

.spielauswahl {
  display: flex;
  align-items: center;
  gap: 12px; /* Abstand zwischen Dropdown und Button */
  margin-bottom: 20px;
}

.spielauswahl form {
  display: flex;
  align-items: center;
}

.spielauswahl select {
  padding: 6px;
  font-size: 1rem;
}

@media (max-width: 600px) {
  .spielauswahl {
    flex-direction: column;
    align-items: flex-start;
  }
}

.message {
  min-height: 40px; /* oder was immer du brauchst */
  padding: 5px;
  background-color: #d4edda;
  color: #155724;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
}

.message:empty {
  display: none;
}

.input-wrapper {
  margin-bottom: 10px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: fit-content;
  max-width: 90%;
}

.closeItem, .closeEdit, .closePlayer, .closeDeletePlayer, .closeVermoegen, .closeGame, .closeGameDelete, .closeItemDelete, .closeRegister, .closeLogin {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.confirmBtn, .confirmDeleteBtn {
  background-color: #d9534f;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  margin-right: 10px;
}

.confirmDeleteBtn:hover {
  animation: shake 0.3s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.cancelBtn {
  background-color: #6c757d;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
}

.table-wrapper {
  display: block;
  white-space: nowrap;
}

.table-scroll {
  max-height: calc(15 * 40px - 5px); /* 10 Zeilen à ca. 40px Höhe */
  overflow-y: auto;
  overflow-x: auto;
  border: none; /* optionaler Rahmen */
  margin-top: 20px; /* Abstand zur Umgebung */
}

/* Fixierter Tabellenkopf */
#inventarTable thead th {
  position: sticky;
  top: 0;
  background-color: #f4f4f4;
  z-index: 2;
  margin-top: -1px; /* verhindert Durchrutschen */
  border: 1px solid #ccc;
}

/* Fixierte Summenzeile */
#inventarTable tfoot td {
  position: sticky;
  bottom: 0;
  background-color: #f4f4f4;
  z-index: 2;
  font-weight: bold;
  border: 1px solid #ccc;
}

#inventarTable tbody td {
  border: 1px solid #ccc;
}

#inventarTable,
#spielerTable {
  width: auto;
}

#spielerTable {
  margin-top: 20px;
}

#spielerTable th,
#spielerTable td {
  border: 1px solid #ccc; /* horizontale & vertikale Linien */
  padding: 10px;
  text-align: left;
}

#spielerTable thead th {
  background-color: #f4f4f4;
}

table {
  border-collapse: collapse;
  width: auto;         /* passt sich dem Inhalt an */
}

th, td {
  padding: 10px;
  text-align: left;
  white-space: nowrap; /* verhindert Zeilenumbruch */
}

td:nth-child(2),
td:nth-child(3) {
  text-align: right;
}


#spielerTable td:nth-child(5){
  text-align: center;
}


#spielerTable td:nth-child(2),
#spielerTable td:nth-child(3),
#spielerTable td:nth-child(4),
#spielerTable td:nth-child(6) {
  text-align: right;
}


button.createBtn, button.createPlayerBtn, button.createGameBtn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

button.editBtn, button.editVermoegenBtn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

button.deleteBtn, button.deletePlayerBtn, button.deleteGameBtn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

select.selectSpielerGelb, select.selectGameGelb {
  background-color: #ffc107; /* Bootstrap-Gelb */
  color: black;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

select.selectSpielerGelb:hover,
select.selectSpielerGelb:focus {
  background-color: #e0a800;
  outline: none;
}

th[data-sort] {
  cursor: pointer;
  position: relative;
  padding-right: 20px;
}

th[data-sort]::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
}

th.sort-asc::after {
  content: '▲';
}

th.sort-desc::after {
  content: '▼';
}

.autocomplete-box {
  position: absolute; /* oder 'fixed', je nach Bedarf */
  top: 100%;           /* direkt unter dem Input-Feld */
  left: 200px;         /* verschiebt die Box weiter nach rechts */
  z-index: 1000;       /* damit sie über anderen Elementen liegt */
  background: white;
  border: none;
  width: 300px;        /* oder was du brauchst */
}

.input-wrapper {
  position: relative;
}


.autocomplete-box div {
  padding: 8px;
  cursor: pointer;
}

.autocomplete-box div:hover {
  background-color: #f0f0f0;
}

.summary-row {
  background-color: #f0f0f0;
  font-weight: bold;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.logo img {
  height: 100px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.user-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.navBtn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0.375rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Neutrale Variante (z. B. für Begrüßung oder passive Links) */
.navBtn.default {
  background-color: #f0f0f0;
  color: #333;
  border-color: #ccc;
}

.navBtn.default:hover {
  background-color: #e0e0e0;
  border-color: #bbb;
}

/* Primäre Aktion (Login/Register) */
.navBtn.primary {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.navBtn.primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* Logout (dezente Variante) */
.navBtn.logout {
  background-color: #6c757d;
  color: #fff;
  border-color: #6c757d;
}

.navBtn.logout:hover {
  background-color: #5c636a;
  border-color: #545b62;
}

/* Fokus-Effekt für alle Varianten */
.navBtn:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.4);
}

/* Begrüßungstext */
.welcome {
  font-weight: bold;
  margin-right: 10px;
}

.tooltip-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tooltip-icon {
  cursor: help;
  color: #555;
  font-size: 0.9em;
}

.custom-tooltip {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 9999;
  max-width: 80%;
  font-size: 0.95em;
}
.custom-tooltip strong {
  font-size: 1.1em;
  display: block;
  margin-bottom: 6px;
}

.language-selector {
  display: inline-block;
  vertical-align: middle;
  position: relative;
}

.language-selector select {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0.375rem;
  text-decoration: none;
  border: 1px solid transparent;
  background-color: #0d6efd;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.language-selector select:hover {
  background-color: #0b5ed7; /* dunkleres Blau beim Hover */
}

.language-select {
  background-color: #0d6efd;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: pointer;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 20px; /* Abstand zwischen den Elementen */
  padding: 20px;
  font-size: 0.9em;
  color: #666;
  border-top: 1px solid #ccc;
  margin-top: 40px;
  flex-wrap: wrap; /* Falls es auf kleinen Bildschirmen umbrechen soll */
}
.footer a {
  color: #0077cc;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
