Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

style.css

316 lines4.7 KB

1* {
2 margin: 0;
3 padding: 0;
4 box-sizing: border-box;
5}
6​
7body {
8 font-family:
9 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
10 Cantarell, sans-serif;
11 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
12 min-height: 100vh;
13 display: flex;
14 align-items: center;
15 justify-content: center;
16 padding: 20px;
18​
19.container {
20 width: 100%;
21 max-width: 800px;
22 background: white;
23 border-radius: 16px;
24 box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
25 display: flex;
26 flex-direction: column;
27 height: 90vh;
28 max-height: 800px;
30​
31header {
32 padding: 24px;
33 border-bottom: 1px solid #e5e7eb;
34 text-align: center;
36​
37header h1 {
38 font-size: 28px;
39 color: #1f2937;
40 margin-bottom: 4px;
42​
43header p {
44 color: #6b7280;
45 font-size: 14px;
47​
48.chat-container {
49 display: flex;
50 flex-direction: column;
51 flex: 1;
52 overflow: hidden;
54​
55.messages {
56 flex: 1;
57 overflow-y: auto;
58 padding: 24px;
59 display: flex;
60 flex-direction: column;
61 gap: 16px;
63​
64.message {
65 display: flex;
66 flex-direction: column;
67 max-width: 75%;
68 animation: fadeIn 0.3s ease-in;
70​
71@keyframes fadeIn {
72 from {
73 opacity: 0;
74 transform: translateY(10px);
75 }
76 to {
77 opacity: 1;
78 transform: translateY(0);
79 }
81​
82.message.user {
83 align-self: flex-end;
85​
86.message.assistant {
87 align-self: flex-start;
89​
90.message-content {
91 padding: 12px 16px;
92 border-radius: 12px;
93 line-height: 1.5;
94 word-wrap: break-word;
96​
97.message.user .message-content {
98 background: #667eea;
99 color: white;
100 border-bottom-right-radius: 4px;
102​
103.message.assistant .message-content {
104 background: #f3f4f6;
105 color: #1f2937;
106 border-bottom-left-radius: 4px;
108​
109.message.typing .message-content {
110 animation: pulse 1.5s ease-in-out infinite;
112​
113@keyframes pulse {
114 0%,
115 100% {
116 opacity: 1;
117 }
118 50% {
119 opacity: 0.5;
120 }
122​
123.thinking {
124 background: #e0e7ff;
125 border: 1px solid #818cf8;
126 border-radius: 8px;
127 padding: 8px 12px;
128 font-size: 12px;
129 color: #3730a3;
130 margin-bottom: 8px;
131 font-style: italic;
133​
134.tool-call {
135 background: #fef3c7;
136 border: 1px solid #fbbf24;
137 border-radius: 8px;
138 padding: 12px;
139 font-size: 13px;
140 margin-bottom: 8px;
142​
143.tool-result {
144 background: #dbeafe;
145 border: 1px solid #60a5fa;
146 border-radius: 8px;
147 padding: 12px;
148 font-size: 13px;
149 margin-bottom: 8px;
151​
152.tool-result-label {
153 font-weight: 600;
154 color: #1e40af;
155 margin-bottom: 4px;
157​
158.tool-result-content {
159 color: #1e3a8a;
160 margin: 0;
161 font-size: 12px;
162 white-space: pre-wrap;
163 word-break: break-all;
165​
166.tool-name {
167 font-weight: 600;
168 color: #92400e;
169 display: inline-block;
170 margin-right: 8px;
172​
173.tool-state {
174 display: inline-block;
175 font-size: 11px;
176 padding: 2px 6px;
177 border-radius: 4px;
178 background: #fbbf24;
179 color: #78350f;
180 font-weight: 500;
181 margin-bottom: 4px;
183​
184.tool-args {
185 color: #78350f;
186 margin: 4px 0 0 0;
187 font-size: 12px;
188 white-space: pre-wrap;
189 word-break: break-all;
191​
192.tool-output {
193 color: #065f46;
194 background: #d1fae5;
195 border: 1px solid #34d399;
196 margin: 8px 0 0 0;
197 padding: 8px;
198 font-size: 12px;
199 white-space: pre-wrap;
200 border-radius: 4px;
202​
203.input-container {
204 padding: 16px;
205 border-top: 1px solid #e5e7eb;
206 background: white;
208​
209#chat-form {
210 display: flex;
211 gap: 12px;
212 align-items: flex-end;
214​
215#message-input {
216 flex: 1;
217 padding: 12px 16px;
218 border: 2px solid #e5e7eb;
219 border-radius: 12px;
220 font-size: 15px;
221 font-family: inherit;
222 resize: none;
223 max-height: 120px;
224 transition: border-color 0.2s;
226​
227#message-input:focus {
228 outline: none;
229 border-color: #667eea;
231​
232#message-input:disabled {
233 background: #f9fafb;
234 cursor: not-allowed;
236​
237#send-button {
238 padding: 12px 24px;
239 background: #667eea;
240 color: white;
241 border: none;
242 border-radius: 12px;
243 font-size: 15px;
244 font-weight: 600;
245 cursor: pointer;
246 transition:
247 background 0.2s,
248 transform 0.1s;
249 min-width: 80px;
251​
252#send-button:hover:not(:disabled) {
253 background: #5568d3;
255​
256#send-button:active:not(:disabled) {
257 transform: scale(0.98);
259​
260#send-button:disabled {
261 background: #d1d5db;
262 cursor: not-allowed;
264​
265.error {
266 padding: 12px 16px;
267 margin: 16px;
268 background: #fee2e2;
269 color: #991b1b;
270 border-radius: 8px;
271 border: 1px solid #fca5a5;
272 font-size: 14px;
274​
275/* Scrollbar styling */
276.messages::-webkit-scrollbar {
277 width: 8px;
279​
280.messages::-webkit-scrollbar-track {
281 background: #f9fafb;
283​
284.messages::-webkit-scrollbar-thumb {
285 background: #d1d5db;
286 border-radius: 4px;
288​
289.messages::-webkit-scrollbar-thumb:hover {
290 background: #9ca3af;
292​
293/* Responsive */
294@media (max-width: 640px) {
295 .container {
296 height: 100vh;
297 max-height: none;
298 border-radius: 0;
299 }
300​
301 .message {
302 max-width: 85%;
303 }
304​
305 header {
306 padding: 16px;
307 }
308​
309 header h1 {
310 font-size: 24px;
311 }
312​
313 .messages {
314 padding: 16px;
315 }