body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-image: url('../../img/backgroundimage.jpg'); /* Replace with the actual path to your image */
  background-size: cover; /* Ensures the image covers the entire body */
  background-position: center; /* Centers the image */
  background-repeat: no-repeat; /* Prevents the image from repeating */
  height: 100vh; /* Sets the body height to fill the viewport */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenitore principale */
.container {
  max-width: 400px;
  width: 100%;
  padding: 30px;
  background-color: white;
  border-radius: 15px; /* Rounded corners */
  border: 7px solid #f1f1f1;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 10px 10px rgba(0, 0, 0, 0.425); /* Stronger shadow effect */
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s ease;
  z-index: 1; /* Ensure it's above other elements */
  position: relative; /* Ensure it stands out on top */
}

/* Hover effect for more lift */
.container:hover {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 15px 15px rgba(0, 0, 0, 0.25); /* Increased shadow depth on hover */
}

h1 {
  color: #333;
  font-size: 24px;
  margin-bottom: 20px;
}

/* Form */
form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

label {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  color: #333;
}

input.testo {
  width: 80%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 16px;
  text-align: center;
  transition: border-color 0.3s;
}

input.testo:focus {
  border-color: #007bff; /* Cambia il colore del bordo in blu al focus */
  outline: none;
}

input.submit {
  width: 60%;
  padding: 10px;
  margin-top: 20px;
  border-radius: 5px;
  border: none;
  background-color: #007bff;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input.submit:hover {
  background-color: #0056b3; /* Colore al passaggio del mouse */
}

/* Toggle password */
.toggle-password {
  margin-top: -10px;
  margin-bottom: 15px;
  cursor: pointer;
  color: #007bff;
  font-size: 12px;
}

.toggle-password:hover {
  text-decoration: underline;
}

/* Checkbox Ricorda */
label[for="remember"] {
  font-size: 14px;
  margin-top: 10px;
  color: #666;
}

input[type="checkbox"] {
  margin-right: 10px;
}

.avviso {
  color: red;
  font-size: 12px;
}

/* Logo */
img {
  max-width: 400px;
  margin-bottom: 20px;
}


/* ============================= */
/* RESPONISVE FOR MOBILE DEVICES */
/* ============================= */

/* Tablet e smartphone orizzontali */
@media only screen and (max-width: 768px) {
  body {
    /* centra di più la porzione visibile */
    background-position: top center;
  }
  .container {
    max-width: 75%;      /* più snello */
    padding: 20px;       /* meno ingombro */
    border-width: 5px;   /* bordo più sottile */
  }
  input.testo {
    width: 80%;         /* occupa tutto lo spazio */
  }
  input.submit {
    width: 8%;
    padding: 12px;
    font-size: 18px;
  }
  h1 {
    font-size: 20px;
  }
}

/* Smartphone verticali */
@media only screen and (max-width: 480px) {
  body {
    /* opzionale: sfondo più leggero o colore di fallback */
    background-position: top center;

  }
  .container {
    max-width: 75%;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  }
  h1 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  label {
    font-size: 13px;
  }
  input.testo, input.submit {
    font-size: 16px;
  }
  .toggle-password {
    font-size: 14px;
  }
}