input[type="text"], input[type="number"] {
  background-color: #F5DEB3;
  border: 1px solid #8B5E3C;
  padding: 5px;
  margin: 1px;
}

.player-name {
  display: inline-block;
  background-color: #F5DEB3;
  border: 1px solid #8B5E3C;
  padding: 5px;
  margin-right: 10px;
  font-weight: bold;
}

select {
  background-color: #F5DEB3;
  border: 1px solid #8B5E3C;
  padding: 10px;
  margin: 10px;
  width: 116px;
}

button {
  font-size: 1.2rem;
  padding: 10px 20px;
  display: inline-block;
  margin: 0.5rem;
  vertical-align: middle;
  background-color: #8B5E3C;
  color: white;
  border: 1px solid white;
  cursor: pointer;
  font-size: 16px;
  margin: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* On desktop, make the buttons circular */
@media only screen and (min-width: 768px) {
  button {
    border-radius: 100%;
    width: 100px;
    height: 100px;
  }
  select {
    width: 97.5px;
  }
}

/* On mobile, make the buttons square */
@media only screen and (max-width: 767px) {
  button {
    border-radius: 0;
    width: 120px;
    height: 50px;
  }
  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .container {
    display: flex;
    justify-content: center;
  }
}

#reset-button {
background-color: #720505;
}


header {
  background-color: #8B5E3C;
  color: white;
  padding: 20px;
  text-align: center;
  font-family: sans-serif;
}

table {
  background-color: #ece6e0;
  border-collapse: collapse;
  width: 60%;
  margin: 20px auto;
  text-align: center;
  font-family: sans-serif;
}

th, td {
  border: 1px solid #8B5E3C;
  padding: 10px;
}

th {
  background-color: #F5DEB3;
  height: 18px;
}


.players-table {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/*.player-row {
  display: flex;
  justify-content: space-between;
  width: 50%;
  margin: 10px 0;
}*/

body {
  background-image: url('./crokinole.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
 }

 html {
  font-size: 16px;
}

.player-input {
  width: 100%;
  max-width: 15em; /* maximum width of input box */
}

.player-name {
  width: 100%;
  max-width: 15em; /* maximum width of input box */
}

@media (max-width: 768px) {
  .player-input {
    max-width: 10em; /* reduce maximum width on smaller screens */
  }
}

@media (max-width: 768px) {
  .player-name {
    max-width: 10em; /* reduce maximum width on smaller screens */
  }
}

button {
  font-size: 1.2rem;
  padding: 10px 20px;
  display: inline-block;
  margin: 0.5rem;
  vertical-align: middle;
}

@media screen and (max-width: 768px) {
  button {
    font-size: 1rem;
    padding: 6px 12px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  border: 1px solid black;
  padding: 8px;
  text-align: center;
}

th {
  background-color: #f2f2f2;
  white-space: normal;
}

.winner {
  background-color: rgba(221, 192, 26, 0.856);
}

#results {
  max-width: 100%;
  overflow-x: auto;
}

#playerInputs {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  padding: 8px;
  text-align: left;
}

th.blau {
  background-color: #0077C0;
  color: white;
}

th.rot {
  background-color: #ca1f1f;
  color: white;
}

th.weiss {
  background-color: #c5c1c1;
  color: black;
}

th.schwarz {
  background-color: #000000;
  color: white;
}

.max-score {
  background-color: #4CAF50;
}

.zero-score {
  background-color: #ce0a0a;
}

.hidden {
  display: none;
}

dialog {
  display: none;
}

dialog button {
  display: block;
  margin: 10px auto;
}

  /* Dialog styles */
  #playerDialog {
    background-color: #fff; /* Set the desired background color for the dialog */
    opacity: 1; /* Set the desired opacity for the dialog */
    z-index: 1000; /* Adjust the z-index to appear above the overlay */

  }


.player-disk {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

@media only screen and (max-width: 767px) {
  .player-disk {
    margin-left: auto;
    margin-right: auto;
  }

  .player-label {
    margin-right: 0;
  }
  
  input[type="number"] {
    margin-left: 0;
    margin-right: auto;
  }
}