:root {
    --bg: #071018;
    --panel: #0b151f;
    --panel-2: #101d29;
    --border: rgba(255,255,255,.08);
    --text: #eef4f7;
    --muted: #8da0ae;
    --accent: #62dfe5;
    --user: #152635;
}

* {
    box-sizing: border-box;
}

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

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

button,
textarea {
    font: inherit;
}

.app {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    padding: 24px 18px;
    background: var(--panel);
    border-right: 1px solid var(--border);
}

.brand {
    margin-bottom: 28px;
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .08em;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .35em;
    margin-top: 4px;
}

#newChat {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--panel-2);
    cursor: pointer;
}

.navigation {
    margin-top: 24px;
    display: grid;
    gap: 6px;
}

.nav-item {
    border: 0;
    background: transparent;
    padding: 12px;
    border-radius: 10px;
    text-align: left;
    color: var(--muted);
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
    background: var(--panel-2);
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title {
    font-weight: 700;
}

.subtitle {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

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

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #55df91;
}

.conversation {
    flex: 1;
    overflow: auto;
    padding: 50px;
}

.welcome {
    max-width: 850px;
    margin: 70px auto 30px;
}

.welcome-eyebrow {
    color: var(--accent);
    font-size: 11px;
    letter-spacing: .2em;
}

.welcome h1 {
    margin: 12px 0 10px;
    font-size: clamp(38px, 6vw, 66px);
}

.welcome p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.message {
    max-width: 850px;
    margin: 0 auto 18px;
    padding: 18px;
    border-radius: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.message.user {
    background: var(--user);
}

.message.assistant {
    background: var(--panel);
    border: 1px solid var(--border);
}

.message-role {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: .08em;
}

.composer {
    padding: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

#message {
    flex: 1;
    min-height: 60px;
    max-height: 220px;
    resize: vertical;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
    outline: none;
}

#sendButton {
    min-width: 100px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #051016;
    font-weight: 700;
    cursor: pointer;
}

#sendButton:disabled {
    opacity: .5;
    cursor: not-allowed;
}

@media (max-width: 800px) {

    .sidebar {
        display: none;
    }

    .conversation {
        padding: 25px 16px;
    }

    .topbar {
        padding: 0 16px;
    }
}
