Spaces:
Running
Running
Update css/styles.css
Browse files- css/styles.css +173 -200
css/styles.css
CHANGED
@@ -1,332 +1,305 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
--muted: #687076;
|
6 |
-
--accent: #0070f3;
|
7 |
-
--border: #E6E8EB;
|
8 |
-
--ring: #22222210;
|
9 |
-
--surface: #fff;
|
10 |
-
--surface-hover: #f3f4f6;
|
11 |
-
--message-user: #ecfdf5;
|
12 |
-
--message-bot: #f5f5f5;
|
13 |
-
--shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
14 |
-
}
|
15 |
-
|
16 |
-
.dark {
|
17 |
-
/* Dark theme */
|
18 |
-
--background: #000000;
|
19 |
-
--foreground: #FFFFFF;
|
20 |
-
--muted: #A1A1AA;
|
21 |
-
--accent: #3b82f6;
|
22 |
-
--border: #27272A;
|
23 |
-
--ring: #ffffff10;
|
24 |
-
--surface: #18181B;
|
25 |
-
--surface-hover: #27272A;
|
26 |
-
--message-user: #064e3b;
|
27 |
-
--message-bot: #18181B;
|
28 |
-
--shadow: 0 1px 2px 0 rgb(0 0 0 / 0.1);
|
29 |
-
}
|
30 |
-
|
31 |
-
* {
|
32 |
margin: 0;
|
33 |
padding: 0;
|
34 |
box-sizing: border-box;
|
35 |
}
|
36 |
|
37 |
-
html {
|
38 |
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
39 |
-
}
|
40 |
-
|
41 |
body {
|
42 |
-
|
43 |
-
color: var(--
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
.app-container {
|
49 |
-
|
|
|
|
|
50 |
display: flex;
|
51 |
flex-direction: column;
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
.app-header {
|
55 |
-
|
56 |
-
|
57 |
-
left: 0;
|
58 |
-
right: 0;
|
59 |
-
z-index: 50;
|
60 |
-
backdrop-filter: blur(12px);
|
61 |
-
border-bottom: 1px solid var(--border);
|
62 |
-
background-color: rgba(var(--background), 0.8);
|
63 |
-
}
|
64 |
-
|
65 |
-
.header-content {
|
66 |
-
max-width: 1200px;
|
67 |
-
margin: 0 auto;
|
68 |
-
padding: 1rem;
|
69 |
display: flex;
|
70 |
justify-content: space-between;
|
71 |
align-items: center;
|
|
|
72 |
}
|
73 |
|
74 |
.header-content h1 {
|
75 |
font-size: 1.5rem;
|
76 |
-
font-weight:
|
77 |
-
display: flex;
|
78 |
-
align-items: center;
|
79 |
-
gap: 0.5rem;
|
80 |
}
|
81 |
|
82 |
.header-actions {
|
83 |
display: flex;
|
84 |
-
gap:
|
85 |
}
|
86 |
|
87 |
.icon-button {
|
88 |
background: none;
|
89 |
border: none;
|
90 |
-
color: var(--
|
91 |
-
|
92 |
-
border-radius: 0.5rem;
|
93 |
cursor: pointer;
|
94 |
-
transition:
|
95 |
}
|
96 |
|
97 |
.icon-button:hover {
|
98 |
-
|
99 |
}
|
100 |
|
101 |
.chat-container {
|
102 |
flex: 1;
|
103 |
-
max-width: 1200px;
|
104 |
-
margin: 0 auto;
|
105 |
-
width: 100%;
|
106 |
-
padding: 5rem 1rem 1rem;
|
107 |
display: flex;
|
108 |
flex-direction: column;
|
|
|
|
|
109 |
}
|
110 |
|
111 |
.messages-container {
|
112 |
flex: 1;
|
113 |
-
|
114 |
-
padding: 1rem;
|
115 |
-
display: flex;
|
116 |
-
flex-direction: column;
|
117 |
-
gap: 1rem;
|
118 |
}
|
119 |
|
120 |
.welcome-message {
|
121 |
text-align: center;
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
.welcome-message h2 {
|
126 |
-
font-size: 2rem;
|
127 |
-
font-weight: 600;
|
128 |
-
margin-bottom: 1rem;
|
129 |
-
}
|
130 |
-
|
131 |
-
.welcome-message p {
|
132 |
-
color: var(--muted);
|
133 |
}
|
134 |
|
135 |
.message {
|
|
|
|
|
|
|
136 |
max-width: 80%;
|
137 |
-
|
138 |
-
|
139 |
-
animation: message-slide 0.3s ease;
|
140 |
-
}
|
141 |
-
|
142 |
-
@keyframes message-slide {
|
143 |
-
from {
|
144 |
-
opacity: 0;
|
145 |
-
transform: translateY(20px);
|
146 |
-
}
|
147 |
-
to {
|
148 |
-
opacity: 1;
|
149 |
-
transform: translateY(0);
|
150 |
-
}
|
151 |
}
|
152 |
|
153 |
.user-message {
|
154 |
-
background-color: var(--message-
|
|
|
155 |
align-self: flex-end;
|
156 |
-
border-bottom-right-radius: 0.25rem;
|
157 |
}
|
158 |
|
159 |
.bot-message {
|
160 |
-
background-color: var(--message-
|
|
|
161 |
align-self: flex-start;
|
162 |
-
border-bottom-left-radius: 0.25rem;
|
163 |
}
|
164 |
|
165 |
-
.
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
|
169 |
-
.
|
170 |
-
|
171 |
-
padding: 1rem;
|
172 |
-
border-radius: 0.75rem;
|
173 |
-
border-bottom-left-radius: 0.25rem;
|
174 |
-
width: fit-content;
|
175 |
}
|
176 |
|
177 |
-
.
|
178 |
display: flex;
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
181 |
|
182 |
.dots span {
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
185 |
border-radius: 50%;
|
186 |
-
|
187 |
-
animation: bounce 1.4s infinite ease-in-out;
|
188 |
}
|
189 |
|
190 |
-
.dots span:nth-child(
|
191 |
-
|
|
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
40% { transform: scale(1); }
|
196 |
}
|
197 |
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
|
|
204 |
}
|
205 |
|
206 |
-
.input-
|
207 |
-
position: relative;
|
208 |
-
background-color: var(--surface);
|
209 |
-
border: 1px solid var(--border);
|
210 |
-
border-radius: 0.75rem;
|
211 |
-
padding: 0.75rem;
|
212 |
display: flex;
|
213 |
-
|
214 |
-
|
215 |
-
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
216 |
}
|
217 |
|
218 |
-
.
|
219 |
-
|
220 |
-
box-shadow: 0 0 0 2px var(--ring);
|
221 |
}
|
222 |
|
223 |
-
|
224 |
-
background: none;
|
225 |
-
border: none;
|
226 |
-
color: var(--foreground);
|
227 |
-
font-size: 1rem;
|
228 |
resize: none;
|
229 |
-
max-height: 200px;
|
230 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
}
|
232 |
|
233 |
-
|
234 |
-
|
235 |
}
|
236 |
|
237 |
.input-actions {
|
238 |
display: flex;
|
239 |
justify-content: space-between;
|
240 |
align-items: center;
|
|
|
241 |
}
|
242 |
|
243 |
.char-counter {
|
244 |
-
font-size: 0.
|
245 |
-
color: var(--
|
246 |
}
|
247 |
|
248 |
.send-button {
|
249 |
-
background
|
250 |
-
color: white;
|
251 |
border: none;
|
252 |
-
|
253 |
-
|
254 |
cursor: pointer;
|
255 |
-
transition:
|
256 |
}
|
257 |
|
258 |
-
.send-button:
|
259 |
-
|
260 |
-
cursor: not-allowed;
|
261 |
}
|
262 |
|
263 |
.toast-container {
|
264 |
position: fixed;
|
265 |
-
bottom:
|
266 |
-
right:
|
267 |
display: flex;
|
268 |
flex-direction: column;
|
269 |
-
gap:
|
270 |
-
z-index: 100;
|
271 |
}
|
272 |
|
273 |
.toast {
|
274 |
-
|
275 |
-
border:
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
animation: toast-slide 0.3s ease;
|
280 |
-
}
|
281 |
-
|
282 |
-
@keyframes toast-slide {
|
283 |
-
from {
|
284 |
-
opacity: 0;
|
285 |
-
transform: translateX(100%);
|
286 |
-
}
|
287 |
-
to {
|
288 |
-
opacity: 1;
|
289 |
-
transform: translateX(0);
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
-
.toast.error {
|
294 |
-
border-left: 4px solid #ef4444;
|
295 |
}
|
296 |
|
297 |
.toast.success {
|
298 |
-
|
299 |
}
|
300 |
|
301 |
-
.
|
302 |
-
|
303 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
|
305 |
-
/* Media Queries for Responsiveness */
|
306 |
-
@media (max-width: 768px) {
|
307 |
.header-content h1 {
|
308 |
-
font-size: 1.
|
309 |
}
|
310 |
|
311 |
-
.
|
312 |
-
font-size:
|
313 |
}
|
314 |
|
315 |
-
.
|
316 |
-
|
317 |
}
|
318 |
-
}
|
319 |
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
}
|
324 |
|
325 |
-
.
|
326 |
-
|
327 |
}
|
328 |
|
329 |
.send-button {
|
330 |
-
|
331 |
}
|
332 |
}
|
|
|
1 |
+
/* General Reset and Base Styles */
|
2 |
+
*,
|
3 |
+
*::before,
|
4 |
+
*::after {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
margin: 0;
|
6 |
padding: 0;
|
7 |
box-sizing: border-box;
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
10 |
body {
|
11 |
+
font-family: 'Arial', sans-serif;
|
12 |
+
background-color: var(--bg-color);
|
13 |
+
color: var(--text-color);
|
14 |
+
display: flex;
|
15 |
+
justify-content: center;
|
16 |
+
align-items: center;
|
17 |
+
min-height: 100vh;
|
18 |
}
|
19 |
|
20 |
.app-container {
|
21 |
+
width: 100%;
|
22 |
+
max-width: 600px;
|
23 |
+
height: 90vh;
|
24 |
display: flex;
|
25 |
flex-direction: column;
|
26 |
+
border-radius: 10px;
|
27 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
28 |
+
background-color: var(--bg-color);
|
29 |
+
overflow: hidden;
|
30 |
}
|
31 |
|
32 |
.app-header {
|
33 |
+
background-color: var(--header-bg-color);
|
34 |
+
padding: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
display: flex;
|
36 |
justify-content: space-between;
|
37 |
align-items: center;
|
38 |
+
border-bottom: 1px solid var(--border-color);
|
39 |
}
|
40 |
|
41 |
.header-content h1 {
|
42 |
font-size: 1.5rem;
|
43 |
+
font-weight: bold;
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
.header-actions {
|
47 |
display: flex;
|
48 |
+
gap: 10px;
|
49 |
}
|
50 |
|
51 |
.icon-button {
|
52 |
background: none;
|
53 |
border: none;
|
54 |
+
color: var(--text-color);
|
55 |
+
font-size: 1.2rem;
|
|
|
56 |
cursor: pointer;
|
57 |
+
transition: color 0.3s;
|
58 |
}
|
59 |
|
60 |
.icon-button:hover {
|
61 |
+
color: var(--primary-color);
|
62 |
}
|
63 |
|
64 |
.chat-container {
|
65 |
flex: 1;
|
|
|
|
|
|
|
|
|
66 |
display: flex;
|
67 |
flex-direction: column;
|
68 |
+
padding: 15px;
|
69 |
+
overflow-y: auto;
|
70 |
}
|
71 |
|
72 |
.messages-container {
|
73 |
flex: 1;
|
74 |
+
padding-bottom: 20px;
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
|
77 |
.welcome-message {
|
78 |
text-align: center;
|
79 |
+
margin-bottom: 20px;
|
80 |
+
font-size: 1.2rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
.message {
|
84 |
+
padding: 12px 15px;
|
85 |
+
margin: 10px 0;
|
86 |
+
border-radius: 8px;
|
87 |
max-width: 80%;
|
88 |
+
word-wrap: break-word;
|
89 |
+
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
.user-message {
|
93 |
+
background-color: var(--user-message-bg);
|
94 |
+
color: var(--user-message-color);
|
95 |
align-self: flex-end;
|
|
|
96 |
}
|
97 |
|
98 |
.bot-message {
|
99 |
+
background-color: var(--bot-message-bg);
|
100 |
+
color: var(--bot-message-color);
|
101 |
align-self: flex-start;
|
|
|
102 |
}
|
103 |
|
104 |
+
.copy-button {
|
105 |
+
position: absolute;
|
106 |
+
top: 5px;
|
107 |
+
right: 5px;
|
108 |
+
background: none;
|
109 |
+
border: none;
|
110 |
+
color: var(--text-color);
|
111 |
+
font-size: 1rem;
|
112 |
+
cursor: pointer;
|
113 |
+
opacity: 0.7;
|
114 |
+
transition: opacity 0.3s;
|
115 |
}
|
116 |
|
117 |
+
.copy-button:hover {
|
118 |
+
opacity: 1;
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
|
121 |
+
.typing-indicator {
|
122 |
display: flex;
|
123 |
+
justify-content: flex-start;
|
124 |
+
padding: 10px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.typing-bubble {
|
128 |
+
display: flex;
|
129 |
+
align-items: center;
|
130 |
+
background-color: var(--bot-message-bg);
|
131 |
+
border-radius: 8px;
|
132 |
+
padding: 5px 12px;
|
133 |
}
|
134 |
|
135 |
.dots span {
|
136 |
+
display: inline-block;
|
137 |
+
width: 8px;
|
138 |
+
height: 8px;
|
139 |
+
margin: 0 3px;
|
140 |
+
background-color: var(--text-color);
|
141 |
border-radius: 50%;
|
142 |
+
animation: blink 1.5s infinite;
|
|
|
143 |
}
|
144 |
|
145 |
+
.dots span:nth-child(2) {
|
146 |
+
animation-delay: 0.2s;
|
147 |
+
}
|
148 |
|
149 |
+
.dots span:nth-child(3) {
|
150 |
+
animation-delay: 0.4s;
|
|
|
151 |
}
|
152 |
|
153 |
+
@keyframes blink {
|
154 |
+
0%, 100% {
|
155 |
+
opacity: 0;
|
156 |
+
}
|
157 |
+
50% {
|
158 |
+
opacity: 1;
|
159 |
+
}
|
160 |
}
|
161 |
|
162 |
+
.chat-input-container {
|
|
|
|
|
|
|
|
|
|
|
163 |
display: flex;
|
164 |
+
padding: 15px;
|
165 |
+
border-top: 1px solid var(--border-color);
|
|
|
166 |
}
|
167 |
|
168 |
+
.textarea-wrapper {
|
169 |
+
flex-grow: 1;
|
|
|
170 |
}
|
171 |
|
172 |
+
textarea {
|
|
|
|
|
|
|
|
|
173 |
resize: none;
|
|
|
174 |
width: 100%;
|
175 |
+
padding: 12px 15px;
|
176 |
+
border-radius: 8px;
|
177 |
+
border: 1px solid var(--border-color);
|
178 |
+
background-color: var(--input-bg-color);
|
179 |
+
color: var(--text-color);
|
180 |
+
font-size: 1rem;
|
181 |
+
outline: none;
|
182 |
+
transition: border-color 0.3s ease-in-out;
|
183 |
}
|
184 |
|
185 |
+
textarea:focus {
|
186 |
+
border-color: var(--primary-color);
|
187 |
}
|
188 |
|
189 |
.input-actions {
|
190 |
display: flex;
|
191 |
justify-content: space-between;
|
192 |
align-items: center;
|
193 |
+
margin-top: 12px;
|
194 |
}
|
195 |
|
196 |
.char-counter {
|
197 |
+
font-size: 0.9rem;
|
198 |
+
color: var(--text-color);
|
199 |
}
|
200 |
|
201 |
.send-button {
|
202 |
+
background: none;
|
|
|
203 |
border: none;
|
204 |
+
color: var(--primary-color);
|
205 |
+
font-size: 1.2rem;
|
206 |
cursor: pointer;
|
207 |
+
transition: color 0.3s ease;
|
208 |
}
|
209 |
|
210 |
+
.send-button:hover {
|
211 |
+
color: var(--primary-color-hover);
|
|
|
212 |
}
|
213 |
|
214 |
.toast-container {
|
215 |
position: fixed;
|
216 |
+
bottom: 20px;
|
217 |
+
right: 20px;
|
218 |
display: flex;
|
219 |
flex-direction: column;
|
220 |
+
gap: 10px;
|
|
|
221 |
}
|
222 |
|
223 |
.toast {
|
224 |
+
padding: 12px 15px;
|
225 |
+
border-radius: 8px;
|
226 |
+
color: #fff;
|
227 |
+
opacity: 1;
|
228 |
+
transition: opacity 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
}
|
230 |
|
231 |
.toast.success {
|
232 |
+
background-color: #4caf50;
|
233 |
}
|
234 |
|
235 |
+
.toast.error {
|
236 |
+
background-color: #f44336;
|
237 |
+
}
|
238 |
+
|
239 |
+
.toast.info {
|
240 |
+
background-color: #2196f3;
|
241 |
+
}
|
242 |
+
|
243 |
+
/* Dark Mode */
|
244 |
+
:root.dark {
|
245 |
+
--bg-color: #121212;
|
246 |
+
--text-color: #e0e0e0;
|
247 |
+
--header-bg-color: #1e1e1e;
|
248 |
+
--border-color: #333;
|
249 |
+
--primary-color: #bb86fc;
|
250 |
+
--primary-color-hover: #3700b3;
|
251 |
+
--user-message-bg: #424242;
|
252 |
+
--user-message-color: #ffffff;
|
253 |
+
--bot-message-bg: #3700b3;
|
254 |
+
--bot-message-color: #ffffff;
|
255 |
+
--input-bg-color: #1e1e1e;
|
256 |
+
}
|
257 |
+
|
258 |
+
/* Light Mode */
|
259 |
+
:root.light {
|
260 |
+
--bg-color: #ffffff;
|
261 |
+
--text-color: #000000;
|
262 |
+
--header-bg-color: #f5f5f5;
|
263 |
+
--border-color: #ccc;
|
264 |
+
--primary-color: #6200ea;
|
265 |
+
--primary-color-hover: #3700b3;
|
266 |
+
--user-message-bg: #e0e0e0;
|
267 |
+
--user-message-color: #000000;
|
268 |
+
--bot-message-bg: #6200ea;
|
269 |
+
--bot-message-color: #ffffff;
|
270 |
+
--input-bg-color: #f5f5f5;
|
271 |
+
}
|
272 |
+
|
273 |
+
/* Responsive Design */
|
274 |
+
@media (max-width: 600px) {
|
275 |
+
.app-container {
|
276 |
+
width: 100%;
|
277 |
+
height: 100vh;
|
278 |
+
border-radius: 0;
|
279 |
+
}
|
280 |
|
|
|
|
|
281 |
.header-content h1 {
|
282 |
+
font-size: 1.3rem;
|
283 |
}
|
284 |
|
285 |
+
.icon-button {
|
286 |
+
font-size: 1rem;
|
287 |
}
|
288 |
|
289 |
+
.chat-input-container {
|
290 |
+
flex-direction: column;
|
291 |
}
|
|
|
292 |
|
293 |
+
.input-actions {
|
294 |
+
flex-direction: column;
|
295 |
+
align-items: flex-start;
|
296 |
}
|
297 |
|
298 |
+
.char-counter {
|
299 |
+
margin-bottom: 10px;
|
300 |
}
|
301 |
|
302 |
.send-button {
|
303 |
+
align-self: flex-end;
|
304 |
}
|
305 |
}
|