akhaliq HF Staff commited on
Commit
2ed9103
·
verified ·
1 Parent(s): 73abbf9

Upload style.css with huggingface_hub

Browse files
Files changed (1) hide show
  1. style.css +382 -42
style.css CHANGED
@@ -1,76 +1,416 @@
1
  * {
2
- box-sizing: border-box;
3
- padding: 0;
4
  margin: 0;
5
- font-family: sans-serif;
 
6
  }
7
 
8
- html,
9
  body {
10
- height: 100%;
 
 
 
 
 
 
11
  }
12
 
13
- body {
14
- padding: 32px;
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
- body,
18
- #container {
 
 
19
  display: flex;
20
- flex-direction: column;
21
- justify-content: center;
22
  align-items: center;
23
  }
24
 
25
- #container {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  position: relative;
27
- gap: 0.4rem;
 
 
28
 
29
- width: 640px;
30
- height: 640px;
31
- max-width: 100%;
32
- max-height: 100%;
 
33
 
34
- border: 2px dashed #D1D5DB;
35
- border-radius: 0.75rem;
36
- overflow: hidden;
37
  cursor: pointer;
38
- margin: 1rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
- background-size: 100% 100%;
41
- background-position: center;
42
- background-repeat: no-repeat;
43
- font-size: 18px;
44
  }
45
 
46
- #upload {
 
 
 
 
 
 
 
 
 
47
  display: none;
48
  }
49
 
50
- svg {
51
- pointer-events: none;
 
 
 
 
 
52
  }
53
 
54
- #example {
55
- font-size: 14px;
56
- text-decoration: underline;
57
- cursor: pointer;
 
 
58
  }
59
 
60
- #example:hover {
61
- color: #2563EB;
62
  }
63
 
64
- .bounding-box {
65
- position: absolute;
66
- box-sizing: border-box;
67
- border: solid 2px;
68
  }
69
 
70
- .bounding-box-label {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  color: white;
72
- position: absolute;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  font-size: 12px;
74
- margin: -16px 0 0 -2px;
75
- padding: 1px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
 
1
  * {
 
 
2
  margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
  }
6
 
 
7
  body {
8
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
9
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
10
+ min-height: 100vh;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ padding: 20px;
15
  }
16
 
17
+ .container {
18
+ width: 100%;
19
+ max-width: 900px;
20
+ background: white;
21
+ border-radius: 20px;
22
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
23
+ overflow: hidden;
24
+ display: flex;
25
+ flex-direction: column;
26
+ height: 90vh;
27
+ max-height: 800px;
28
  }
29
 
30
+ header {
31
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
32
+ color: white;
33
+ padding: 20px;
34
  display: flex;
35
+ justify-content: space-between;
 
36
  align-items: center;
37
  }
38
 
39
+ header h1 {
40
+ font-size: 24px;
41
+ font-weight: 600;
42
+ }
43
+
44
+ .model-info {
45
+ display: flex;
46
+ align-items: center;
47
+ gap: 15px;
48
+ }
49
+
50
+ .model-badge {
51
+ background: rgba(255, 255, 255, 0.2);
52
+ padding: 5px 12px;
53
+ border-radius: 20px;
54
+ font-size: 12px;
55
+ font-weight: 500;
56
+ }
57
+
58
+ .device-toggle {
59
+ display: flex;
60
+ align-items: center;
61
+ gap: 8px;
62
+ }
63
+
64
+ .switch {
65
  position: relative;
66
+ width: 44px;
67
+ height: 24px;
68
+ }
69
 
70
+ .switch input {
71
+ opacity: 0;
72
+ width: 0;
73
+ height: 0;
74
+ }
75
 
76
+ .slider {
77
+ position: absolute;
 
78
  cursor: pointer;
79
+ top: 0;
80
+ left: 0;
81
+ right: 0;
82
+ bottom: 0;
83
+ background-color: rgba(255, 255, 255, 0.3);
84
+ transition: 0.3s;
85
+ border-radius: 24px;
86
+ }
87
+
88
+ .slider:before {
89
+ position: absolute;
90
+ content: "";
91
+ height: 18px;
92
+ width: 18px;
93
+ left: 3px;
94
+ bottom: 3px;
95
+ background-color: white;
96
+ transition: 0.3s;
97
+ border-radius: 50%;
98
+ }
99
+
100
+ input:checked + .slider {
101
+ background-color: #4CAF50;
102
+ }
103
+
104
+ input:checked + .slider:before {
105
+ transform: translateX(20px);
106
+ }
107
+
108
+ input:disabled + .slider {
109
+ opacity: 0.5;
110
+ cursor: not-allowed;
111
+ }
112
+
113
+ #deviceLabel {
114
+ font-size: 12px;
115
+ font-weight: 500;
116
+ }
117
+
118
+ .chat-container {
119
+ flex: 1;
120
+ overflow: hidden;
121
+ position: relative;
122
+ }
123
+
124
+ .chat-messages {
125
+ height: 100%;
126
+ overflow-y: auto;
127
+ padding: 20px;
128
+ scroll-behavior: smooth;
129
+ }
130
+
131
+ .welcome-message {
132
+ text-align: center;
133
+ padding: 40px 20px;
134
+ color: #666;
135
+ }
136
+
137
+ .welcome-icon {
138
+ font-size: 48px;
139
+ margin-bottom: 20px;
140
+ }
141
+
142
+ .welcome-message h2 {
143
+ color: #333;
144
+ margin-bottom: 10px;
145
+ }
146
+
147
+ .message {
148
+ display: flex;
149
+ gap: 12px;
150
+ margin-bottom: 20px;
151
+ animation: fadeIn 0.3s ease;
152
+ }
153
+
154
+ .message.user {
155
+ flex-direction: row-reverse;
156
+ }
157
+
158
+ .avatar {
159
+ width: 36px;
160
+ height: 36px;
161
+ border-radius: 50%;
162
+ display: flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ font-size: 20px;
166
+ flex-shrink: 0;
167
+ }
168
+
169
+ .message-content {
170
+ max-width: 70%;
171
+ padding: 12px 16px;
172
+ border-radius: 18px;
173
+ line-height: 1.5;
174
+ word-wrap: break-word;
175
+ }
176
+
177
+ .message.user .message-content {
178
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
179
+ color: white;
180
+ }
181
 
182
+ .message.assistant .message-content {
183
+ background: #f1f3f5;
184
+ color: #333;
 
185
  }
186
 
187
+ .message.error .message-content {
188
+ background: #fee;
189
+ color: #c00;
190
+ }
191
+
192
+ .loading-indicator {
193
+ padding: 0 20px 20px;
194
+ }
195
+
196
+ .loading-indicator.hidden {
197
  display: none;
198
  }
199
 
200
+ .typing-dots {
201
+ display: flex;
202
+ gap: 4px;
203
+ padding: 12px 16px;
204
+ background: #f1f3f5;
205
+ border-radius: 18px;
206
+ width: fit-content;
207
  }
208
 
209
+ .typing-dots span {
210
+ width: 8px;
211
+ height: 8px;
212
+ background: #999;
213
+ border-radius: 50%;
214
+ animation: typing 1.4s infinite;
215
  }
216
 
217
+ .typing-dots span:nth-child(2) {
218
+ animation-delay: 0.2s;
219
  }
220
 
221
+ .typing-dots span:nth-child(3) {
222
+ animation-delay: 0.4s;
 
 
223
  }
224
 
225
+ .input-container {
226
+ padding: 20px;
227
+ border-top: 1px solid #e0e0e0;
228
+ background: white;
229
+ }
230
+
231
+ .input-wrapper {
232
+ display: flex;
233
+ gap: 10px;
234
+ align-items: flex-end;
235
+ }
236
+
237
+ #userInput {
238
+ flex: 1;
239
+ padding: 12px;
240
+ border: 2px solid #e0e0e0;
241
+ border-radius: 12px;
242
+ font-size: 15px;
243
+ resize: none;
244
+ outline: none;
245
+ transition: border-color 0.3s;
246
+ max-height: 120px;
247
+ line-height: 1.5;
248
+ }
249
+
250
+ #userInput:focus {
251
+ border-color: #667eea;
252
+ }
253
+
254
+ .send-button {
255
+ width: 44px;
256
+ height: 44px;
257
+ border-radius: 50%;
258
+ border: none;
259
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
260
  color: white;
261
+ cursor: pointer;
262
+ display: flex;
263
+ align-items: center;
264
+ justify-content: center;
265
+ transition: transform 0.2s, opacity 0.2s;
266
+ }
267
+
268
+ .send-button:hover:not(:disabled) {
269
+ transform: scale(1.05);
270
+ }
271
+
272
+ .send-button:disabled {
273
+ opacity: 0.5;
274
+ cursor: not-allowed;
275
+ }
276
+
277
+ .input-info {
278
+ display: flex;
279
+ justify-content: space-between;
280
+ align-items: center;
281
+ margin-top: 8px;
282
+ padding: 0 4px;
283
+ }
284
+
285
+ #charCount {
286
  font-size: 12px;
287
+ color: #999;
288
+ }
289
+
290
+ .clear-button {
291
+ font-size: 12px;
292
+ color: #666;
293
+ background: none;
294
+ border: none;
295
+ cursor: pointer;
296
+ padding: 4px 8px;
297
+ border-radius: 4px;
298
+ transition: background 0.2s;
299
+ }
300
+
301
+ .clear-button:hover {
302
+ background: #f1f3f5;
303
+ }
304
+
305
+ .init-loader {
306
+ position: absolute;
307
+ inset: 0;
308
+ background: rgba(255, 255, 255, 0.98);
309
+ display: flex;
310
+ align-items: center;
311
+ justify-content: center;
312
+ z-index: 1000;
313
+ display: none;
314
+ }
315
+
316
+ .loader-content {
317
+ text-align: center;
318
+ }
319
+
320
+ .spinner {
321
+ width: 50px;
322
+ height: 50px;
323
+ border: 4px solid #f3f3f3;
324
+ border-top: 4px solid #667eea;
325
+ border-radius: 50%;
326
+ animation: spin 1s linear infinite;
327
+ margin: 0 auto 20px;
328
+ }
329
+
330
+ .loader-content p {
331
+ color: #333;
332
+ margin-bottom: 8px;
333
+ }
334
+
335
+ .loader-subtext {
336
+ font-size: 14px;
337
+ color: #666;
338
+ }
339
+
340
+ .notification {
341
+ position: fixed;
342
+ top: 20px;
343
+ right: 20px;
344
+ padding: 12px 20px;
345
+ border-radius: 8px;
346
+ background: white;
347
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
348
+ transform: translateX(400px);
349
+ transition: transform 0.3s;
350
+ z-index: 2000;
351
+ }
352
+
353
+ .notification.show {
354
+ transform: translateX(0);
355
+ }
356
+
357
+ .notification.success {
358
+ border-left: 4px solid #4CAF50;
359
+ }
360
+
361
+ .notification.error {
362
+ border-left: 4px solid #f44336;
363
+ }
364
+
365
+ .notification.info {
366
+ border-left: 4px solid #2196F3;
367
+ }
368
+
369
+ @keyframes fadeIn {
370
+ from {
371
+ opacity: 0;
372
+ transform: translateY(10px);
373
+ }
374
+ to {
375
+ opacity: 1;
376
+ transform: translateY(0);
377
+ }
378
+ }
379
+
380
+ @keyframes typing {
381
+ 0%, 60%, 100% {
382
+ transform: translateY(0);
383
+ }
384
+ 30% {
385
+ transform: translateY(-10px);
386
+ }
387
+ }
388
+
389
+ @keyframes spin {
390
+ 0% { transform: rotate(0deg); }
391
+ 100% { transform: rotate(360deg); }
392
+ }
393
+
394
+ @media (max-width: 768px) {
395
+ .container {
396
+ height: 100vh;
397
+ max-height: none;
398
+ border-radius: 0;
399
+ }
400
+
401
+ body {
402
+ padding: 0;
403
+ }
404
+
405
+ .message-content {
406
+ max-width: 85%;
407
+ }
408
+
409
+ header h1 {
410
+ font-size: 20px;
411
+ }
412
+
413
+ .model-badge {
414
+ display: none;
415
+ }
416
  }