:root { color-scheme: dark; --bg: #212121; --sidebar: #171717; --surface: #2f2f2f; --surface-hover: #3a3a3a; --border: #484848; --text: #ececec; --muted: #a3a3a3; --subtle: #777; --danger: #ef8f97; }
* { box-sizing: border-box; }
button[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { height: 100%; display: flex; }
.sidebar { width: 260px; flex: 0 0 260px; display: flex; flex-direction: column; padding: 12px 10px; background: var(--sidebar); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 7px 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.brand-mark, .welcome-mark { display: grid; place-items: center; border: 1px solid #5a5a5a; background: #292929; color: #e5e5e5; font-weight: 700; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; font-size: 9px; }
.sidebar-icon, .menu-button, .topbar-button { width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 21px; }
.sidebar-icon:hover, .menu-button:hover, .topbar-button:hover { color: var(--text); background: #292929; }
.mobile-only { display: none; }
.new-chat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid #444; border-radius: 7px; background: transparent; color: var(--text); text-align: left; }
.new-chat:hover, .nav-button:hover, .history-item:hover { background: #292929; }
.new-chat span { font-size: 20px; color: #c6c6c6; }
.nav-button { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 4px; border: 0; border-radius: 7px; padding: 10px 12px; background: transparent; color: #c7c7c7; text-align: left; }
.nav-button span { width: 18px; color: #bdbdbd; text-align: center; font-size: 17px; }
.search-box { padding: 5px 3px 4px; }
.search-box input { width: 100%; padding: 8px 10px; border: 1px solid #444; border-radius: 7px; outline: none; background: #252525; color: var(--text); }
.search-box input:focus { border-color: #777; }
.history-heading { padding: 20px 12px 8px; color: var(--subtle); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.history-list { overflow: auto; }
.history-item { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 0; border-radius: 7px; padding: 10px 12px; background: transparent; color: #dedede; text-align: left; }
.history-item.active { background: #2a2a2a; }
.history-empty { padding: 8px 12px; color: var(--subtle); font-size: 12px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #292929; padding-top: 9px; }
.workspace { position: relative; min-width: 0; height: 100%; flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.topbar { position: relative; height: 60px; flex: 0 0 60px; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid #303030; background: rgba(33,33,33,.94); }
.menu-button { display: none; }
.model-picker { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; max-width: calc(100% - 132px); border: 0; background: transparent; color: var(--text); padding: 7px 9px; border-radius: 7px; font-size: 15px; white-space: nowrap; }
.model-picker:hover { background: var(--surface-hover); }
.model-picker strong { font-weight: 600; }.model-muted, .chevron { color: var(--muted); font-size: 12px; font-weight: 400; }.chevron { font-size: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.chat { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 24px 190px; overflow-y: auto; }
.welcome { max-width: 780px; margin: 18vh auto 0; text-align: center; }
.welcome-mark { width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 12px; font-size: 12px; }
.welcome h1 { margin: 0 0 26px; color: var(--text); font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 auto; max-width: 640px; }
.suggestions button { min-height: 58px; padding: 11px 14px; border: 1px solid #454545; border-radius: 10px; background: transparent; color: #c5c5c5; text-align: left; }
.suggestions button:hover { background: #2b2b2b; border-color: #626262; color: var(--text); }
.message-row { display: flex; margin: 22px 0; }.message-row.user { justify-content: flex-end; }.bubble { max-width: min(78%, 650px); padding: 10px 13px 6px; white-space: pre-wrap; overflow-wrap: anywhere; }.user .bubble { border-radius: 16px 16px 4px 16px; background: #303030; }.assistant .bubble { padding-left: 0; background: transparent; }
.bubble-time { display: block; margin-top: 4px; color: #777; font-size: 10px; text-align: right; }.audio-bubble { display: flex; align-items: center; gap: 9px; }.audio-bubble span { color: #c5c5c5; }
.assistant .message-actions { display: flex; gap: 2px; margin-top: 5px; }.message-action { width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }.message-action:hover { background: var(--surface-hover); color: var(--text); }
.composer-wrap { position: fixed; left: calc(50% + 130px); bottom: 15px; transform: translateX(-50%); width: min(calc(100% - 320px), 760px); z-index: 1; }.composer { display: flex; align-items: flex-end; gap: 7px; width: 100%; padding: 8px 9px; border: 1px solid #4b4b4b; border-radius: 14px; background: var(--surface); box-shadow: 0 5px 20px rgba(0,0,0,.22); }.composer textarea { flex: 1; min-height: 36px; max-height: 130px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); padding: 8px 5px; }.composer textarea::placeholder { color: #999; }.attach-button, .composer-button, .send-button { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 50%; }.attach-button, .composer-button { background: transparent; color: var(--muted); font-size: 21px; }.attach-button:hover, .composer-button:hover { background: var(--surface-hover); color: var(--text); }.send-button { background: #e7e7e7; color: #222; font-size: 20px; }.send-button:hover { background: white; }.stop-button { background: var(--danger); color: #231719; font-size: 12px; }.composer-note { margin: 7px 0 0; color: #858585; font-size: 11px; text-align: center; }.recording-hint { position: fixed; bottom: 89px; left: 50%; transform: translateX(-50%); margin: 0; color: var(--danger); font-size: 12px; }
dialog { width: min(420px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 12px; color: var(--text); background: var(--surface); }.settings-card { display: grid; gap: 10px; padding: 20px; }.dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }.dialog-header h2 { margin: 0; font-size: 20px; }.settings-card label { color: var(--muted); font-size: 12px; }.settings-card input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 7px; outline: 0; background: var(--bg); color: var(--text); }.settings-card input:focus { border-color: #858585; }.helper { margin: 0 0 5px; color: var(--muted); font-size: 12px; }.primary-button { padding: 10px 13px; border: 0; border-radius: 7px; background: #e7e7e7; color: #222; font-weight: 650; }
.model-option { display: grid; gap: 1px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); text-align: left; }.model-option:hover { background: var(--surface-hover); }.model-option span { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .sidebar { display: none; position: fixed; inset: 0 auto 0 0; z-index: 5; box-shadow: 14px 0 40px rgba(0,0,0,.4); }.sidebar.open { display: flex; }.mobile-only { display: block; }.menu-button { display: block; }.topbar { padding: 10px 12px; }.model-muted { display: none; }.chat { padding: 24px 14px 170px; }.welcome { margin-top: 17vh; }.welcome h1 { font-size: 25px; }.suggestions { grid-template-columns: 1fr; }.bubble { max-width: 88%; }.composer-wrap { left: 50%; width: calc(100% - 24px); bottom: max(12px, env(safe-area-inset-bottom)); }.composer-note { font-size: 10px; } }
.mic-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer-button.recording { background: var(--danger); color: #231719; }
.composer { flex-direction: column; align-items: stretch; gap: 3px; }
.composer textarea { width: 100%; min-height: 42px; flex: none; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.composer-footer-right, .composer-actions { display: flex; align-items: center; gap: 3px; }
.model-picker { position: static; left: auto; transform: none; max-width: 220px; padding: 7px 8px; font-size: 12px; }
.topbar-actions { margin-left: auto; }
