/* CSS per modali di autenticazione */

/* Modal overlay */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* Modal content */
.modal-content {
    background-color: #fff;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Form styles */
.auth-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Auth button */
.auth-btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: #0056b3;
}

.auth-btn:active {
    transform: translateY(1px);
}

/* Auth switch */
.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-switch a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Error and success messages */
.error-message, .success-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* User menu styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-menu span {
    color: #54f4fc;
    font-family: "Montserrat-Bold", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Sign up button styles - mantiene stili originali */
.sign-up {
    /* Stili originali preservati */
    color: #54f4fc;
    text-align: left;
    font-family: "Montserrat-Bold", sans-serif;
    font-size: 18px;
    line-height: 164%;
    letter-spacing: 0.05em;
    font-weight: 700;
    position: relative;
    
    /* Aggiunte per il funzionamento come button */
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    outline: none;
}

.sign-up:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.sign-up:active {
    transform: translateY(0);
}

.sign-up:focus {
    outline: 2px solid rgba(84, 244, 252, 0.3);
    outline-offset: 2px;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "Montserrat-Bold", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.logout-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 8px;
    }
    
    .user-menu span {
        font-size: 12px;
    }
}
