


/* Label */
label {
    font-size: 14px;
    color: #444;
    margin-bottom: 5px;
    display: block;
}

/* Input */
.userInput,
.passwdInput {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}


.loginBody {
    font-family: var(--main-font);
    background-color: #ff00004d;
    background-image: url('../immagini/bgmain.jpg');
    display: flex;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}

.inputContainer {

    margin: 20px 0;
    position: relative;

}

.inputContainer label {

    position: absolute;
    transform: translateY(-50%);
    top: 40%;
    left: 15px;
    font-size: 16px;
    pointer-events: none;
    color: #444;
        padding: 0 5px;
    transition: .5s;
}   

.inputContainer input {

    width: 360px;
    height: 60px;
    color:  #000000;
    font-size: 16px;
    padding: 0 15px;
    border: 1.2px solid rgb(220, 223, 223);
    background: transparent;
    outline: none;
    border-radius: 5px;


}

.inputContainer input:focus~label,
.inputContainer.filled label,
.inputContainer.focussed label {
    top: 0;
    background: linear-gradient(45deg, #d32d1f, #f2492a);
    color: white;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 6px;
}

.inputContainer input:focus {
    border-color: #d32d1f;
    box-shadow: 0 0 5px rgba(243, 73, 42, 0.4);
}

.actionsLogin {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: flex-end;
}


/* Animazione fade-in */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Contenitore del login */
.login-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    margin-bottom: 30%;
    backdrop-filter: blur(10px); /* Effetto sfocato sullo sfondo */
    margin: auto;
    margin-top: 10%;
}



/* Titolo del form */
.logH1 {
    text-align: center;
    background: linear-gradient(45deg, #b50a16, #d32d1f, #f2492a);
    color: white;
    padding: 25px 15px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    font-size: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}



.logH1:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}


/* Gruppo di form */
.form-group {
    margin-bottom: 20px;
}

.loginBtn{
    width: 100%;
    padding: 12px;
    background-color: #b50a16;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
}

.loginBtn:hover {
    background-color: var(--hover-color);
    transform: scale(1.01) translateY(-5px); /* Effetto hover più dinamico */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Pulsante di registrazione */
.registratiBtn {
    width: 50%;
    left: 50%;
    text-decoration: none;
    text-align: center;
    color: white;
    margin-top: 15px;
    padding: 12px;
    background-color: var(--main-color);
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.registratiBtn:hover {
    background-color: #d01924;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.registratiBtn:active {
    transform: scale(1.05);
}

/* Messaggio di errore */
.error-message {
    width: auto;
    padding: 15px;
    background-color: #e74c3c;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    animation: slideIn 0.5s ease-out;
}

.error-message i {
    margin-right: 10px;
    font-size: 20px;
}

.error-message strong {
    font-weight: bold;
}

/* Animazione messaggio errore */
@keyframes slideIn {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0); }
}

/* Media Query per schermi di larghezza media (come iPhone e Realme) */
@media (max-width: 768px) {
    /* Modifiche al layout per dispositivi con schermo più piccolo */
    
    .login-container {
        padding: 20px;
        max-width: 350px;
        margin-top: 5%;
    }

    .logH1 {
        font-size: 20px;
        padding: 20px 10px;
    }

    .userInput, .passwdInput, .inputContainer {
        font-size: 12px;
        padding: 10px;
    }

    .loginBtn, .registratiBtn {
        font-size: 16px;
        padding: 10px;
    }
    
    .error-message {
        font-size: 14px;
        padding: 12px;
    }
}

/* Media Query per dispositivi molto piccoli (es. schermi più piccoli di 480px) */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
        max-width: 300px;
        margin-top: 10%;
    }

    .logH1 {
        font-size: 18px;
        padding: 15px 8px;
    }

    .userInput, .passwdInput {
        font-size: 12px;
        padding: 8px;
    }

    .loginBtn, .registratiBtn {
        font-size: 14px;
        padding: 8px;
    }

    .error-message {
        font-size: 12px;
        padding: 10px;
    }
}


