:root {
  --primary-color: #6976AA;
  --accent-color: #3949ab;
  --bg-light: #f5f5f7;
  --text-dark: #333;
  --border-radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  margin: 0;
  padding: 20px;
  line-height: 1.6;
}

header {
  margin-bottom: 10px;
  text-align: center;
}

header a {
  display: inline-block;
  width: 100%;
  text-decoration: none;
  color: darkblue;
}

.logo-img {
  max-width: 400px;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.logo-img:hover {
  transform: scale(1.05);
}

.main {
  background-color: white;
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.title span {
  font-size: 18px;
  color: #666;
  font-weight: 400;
  color: #EE3E33;
}

/* Layout del Form */
.udienze-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-weight: 600;
  font-size: 14px;
  color: #555;
  margin-left: 4px;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  /* Evita zoom su iOS */
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  background-color: #fff;
  appearance: none;
  /* Rimuove stile nativo select su alcuni browser */
}

input[type="text"]:focus,
select:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

/* Bottone di invio */
.submit-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 10px;
}

.submit-btn:hover {
  background-color: var(--accent-color);
}

.submit-btn:active {
  transform: scale(0.98);
}

/* Stile del nome docente */
.docente {
  font-weight: bold;
  background-color: #999;
  color: white;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 5px;
}

/* Stile della materia */
.materia {
  font-style: italic;
  text-align: center;
  padding: 5px;
  text-transform: uppercase;
}

/* Stile dell'elemento del risultato */
.item {
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  margin: 15px auto;
  padding: 10px;
  background: #e9e9e9;
}

.giorno {
  font-weight: bold;
  text-align: center;
}

.ora {
  font-weight: bold;
  text-align: center;
}

.aula {
  font-weight: bold;
  text-align: center;
}

/* stile testo di errore */
.error {
  color: red;
  font-weight: bold;
  font-style: italic;
  font-size: 1.2em;
  padding-top: 10px;
  text-align: center;
}

/* Media Queries per Mobile */
@media only screen and (max-width: 480px) {
  body {
    padding: 10px;
  }

  .main {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .title {
    font-size: 22px;
  }
}
