:root {
    --bg-main: #343541;
    --bg-sidebar: #171717;
    --bg-chat: #444654;
    --text-color: #ececf1;
    --text-color-header: #b4b4b4;
    --button-color: #10a37f;
    --button-hover: #0e8c6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-color);
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
}

.new-chat {
    background-color: transparent;
    border: 1px solid #4e4f5c;
    color: var(--text-color);
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-item {
    background-color: var(--bg-sidebar);
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.active {
    background-color: #212121;
}

.chat-item:hover {
    background-color: #3a3b42;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-btn {
    background: none;
    border: none;
    color: var(--text-color);
    text-align: left;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #212121;
}

.chat-header {
    padding: 1rem;
    background-color: #212121;
    border-bottom: 1px solid #2c2d33;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-color-header);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: 0.9rem 1rem;
    border-radius: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.message.bot {
    background-color: #303030;
    align-self: flex-start;
}

.message.user {
    background-color: #303030;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #212121;
    border-top: 1px solid #2c2d33;
}

.chat-input-area textarea {
    flex: 1;
    resize: none;
    background-color: #303030;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
}

.chat-input-area button {
    background-color: #ffffff;
    color: #000000;
    border: none;
    margin-left: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

.chat-input-area button:hover {
    background-color: var(--button-hover);
}
