#lia-chat {
    max-width: 420px;
    border-radius: 18px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    background: #ffffff;
    border: 1px solid #eee;
}

/* HEADER */
#lia-header {
    background: #ffffff;
    color: #222;
    padding: 14px;
    font-weight: 600;
    text-align: center;
    font-size: 15px;
    border-bottom: 1px solid #eee;
}

/* MESSAGGI */
#lia-messages {
    height: 340px;
    overflow-y: auto;
    padding: 12px;
    background: #f7f7f8;
}
#lia-messages {
    scroll-behavior: smooth;
}

/* BOLLE BASE */
.user, .lia {
    padding: 10px 14px;
    margin: 6px 0;
    border-radius: 16px;
    display: inline-block;
    max-width: 80%;
    line-height: 1.4;
    font-size: 14px;
}

/* UTENTE */
.user {
    background: #4a90e2;
    color: white;
    margin-left: auto;
    text-align: left;
    border-bottom-right-radius: 4px;
}

/* LIA */
.lia {
    background: #ffffff;
    color: #222;
    border: 1px solid #e5e5e5;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* INPUT AREA */
#lia-input-area {
    display: flex;
    border-top: 1px solid #eee;
    background: #fff;
}

/* INPUT */
#lia-input {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
    font-size: 14px;
}

/* BUTTON */
#lia-send {
    background: #4a90e2;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: 0.2s;
}

#lia-send:hover {
    background: #5a4bcf;
    transform: scale(1.05);
    transition: 0.2s;
}

/* TYPING */
.typing {
    font-style: italic;
    opacity: 0.6;
}

/* SCROLLBAR (extra qualità) */
#lia-messages::-webkit-scrollbar {
    width: 6px;
}

#lia-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}
#lia-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    z-index: 9999;
    animation: fadeInUp 0.4s ease;
}

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