@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

#chat-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Varela Round', sans-serif;
}

#chat-box {
    width: 100%;
    height: 400px;
    border: 1px solid #ccc;
    padding: 10px;
    overflow-y: auto;
    border-radius: 10px;
    background-color: #f9f9f9;
}

.user-message,
.ai-message,
.error-message {
    display: inline-block;
    /* Adjusted to inline-block for content-based width */
    max-width: 80%;
    /* Prevents the message from being too wide */
    padding: 8px;
    border-radius: 10px;
    margin: 5px 10px;
    /* Consistent margin */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
    position: relative;
    /* Needed for absolute positioning inside */
    clear: both;
    /* Forces the element to appear on a new line */
}

.user-message {
    background-color: #eff0f1;
    border: 1px solid #d1d1d1;
    color: black;
    text-align: right;
    float: right;
    /* Align to the right */
}

.ai-message {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    color: black;
    text-align: left;
    float: left;
    /* Align to the left */
}

.error-message {
    text-align: center;
    color: red;
    background-color: #ffecec;
    border: 1px solid #f1b0b0;
    margin: 5px auto;
    /* Center error message */
    float: none;
    /* Normal flow */
}

#user-input {
    width: 100%;
    height: 50px;
    margin-top: 10px;
    font-family: 'Varela Round', sans-serif;
}

#send-button {
    margin-top: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
}