.ai-chat{height:calc(100dvh - var(--navbar-height) - 2rem);background:var(--color-bg);flex-direction:column;max-width:768px;min-height:500px;margin:0 auto;display:flex}.chat-messages{scroll-behavior:smooth;flex-direction:column;flex:1;gap:1.5rem;padding:1.5rem 1rem;display:flex;overflow-y:auto}.message{gap:.75rem;max-width:100%;animation:.2s fadeIn;display:flex}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.message-user{justify-content:flex-end}.message-user .message-content{background:var(--color-primary);color:#fff;border-radius:1.25rem 1.25rem 4px;width:fit-content;max-width:72%;padding:.75rem 1rem}.message-user .message-content:has(img):not(:has(p)){padding:.35rem}.message-user .message-content p{margin:0;line-height:1.5}.message-user .user-attached-image{border-radius:.875rem;max-width:280px;max-height:200px;margin-bottom:0;display:block}.message-user .user-attached-image+p{margin-top:.5rem}.user-image-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:4px;margin-bottom:0;display:grid}.user-image-grid .user-attached-image{border-radius:8px;width:100%;max-width:none;max-height:140px;margin-bottom:0}.user-image-grid+p{margin-top:.5rem}.message-assistant{align-items:flex-start}.message-icon{background:var(--color-bg-secondary);border:1px solid var(--color-border);width:24px;height:24px;color:var(--color-text-muted);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;margin-top:3px;font-size:12px;display:flex}.message-content{flex:1;min-width:0}.message-model-name{color:var(--color-text);margin-bottom:.3rem;font-size:.8rem;font-weight:600;line-height:24px}.message-text{color:var(--color-text);font-size:.95rem;line-height:1.7}.message-text p{margin:0 0 .75em}.message-text p:last-child{margin-bottom:0}.message-text h1,.message-text h2,.message-text h3,.message-text h4{margin:1em 0 .5em;font-weight:600;line-height:1.4}.message-text h1{font-size:1.25em}.message-text h2{font-size:1.15em}.message-text h3{font-size:1.05em}.message-text h4{font-size:1em}.message-text ul,.message-text ol{margin:.5em 0;padding-left:1.5em}.message-text li{margin:.25em 0}.message-text strong{font-weight:600}.message-text a{color:var(--color-primary);text-decoration:none}.message-text a:hover{text-decoration:underline}.message-text blockquote{border-left:3px solid var(--color-primary);color:var(--color-text-muted);margin:.75em 0;padding:.25em .75em}.message-text hr{border:none;border-top:1px solid var(--color-border);margin:1em 0}.message-text table{border-collapse:collapse;width:100%;margin:.75em 0;font-size:.9em}.message-text th,.message-text td{border:1px solid var(--color-border);text-align:left;padding:.5em .75em}.message-text th{background:var(--color-bg-secondary);font-weight:600}.message-text pre{background:#1e1e1e;border-radius:.75rem;margin:.75em 0;padding:1rem;font-size:.875rem;overflow-x:auto}[data-theme=light] .message-text pre{background:#f6f8fa}.message-text code{font-family:Fira Code,Monaco,Consolas,monospace;font-size:.875em}.message-text :not(pre)>code{background:var(--color-bg-secondary);color:var(--color-primary);border-radius:4px;padding:.15em .4em}.message-text pre code{color:#e6e6e6;background:0 0;padding:0}[data-theme=light] .message-text pre code{color:#24292e}.code-block-wrapper{margin:.75em 0;position:relative}.code-block-wrapper pre{margin:0}.code-copy-btn{color:#999;cursor:pointer;opacity:0;background:#ffffff1a;border:none;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;transition:opacity .15s,background .15s,color .15s;display:flex;position:absolute;top:8px;right:8px}[data-theme=light] .code-copy-btn{background:#0000000d}.code-block-wrapper:hover .code-copy-btn{opacity:1}.code-copy-btn:hover{color:#fff;background:#fff3}[data-theme=light] .code-copy-btn:hover{color:#333;background:#0000001a}.code-copy-btn.copied{color:#fff;opacity:1;background:#10b981}.message-actions{opacity:0;gap:2px;margin-top:.5rem;transition:opacity .15s;display:flex}.message:hover .message-actions,.message-actions:focus-within{opacity:1}.message-action-btn{width:32px;height:32px;color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:background .15s,color .15s;display:flex}.message-action-btn:hover{background:var(--color-bg-secondary);color:var(--color-text)}.message-action-btn.copied{color:#10b981}.streaming-cursor{color:var(--color-primary);margin-left:2px;animation:.7s step-end infinite blink;display:inline}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.message-thinking{align-items:center;gap:4px;padding:.5rem 0;display:flex}.message-thinking span{background:var(--color-text-muted);border-radius:50%;width:6px;height:6px;animation:1s ease-in-out infinite bounce}.message-thinking span:first-child{animation-delay:0s}.message-thinking span:nth-child(2){animation-delay:.15s}.message-thinking span:nth-child(3){animation-delay:.3s}@keyframes bounce{0%,80%,to{opacity:.4;transform:scale(1)}40%{opacity:1;transform:scale(1.2)}}.message-error .message-text{color:#ef4444}[data-theme=dark] .message-error .message-text{color:#f87171}.suggestions{flex-wrap:wrap;justify-content:center;gap:.5rem;padding:0 1rem 1rem;display:flex}.suggestion-chip{border:1px solid var(--color-border);color:var(--color-text);cursor:pointer;text-align:left;background:0 0;border-radius:1.25rem;max-width:100%;padding:.5rem 1rem;font-size:.875rem;transition:background .15s,border-color .15s}.suggestion-chip:hover{background:var(--color-bg-secondary);border-color:var(--color-primary)}.image-preview{flex-wrap:wrap;gap:.5rem;padding:.75rem 1rem 0;display:flex}.image-preview-thumb{flex-shrink:0;position:relative}.image-preview-thumb img{object-fit:cover;border:1px solid var(--color-border);border-radius:8px;width:64px;height:64px;display:block}.image-preview-remove{color:#fff;cursor:pointer;background:#ef4444;border:none;border-radius:50%;justify-content:center;align-items:center;width:20px;height:20px;padding:0;font-size:.85rem;line-height:1;transition:background .15s;display:flex;position:absolute;top:-6px;right:-6px}.image-preview-remove:hover{background:#dc2626}.chat-form{background:var(--color-bg);border-top:1px solid var(--color-border);padding:1rem}.chat-input-wrapper{background:var(--color-bg-secondary);border:1px solid var(--color-border);border-radius:1.5rem;align-items:flex-end;gap:.5rem;padding:.5rem .75rem;transition:border-color .15s;display:flex}.chat-input-wrapper:focus-within{border-color:var(--color-primary)}.chat-attach-btn{width:36px;height:36px;color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:color .15s,background .15s;display:flex}.chat-attach-btn:hover:not(:disabled){color:var(--color-text);background:var(--color-bg)}.chat-attach-btn:disabled{opacity:.5;cursor:not-allowed}.chat-input{resize:none;color:var(--color-text);background:0 0;border:none;outline:none;flex:1;max-height:160px;padding:.5rem .25rem;font-family:inherit;font-size:.95rem;line-height:1.5;overflow-y:auto}.chat-input::placeholder{color:var(--color-text-muted)}.chat-input:disabled{opacity:.6;cursor:not-allowed}.chat-send-btn,.chat-stop-btn{cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;padding:0;transition:background .15s,opacity .15s;display:flex}.chat-send-btn{background:var(--color-primary);color:#fff}.chat-send-btn:hover:not(:disabled){opacity:.9}.chat-send-btn:disabled{opacity:.5;cursor:not-allowed}.chat-stop-btn{color:#fff;background:#ef4444}.chat-stop-btn:hover{background:#dc2626}.sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (width<=640px){.ai-chat{height:calc(100dvh - var(--navbar-height))}.chat-messages{gap:1.25rem;padding:1rem .75rem}.message-user .message-content{max-width:90%}.suggestions{padding:0 .75rem 1rem}.chat-form{padding:.75rem}.message-actions,.code-copy-btn{opacity:1}}
