html,
input,
select {
  font-family: "Manrope", sans-serif;
  color: #1a1a1a;
}

html {
  font-optical-sizing: auto;
  font-size: 5vw;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #d7e8dd;
  margin: 0;
}

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

td {
  text-align: center;
  border: 0.2vw solid #1a1a1a;
  border-radius: 1vw;
}

button {
  border: 0.1vw solid #1a1a1a;
  border-radius: 10vw;
  padding-top: 1vw;
  padding-bottom: 1vw;
  padding-left: 3vw;
  padding-right: 3vw;
  background-color: #1b5e42;
  color: white;
}

h1 {
  color: #1b5e42;
  font-weight: 700;
  margin-top: 1vw;
  margin-bottom: 2vw;
  border-bottom: 0.3vw solid #1b5e42;
  padding-bottom: 1vw;
}

#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100vw;
  overflow-x: hidden;
}

#home,
#menu,
#partita {
  width: 100%;
}

#menu > h1 {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #d7e8dd;
  z-index: 2;
  text-align: center;
}

.scroll-tabella {
  display: block;
  width: 100%;
  max-width: 90vw;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.scroll-tabella table {
  margin: 0 auto;
}

#partita table td:first-child,
#partita table th:first-child {
  position: sticky;
  left: 0;
  background-color: #d7e8dd;
  z-index: 1;
}

#scelta {
  gap: 5vw;
}

#scelta > div {
  gap: 2vw;
}

#scelta > div > button {
  margin-top: 2vw;
}

input,
button,
select {
  font-size: 0.9rem;
}

input {
  border: 0;
  background-color: transparent;
}

h2 {
  width: 100%;
  text-align: center;
  color: #c9a227;
}

table {
  border-collapse: separate;
  border-spacing: 1vw;
}

th,
td:not(:has(button)):not(:has(input)) {
  padding-left: 2vw;
  padding-right: 2vw;
}

table > tr > td > button {
  width: 1vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

#home > button:last-of-type,
#inserisci_nome_giocatori > button,
#seleziona_numero_giocatori > div > button {
  margin-top: 10vw;
}

#seleziona_numero_giocatori > :first-child {
  flex-direction: row;
}

#partita .scroll-tabella > table > tr > td:first-child,
#storico > tr > td:last-child,
#inserisci_nome_giocatori > table > tr > td:first-child {
  border: 0;
}

#partita .scroll-tabella > table > tr > td:first-child {
  text-align: right;
  padding: 0;
}

#calcola {
  margin-top: 10vw;
  margin-bottom: 10vw;
}

.hidden {
  display: none !important;
}

/* Chrome, Safari, Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

#storico > tr > td > button,
#lista_partite > tbody > tr > td > button {
  border-radius: 1vw;
  background-color: #b83a3a;
  color: white;
}

#home > button:last-of-type {
  background-color: #3e7c5d;
  color: white;
}

#reset {
  gap: 5vw;
  margin-bottom: 10vw;
}

#reset > button:first-child {
  background-color: #356882;
}

#reset > button:last-child {
  background-color: #d32f2f;
}

#menu > button {
  margin-top: 10vw;
  margin-bottom: 10vw;
}

#seleziona_numero_giocatori > div > button,
#inserisci_nome_giocatori > button,
#scelta > div > button {
  margin-bottom: 10vw;
}

#lista_partite td:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#lista_partite {
  border-collapse: collapse;
}

#lista_partite > tbody > tr > td {
  border: 0;
}

#lista_partite > tbody > tr:not(:last-child) {
  border-bottom: 0.2vw solid #1a1a1a;
  border-radius: 0;
}
