
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: #343541; color: #ececf1; height: 100vh; display: flex; flex-direction: column; }
.app-container { display: flex; flex-direction: column; height: 100%; max-width: 800px; margin: 0 auto; width: 100%; background-color: #343541; position: relative; }


header {
    padding: 15px 20px;
    border-bottom: 1px solid #4d4d4f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #343541;
    z-index: 10;
}

.logo { font-weight: 600; font-size: 18px; color: #fff; display: flex; align-items: center; gap: 10px; }
.logo-img { width: 40px !important; height: 40px !important; object-fit: cover; border-radius: 50%; }
.badge { background: #fae69e; color: #343541; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; margin-left: 5px; }


#clear-history {
    background: transparent;
    border: 1px solid #565869;
    color: #8e8ea0;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#clear-history:hover {
    background-color: #40414f;
    color: #ff4d4d; /* Màu đỏ khi di chuột vào */
    border-color: #ff4d4d;
}


.chat-box { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; scroll-behavior: smooth; }
.welcome-message { text-align: center; margin-top: 50px; color: #fff; }
.welcome-message h2 { margin-bottom: 10px; }
.welcome-message p { color: #c5c5d2; font-size: 14px; }
.message { display: flex; gap: 15px; padding: 20px; border-radius: 8px; font-size: 15px; line-height: 1.6; animation: fadeIn 0.3s ease; }
.message.user { background-color: #343541; flex-direction: row-reverse; }
.message.bot { background-color: #444654; border: 1px solid #40414f; }
.avatar { width: 30px; height: 30px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.user .avatar { background-color: #5436DA; color: white; }
.bot .avatar { background-color: #19c37d; color: white; }
.content { flex: 1; word-wrap: break-word; }
.input-area { padding: 20px; background-color: #343541; border-top: 1px solid #4d4d4f; position: sticky; bottom: 0px; } /* Đã sửa lỗi bottom 50px của bạn về 0 cho đẹp, script JS mới đã fix lỗi đè nút */
.input-container { display: flex; background-color: #40414f; border-radius: 12px; padding: 10px; box-shadow: 0 0 15px rgba(0,0,0,0.1); border: 1px solid #565869; }
input { flex: 1; background: transparent; border: none; color: white; font-size: 16px; padding: 5px 10px; outline: none; font-family: 'Inter', sans-serif; }
#send-btn { background-color: #19c37d; border: none; border-radius: 8px; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
#send-btn:hover { background-color: #1a885d; }
#send-btn:disabled { background-color: #4e4e5e; cursor: not-allowed; }
.footer-note { text-align: center; font-size: 11px; color: #8e8ea0; margin-top: 10px; }
.typing-indicator span { display: inline-block; width: 6px; height: 6px; background-color: #ccc; border-radius: 50%; animation: typing 1s infinite; margin: 0 2px; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
