:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --input-bg: #f0f0f0;
    --user-bubble: #007bff;
    --gpt-bubble: #e0e0e0;
}

.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #ffffff;
    --input-bg: #333333;
    --user-bubble: #0056b3;
    --gpt-bubble: #444444;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: center;
}

#settings {
    position: absolute;
    top: 10px;
    display: flex;
    gap: 5px;
}

input, select, button {
    padding: 8px;
    border: none;
    border-radius: 5px;
}

button {
    background: var(--user-bubble);
    color: white;
    cursor: pointer;
}

#chat-container {
    width: 90%;
    max-width: 800px;
    height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--bg-color);
}

#messages {
    flex-grow: 1; /* Makes messages fill available space */
    overflow-y: auto;
    padding: 10px;
}

.message {
    padding: 8px;
    margin: 5px;
    border-radius: 10px;
    max-width: 80%;
}

.user {
    background: var(--user-bubble);
    color: white;
    align-self: flex-end;
}

.gpt {
    background: var(--gpt-bubble);
    color: var(--text-color);
    align-self: flex-start;
}

#input-container {
    display: flex;
    border-top: 1px solid #ccc;
    padding: 10px;
    background: var(--input-bg);
}

#input {
    flex-grow: 1;
    border-radius: 5px;
    padding: 8px;
}

#dark-mode-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

@media (min-width: 600px) {
    #chat-container {
        width: 60%;
        height: 500px;
    }
}

@media (min-width: 1200px) {
    #chat-container {
        width: 40%;
        height: 600px;
    }
}
