body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  background-color: #ffffff;
  padding: 15px 20px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #000000;
  box-sizing: border-box;
}
.navbar .logo img {
  height: 60px;
  width: auto;
  display: block;
}
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  justify-content: flex-end;
}
.navbar li {
  display: inline-block;
  margin: 0 20px;
  position: relative;
  white-space: nowrap;
}
.navbar li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60px;
  background-color: #000000;
}
.navbar li.user-email-item {
  position: absolute;
  bottom: -30px;
  right: 20px;
  margin: 0;
  width: auto;
  max-width: 200px;
}
.navbar a {
  color: #000000;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  transition: color 0.3s;
}
.navbar a:hover {
  color: #333333;
}
.navbar .user-email {
  font-size: 14px;
  color: #2c3e50;
  font-weight: 700;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  max-width: 200px;
  overflow-wrap: break-word;
  word-break: break-all;
}

/* Registrazione page */
.registrazione-page {
  background-color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 140px;
  box-sizing: border-box;
}

/* Container */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1600px;
  padding: 20px;
  box-sizing: border-box;
  min-height: calc(100vh - 120px);
  padding-top: 180px;
}

/* Adatta per tablet */
@media screen and (max-width: 768px) {
  .container {
    max-width: 90%;
    padding: 10px;
    min-height: calc(100vh - 100px);
    padding-top: 160px;
  }
}

/* Adatta per smartphone */
@media screen and (max-width: 480px) {
  .container {
    max-width: 95%;
    padding: 5px;
    min-height: calc(100vh - 80px);
    padding-top: 140px;
  }
}

/* Login form */
.login-form {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 300px;
  text-align: center;
  margin-bottom: 20px;
}
.login-form h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #2c3e50;
}
.login-form input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-all;
}
.login-form input:focus {
  border-color: #2c3e50;
  outline: none;
}

/* Registrazione form */
#registrazioneForm {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  text-align: left;
  margin-bottom: 20px;
}
#registrazioneForm h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #2c3e50;
  text-align: center;
}
#registrazioneForm label {
  display: block;
  font-size: 16px;
  color: #2c3e50;
  margin-bottom: 8px;
}
#registrazioneForm input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-all;
}
#registrazioneForm input:focus {
  border-color: #2c3e50;
  outline: none;
}

/* User info */
.user-info {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  text-align: left;
  margin-bottom: 20px;
  display: none;
}
.user-info h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #2c3e50;
  text-align: center;
}
.user-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.user-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}
.user-info li:last-child {
  border-bottom: none;
}
.user-info li strong {
  flex: 1;
  font-size: 16px;
  color: #2c3e50;
}
.user-info li span[data-field] {
  flex: 2;
  font-size: 16px;
  color: #34495e;
  text-align: right;
  max-width: 200px;
  overflow-wrap: break-word;
  word-break: break-all;
  display: inline-block;
}
.user-info .edit-icon {
  cursor: pointer;
  color: #2c3e50;
  font-size: 18px;
  margin-left: 10px;
}

/* Contenitore per il modello 3D */
.model-3d-container {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 400px;
  height: 300px;
  z-index: 5;
}

/* Canvas per il modello 3D */
#modelCanvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}

/* Adatta per tablet */
@media screen and (max-width: 768px) {
  .model-3d-container {
    top: 25%;
    max-width: 60%;
    height: 200px;
  }
}

/* Adatta per smartphone */
@media screen and (max-width: 480px) {
  .model-3d-container {
    top: 20%;
    max-width: 70%;
    height: 150px;
  }
}

/* Bottom buttons */
.bottom-buttons {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  background-color: transparent;
  margin-top: 20px;
}
.bottom-buttons .button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

/* Pulsanti */
.btn {
  display: block;
  padding: 12px 30px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  background-color: #000000;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
  max-width: 200px;
  text-align: center;
  text-decoration: none;
  outline: none;
}
.btn:hover {
  background-color: #333333;
}
.btn a {
  color: white;
  text-decoration: none !important;
  display: block;
  width: 100%;
  height: 100%;
}

/* Google button */
.google-btn {
  width: 200px;
  height: 42px;
  display: block;
  cursor: pointer;
  transition: opacity 0.3s;
  object-fit: contain;
}
.google-btn:hover {
  opacity: 0.8;
}

/* Button container per entra-page */
.entra-page .button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Success and error messages */
.success-message {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0;
  text-align: center;
}
.error-message {
  color: #d32f2f;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0;
  text-align: center;
  background-color: #ffebee;
  padding: 10px;
  border-radius: 5px;
}

/* Password modal */
.password-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  width: 100%;
  max-width: 300px;
  text-align: center;
}
.password-modal h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #2c3e50;
}
.password-modal input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-all;
}
.password-modal input:focus {
  border-color: #2c3e50;
  outline: none;
}
.password-modal button {
  margin: 5px;
}

/* Confirmation message */
.confirmation-message {
  background: url('elegant_frame.png') no-repeat center center;
  background-size: contain;
  padding: 120px 60px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 1600px;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  position: absolute;
  top: 550px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.confirmation-message span {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0..2);
  max-width: 50%;
  max-height: 60%;
  overflow-wrap: break-word;
  word-break: break-word;
  display: inline-block;
  padding: 10px;
  line-height: 1.4;
}

/* Nuova sezione per rivenditori */
.rivenditori-section {
  margin-top: 40px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}
.rivenditori-section h2 {
  font-size: 28px;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 700;
}
.rivenditori-section p {
  font-size: 18px;
  color: #34495e;
  line-height: 1.6;
  margin-bottom: 20px;
}
.rivenditori-section .rivenditori-btn {
  background-color: #2c3e50;
  max-width: 250px;
  padding: 12px 40px;
}
.rivenditori-section .rivenditori-btn:hover {
  background-color: #34495e;
}

/* Media query per schermi piccoli (Android) */
@media screen and (max-width: 768px) {
  .navbar {
    padding: 10px;
    height: 100px;
  }
  .navbar .logo img {
    height: 40px;
    display: block;
  }
  .navbar ul {
    flex-wrap: nowrap;
    justify-content: flex-end;
    padding-right: 10px;
  }
  .navbar li {
    margin: 0 10px;
  }
  .navbar a {
    font-size: 16px;
  }
  .navbar li.user-email-item {
    right: 10px;
    max-width: 150px;
    bottom: -25px;
  }
  .navbar .user-email {
    font-size: 12px;
    max-width: 150px;
  }
  .navbar li:not(:last-child)::after {
    right: -10px;
    height: 40px;
  }
  .registrazione-page {
    padding-top: 120px;
  }
  .container {
    max-width: 90%;
    padding: 10px;
    min-height: calc(100vh - 100px);
    padding-top: 150px;
  }
  .login-form {
    max-width: 250px;
  }
  #registrazioneForm {
    max-width: 300px;
  }
  .user-info {
    max-width: 300px;
  }
  .user-info li span[data-field] {
    max-width: 150px;
  }
  .bottom-buttons {
    max-width: 300px;
    padding: 10px;
  }
  .btn {
    max-width: 180px;
    font-size: 16px;
    padding: 10px 20px;
  }
  .google-btn {
    width: 180px;
    height: 38px;
  }
  .entra-page .button-container {
    gap: 22px;
  }
  .confirmation-message {
    max-width: 600px;
    min-height: 300px;
    padding: 80px 40px;
    top: 200px;
  }
  .confirmation-message span {
    font-size: 20px;
    max-width: 60%;
    max-height: 65%;
  }
  .rivenditori-section {
    margin-top: 30px;
    padding: 20px;
    max-width: 90%;
  }
  .rivenditori-section h2 {
    font-size: 24px;
  }
  .rivenditori-section p {
    font-size: 16px;
  }
  .rivenditori-section .rivenditori-btn {
    max-width: 200px;
    padding: 10px 30px;
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .navbar {
    padding: 5px;
    height: 80px;
  }
  .navbar .logo img {
    height: 30px;
    display: block;
  }
  .navbar ul {
    flex-wrap: nowrap;
    justify-content: flex-end;
    padding-right: 5px;
  }
  .navbar li {
    margin: 0 5px;
  }
  .navbar a {
    font-size: 14px;
  }
  .navbar li.user-email-item {
    right: 5px;
    max-width: 100px;
    bottom: -20px;
  }
  .navbar .user-email {
    font-size: 10px;
    max-width: 100px;
  }
  .navbar li:not(:last-child)::after {
    right: -5px;
    height: 30px;
  }
  .registrazione-page {
    padding-top: 100px;
  }
  .container {
    max-width: 95%;
    padding: 5px;
    min-height: calc(100vh - 80px);
    padding-top: 120px;
  }
  .login-form {
    max-width: 200px;
  }
  #registrazioneForm {
    max-width: 250px;
  }
  .user-info {
    max-width: 250px;
  }
  .user-info li span[data-field] {
    max-width: 120px;
  }
  .bottom-buttons {
    max-width: 250px;
    padding: 5px;
  }
  .btn {
    max-width: 160px;
    font-size: 14px;
    padding: 8px 15px;
  }
  .google-btn {
    width: 160px;
    height: 34px;
  }
  .entra-page .button-container {
    gap: 20px;
  }
  .password-modal {
    max-width: 250px;
  }
  .confirmation-message {
    max-width: 300px;
    min-height: 200px;
    padding: 60px 30px;
    top: 150px;
  }
  .confirmation-message span {
    font-size: 16px;
    max-width: 70%;
    max-height: 70%;
  }
  .rivenditori-section {
    margin-top: 20px;
    padding: 15px;
    max-width: 95%;
  }
  .rivenditori-section h2 {
    font-size: 20px;
  }
  .rivenditori-section p {
    font-size: 14px;
    line-height: 1.5;
  }
  .rivenditori-section .rivenditori-btn {
    max-width: 180px;
    padding: 8px 25px;
    font-size: 14px;
  }
}

/* Stili per altre pagine */
.entra-page,
.chi-siamo-page,
.dove-siamo-page,
.descrizione-page,
.registrazione-page {
  margin-top: 120px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.entra-page::before,
.chi-siamo-page::before,
.dove-siamo-page::before,
.registrazione-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url('battery_pack.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: -1;
}

/* Stile per i contenitori bianchi */
.white-container {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  margin: 20px 0;
  box-sizing: border-box;
}

/* Rimuovi la sottolineatura dai pulsanti */
.btn {
  text-decoration: none !important;
  border: none !important;
}

.btn a {
  text-decoration: none !important;
  border: none !important;
}

/* Adatta l'immagine di sfondo */
.background-image {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
}

/* Aggiorna lo stile della pagina descrizione */
.descrizione-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url('battery_pack.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: -1;
}

/* Media queries per la responsività */
@media screen and (max-width: 768px) {
  .model-3d-container {
    top: 25%;
    max-width: 60%;
    height: 200px;
  }
  
  .white-container {
    margin: 15px;
    padding: 20px;
  }
}

@media screen and (max-width: 480px) {
  .model-3d-container {
    top: 20%;
    max-width: 70%;
    height: 150px;
  }
  
  .white-container {
    margin: 10px;
    padding: 15px;
  }
}

/* Stile per il contenitore del download dell'app */
.app-download-container {
  background-color: white;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Opzionale, per un effetto simile alla sezione rivenditori */
}

/* Stile per il testo della sezione download */
.app-download-text {
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  color: #333;
}

/* Stile per il pulsante "SCARICA L'APP" all'interno del contenitore */
.app-download-container .btn {
  background-color: black;
  color: white;
}

/* Stile per la nota */
.note {
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  color: #666;
  margin-top: 10px;
}