:root{--bg: #0e1117;--panel: #161b26;--panel-2: #1c2333;--border: #2a3348;--text: #e6e9f0;--muted: #8b93a7;--accent: #6d8dff;--accent-2: #9a6dff;--green: #34d399;--red: #f87171;--radius: 14px;font-family:Segoe UI,system-ui,-apple-system,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}#root,.app{height:100vh;display:flex;flex-direction:column}button{font:inherit;cursor:pointer}input,textarea{font:inherit;color:var(--text);background:var(--panel-2);border:1px solid var(--border);border-radius:8px;padding:8px 10px}input:focus,textarea:focus{outline:2px solid var(--accent);border-color:transparent}.hint{color:var(--muted)}.hint.small{font-size:12px;margin:6px 2px 0}.error{color:var(--red)}.btn{border:1px solid var(--border);background:var(--panel-2);color:var(--text);padding:9px 14px;border-radius:10px;transition:filter .15s}.btn:hover:not(:disabled){filter:brightness(1.2)}.btn:disabled{opacity:.45;cursor:default}.btn.primary{background:linear-gradient(135deg,var(--accent),var(--accent-2));border:none;font-weight:600}.btn.danger{background:#7f1d1d;border-color:#b91c1c}.btn.ghost{background:transparent}.chip{background:var(--panel-2);border:1px solid var(--border);color:var(--text);padding:6px 12px;border-radius:999px;font-size:13px}.chip:hover:not(:disabled){border-color:var(--accent)}.chip:disabled{opacity:.4}.topbar{display:flex;align-items:center;justify-content:space-between;position:relative;padding:10px 18px;border-bottom:1px solid var(--border);background:var(--panel)}.logo{font-size:20px;font-weight:700}.logo span{background:linear-gradient(135deg,var(--accent),var(--accent-2));-webkit-background-clip:text;background-clip:text;color:transparent}.topbar-actions{display:flex;gap:8px}.settings-pop{position:absolute;right:18px;top:56px;z-index:10;width:340px;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 12px 40px #0009}.settings-pop label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--muted)}.preset-row{display:flex;gap:8px}.layout{flex:1;display:grid;grid-template-columns:380px 1fr;min-height:0}@media(max-width:860px){.layout{grid-template-columns:1fr;grid-template-rows:auto 1fr}}.share-panel{border-right:1px solid var(--border);background:var(--panel);padding:16px;display:flex;flex-direction:column;gap:14px;overflow-y:auto}.panel-head{display:flex;justify-content:space-between;align-items:center}.panel-head h2{margin:0;font-size:16px}.live-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--green)}.dot{width:8px;height:8px;border-radius:50%;background:var(--green);animation:pulse 1.2s infinite}@keyframes pulse{50%{opacity:.3}}.video-wrap{position:relative;border-radius:var(--radius);overflow:hidden;background:#000;border:1px solid var(--border);aspect-ratio:16/9;display:grid;place-items:center}.video-wrap video{width:100%;height:100%;object-fit:contain}.video-wrap.empty video{display:none}.video-wrap .hint{padding:0 24px;text-align:center;font-size:14px}.share-controls{display:flex;gap:10px}.share-controls .btn{flex:1}.fps-row label{font-size:13px;color:var(--muted);display:block;margin-bottom:6px}.segmented{display:flex;border:1px solid var(--border);border-radius:10px;overflow:hidden}.segmented button{flex:1;padding:8px 4px;background:transparent;border:none;color:var(--muted);font-size:13px}.segmented button.active{background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-weight:600}.chat-panel{display:flex;flex-direction:column;min-height:0}.messages{flex:1;overflow-y:auto;padding:22px;display:flex;flex-direction:column;gap:14px}.welcome{margin:auto;text-align:center;max-width:480px;color:var(--muted)}.welcome h1{color:var(--text)}.welcome .brand{background:linear-gradient(135deg,var(--accent),var(--accent-2));-webkit-background-clip:text;background-clip:text;color:transparent}.msg{max-width:78%;padding:12px 16px;border-radius:var(--radius);line-height:1.55}.msg.user{align-self:flex-end;background:linear-gradient(135deg,#2b3a67,#35306b);border:1px solid #3d4a7a}.msg.user p{margin:0;white-space:pre-wrap}.msg.assistant{align-self:flex-start;background:var(--panel);border:1px solid var(--border);max-width:88%}.msg-thumbs{display:flex;gap:6px;margin-bottom:8px;flex-wrap:wrap}.msg-thumbs img{width:120px;border-radius:8px;border:1px solid var(--border)}.thinking{color:var(--muted);font-style:italic;margin:0;animation:pulse 1.4s infinite}.stream-indicator{color:var(--muted);font-size:12px;padding-left:6px}.msg-html h3,.msg-html h4{margin:10px 0 6px;color:var(--accent)}.msg-html p,.msg-html ul,.msg-html ol{margin:6px 0}.msg-html table{border-collapse:collapse;margin:8px 0;width:100%;font-size:14px}.msg-html th,.msg-html td{border:1px solid var(--border);padding:6px 10px;text-align:left}.msg-html th{background:var(--panel-2)}.msg-html blockquote{margin:8px 0;padding:8px 12px;border-left:3px solid var(--accent-2);background:var(--panel-2);border-radius:0 8px 8px 0}.msg-html .hl{color:#ffd479;font-weight:600}.msg-html .card,.msg-html .quiz{background:var(--panel-2);border:1px solid var(--border);border-radius:10px;padding:10px 14px;margin:10px 0}.msg-html .quiz{border-left:3px solid var(--accent)}.msg-html details{margin-top:8px}.msg-html summary{cursor:pointer;color:var(--accent);font-weight:600;-webkit-user-select:none;user-select:none}.msg-html summary:hover{text-decoration:underline}.msg-html details[open]{background:#10241c;border:1px solid #1d4535;border-radius:8px;padding:6px 10px}.msg-html code{background:var(--panel-2);padding:1px 5px;border-radius:5px;font-size:.9em}.quick-actions{display:flex;gap:8px;padding:0 22px 8px;flex-wrap:wrap}.composer{padding:0 22px 18px}.shot-tray{display:flex;gap:8px;margin-bottom:8px;flex-wrap:wrap}.shot{position:relative}.shot img{width:96px;border-radius:8px;border:1px solid var(--accent);display:block}.shot button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:none;background:var(--red);color:#fff;font-size:11px;line-height:1}.composer-row{display:flex;gap:10px;align-items:flex-end}.composer-row textarea{flex:1;resize:none;border-radius:12px;padding:12px 14px}.btn.send{padding:12px 20px;white-space:nowrap}::-webkit-scrollbar{width:9px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:5px}
