:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --primary-color: #3b82f6;
    --secondary-color: #1e293b;
    --accent-color: #10b981;
    --error-color: #ef4444;
    --font-family: 'Inter', sans-serif;
}

* {
    box_sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    background-color: var(--secondary-color);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
    color: #fff;
}

input,
button,
textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background-color: #1e293b;
    color: #fff;

    margin-bottom: 1rem;
}

textarea {
    width: 100%;
}

input,
button {
    width: auto
}

button {
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2563eb;
}

.chat-history {
    margin-bottom: 1rem;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

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

.message.assistant {
    align-self: flex-start;
    background-color: #334155;
}

.error {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.loading {
    text-align: center;
    color: #94a3b8;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}