/* Stile generale */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f8; /* Colore di sfondo più chiaro */
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Stile dell'header */
header {
  background-color: #0078d7; /* Colore azzurro */
  padding: 30px 20px; /* Padding per dare un po' di spazio intorno */
  padding-top: 10px;
  display: flex;
  justify-content: space-between; /* Distribuisce gli elementi a sinistra, centro e destra */
  width: 100%;
  box-sizing: border-box;
}

/* Contenuto dell'header */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
header img {
  height: 50px;
}

/* Titolo */
header h1 {
  color: white;
  font-size: 1.5em;
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

/* Bottone di logout */
header button {
  background-color: #fff;
  color: #0078d7;
  border: 1px solid #0078d7;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* Stile al passaggio del mouse sul bottone */
header button:hover {
  background-color: #005091;
  color: #fff;
}

/* Footer */
footer {
  background-color: #333333;
  color: #ffffff;
  text-align: center;
  padding: 10px;
  margin-top: auto;
  width: 100%;
  font-size: 0.9em;
}

/* Popup generale (Login) */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Sfondo scuro e trasparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px; /* Bordo arrotondato */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 400px;
  text-align: center; /* Centra il contenuto */
}

.popup-content input,
.popup-content button {
  width: 80%; /* Larghezza dell'input 80% */
  padding: 10px;
  margin: 10px auto; /* Margine automatico per centrare */
  font-size: 1em;
  border-radius: 5px; /* Bordo arrotondato */
  display: block; /* Assicura che gli elementi siano blocchi */
}

.popup-content button {
  background-color: #0078d7;
  color: white;
  border: none;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #005bb5;
}

/* Sezione dello studente - Votazione */
#studentSection {
  width: 100%;
  max-width: 800px;
  margin: 20px;
  text-align: center;
}

#studentSection h1 {
  font-size: 1.5em;
  margin-bottom: 20px;
}

#studentSection label {
  font-size: 1em;
  margin-bottom: 10px;
  display: block;
}

#studentSection select {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  margin-bottom: 20px;
}

#studentSection table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  overflow-x: auto; /* Aggiungi questa regola */
  display: block; /* Aggiungi questa regola */
}

#studentSection table th,
#studentSection table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

#studentSection table th {
  background-color: #f4f6f8;
}

#studentSection button {
  background-color: #0078d7;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 15px 20px;
  font-size: 1.3em;
  cursor: pointer;
  margin: 5px;
}

#studentSection button:hover {
  background-color: #005bb5;
}

#studentSection .confirmation {
  margin-top: 20px;
  font-size: 1.2em;
  color: green;
}

#studentSection .risultato {
  margin-top: 20px;
}

#studentSection .risultato h2 {
  font-size: 1.5em;
}

/* Sezione del professore - Tabella Gruppi */
#profSection {
  display: block; /* Aggiungi display block per renderlo visibile quando necessario */
  text-align: center;
  margin: 30px auto;
  margin-bottom: 20px;
  background: #fff;
  padding: 40px;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 100%;
  max-width: 900px; /* Aumenta leggermente la larghezza massima */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#profSection h2 {
  font-size: 1.75em; /* Aumenta la dimensione del titolo per renderlo più visibile */
  margin-bottom: 20px;
  color: #0078d7;
}

#groupTable {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  overflow-x: auto;
  text-align: center;
  align-content: center;
}

#groupTable th,
#groupTable td {
  padding: 15px;
  border: 1px solid #ddd;
  text-align: left;
  font-size: 1em;
  align-content: center;
}

#groupTable th {
  background-color: #f4f6f8;
  color: #0078d7;
  font-weight: bold;
}

#groupTable tr:nth-child(even) {
  background-color: #f9f9f9;
}

#groupTable tr:hover {
  background-color: #f1f1f1;
}

#criteriaSection, #votesSection {
  display: none;
}

#criteriaSection h2,
#votesSection h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: #0078d7;
}

#criteriaSection table, #votesSection table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

#criteriaTable th,
#votesTable th,
#criteriaTable td,
#votesTable td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

#criteriaTable th, #votesTable th {
  background-color: #f4f6f8;
  color: #0078d7;
  font-weight: bold;
}

#criteriaTable tr:nth-child(even), #votesTable tr:nth-child(even) {
  background-color: #f9f9f9;
}

#criteriaTable tr:hover, #votesTable tr:hover {
  background-color: #f1f1f1;
}

/* Bottone per tornare indietro */
button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #0078d7;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #005fa3;
}

.hidden {
  display: none;
}

/* Dropdown (menu a tendina) */
#groupSelector {
  margin: 10px 0;
  padding: 10px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Sezione di errore per il login */
#errorMessage {
  color: red;
  font-size: 1.2em;
  margin-top: 10px;
}

.risultato {
  margin-top: 20px;
  text-align: center;
}

.risultato h2 {
  color: #007bff;
  font-size: 24px;
}
/* Tabella criteri */
#studentSection {
  margin: 20px auto;
  padding: 15px;
  max-width: 800px;
  border: 2px solid #ccc;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#studentSection h1 {
  text-align: center;
  color: #333;
  font-size: 24px;
  margin-bottom: 20px;
}

#studentSection table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

#studentSection table th,
#studentSection table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  font-size: 14px;
}

#studentSection table th {
  background-color: #e9ecef;
  color: #333;
  font-weight: bold;
}

#studentSection table tr:nth-child(even) {
  background-color: #f2f2f2;
}

#studentSection table tr:hover {
  background-color: #e0e7ff;
}

#studentSection table td .input {
  display: flex;
  width: 110px;
  padding: 5px;
  font-size: 14px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  margin: auto;
}

.punteggio:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Stile per la barra del volume */
.volume-slider {
  width: 100%; /* La barra di scorrimento occupa tutta la larghezza della cella */
  margin-top: 10px; /* Distanza tra il campo di input numerico e la barra */
  -webkit-appearance: none; /* Per rimuovere lo stile predefinito */
  appearance: none; 
  height: 8px; /* Altezza della barra */
  background: linear-gradient(to right, #0078d7 0%, #ddd 0%); /* Gradiente iniziale */
  border-radius: 5px; /* Angoli arrotondati */
  outline: none; /* Rimuove il bordo blu predefinito */
  transition: background 0.2s ease; /* Aggiunge una transizione fluida */
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Rimuove lo stile predefinito */
  appearance: none; 
  width: 20px; /* Larghezza del "pollice" della barra */
  height: 20px; /* Altezza del "pollice" della barra */
  border-radius: 50%; /* Forma rotonda */
  background: #0078d7; /* Colore del "pollice" */
  cursor: pointer; /* Cambia il cursore quando si passa sopra */
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0078d7;
  cursor: pointer;
}


/* Aggiunta stili per responsive */
@media (max-width: 768px) {
  #studentSection, #profSection {
      width: 90%;
  }

  #groupTable th, #groupTable td {
      font-size: 1em;
      padding: 8px;
  }

  #studentSection h2, #profSection h2 {
      font-size: 2em;
  }

  #studentSection input, #studentSection button {
      font-size: 1.2em;
  }

  #prevButton, #nextButton {
      font-size: 1em;
      padding: 10px 20px;
  }

  #studentSection table, #groupTable {
      display: block;
      overflow-x: auto;
      white-space: nowrap;
  }

  #studentSection table th, #studentSection table td, #groupTable th, #groupTable td {
      display: table-cell;
      text-align: left;
      padding: 10px;
      border-bottom: 1px solid #ddd;
  }

  #studentSection table th::before, #studentSection table td::before, #groupTable th::before, #groupTable td::before {
      content: none;
  }

  #studentSection table th:last-child, #studentSection table td:last-child, #groupTable th:last-child, #groupTable td:last-child {
      border-bottom: 0;
  }
}
