/* Stile generale */
html {
    box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #fc6f6f, #89fa98);
    color: #222;
    font-size: 14px;
    display: block; /* Cambia il display da flex a block per evitare la centratura verticale */
    min-height: 100vh; /* Aggiungi un'altezza minima per riempire tutta la pagina */
}
  
/* Contenitore principale */
.container {
    text-align: center;
    max-width: 800px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 2%;
    margin: 2%; /* Margine aggiunto */
    width: 90%;
    margin-bottom: 5%;
    margin: 4% auto;
    margin-top: 3%; /* Distanza dal pulsante hamburger */
}

/* -------- Buttons --------*/
button[type="submit"] {
  display: block;
  background: linear-gradient(135deg, #4884f4, #56fc2d);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(100, 200, 255, 0.3);
  margin: 10px auto;
}

button[type="submit"]:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

button[type="submit"]:disabled {
  background: linear-gradient(135deg, #1a3565, #15400a);
  color: #000000; /* Testo più chiaro */
  cursor: not-allowed; /* Cursore che indica disabilitazione */
  opacity: 0.7; /* Opacità ridotta */
  transform: none; /* Rimuove l'animazione del movimento */
}

.btnBackHome {
  display: block;
  background: linear-gradient(135deg, #6b9eff, #f76060);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(100, 200, 255, 0.3);
  margin: 10px auto;
}

.btnBackHome:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #3c81ff, #f76060);
  box-shadow: 0 5px 25px rgba(255, 255, 255, 0.6);
}

.switchLoginSignupBtn {
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 120, 180, 0.3);
}

.switchLoginSignupBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 25px rgba(255, 120, 180, 0.5);
}

/* ---------------------- FOOTER ---------------------- */
footer {
  text-align: center;
  background: linear-gradient(90deg, #ff4d4d, #ff9a3d, #f9a426);
  color: white;
  padding: 15px 10px;
  font-size: 0.95rem;
  margin-top: auto;
}

footer a {
  color: white;
  text-decoration: underline;
  transition: opacity 0.3s;
}

footer a:hover {
  opacity: 0.8;
}

/* ---------------------- ANIMATIONS ---------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    /* Riduci padding e margini */
    .container {
        width: 95%;
        padding: 5%;
        margin-top: 5%;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    /* Navbar compatta */
    nav {
        padding: 10px 20px;
        height: 8vh;
    }

    /* Mostra hamburger */
    .hamburger-menu {
        display: block;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 1100;
        margin-bottom: 5%;
    }

    /* Menu a comparsa da destra */
    nav .menu {
        flex-direction: column;
        align-items: center;
        justify-content: start;
        background: linear-gradient(135deg, #ff6f61, #e74c3c);
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: auto;
        padding: 80px 30px;
        box-shadow: -4px 0 10px rgba(0,0,0,0.15);
        transition: right 0.4s ease-in-out;
        border-top-left-radius: 16px;
        border-bottom-left-radius: 16px;
        z-index: 1000;
    }

    /* Mostra menu quando attivato */
    nav .menu.show {
        right: 0;
    }

    /* Stile dei link nel menu mobile */
    nav .menu li {
        width: 100%;
        margin: 10px 0;
    }

    nav .menu li a {
        color: #ffdede;
        background: none;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        transition: background 0.3s, color 0.3s;
    }

    nav .menu li a:hover,
    nav .menu li a.selezionata {
        background-color: #ffd6d6;
        color: #a4161a;
        font-weight: bold;
    }

    /* Effetto overlay leggero per il resto della pagina */
    body.menu-open::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.3);
        z-index: 900;
    }

    footer {
        font-size: 0.8rem;
        padding: 0.8rem 0;
    }
}