:root {
    color-scheme: dark;

    --background: #111111;
    --surface: #181818;
    --surface-light: #222222;
    --border: #303030;
    --text: #fafaf7;
    --muted: #a3a3a3;
    --accent: #06d6a0;
    --accent-dark: #04aa80;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    width: 100%;
    height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.welcome-icon {
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #061f18;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.brand div:last-child {
    display: flex;
    flex-direction: column;
}

.brand span {
    color: var(--muted);
    font-size: 13px;
}

.new-conversation-button {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-light);
    color: var(--text);
    text-align: left;
}

.new-conversation-button:hover {
    border-color: var(--accent);
}

.sidebar-title {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.conversation-list {
    min-height: 0;
    overflow-y: auto;
}

.empty-state {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.chat {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    height: 100vh;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(17, 17, 17, 0.94);
}

.chat-header h1 {
    margin: 0;
    font-size: 18px;
}

.chat-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(6, 214, 160, 0.7);
}

.messages {
    overflow-y: auto;
    padding: 32px;
}

.welcome {
    width: min(620px, 100%);
    margin: 13vh auto 0;
    text-align: center;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 18px;
    font-size: 28px;
}

.welcome h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 40px);
}

.welcome p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    width: min(900px, calc(100% - 40px));
    margin: 0 auto 24px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.composer:focus-within {
    border-color: var(--accent);
}

.composer textarea {
    min-height: 44px;
    max-height: 200px;
    resize: none;
    overflow-y: auto;
    padding: 11px 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    line-height: 1.5;
}

.composer textarea::placeholder {
    color: #777777;
}

.composer button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: #061f18;
    font-weight: 800;
}

.composer button:hover {
    background: var(--accent-dark);
}

@media (max-width: 760px) {
    .app {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .chat-header {
        padding: 16px 18px;
    }

    .messages {
        padding: 20px;
    }

    .composer {
        width: calc(100% - 24px);
        margin-bottom: 12px;
    }
}
.message{

    display:flex;

    margin-bottom:20px;

}

.message.user{

    justify-content:flex-end;

}

.message.assistant{

    justify-content:flex-start;

}

.bubble{

    max-width:850px;

    padding:16px 18px;

    border-radius:14px;

    line-height:1.7;

    white-space:pre-wrap;

}

.message.user .bubble{

    background:#06D6A0;

    color:#111;

}

.message.assistant .bubble{

    background:#222;

    color:#FAFAF7;

}
