body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
}

#chat-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: height 0.3s ease;
}

.chat-expanded {
    height: 90vh !important;
}

#chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

#chat-resize {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#chat-log {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.message {
    display: flex;
    align-items: flex-end;
    margin: 10px 0;
}

.message.bot {
    flex-direction: row;
}

.message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 8px;
    font-size: 28px;
}

.bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
}

.bot .bubble {
    background: #eee;
    color: #333;
    border-bottom-left-radius: 0;
}

.user .bubble {
    background: #007bff;
    color: #fff;
    border-bottom-right-radius: 0;
}

#chat-form {
    display: flex;
    border-top: 1px solid #ddd;
}

#chat-input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 16px;
    outline: none;
}

#chat-submit {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 16px;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #aaa;
    border-radius: 50%;
    animation: typing 1s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-4px); opacity: 1; }
    100% { transform: translateY(0); opacity: 0.3; }
}
