:root { color-scheme: dark; --bg: #0b0d12; --bg-elevated: #131722; --bg-soft: #1a2030; --border: #232a3b; --text: #e6e9f2; --text-dim: #95a0bb; --accent: #4f8cff; --accent-strong: #6aa1ff; --user: #2f7ff0; --assistant: #2a3145; --danger: #ff5577; --success: #2dd28b; --warning: #ffb84d; --radius: 14px; --shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; } * { box-sizing: border-box; } html, body { margin: 0; padding: 0; height: 100%; background: radial-gradient( 1200px 600px at 80% -10%, rgba(79, 140, 255, 0.18), transparent 60% ), radial-gradient( 900px 500px at -10% 110%, rgba(45, 210, 139, 0.12), transparent 60% ), var(--bg); color: var(--text); } body { display: flex; justify-content: center; padding: 12px; } .app { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; width: min(1440px, 100%); height: calc(100dvh - 24px); max-height: calc(100vh - 24px); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; } .camera-drawer { flex: 0 0 var(--camera-drawer-width, min(34%, 430px)); max-width: 0; min-width: 0; min-height: 0; overflow: hidden; pointer-events: none; opacity: 0; transform: translateX(-18px); transition: max-width 340ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease, transform 340ms cubic-bezier(0.22, 1, 0.36, 1); will-change: max-width, opacity, transform; } .camera-drawer.is-open { max-width: var(--camera-drawer-max-width, 430px); pointer-events: auto; transform: translateX(0); opacity: 1; } .camera-drawer__panel { display: flex; flex-direction: column; gap: 16px; height: 100%; min-width: 280px; padding: 18px; overflow-y: auto; background: linear-gradient(180deg, rgba(26, 32, 48, 0.98), rgba(11, 13, 18, 0.98)), var(--bg-elevated); border: 1px solid rgba(106, 161, 255, 0.35); border-width: 0 1px 0 0; border-radius: 0; box-shadow: none; } .camera-drawer__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; } .camera-drawer__eyebrow { margin: 0 0 4px; color: var(--text-dim); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; } .camera-drawer__header h2 { margin: 0; font-size: 16px; font-weight: 650; } .camera-drawer__state { flex-shrink: 0; padding: 5px 8px; border: 1px solid rgba(255, 184, 77, 0.34); border-radius: 999px; background: rgba(255, 184, 77, 0.12); color: #ffd18a; font-size: 11px; font-weight: 700; } .camera-drawer__preview { position: relative; aspect-ratio: 4 / 3; min-height: 200px; overflow: hidden; border: 1px solid rgba(149, 160, 187, 0.28); border-radius: 14px; background: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px), radial-gradient(circle at center, rgba(79, 140, 255, 0.22), transparent 42%), #0f141f; background-size: 34px 34px, 34px 34px, auto, auto; } .camera-drawer__video, .camera-drawer__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; z-index: 1; } .camera-drawer__preview.is-camera .camera-drawer__video { display: block; } .camera-drawer__preview.is-photo .camera-drawer__photo { display: block; } /* Hide the decorative lens/scan/placeholder once real media is showing. */ .camera-drawer__preview.is-camera .camera-drawer__lens, .camera-drawer__preview.is-photo .camera-drawer__lens, .camera-drawer__preview.is-camera .camera-drawer__scan, .camera-drawer__preview.is-photo .camera-drawer__scan, .camera-drawer__preview.is-camera .camera-drawer__placeholder, .camera-drawer__preview.is-photo .camera-drawer__placeholder { display: none; } .camera-drawer__placeholder { position: absolute; inset: auto 18px 16px; z-index: 2; color: rgba(214, 220, 235, 0.78); font-size: 12px; line-height: 1.5; text-align: center; } .camera-drawer__lens { position: absolute; top: 50%; left: 50%; width: 92px; height: 92px; border: 2px solid rgba(230, 233, 242, 0.38); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: inset 0 0 0 14px rgba(79, 140, 255, 0.1), 0 0 36px rgba(79, 140, 255, 0.18); } .camera-drawer__scan { position: absolute; left: 18px; right: 18px; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--success), transparent); box-shadow: 0 0 12px rgba(45, 210, 139, 0.8); } .camera-drawer__corner { position: absolute; z-index: 2; width: 28px; height: 28px; border-color: rgba(255, 255, 255, 0.7); } .camera-drawer__corner--tl { top: 16px; left: 16px; border-top: 2px solid; border-left: 2px solid; } .camera-drawer__corner--tr { top: 16px; right: 16px; border-top: 2px solid; border-right: 2px solid; } .camera-drawer__corner--bl { bottom: 16px; left: 16px; border-bottom: 2px solid; border-left: 2px solid; } .camera-drawer__corner--br { right: 16px; bottom: 16px; border-right: 2px solid; border-bottom: 2px solid; } .camera-drawer__question { margin: 0; color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.5; } .camera-drawer__button { width: 100%; margin-top: auto; min-height: 48px; border-radius: 12px; font-size: 15px; font-weight: 700; } .camera-drawer__button:disabled { opacity: 0.55; cursor: not-allowed; } .camera-drawer__sources { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .camera-drawer__source { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 38px; font-size: 13px; font-weight: 600; cursor: pointer; } /* Upload spans the full width on its own row below camera + switch. */ .camera-drawer__source--upload { grid-column: 1 / -1; } .camera-drawer__source.is-active { border-color: var(--success); color: var(--success); } .camera-drawer__source:disabled { opacity: 0.5; cursor: not-allowed; } .camera-drawer__samples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .camera-drawer__samples:empty { display: none; } .camera-drawer__sample { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: #0f141f; } .camera-drawer__sample img { width: 100%; height: 100%; object-fit: cover; display: block; } .camera-drawer__sample:hover { border-color: rgba(149, 160, 187, 0.6); } .camera-drawer__sample.is-selected { border-color: var(--success); box-shadow: 0 0 0 1px var(--success); } .app__body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 420px); gap: 12px; min-height: 0; } .app__main { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 0; min-height: 0; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); } .conversation { display: flex; min-height: 0; overflow: hidden; } .conversation.has-camera { --camera-drawer-width: min(34%, 430px); --camera-drawer-max-width: 430px; } /* Header ---------------------------------------------------------------- */ .app__header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); } .brand { display: flex; align-items: center; gap: 10px; } .brand h1 { font-size: 16px; margin: 0; letter-spacing: 0.2px; } .brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.18); } .connection { display: flex; align-items: end; gap: 8px; min-width: 0; } .connection__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; } .connection__field--chat { flex: 0 1 220px; } .connection__field span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; } .connection__field input { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 12px; outline: none; width: 100%; min-width: 0; } .connection__field input:disabled { color: var(--text-dim); background: rgba(148, 163, 184, 0.12); cursor: not-allowed; } .connection__field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18); } .chat-id-control { display: flex; min-width: 0; } .chat-id-control input { border-top-right-radius: 0; border-bottom-right-radius: 0; } .chat-id-control__copy { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 34px; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; background: var(--bg-soft); color: var(--text-dim); padding: 0; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; } .chat-id-control__copy:disabled { opacity: 0.45; cursor: not-allowed; } .chat-id-control__copy:not(:disabled):hover { color: var(--accent-strong); border-color: var(--accent); background: rgba(79, 140, 255, 0.08); } .chat-id-control__copy .copy-icon--check { display: none; color: var(--success); } .chat-id-control__copy.copied .copy-icon--default { display: none; } .chat-id-control__copy.copied .copy-icon--check { display: block; } .status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); white-space: nowrap; } .status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); } .status__dot--idle { background: var(--text-dim); } .status__dot--connecting { background: var(--warning); animation: pulse 1.2s ease-in-out infinite; } .status__dot--connected { background: var(--success); } .status__dot--error { background: var(--danger); } /* Chat ------------------------------------------------------------------ */ .chat { flex: 1 1 0; overflow: hidden; display: flex; flex-direction: column; min-width: 0; min-height: 0; } .chat__log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; } .chat__empty { margin: auto; width: min(100%, 460px); text-align: center; color: var(--text-dim); } .chat__empty p { margin: 4px 0; } .chat__hint code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 12px; } .bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; animation: bubble-in 0.16s ease-out; } .bubble--user { background: var(--user); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; } .bubble--assistant { background: var(--assistant); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; } .bubble--assistant.bubble--interrupted { opacity: 0.75; border-left: 2px solid var(--warning); } .bubble--system { align-self: center; background: transparent; color: var(--text-dim); font-size: 12px; border: 1px dashed var(--border); padding: 6px 10px; border-radius: 999px; } .bubble__role { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; opacity: 0.7; margin-bottom: 4px; } .bubble__image { display: block; max-width: 240px; width: 100%; border-radius: 10px; margin-bottom: 6px; } .bubble__image + .bubble__text:empty { display: none; } /* WebSocket log --------------------------------------------------------- */ .ws-log { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } .ws-log__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--bg-soft); } .ws-log__legend { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--text-dim); } .ws-log__legend-item { display: inline-flex; align-items: center; gap: 4px; } .ws-log__legend-item::before { content: ""; width: 8px; height: 8px; border-radius: 2px; } .ws-log__legend-item--send::before { background: var(--success); } .ws-log__legend-item--recv::before { background: var(--accent-strong); } .ws-log__header h2 { margin: 0; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; } .ws-log__header-left { display: flex; align-items: center; gap: 12px; min-width: 0; } .ws-log__body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; line-height: 1.4; color: var(--text-dim); } .ws-log__entry { display: grid; grid-template-columns: 58px 42px minmax(0, 1fr); gap: 6px; align-items: start; padding: 5px 4px; border-radius: 6px; white-space: pre-wrap; word-break: break-word; } .ws-log__entry:hover { background: rgba(255, 255, 255, 0.03); } .ws-log__time { color: var(--text-dim); opacity: 0.7; font-size: 10px; } .ws-log__direction { font-weight: 700; font-size: 9px; letter-spacing: 0.4px; text-transform: uppercase; padding: 2px 0; } .ws-log__detail { min-width: 0; overflow-wrap: anywhere; } .ws-log__entry--send .ws-log__direction { color: var(--success); } .ws-log__entry--recv .ws-log__direction { color: var(--accent-strong); } .ws-log__entry--system .ws-log__direction { color: var(--text-dim); } .ws-log__entry--error .ws-log__direction { color: var(--danger); } .ws-log__empty { color: var(--text-dim); opacity: 0.7; padding: 8px 4px; } .ws-log__group { border-radius: 6px; } .ws-log__group-header { display: grid; grid-template-columns: 58px 42px 14px minmax(0, 1fr); gap: 6px; align-items: start; width: 100%; margin: 0; padding: 5px 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; white-space: pre-wrap; word-break: break-word; } .ws-log__group-header:hover { background: rgba(255, 255, 255, 0.03); } .ws-log__group-header:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; } .ws-log__group-chevron { color: var(--text-dim); font-size: 9px; line-height: 1.6; user-select: none; } .ws-log__group-summary { min-width: 0; overflow-wrap: anywhere; color: var(--text); } .ws-log__group-children { margin: 0 0 4px 18px; padding-left: 8px; border-left: 1px solid var(--border); } .ws-log__entry--child { grid-template-columns: 58px 42px minmax(0, 1fr); opacity: 0.85; padding-left: 0; } .ws-log__group-omit { padding: 4px 4px 4px 0; font-size: 10px; font-style: italic; color: var(--text-dim); opacity: 0.75; } .ws-log__group--send .ws-log__direction { color: var(--success); } .ws-log__group--recv .ws-log__direction { color: var(--accent-strong); } /* Controls -------------------------------------------------------------- */ .controls { display: grid; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--border); background: var(--bg-elevated); } .meter { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; } .meter__fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--success), var(--accent)); transition: width 80ms linear; } .composer { display: flex; align-items: flex-end; gap: 8px; } .composer__input { flex: 1; resize: none; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.4; outline: none; min-height: 42px; max-height: 180px; overflow-y: auto; } .composer__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18); } .composer__input:disabled { opacity: 0.55; cursor: not-allowed; } .composer__send { padding: 10px 18px; border-radius: 12px; min-width: 84px; align-self: flex-end; } .composer__send:disabled { opacity: 0.5; cursor: not-allowed; } .controls__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .device-picker { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 160px; max-width: 240px; } .device-picker__label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; } .device-picker__select { appearance: none; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 7px 28px 7px 10px; font: inherit; font-size: 12px; outline: none; width: 100%; cursor: pointer; } .device-picker__select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18); } .device-picker__select:disabled { opacity: 0.5; cursor: not-allowed; } .mic-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease; } .mic-btn:disabled { opacity: 0.5; cursor: not-allowed; } .mic-btn:not(:disabled):hover { border-color: var(--accent); } .mic-btn:not(:disabled):active { transform: scale(0.98); } .mic-btn[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 0 0 6px rgba(255, 85, 119, 0.18); } .mic-btn__icon { display: block; } .indicators { display: flex; gap: 12px; margin-left: auto; } .indicator { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); } .indicator__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--border); } .indicator.is-active .indicator__dot--mic { background: var(--success); border-color: var(--success); box-shadow: 0 0 0 4px rgba(45, 210, 139, 0.2); } .indicator.is-active .indicator__dot--bot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.22); animation: pulse 1s ease-in-out infinite; } .indicator.is-active .indicator__dot--state { background: var(--warning); border-color: var(--warning); box-shadow: 0 0 0 4px rgba(255, 184, 77, 0.18); } .indicator.is-active .indicator__label { color: var(--text); } .indicator--state { max-width: 180px; } .indicator--state .indicator__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .btn { appearance: none; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); padding: 9px 14px; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; } .btn:hover { border-color: var(--accent); } .btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); } .btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); } .btn--primary.is-disconnect { background: transparent; color: var(--danger); border-color: var(--danger); } .btn--ghost { background: transparent; } .hint { margin: 0; font-size: 11px; color: var(--text-dim); opacity: 0.85; } .hint kbd { background: var(--bg-soft); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--text); } /* Animations ------------------------------------------------------------ */ @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } } @keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } } /* Responsive ------------------------------------------------------------ */ @media (max-width: 820px) { .conversation.has-camera { --camera-drawer-width: 46%; --camera-drawer-max-width: 420px; } .app__body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) min(240px, 32vh); } .ws-log__legend { display: none; } .hint { display: none; } } @media (max-width: 720px) { body { padding: 0; } .app { height: 100dvh; max-height: 100vh; border-radius: 0; border: none; padding: 10px; } .conversation.has-camera { --camera-drawer-width: 58%; --camera-drawer-max-width: calc(100vw - 120px); } .camera-drawer__panel { min-width: 220px; padding: 16px; } .camera-drawer__preview { min-height: 150px; } .camera-drawer__question { font-size: 16px; } .app__header { grid-template-columns: 1fr; } .connection { flex-direction: column; align-items: stretch; } .connection__field--chat { flex-basis: auto; } .ws-log__entry, .ws-log__group-header { grid-template-columns: 54px 38px minmax(0, 1fr); } .ws-log__group-header { grid-template-columns: 54px 38px 12px minmax(0, 1fr); } .status { justify-content: flex-end; } .device-picker { flex: 1 1 100%; max-width: none; } .indicators { margin-left: 0; } }