:root {
    --background-color: #131314;
    --text-color: #e3e3e3;
    --input-bg-color: #1e1f20;
    --primary-color: #8ab4f8;
    --border-color: #3c4043;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
}

.chat-header h1 {
    font-size: 2em;
    font-weight: 500;
    text-align: center;
    color: var(--primary-color);
    margin: 20px 0;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
}

.user-message {
    background-color: var(--input-bg-color);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background-color: transparent;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    white-space: pre-wrap; /* Preserve line breaks from AI response */
}

.chat-input-form {
    padding: 20px;
}

#qa-form {
    position: relative;
    display: flex;
    align-items: center;
}

#question-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--input-bg-color);
    color: var(--text-color);
    font-size: 16px;
    outline: none;
}

#question-input:focus {
    border-color: var(--primary-color);
}

#submit-button {
    position: absolute;
    right: 10px;
    height: 38px;
    width: 38px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#submit-button:hover {
    background-color: rgba(138, 180, 248, 0.1);
}

#submit-button:disabled {
    color: var(--border-color);
    cursor: not-allowed;
}
