body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 80vh;
}

#chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    margin: 5px;
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 70%;
    word-wrap: break-word;
    position: relative;
}

.message.user {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
}

.message.bot {
    background-color: #f1f1f1;
    color: #333;
    align-self: flex-start;
}

#user-input-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

#user-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

#send-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

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

.thinking {
    display: none;
    margin: 10px;
    padding: 10px;
    border-radius: 10px;
    background-color: #f1f1f1;
    color: #555;
    align-self: flex-start;
    font-style: italic;
}

/* Preserve formatting for chatbot responses */
.message.bot {
    background-color: #f1f1f1;
    color: #333;
    align-self: flex-start;
    white-space: pre-wrap; /* Preserve newlines and spaces */
}

.stop-button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    font-size: 14px;
}

.stop-button:hover {
    background-color: #cc0000;
}

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

.message.bot ul {
    list-style-type: disc;
    padding-left: 20px;
}

.message.bot li {
    margin-bottom: 5px;
}
/* Responsive Design */
@media (max-width: 600px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
    }

    #chat-box {
        padding: 10px;
    }

    #user-input-container {
        padding: 8px;
    }

    #user-input {
        padding: 8px;
    }

    #send-btn {
        padding: 8px 16px;
    }
}