Spaces:
Running
Running
Are there small settings button right down side of the main window it's so inside the settings I need for settings for the glass morphism for the particular window so make sure that everything is so small tiny and I need you to add there - Initial Deployment
Browse files- README.md +7 -5
- index.html +1070 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: aiui
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: blue
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,1070 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Interactive Card Grid</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.card {
|
11 |
+
width: 190px;
|
12 |
+
height: 250px;
|
13 |
+
background: linear-gradient(-45deg, rgb(9, 16, 109), rgba(0,255,239,1));
|
14 |
+
border-radius: 20px;
|
15 |
+
box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.5);
|
16 |
+
transition: 0.5s ease;
|
17 |
+
cursor: pointer;
|
18 |
+
position: relative;
|
19 |
+
overflow: hidden;
|
20 |
+
}
|
21 |
+
|
22 |
+
.card::after {
|
23 |
+
content: "HOVER ME";
|
24 |
+
position: absolute;
|
25 |
+
top: 50%;
|
26 |
+
left: 50%;
|
27 |
+
transform: translate(-50%, -50%);
|
28 |
+
font-weight: bold;
|
29 |
+
text-shadow: 1px 1px 4px rgb(0,0,0);
|
30 |
+
transition: 0.3s;
|
31 |
+
font-size: 18px;
|
32 |
+
letter-spacing: 2px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.card:hover {
|
36 |
+
scale: 1.1;
|
37 |
+
border-radius: 20px 80px;
|
38 |
+
box-shadow: 11px 11px 25px rgba(0, 0, 0, 0.5);
|
39 |
+
transform: rotateY(5deg) rotateX(-5deg);
|
40 |
+
}
|
41 |
+
|
42 |
+
.card:hover::after {
|
43 |
+
content: "THANKS";
|
44 |
+
color: aqua;
|
45 |
+
}
|
46 |
+
|
47 |
+
.card::before {
|
48 |
+
content: '';
|
49 |
+
position: absolute;
|
50 |
+
top: -50%;
|
51 |
+
left: -50%;
|
52 |
+
width: 200%;
|
53 |
+
height: 200%;
|
54 |
+
background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
|
55 |
+
transform: rotate(45deg);
|
56 |
+
transition: 0.5s;
|
57 |
+
opacity: 0;
|
58 |
+
}
|
59 |
+
|
60 |
+
.card:hover::before {
|
61 |
+
animation: shine 0.5s ease-in-out;
|
62 |
+
opacity: 1;
|
63 |
+
}
|
64 |
+
|
65 |
+
@keyframes shine {
|
66 |
+
0% {
|
67 |
+
transform: translateX(-100%) translateY(-100%) rotate(45deg);
|
68 |
+
}
|
69 |
+
100% {
|
70 |
+
transform: translateX(100%) translateY(100%) rotate(45deg);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
.floating {
|
75 |
+
animation: float 6s ease-in-out infinite;
|
76 |
+
}
|
77 |
+
|
78 |
+
@keyframes float {
|
79 |
+
0%, 100% {
|
80 |
+
transform: translateY(0px);
|
81 |
+
}
|
82 |
+
50% {
|
83 |
+
transform: translateY(-20px);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
.glow {
|
88 |
+
box-shadow: 0 0 20px rgba(0,255,239,0.5);
|
89 |
+
animation: glow 2s ease-in-out infinite alternate;
|
90 |
+
}
|
91 |
+
|
92 |
+
@keyframes glow {
|
93 |
+
from {
|
94 |
+
box-shadow: 0 0 20px rgba(0,255,239,0.5);
|
95 |
+
}
|
96 |
+
to {
|
97 |
+
box-shadow: 0 0 30px rgba(0,255,239,0.8), 0 0 40px rgba(0,255,239,0.6);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
@keyframes voice {
|
102 |
+
0%, 100% {
|
103 |
+
transform: scaleY(1);
|
104 |
+
}
|
105 |
+
50% {
|
106 |
+
transform: scaleY(1.5);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
.particle {
|
111 |
+
position: absolute;
|
112 |
+
width: 4px;
|
113 |
+
height: 4px;
|
114 |
+
background: rgba(0,255,239,0.8);
|
115 |
+
border-radius: 50%;
|
116 |
+
pointer-events: none;
|
117 |
+
animation: particle-float 3s ease-out forwards;
|
118 |
+
}
|
119 |
+
|
120 |
+
@keyframes particle-float {
|
121 |
+
0% {
|
122 |
+
transform: translateY(0) scale(1);
|
123 |
+
opacity: 1;
|
124 |
+
}
|
125 |
+
100% {
|
126 |
+
transform: translateY(-100px) scale(0);
|
127 |
+
opacity: 0;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
.modal {
|
132 |
+
backdrop-filter: blur(5px);
|
133 |
+
background: rgba(0, 0, 0, 0.8);
|
134 |
+
}
|
135 |
+
|
136 |
+
.modal-content {
|
137 |
+
background: linear-gradient(135deg, rgba(9, 16, 109, 0.9), rgba(0, 0, 0, 0.9));
|
138 |
+
border: 1px solid rgba(0,255,239,0.3);
|
139 |
+
box-shadow: 0 0 50px rgba(0,255,239,0.2);
|
140 |
+
}
|
141 |
+
|
142 |
+
.chat-container {
|
143 |
+
width: 240px;
|
144 |
+
height: 360px;
|
145 |
+
background: rgba(235, 142, 253, 0.15);
|
146 |
+
backdrop-filter: blur(15px);
|
147 |
+
-webkit-backdrop-filter: blur(15px);
|
148 |
+
border-radius: 22px;
|
149 |
+
border: 1px solid rgba(255, 255, 255, 0.34);
|
150 |
+
box-shadow:
|
151 |
+
0 8px 32px rgba(0, 0, 0, 0.1),
|
152 |
+
inset 0 1px 0 rgba(255, 255, 255, 0.5),
|
153 |
+
inset 0 -1px 0 rgba(255, 255, 255, 0.1),
|
154 |
+
inset 0 0 22px 11px rgba(255, 255, 255, 0.1);
|
155 |
+
position: relative;
|
156 |
+
overflow: hidden;
|
157 |
+
}
|
158 |
+
|
159 |
+
.chat-container::before {
|
160 |
+
content: '';
|
161 |
+
position: absolute;
|
162 |
+
top: 0;
|
163 |
+
left: 0;
|
164 |
+
right: 0;
|
165 |
+
height: 1px;
|
166 |
+
background: linear-gradient(
|
167 |
+
90deg,
|
168 |
+
transparent,
|
169 |
+
rgba(255, 255, 255, 0.8),
|
170 |
+
transparent
|
171 |
+
);
|
172 |
+
}
|
173 |
+
|
174 |
+
.chat-container::after {
|
175 |
+
content: '';
|
176 |
+
position: absolute;
|
177 |
+
top: 0;
|
178 |
+
left: 0;
|
179 |
+
width: 1px;
|
180 |
+
height: 100%;
|
181 |
+
background: linear-gradient(
|
182 |
+
180deg,
|
183 |
+
rgba(255, 255, 255, 0.8),
|
184 |
+
transparent,
|
185 |
+
rgba(255, 255, 255, 0.3)
|
186 |
+
);
|
187 |
+
}
|
188 |
+
|
189 |
+
.chat-container:hover {
|
190 |
+
scale: 1.02;
|
191 |
+
box-shadow: 11px 11px 25px rgba(0, 0, 0, 0.5);
|
192 |
+
}
|
193 |
+
|
194 |
+
.chat-messages {
|
195 |
+
scrollbar-width: thin;
|
196 |
+
scrollbar-color: rgba(0,255,239,0.5) transparent;
|
197 |
+
}
|
198 |
+
|
199 |
+
.chat-messages::-webkit-scrollbar {
|
200 |
+
width: 6px;
|
201 |
+
}
|
202 |
+
|
203 |
+
.chat-messages::-webkit-scrollbar-track {
|
204 |
+
background: rgba(0,0,0,0.1);
|
205 |
+
border-radius: 10px;
|
206 |
+
}
|
207 |
+
|
208 |
+
.chat-messages::-webkit-scrollbar-thumb {
|
209 |
+
background: rgba(0,255,239,0.5);
|
210 |
+
border-radius: 10px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.message {
|
214 |
+
margin-bottom: 1rem;
|
215 |
+
padding: 0.5rem 1rem;
|
216 |
+
border-radius: 20px;
|
217 |
+
max-width: 80%;
|
218 |
+
word-wrap: break-word;
|
219 |
+
}
|
220 |
+
|
221 |
+
.message.user {
|
222 |
+
background: rgba(0,255,239,0.2);
|
223 |
+
margin-left: auto;
|
224 |
+
border-bottom-right-radius: 5px;
|
225 |
+
}
|
226 |
+
|
227 |
+
.message.assistant {
|
228 |
+
background: rgba(255,255,255,0.1);
|
229 |
+
margin-right: auto;
|
230 |
+
border-bottom-left-radius: 5px;
|
231 |
+
}
|
232 |
+
/* ===== CYBER-TOGGLE ===== */
|
233 |
+
.cyber-toggle {
|
234 |
+
--hue: 180;
|
235 |
+
--core-size: 20px; /* Half of 40px */
|
236 |
+
display: inline-block;
|
237 |
+
padding: 1rem; /* Half of 2rem */
|
238 |
+
background: transparent;
|
239 |
+
border-radius: 17.5px; /* Half of 35px */
|
240 |
+
position: relative;
|
241 |
+
overflow: hidden;
|
242 |
+
transition: transform 0.3s ease-in-out;
|
243 |
+
}
|
244 |
+
.cyber-toggle:hover {
|
245 |
+
transform: perspective(100px) rotateX(5deg) rotateY(-5deg);
|
246 |
+
}
|
247 |
+
.cyber-input {
|
248 |
+
position: absolute;
|
249 |
+
opacity: 0;
|
250 |
+
}
|
251 |
+
.cyber-label {
|
252 |
+
display: block;
|
253 |
+
cursor: pointer;
|
254 |
+
width: var(--core-size);
|
255 |
+
height: calc(var(--core-size) / 2);
|
256 |
+
position: relative;
|
257 |
+
transition: filter 0.3s ease;
|
258 |
+
}
|
259 |
+
.cyber-core {
|
260 |
+
position: relative;
|
261 |
+
width: 100%;
|
262 |
+
height: 100%;
|
263 |
+
background: #1a1a2f;
|
264 |
+
border-radius: 20px; /* Half of 40px */
|
265 |
+
transition: all 0.4s ease;
|
266 |
+
overflow: hidden;
|
267 |
+
box-shadow:
|
268 |
+
/* Adjusted shadow values for smaller size */
|
269 |
+
inset 0 2px 6px rgba(255, 255, 255, 0.1),
|
270 |
+
inset 0 -2px 6px rgba(0, 0, 0, 0.4);
|
271 |
+
}
|
272 |
+
.cyber-toggle-circle {
|
273 |
+
position: absolute;
|
274 |
+
/* width/height calculation already based on --core-size */
|
275 |
+
background: #ffffff;
|
276 |
+
border-radius: 50%;
|
277 |
+
top: 2px; /* Half of 4px */
|
278 |
+
left: 2px; /* Half of 4px */
|
279 |
+
transition: transform 0.4s ease;
|
280 |
+
box-shadow:
|
281 |
+
/* Adjusted shadow values for smaller size */
|
282 |
+
0 1px 4px rgba(0, 0, 0, 0.3),
|
283 |
+
inset 0 0.5px 1px rgba(255, 255, 255, 0.8);
|
284 |
+
}
|
285 |
+
.cyber-power-line {
|
286 |
+
position: absolute;
|
287 |
+
width: calc(var(--core-size) * 1.14159 + 4rem);
|
288 |
+
height: 2px;
|
289 |
+
background: linear-gradient(
|
290 |
+
135deg,
|
291 |
+
hsl(280, 80%, 40%),
|
292 |
+
hsl(320, 70%, 50%),
|
293 |
+
hsl(340, 85%, 45%)
|
294 |
+
);
|
295 |
+
top: 50%;
|
296 |
+
left: calc(-1 * (var(--core-size) + 2rem));
|
297 |
+
transform: translateY(-220%);
|
298 |
+
opacity: 0;
|
299 |
+
pointer-events: none;
|
300 |
+
}
|
301 |
+
.cyber-power-ring {
|
302 |
+
position: absolute;
|
303 |
+
inset: -2px;
|
304 |
+
outline: 3px solid transparent;
|
305 |
+
border-radius: 12px;
|
306 |
+
opacity: 0;
|
307 |
+
transform: scale(1);
|
308 |
+
pointer-events: none;
|
309 |
+
box-shadow: 0 0 6px transparent;
|
310 |
+
background: linear-gradient(
|
311 |
+
to right,
|
312 |
+
rgba(99, 49, 49, 0.2) 0%,
|
313 |
+
rgba(31, 28, 212, 0.2) 15%,
|
314 |
+
rgba(64, 6, 112, 0.2) 30%,
|
315 |
+
rgba(131, 33, 161, 0.2) 45%,
|
316 |
+
rgba(132, 14, 179, 0.2) 60%,
|
317 |
+
rgba(255, 0, 242, 0.2) 100%
|
318 |
+
);
|
319 |
+
background-size: 200% 100%;
|
320 |
+
}
|
321 |
+
.cyber-input:checked ~ .cyber-label .cyber-core {
|
322 |
+
background: #242444;
|
323 |
+
box-shadow:
|
324 |
+
inset 0 4px 24px rgba(255, 255, 255, 0.2),
|
325 |
+
inset 0 -4px 12px rgba(0, 0, 0, 0.6),
|
326 |
+
0 0 8px rgba(79, 78, 78, 0.6);
|
327 |
+
}
|
328 |
+
.cyber-input:checked ~ .cyber-label .cyber-toggle-circle {
|
329 |
+
transform: translateX(calc(var(--core-size) / 2));
|
330 |
+
}
|
331 |
+
.cyber-input:checked + .cyber-label .cyber-power-line {
|
332 |
+
animation: power-line-in 0.6s ease forwards;
|
333 |
+
}
|
334 |
+
.cyber-input:checked + .cyber-label .cyber-power-ring {
|
335 |
+
animation:
|
336 |
+
power-ring-appear 0.6s ease 0.3s forwards,
|
337 |
+
ring-glow 2.5s linear infinite 0.9s;
|
338 |
+
}
|
339 |
+
.cyber-input:checked + .cyber-label .cyber-power-ring .ring-particle {
|
340 |
+
animation: ring-particle-fly 1s ease-out infinite var(--delay);
|
341 |
+
}
|
342 |
+
.cyber-input:not(:checked) + .cyber-label .cyber-power-ring {
|
343 |
+
animation: power-ring-break 0.8s ease forwards;
|
344 |
+
}
|
345 |
+
.cyber-power-ring .ring-particle {
|
346 |
+
position: absolute;
|
347 |
+
width: 4px;
|
348 |
+
height: 4px;
|
349 |
+
background: #ffffff;
|
350 |
+
border-radius: 50%;
|
351 |
+
opacity: 0;
|
352 |
+
left: var(--x);
|
353 |
+
top: var(--y);
|
354 |
+
}
|
355 |
+
@keyframes power-line-in {
|
356 |
+
0% {
|
357 |
+
opacity: 1;
|
358 |
+
transform: translateY(-50%) translateX(-100%);
|
359 |
+
}
|
360 |
+
50% {
|
361 |
+
opacity: 1;
|
362 |
+
transform: translateY(-50%) translateX(0);
|
363 |
+
}
|
364 |
+
100% {
|
365 |
+
opacity: 0;
|
366 |
+
transform: translateY(-50%) translateX(100%);
|
367 |
+
}
|
368 |
+
}
|
369 |
+
@keyframes power-ring-appear {
|
370 |
+
0% {
|
371 |
+
opacity: 0;
|
372 |
+
transform: scale(0.8);
|
373 |
+
}
|
374 |
+
50% {
|
375 |
+
opacity: 1;
|
376 |
+
transform: scale(1.1);
|
377 |
+
}
|
378 |
+
100% {
|
379 |
+
opacity: 1;
|
380 |
+
transform: scale(1);
|
381 |
+
}
|
382 |
+
}
|
383 |
+
@keyframes ring-glow {
|
384 |
+
0% {
|
385 |
+
background-position: 0% 0;
|
386 |
+
box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
|
387 |
+
}
|
388 |
+
50% {
|
389 |
+
background-position: 100% 0;
|
390 |
+
box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
|
391 |
+
}
|
392 |
+
100% {
|
393 |
+
background-position: 200% 0;
|
394 |
+
box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
|
395 |
+
}
|
396 |
+
}
|
397 |
+
@keyframes power-ring-break {
|
398 |
+
0% {
|
399 |
+
opacity: 1;
|
400 |
+
clip-path: inset(0 0 0 0);
|
401 |
+
}
|
402 |
+
25% {
|
403 |
+
clip-path: inset(0 25% 0 25%);
|
404 |
+
}
|
405 |
+
50% {
|
406 |
+
clip-path: inset(25% 25% 25% 25%);
|
407 |
+
}
|
408 |
+
75% {
|
409 |
+
clip-path: inset(40% 40% 40% 40%);
|
410 |
+
}
|
411 |
+
100% {
|
412 |
+
opacity: 0;
|
413 |
+
clip-path: inset(50% 50% 50% 50%);
|
414 |
+
}
|
415 |
+
}
|
416 |
+
@keyframes ring-particle-fly {
|
417 |
+
0% {
|
418 |
+
opacity: 1;
|
419 |
+
transform: translate(0, 0);
|
420 |
+
}
|
421 |
+
100% {
|
422 |
+
opacity: 0;
|
423 |
+
transform: translate(var(--px), var(--py));
|
424 |
+
}
|
425 |
+
}
|
426 |
+
.cyber-particles {
|
427 |
+
position: absolute;
|
428 |
+
inset: 0;
|
429 |
+
}
|
430 |
+
.particle {
|
431 |
+
position: absolute;
|
432 |
+
width: 4px;
|
433 |
+
height: 4px;
|
434 |
+
background: hsl(var(--hue), 100%, 70%);
|
435 |
+
border-radius: 50%;
|
436 |
+
opacity: 0;
|
437 |
+
left: 50%;
|
438 |
+
top: 50%;
|
439 |
+
transform: translate(-50%, -50%);
|
440 |
+
}
|
441 |
+
.cyber-input:checked ~ .cyber-label .particle {
|
442 |
+
animation: particle-fly 0.8s ease-out forwards;
|
443 |
+
}
|
444 |
+
@keyframes particle-fly {
|
445 |
+
0% {
|
446 |
+
opacity: 1;
|
447 |
+
transform: translate(-50%, -50%);
|
448 |
+
}
|
449 |
+
100% {
|
450 |
+
opacity: 0;
|
451 |
+
transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)));
|
452 |
+
}
|
453 |
+
}
|
454 |
+
.particle:nth-child(1) {
|
455 |
+
--dx: 20px;
|
456 |
+
--dy: -20px;
|
457 |
+
}
|
458 |
+
.particle:nth-child(2) {
|
459 |
+
--dx: -15px;
|
460 |
+
--dy: 25px;
|
461 |
+
}
|
462 |
+
.particle:nth-child(3) {
|
463 |
+
--dx: 25px;
|
464 |
+
--dy: 15px;
|
465 |
+
}
|
466 |
+
.particle:nth-child(4) {
|
467 |
+
--dx: -20px;
|
468 |
+
--dy: -15px;
|
469 |
+
}
|
470 |
+
.particle:nth-child(5) {
|
471 |
+
--dx: 0px;
|
472 |
+
--dy: -30px;
|
473 |
+
}
|
474 |
+
.cyber-label:hover .cyber-core {
|
475 |
+
transform: scale(1.05);
|
476 |
+
filter: brightness(1.2);
|
477 |
+
box-shadow:
|
478 |
+
inset 0 4px 24px rgba(255, 255, 255, 0.3),
|
479 |
+
inset 0 -4px 12px rgba(0, 0, 0, 0.5);
|
480 |
+
}
|
481 |
+
.cyber-input:active ~ .cyber-label .cyber-core {
|
482 |
+
transform: scale(0.95);
|
483 |
+
}
|
484 |
+
.cyber-input:focus-visible ~ .cyber-label .cyber-core {
|
485 |
+
outline: 2px solid hsl(var(--hue), 100%, 50%);
|
486 |
+
outline-offset: 4px;
|
487 |
+
}
|
488 |
+
.cyber-glare {
|
489 |
+
position: absolute;
|
490 |
+
width: 50%;
|
491 |
+
height: 100%;
|
492 |
+
background: linear-gradient(
|
493 |
+
90deg,
|
494 |
+
rgba(255, 255, 255, 0.1) 0%,
|
495 |
+
transparent 100%
|
496 |
+
);
|
497 |
+
transform: skewX(-20deg);
|
498 |
+
filter: blur(2px);
|
499 |
+
}
|
500 |
+
.cyber-toggle::before {
|
501 |
+
content: "";
|
502 |
+
position: absolute;
|
503 |
+
inset: 0;
|
504 |
+
background-image:
|
505 |
+
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
|
506 |
+
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
|
507 |
+
background-size: 20px 20px;
|
508 |
+
mix-blend-mode: overlay;
|
509 |
+
}
|
510 |
+
/* ===== END CYBER-TOGGLE ===== */
|
511 |
+
|
512 |
+
.glass-card-colored {
|
513 |
+
width: 240px;
|
514 |
+
height: 360px;
|
515 |
+
background: rgba(235, 142, 253, 0.15);
|
516 |
+
backdrop-filter: blur(15px);
|
517 |
+
-webkit-backdrop-filter: blur(15px);
|
518 |
+
border-radius: 22px;
|
519 |
+
border: 1px solid rgba(255, 255, 255, 0.34);
|
520 |
+
box-shadow:
|
521 |
+
0 8px 32px rgba(0, 0, 0, 0.1),
|
522 |
+
inset 0 1px 0 rgba(255, 255, 255, 0.5),
|
523 |
+
inset 0 -1px 0 rgba(255, 255, 255, 0.1),
|
524 |
+
inset 0 0 22px 11px rgba(255, 255, 255, 0.1);
|
525 |
+
position: relative;
|
526 |
+
overflow: hidden;
|
527 |
+
}
|
528 |
+
|
529 |
+
.glass-card-colored::before {
|
530 |
+
content: '';
|
531 |
+
position: absolute;
|
532 |
+
top: 0;
|
533 |
+
left: 0;
|
534 |
+
right: 0;
|
535 |
+
height: 1px;
|
536 |
+
background: linear-gradient(
|
537 |
+
90deg,
|
538 |
+
transparent,
|
539 |
+
rgba(255, 255, 255, 0.8),
|
540 |
+
transparent
|
541 |
+
);
|
542 |
+
}
|
543 |
+
|
544 |
+
.glass-card-colored::after {
|
545 |
+
content: '';
|
546 |
+
position: absolute;
|
547 |
+
top: 0;
|
548 |
+
left: 0;
|
549 |
+
width: 1px;
|
550 |
+
height: 100%;
|
551 |
+
background: linear-gradient(
|
552 |
+
180deg,
|
553 |
+
rgba(255, 255, 255, 0.8),
|
554 |
+
transparent,
|
555 |
+
rgba(255, 255, 255, 0.3)
|
556 |
+
);
|
557 |
+
}
|
558 |
+
</style>
|
559 |
+
</head>
|
560 |
+
<body id="appBody" class="min-h-screen flex items-center justify-center p-4 transition-colors duration-300 bg-slate-100 dark:bg-gray-900">
|
561 |
+
<!-- Glass-morph settings button (bottom-right) -->
|
562 |
+
<button id="glassSettingsBtn"
|
563 |
+
title="Glass settings"
|
564 |
+
class="fixed bottom-3 right-3 z-50 w-5 h-5 text-cyan-400 hover:text-cyan-300 transition-transform hover:scale-125">
|
565 |
+
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-8.5-2c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm17 0c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"/></svg>
|
566 |
+
</button>
|
567 |
+
|
568 |
+
<!-- Dark / Light Mode Toggle -->
|
569 |
+
<div class="fixed top-4 right-4 z-50 flex flex-col items-center space-y-2">
|
570 |
+
<div class="cyber-toggle">
|
571 |
+
<input id="toggle" class="cyber-input" type="checkbox" />
|
572 |
+
<label for="toggle" class="cyber-label">
|
573 |
+
<div class="cyber-core">
|
574 |
+
<div class="cyber-toggle-circle"></div>
|
575 |
+
</div>
|
576 |
+
<div class="cyber-power-line"></div>
|
577 |
+
<div class="cyber-power-ring">
|
578 |
+
<div style="--x: 10%; --y: 20%; --px: 15px; --py: -10px; --delay: 0.1s;" class="ring-particle"></div>
|
579 |
+
<div style="--x: 70%; --y: 30%; --px: -10px; --py: 15px; --delay: 0.3s;" class="ring-particle"></div>
|
580 |
+
<div style="--x: 40%; --y: 80%; --px: 20px; --py: 10px; --delay: 0.5s;" class="ring-particle"></div>
|
581 |
+
<div style="--x: 90%; --y: 60%; --px: -15px; --py: -15px; --delay: 0.7s;" class="ring-particle"></div>
|
582 |
+
</div>
|
583 |
+
<div class="cyber-particles">
|
584 |
+
<div class="particle"></div>
|
585 |
+
<div class="particle"></div>
|
586 |
+
<div class="particle"></div>
|
587 |
+
<div class="particle"></div>
|
588 |
+
<div class="particle"></div>
|
589 |
+
</div>
|
590 |
+
</label>
|
591 |
+
</div>
|
592 |
+
<!-- Settings button -->
|
593 |
+
<button id="settingsBtn" title="Settings" class="w-6 h-6 text-cyan-400 hover:text-cyan-300 transition-colors">
|
594 |
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-full h-full" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
595 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
|
596 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
597 |
+
</svg>
|
598 |
+
</button>
|
599 |
+
</div>
|
600 |
+
<div class="container mx-auto">
|
601 |
+
|
602 |
+
|
603 |
+
<!-- Chat Interface Area -->
|
604 |
+
<div class="max-w-2xl mx-auto mb-8">
|
605 |
+
<div class="chat-container w-full h-[500px] rounded-[20px] shadow-[10px_10px_15px_rgba(0,0,0,0.5)] relative overflow-hidden transition-colors duration-300 bg-gradient-to-br from-blue-200 via-cyan-100 to-teal-100 dark:from-blue-900 dark:via-cyan-800 dark:to-teal-900">
|
606 |
+
<!-- Chat Header -->
|
607 |
+
<div class="chat-header p-4 border-b border-cyan-400/30">
|
608 |
+
<div class="flex items-center justify-between">
|
609 |
+
<div class="flex items-center">
|
610 |
+
<div class="w-3 h-3 bg-green-400 rounded-full mr-2 animate-pulse"></div>
|
611 |
+
<span class="text-white font-semibold">Eva</span>
|
612 |
+
</div>
|
613 |
+
<div class="text-cyan-400">
|
614 |
+
<i class="fas fa-microphone"></i>
|
615 |
+
</div>
|
616 |
+
</div>
|
617 |
+
</div>
|
618 |
+
|
619 |
+
<!-- Chat Messages -->
|
620 |
+
<div class="chat-messages h-80 p-4 overflow-y-auto" id="chatMessages">
|
621 |
+
<div class="text-center text-gray-300 py-8">
|
622 |
+
<i class="fas fa-comments text-4xl mb-4 opacity-50"></i>
|
623 |
+
<p>Start speaking or type a message...</p>
|
624 |
+
</div>
|
625 |
+
</div>
|
626 |
+
|
627 |
+
<!-- Input Area -->
|
628 |
+
<div class="chat-input p-4 border-t border-cyan-400/30">
|
629 |
+
<div class="flex items-center space-x-2">
|
630 |
+
<input type="text"
|
631 |
+
id="userInput"
|
632 |
+
placeholder="Type your message or click to speak..."
|
633 |
+
class="flex-1 bg-black/20 border border-cyan-400/30 rounded-lg px-4 py-2 text-white placeholder-gray-400 focus:outline-none focus:border-cyan-400">
|
634 |
+
<button id="voiceBtn" class="bg-cyan-500 hover:bg-cyan-600 text-white p-2 rounded-lg transition duration-300">
|
635 |
+
<i class="fas fa-microphone"></i>
|
636 |
+
</button>
|
637 |
+
<button id="sendBtn" class="bg-blue-500 hover:bg-blue-600 text-white p-2 rounded-lg transition duration-300">
|
638 |
+
<i class="fas fa-paper-plane"></i>
|
639 |
+
</button>
|
640 |
+
</div>
|
641 |
+
</div>
|
642 |
+
|
643 |
+
<!-- Voice Visualizer -->
|
644 |
+
<div id="voiceVisualizer" class="absolute bottom-20 left-0 right-0 hidden">
|
645 |
+
<div class="flex justify-center items-end space-x-1 h-16">
|
646 |
+
<div class="w-1 bg-cyan-400 rounded" style="height: 20%; animation: voice 0.5s ease-in-out infinite;"></div>
|
647 |
+
<div class="w-1 bg-cyan-400 rounded" style="height: 40%; animation: voice 0.5s ease-in-out infinite 0.1s;"></div>
|
648 |
+
<div class="w-1 bg-cyan-400 rounded" style="height: 60%; animation: voice 0.5s ease-in-out infinite 0.2s;"></div>
|
649 |
+
<div class="w-1 bg-cyan-400 rounded" style="height: 80%; animation: voice 0.5s ease-in-out infinite 0.3s;"></div>
|
650 |
+
<div class="w-1 bg-cyan-400 rounded" style="height: 100%; animation: voice 0.5s ease-in-out infinite 0.4s;"></div>
|
651 |
+
</div>
|
652 |
+
</div>
|
653 |
+
|
654 |
+
<!-- Microphone Icon in Center -->
|
655 |
+
<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2">
|
656 |
+
<div class="text-center">
|
657 |
+
<div class="w-16 h-16 bg-cyan-500/20 rounded-full flex items-center justify-center mb-2">
|
658 |
+
<i class="fas fa-microphone text-2xl text-cyan-400"></i>
|
659 |
+
</div>
|
660 |
+
</div>
|
661 |
+
</div>
|
662 |
+
</div>
|
663 |
+
</div>
|
664 |
+
|
665 |
+
<!-- Removed cards and stats section -->
|
666 |
+
</div>
|
667 |
+
|
668 |
+
<!-- Card Modal (unchanged) -->
|
669 |
+
<div id="modal" class="modal fixed inset-0 hidden items-center justify-center z-50">
|
670 |
+
<div class="modal-content rounded-lg p-8 max-w-md mx-4 text-center">
|
671 |
+
<h2 class="text-2xl font-bold text-white mb-4">Card Unlocked!</h2>
|
672 |
+
<p class="text-gray-300 mb-6">You discovered the secret of card <span id="cardNumber" class="text-cyan-400 font-bold"></span>!</p>
|
673 |
+
<button id="closeModal" class="bg-cyan-500 hover:bg-cyan-600 text-white font-bold py-2 px-6 rounded-lg transition duration-300">
|
674 |
+
Awesome!
|
675 |
+
</button>
|
676 |
+
</div>
|
677 |
+
</div>
|
678 |
+
|
679 |
+
<!-- Settings Modal -->
|
680 |
+
<div id="settingsModal"
|
681 |
+
class="fixed inset-0 bg-black/60 backdrop-blur-sm hidden items-center justify-center z-[60]">
|
682 |
+
<div class="bg-slate-800/90 border border-cyan-400/30 rounded-xl p-6 w-[320px] space-y-4">
|
683 |
+
<h3 class="text-cyan-300 text-lg font-semibold mb-2">Theme Settings</h3>
|
684 |
+
|
685 |
+
<!-- Gradient selector -->
|
686 |
+
<div>
|
687 |
+
<label class="text-sm text-gray-300 block mb-1">Gradient</label>
|
688 |
+
<div id="gradientPalette" class="grid grid-cols-5 gap-1">
|
689 |
+
<!-- palettes filled by JS -->
|
690 |
+
</div>
|
691 |
+
</div>
|
692 |
+
|
693 |
+
<button id="closeSettings"
|
694 |
+
class="w-full mt-2 bg-cyan-500 hover:bg-cyan-600 text-white rounded py-1 text-sm">
|
695 |
+
Close
|
696 |
+
</button>
|
697 |
+
</div>
|
698 |
+
</div>
|
699 |
+
|
700 |
+
<!-- Glass-morph Settings Mini Modal -->
|
701 |
+
<div id="glassSettingsModal"
|
702 |
+
class="fixed bottom-12 right-3 z-50 hidden bg-gray-900/90 backdrop-blur-md border border-cyan-400/30 rounded-lg p-2 w-48 text-xs text-white shadow-lg">
|
703 |
+
<h4 class="text-cyan-300 mb-1">Glass Style</h4>
|
704 |
+
|
705 |
+
<label class="block mb-1"><input type="color" id="glassColor" value="#eb8efdd9" class="w-4 h-4 rounded border-none"> Color</label>
|
706 |
+
|
707 |
+
<label class="block mb-1">Blur <input type="range" id="glassBlur" min="0" max="30" value="15" class="w-full h-1 bg-gray-700 rounded appearance-none"></label>
|
708 |
+
|
709 |
+
<label class="block mb-1">Border <input type="range" id="glassBorder" min="0" max="1" step="0.05" value="0.34" class="w-full h-1 bg-gray-700 rounded appearance-none"></label>
|
710 |
+
|
711 |
+
<label class="block mb-1">Shadow <input type="range" id="glassShadow" min="0" max="1" step="0.05" value="0.5" class="w-full h-1 bg-gray-700 rounded appearance-none"></label>
|
712 |
+
</div>
|
713 |
+
|
714 |
+
<!-- Animated Background Particles -->
|
715 |
+
<div id="particleCanvas" class="fixed top-0 left-0 -z-10 overflow-hidden">
|
716 |
+
<canvas id="particles" class="absolute inset-0 w-full h-full"></canvas>
|
717 |
+
</div>
|
718 |
+
|
719 |
+
<script src="https://cdn.jsdelivr.net/npm/interactjs/dist/interact.min.js"></script>
|
720 |
+
<script>
|
721 |
+
// Make the chat box draggable via header & resizable
|
722 |
+
interact('.chat-container')
|
723 |
+
.resizable({
|
724 |
+
edges: { left: true, right: true, bottom: true, top: true },
|
725 |
+
listeners: {
|
726 |
+
move(event) {
|
727 |
+
const { target } = event;
|
728 |
+
// Only update width/height, do NOT translate
|
729 |
+
target.style.width = `${event.rect.width}px`;
|
730 |
+
target.style.height = `${event.rect.height}px`;
|
731 |
+
}
|
732 |
+
}
|
733 |
+
});
|
734 |
+
|
735 |
+
interact('.chat-header')
|
736 |
+
.draggable({
|
737 |
+
inertia: true,
|
738 |
+
listeners: {
|
739 |
+
move(event) {
|
740 |
+
const container = document.querySelector('.chat-container');
|
741 |
+
let x = (parseFloat(container.getAttribute('data-x')) || 0) + event.dx;
|
742 |
+
let y = (parseFloat(container.getAttribute('data-y')) || 0) + event.dy;
|
743 |
+
container.style.transform = `translate(${x}px, ${y}px)`;
|
744 |
+
container.setAttribute('data-x', x);
|
745 |
+
container.setAttribute('data-y', y);
|
746 |
+
}
|
747 |
+
}
|
748 |
+
});
|
749 |
+
|
750 |
+
// Dark/light mode toggle
|
751 |
+
const toggle = document.getElementById('toggle');
|
752 |
+
const appBody = document.getElementById('appBody');
|
753 |
+
|
754 |
+
// init
|
755 |
+
if (localStorage.theme === 'dark') {
|
756 |
+
appBody.classList.add('dark');
|
757 |
+
toggle.checked = true;
|
758 |
+
}
|
759 |
+
|
760 |
+
toggle.addEventListener('change', () => {
|
761 |
+
if (toggle.checked) {
|
762 |
+
appBody.classList.add('dark');
|
763 |
+
localStorage.theme = 'dark';
|
764 |
+
} else {
|
765 |
+
appBody.classList.remove('dark');
|
766 |
+
localStorage.theme = 'light';
|
767 |
+
}
|
768 |
+
});
|
769 |
+
|
770 |
+
const modal = document.getElementById('modal');
|
771 |
+
const cardNumberSpan = document.getElementById('cardNumber');
|
772 |
+
const closeModalBtn = document.getElementById('closeModal');
|
773 |
+
|
774 |
+
// --- Settings panel ---
|
775 |
+
const settingsBtn = document.getElementById('settingsBtn');
|
776 |
+
const settingsModal = document.getElementById('settingsModal');
|
777 |
+
const closeSettings = document.getElementById('closeSettings');
|
778 |
+
const eyePicker = document.getElementById('eyeColorPicker');
|
779 |
+
const textPicker = document.getElementById('textColorPicker');
|
780 |
+
const gradPalette = document.getElementById('gradientPalette');
|
781 |
+
const chatContainer = document.querySelector('.chat-container');
|
782 |
+
|
783 |
+
settingsBtn.addEventListener('click', () => settingsModal.classList.remove('hidden'));
|
784 |
+
closeSettings.addEventListener('click', () => settingsModal.classList.add('hidden'));
|
785 |
+
settingsModal.addEventListener('click', (e) => {
|
786 |
+
if (e.target === settingsModal) settingsModal.classList.add('hidden');
|
787 |
+
});
|
788 |
+
|
789 |
+
// -- mini glass-morph controls
|
790 |
+
const glassBtn = document.getElementById('glassSettingsBtn');
|
791 |
+
const glassMod = document.getElementById('glassSettingsModal');
|
792 |
+
const glassColor = document.getElementById('glassColor');
|
793 |
+
const glassBlur = document.getElementById('glassBlur');
|
794 |
+
const glassBorder = document.getElementById('glassBorder');
|
795 |
+
const glassShadow = document.getElementById('glassShadow');
|
796 |
+
|
797 |
+
glassBtn.addEventListener('click', () => glassMod.classList.toggle('hidden'));
|
798 |
+
|
799 |
+
function updateGlass() {
|
800 |
+
const color = glassColor.value;
|
801 |
+
const blur = glassBlur.value;
|
802 |
+
const bord = glassBorder.value
|
803 |
+
const shad = glassShadow.value
|
804 |
+
const container = document.querySelector('.chat-container');
|
805 |
+
container.style.background = color + Math.round(bord*255).toString(16).padStart(2,'0');
|
806 |
+
container.style.backdropFilter = `blur(${blur}px)`;
|
807 |
+
container.style.webkitBackdropFilter= `blur(${blur}px)`;
|
808 |
+
container.style.borderColor = `rgba(255,255,255,${bord})`;
|
809 |
+
container.style.boxShadow = `0 8px 32px rgba(0,0,0,${shad})`;
|
810 |
+
}
|
811 |
+
[glassColor, glassBlur, glassBorder, glassShadow].forEach(el => el.addEventListener('input', updateGlass));
|
812 |
+
updateGlass(); // init
|
813 |
+
|
814 |
+
// 20 gradients (10 light, 10 dark)
|
815 |
+
const lightGradients = [
|
816 |
+
'linear-gradient(135deg,#ffeaa7 0%,#fab1a0 50%,#fd79a8 100%)',
|
817 |
+
'linear-gradient(135deg,#a29bfe 0%,#6c5ce7 50%,#00cec9 100%)',
|
818 |
+
'linear-gradient(135deg,#74b9ff 0%,#0984e3 50%,#00cec9 100%)',
|
819 |
+
'linear-gradient(135deg,#fd79a8 0%,#e84393 50%,#a29bfe 100%)',
|
820 |
+
'linear-gradient(135deg,#00b894 0%,#00cec9 50%,#6c5ce7 100%)',
|
821 |
+
'linear-gradient(135deg,#fdcb6e 0%,#e17055 50%,#d63031 100%)',
|
822 |
+
'linear-gradient(135deg,#81ecec 0%,#74b9ff 50%,#a29bfe 100%)',
|
823 |
+
'linear-gradient(135deg,#55efc4 0%,#00b894 50%,#00cec9 100%)',
|
824 |
+
'linear-gradient(135deg,#fd79a8 0%,#fdcb6e 50%,#e17055 100%)',
|
825 |
+
'linear-gradient(135deg,#e17055 0%,#fab1a0 50%,#ffeaa7 100%)'
|
826 |
+
];
|
827 |
+
const darkGradients = [
|
828 |
+
'linear-gradient(135deg,#2d3436 0%,#636e72 50%,#2d3436 100%)',
|
829 |
+
'linear-gradient(135deg,#192a56 0%,#273c75 50%,#487eb0 100%)',
|
830 |
+
'linear-gradient(135deg,#2d3436 0%,#636e72 50%,#b2bec3 100%)',
|
831 |
+
'linear-gradient(135deg,#192a56 0%,#40739e 50%,#0097e6 100%)',
|
832 |
+
'linear-gradient(135deg,#192a56 0%,#192a56 50%,#273c75 100%)',
|
833 |
+
'linear-gradient(135deg,#2f3640 0%,#353b48 50%,#192a56 100%)',
|
834 |
+
'linear-gradient(135deg,#192a56 0%,#40739e 50%,#192a56 100%)',
|
835 |
+
'linear-gradient(135deg,#2d3436 0%,#636e72 50%,#192a56 100%)',
|
836 |
+
'linear-gradient(135deg,#273c75 0%,#40739e 50%,#192a56 100%)',
|
837 |
+
'linear-gradient(135deg,#192a56 0%,#273c75 50%,#2d3436 100%)'
|
838 |
+
];
|
839 |
+
|
840 |
+
// Build palette
|
841 |
+
[...lightGradients, ...darkGradients].forEach((g, i) => {
|
842 |
+
const swatch = document.createElement('button');
|
843 |
+
swatch.className = 'w-8 h-8 rounded border border-cyan-400/30 hover:scale-125 transition-transform';
|
844 |
+
swatch.style.background = g;
|
845 |
+
swatch.addEventListener('click', () => applyGradient(g));
|
846 |
+
gradPalette.appendChild(swatch);
|
847 |
+
});
|
848 |
+
|
849 |
+
// Apply saved gradient on load
|
850 |
+
const savedGrad = localStorage.getItem('bgGradient');
|
851 |
+
if (savedGrad) applyGradient(savedGrad);
|
852 |
+
|
853 |
+
function applyGradient(grad) {
|
854 |
+
appBody.style.background = grad;
|
855 |
+
appBody.style.backgroundAttachment = 'fixed';
|
856 |
+
localStorage.setItem('bgGradient', grad);
|
857 |
+
}
|
858 |
+
|
859 |
+
// Animated background particles
|
860 |
+
const canvas = document.getElementById('particles');
|
861 |
+
const ctx = canvas.getContext('2d');
|
862 |
+
let particles = [];
|
863 |
+
let animationId;
|
864 |
+
|
865 |
+
function resizeCanvas() {
|
866 |
+
canvas.width = window.innerWidth / 2;
|
867 |
+
canvas.height = window.innerHeight / 2;
|
868 |
+
}
|
869 |
+
|
870 |
+
class Particle {
|
871 |
+
constructor() {
|
872 |
+
this.x = Math.random() * canvas.width;
|
873 |
+
this.y = Math.random() * canvas.height;
|
874 |
+
this.size = Math.random() * 4 + 2;
|
875 |
+
this.speedX = Math.random() * 0.5 - 0.25;
|
876 |
+
this.speedY = Math.random() * 0.5 - 0.25;
|
877 |
+
this.opacity = Math.random() * 0.5 + 0.1;
|
878 |
+
this.blur = 0; // sharp
|
879 |
+
this.hue = Math.random() * 360;
|
880 |
+
}
|
881 |
+
|
882 |
+
update() {
|
883 |
+
this.x += this.speedX;
|
884 |
+
this.y += this.speedY;
|
885 |
+
|
886 |
+
if (this.x < 0 || this.x > canvas.width) this.speedX *= -1;
|
887 |
+
if (this.y < 0 || this.y > canvas.height) this.speedY *= -1;
|
888 |
+
|
889 |
+
this.hue = (this.hue + 0.5) % 360;
|
890 |
+
this.opacity = 0.4 + 0.3 * Math.sin(Date.now() * 0.002 + this.x * 0.01);
|
891 |
+
}
|
892 |
+
|
893 |
+
draw() {
|
894 |
+
ctx.save();
|
895 |
+
ctx.globalAlpha = this.opacity;
|
896 |
+
ctx.fillStyle = `hsl(${this.hue},100%,70%)`;
|
897 |
+
ctx.beginPath();
|
898 |
+
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
|
899 |
+
ctx.fill();
|
900 |
+
ctx.restore();
|
901 |
+
}
|
902 |
+
}
|
903 |
+
|
904 |
+
class Star {
|
905 |
+
constructor() {
|
906 |
+
this.x = Math.random() * canvas.width;
|
907 |
+
this.y = Math.random() * canvas.height;
|
908 |
+
this.size = 1 + Math.random() * 2;
|
909 |
+
this.speedX = Math.random() * 0.3 - 0.15;
|
910 |
+
this.speedY = Math.random() * 0.3 - 0.15;
|
911 |
+
this.hue = Math.random() * 360;
|
912 |
+
this.twinkle = 0;
|
913 |
+
}
|
914 |
+
|
915 |
+
update() {
|
916 |
+
this.x += this.speedX;
|
917 |
+
this.y += this.speedY;
|
918 |
+
|
919 |
+
if (this.x < 0 || this.x > canvas.width) this.speedX *= -1;
|
920 |
+
if (this.y < 0 || this.y > canvas.height) this.speedY *= -1;
|
921 |
+
|
922 |
+
this.hue = (this.hue + 0.3) % 360;
|
923 |
+
this.twinkle = 0.3 + 0.7 * Math.abs(Math.sin(Date.now() * 0.004 + this.x * 0.01));
|
924 |
+
}
|
925 |
+
|
926 |
+
draw() {
|
927 |
+
ctx.save();
|
928 |
+
ctx.globalAlpha = this.twinkle;
|
929 |
+
ctx.shadowColor = `hsl(${this.hue},100%,80%)`;
|
930 |
+
ctx.shadowBlur = 12;
|
931 |
+
ctx.fillStyle = `hsl(${this.hue},100%,80%)`;
|
932 |
+
ctx.beginPath();
|
933 |
+
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
|
934 |
+
ctx.fill();
|
935 |
+
ctx.restore();
|
936 |
+
}
|
937 |
+
}
|
938 |
+
|
939 |
+
function initParticles() {
|
940 |
+
particles = [];
|
941 |
+
const sharpCount = Math.min(40, Math.floor((canvas.width * canvas.height) / 25000));
|
942 |
+
const starCount = Math.min(30, Math.floor((canvas.width * canvas.height) / 30000));
|
943 |
+
|
944 |
+
for (let i = 0; i < sharpCount; i++) particles.push(new Particle());
|
945 |
+
for (let i = 0; i < starCount; i++) particles.push(new Star());
|
946 |
+
}
|
947 |
+
|
948 |
+
function animateParticles() {
|
949 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
950 |
+
|
951 |
+
particles.forEach(particle => {
|
952 |
+
particle.update();
|
953 |
+
particle.draw();
|
954 |
+
});
|
955 |
+
|
956 |
+
animationId = requestAnimationFrame(animateParticles);
|
957 |
+
}
|
958 |
+
|
959 |
+
function startParticleAnimation() {
|
960 |
+
resizeCanvas();
|
961 |
+
initParticles();
|
962 |
+
animateParticles();
|
963 |
+
}
|
964 |
+
|
965 |
+
// Initialize particles on load
|
966 |
+
window.addEventListener('resize', () => {
|
967 |
+
resizeCanvas();
|
968 |
+
initParticles();
|
969 |
+
});
|
970 |
+
|
971 |
+
startParticleAnimation();
|
972 |
+
|
973 |
+
// Eye / Text color pickers
|
974 |
+
// Chat functionality
|
975 |
+
const chatMessages = document.getElementById('chatMessages');
|
976 |
+
const userInput = document.getElementById('userInput');
|
977 |
+
const sendBtn = document.getElementById('sendBtn');
|
978 |
+
const voiceBtn = document.getElementById('voiceBtn');
|
979 |
+
const voiceVisualizer = document.getElementById('voiceVisualizer');
|
980 |
+
|
981 |
+
// Voice recognition setup
|
982 |
+
let recognition = null;
|
983 |
+
if ('webkitSpeechRecognition' in window || 'SpeechRecognition' in window) {
|
984 |
+
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
985 |
+
recognition = new SpeechRecognition();
|
986 |
+
recognition.continuous = false;
|
987 |
+
recognition.interimResults = false;
|
988 |
+
recognition.lang = 'en-US';
|
989 |
+
}
|
990 |
+
|
991 |
+
// Chat event listeners
|
992 |
+
sendBtn.addEventListener('click', sendMessage);
|
993 |
+
userInput.addEventListener('keypress', (e) => {
|
994 |
+
if (e.key === 'Enter') sendMessage();
|
995 |
+
});
|
996 |
+
voiceBtn.addEventListener('click', toggleVoiceRecognition);
|
997 |
+
|
998 |
+
function addMessage(message, sender) {
|
999 |
+
const messageDiv = document.createElement('div');
|
1000 |
+
messageDiv.className = `message ${sender}`;
|
1001 |
+
messageDiv.textContent = message;
|
1002 |
+
chatMessages.appendChild(messageDiv);
|
1003 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
function sendMessage() {
|
1007 |
+
const message = userInput.value.trim();
|
1008 |
+
if (!message) return;
|
1009 |
+
|
1010 |
+
addMessage(message, 'user');
|
1011 |
+
userInput.value = '';
|
1012 |
+
|
1013 |
+
// Simulate AI response (replace with actual API call)
|
1014 |
+
setTimeout(() => {
|
1015 |
+
const responses = [
|
1016 |
+
"I'm processing your request...",
|
1017 |
+
"Let me think about that...",
|
1018 |
+
"Interesting question!",
|
1019 |
+
"Here's what I found..."
|
1020 |
+
];
|
1021 |
+
const response = responses[Math.floor(Math.random() * responses.length)];
|
1022 |
+
addMessage(response, 'assistant');
|
1023 |
+
}, 1000);
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
function toggleVoiceRecognition() {
|
1027 |
+
if (!recognition) {
|
1028 |
+
alert('Speech recognition not supported in this browser');
|
1029 |
+
return;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
if (voiceBtn.classList.contains('listening')) {
|
1033 |
+
recognition.stop();
|
1034 |
+
stopListening();
|
1035 |
+
} else {
|
1036 |
+
recognition.start();
|
1037 |
+
voiceBtn.classList.add('listening');
|
1038 |
+
voiceBtn.innerHTML = '<i class="fas fa-stop"></i>';
|
1039 |
+
voiceVisualizer.classList.remove('hidden');
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
function stopListening() {
|
1044 |
+
voiceBtn.classList.remove('listening');
|
1045 |
+
voiceBtn.innerHTML = '<i class="fas fa-microphone"></i>';
|
1046 |
+
voiceVisualizer.classList.add('hidden');
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
// Voice recognition events
|
1050 |
+
if (recognition) {
|
1051 |
+
recognition.onresult = (event) => {
|
1052 |
+
const transcript = event.results[0][0].transcript;
|
1053 |
+
userInput.value = transcript;
|
1054 |
+
sendMessage();
|
1055 |
+
};
|
1056 |
+
|
1057 |
+
recognition.onend = () => {
|
1058 |
+
stopListening();
|
1059 |
+
};
|
1060 |
+
|
1061 |
+
recognition.onerror = (event) => {
|
1062 |
+
console.error('Speech recognition error:', event.error);
|
1063 |
+
stopListening();
|
1064 |
+
};
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
<!-- duplicate block removed -->
|
1068 |
+
</script>
|
1069 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=basheer1414/aiui" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
1070 |
+
</html>
|