* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #212121;
    color: white;
    font-family: Arial, sans-serif;
}

.layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 240px;
    background: #171717;
    padding: 15px;
    overflow-y: auto;
}

.sidebar h2 {
    margin-top: 5px;
}

.new-chat {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 8px;
    background: #252525;
    color: white;
    cursor: pointer;
    margin-bottom: 15px;
}

.new-chat:hover {
    background: #333;
}

.history-item {
    padding: 10px;
    margin: 5px 0;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item:hover {
    background: #333;
}

.history-item.active {
    background: #444;
}

.app {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

#chat {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.message {
    padding: 14px;
    margin: 12px 0;
    border-radius: 10px;
    line-height: 1.5;
}

.user {
    background: #343541;
}

.ai {
    background: #444654;
}

.input-area {
    display: flex;
    margin-top: 15px;
}

input {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    outline: none;
}

button {
    margin-left: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
