Hadiil commited on
Commit
dbd0f66
·
verified ·
1 Parent(s): 6c25547

Update static/styles.css

Browse files
Files changed (1) hide show
  1. static/styles.css +150 -1371
static/styles.css CHANGED
@@ -1,1371 +1,150 @@
1
- /* Cosmic Chatbot - Enhanced Styles CSS */
2
- @import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap");
3
- @import url("https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap");
4
-
5
- :root {
6
- /* Enhanced Cosmic Theme Colors */
7
- --cosmic-deep-blue: #050b20;
8
- --cosmic-blue: #0a1642;
9
- --cosmic-accent-blue: #1e3a8a;
10
- --cosmic-light-blue: #3b82f6;
11
- --cosmic-bright-blue: #60a5fa;
12
- --cosmic-purple: #7c3aed;
13
- --cosmic-violet: #8b5cf6;
14
- --cosmic-pink: #c026d3;
15
- --cosmic-text: #f8fafc;
16
- --cosmic-text-secondary: #cbd5e1;
17
- --cosmic-border: rgba(148, 163, 184, 0.2);
18
- --cosmic-shadow: rgba(30, 58, 138, 0.4);
19
-
20
- /* More transparent backgrounds */
21
- --cosmic-card-bg: rgba(15, 23, 42, 0.35);
22
- --cosmic-input-bg: rgba(15, 23, 42, 0.4);
23
- --cosmic-sidebar-bg: rgba(15, 23, 42, 0.6);
24
-
25
- /* Animation Speeds */
26
- --animation-slow: 3s;
27
- --animation-medium: 1.5s;
28
- --animation-fast: 0.6s;
29
-
30
- /* Sizes */
31
- --border-radius-sm: 0.5rem;
32
- --border-radius-md: 1rem;
33
- --border-radius-lg: 1.5rem;
34
- --spacing-xs: 0.25rem;
35
- --spacing-sm: 0.5rem;
36
- --spacing-md: 1rem;
37
- --spacing-lg: 1.5rem;
38
- --spacing-xl: 2rem;
39
- --sidebar-width: 250px;
40
- --sidebar-collapsed-width: 70px;
41
- }
42
-
43
- /* Base Styles */
44
- * {
45
- box-sizing: border-box;
46
- margin: 0;
47
- padding: 0;
48
- }
49
-
50
- /* Enhanced body background with the starry night sky */
51
- body {
52
- font-family: "Quicksand", sans-serif;
53
- color: var(--cosmic-text);
54
- margin: 0;
55
- padding: 0;
56
- min-height: 100vh;
57
- transition: all 0.5s ease;
58
- position: relative;
59
- overflow-x: hidden;
60
- line-height: 1.5;
61
- background-image: url("https://hebbkx1anhila5yf.public.blob.vercel-storage.com/FFF.jpg-cGV70B1lijiFwqNv1o73GWgEUJ76iN.jpeg");
62
- background-size: cover;
63
- background-position: center;
64
- background-attachment: fixed;
65
- background-repeat: no-repeat;
66
- }
67
-
68
- /* Subtle overlay for better text readability */
69
- body::before {
70
- content: "";
71
- position: fixed;
72
- top: 0;
73
- left: 0;
74
- width: 100%;
75
- height: 100%;
76
- background: linear-gradient(to bottom, rgba(5, 11, 32, 0.2), rgba(10, 22, 66, 0.3));
77
- pointer-events: none;
78
- z-index: -1;
79
- }
80
-
81
- /* Enhanced stars animation */
82
- .stars {
83
- position: fixed;
84
- top: 0;
85
- left: 0;
86
- width: 100%;
87
- height: 100%;
88
- pointer-events: none;
89
- z-index: -1;
90
- }
91
-
92
- .star {
93
- position: absolute;
94
- background-color: #ffffff;
95
- border-radius: 50%;
96
- opacity: 0;
97
- animation: twinkle var(--animation-slow) infinite ease-in-out;
98
- box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.4);
99
- }
100
-
101
- @keyframes twinkle {
102
- 0%,
103
- 100% {
104
- opacity: 0;
105
- transform: scale(0.5);
106
- }
107
- 50% {
108
- opacity: 0.9;
109
- transform: scale(1);
110
- }
111
- }
112
-
113
- /* Enhanced particles to match the blue nebula */
114
- .particles {
115
- position: fixed;
116
- top: 0;
117
- left: 0;
118
- width: 100%;
119
- height: 100%;
120
- pointer-events: none;
121
- z-index: -1;
122
- }
123
-
124
- .particle {
125
- position: absolute;
126
- background: radial-gradient(circle, rgba(59, 130, 246, 0.3), rgba(30, 58, 138, 0.1));
127
- border-radius: 50%;
128
- opacity: 0.3;
129
- filter: blur(8px);
130
- animation: float var(--animation-medium) infinite ease-in-out;
131
- }
132
-
133
- @keyframes float {
134
- 0%,
135
- 100% {
136
- transform: translateY(0) translateX(0) scale(1);
137
- }
138
- 50% {
139
- transform: translateY(-20px) translateX(10px) scale(1.05);
140
- }
141
- }
142
-
143
- /* Shooting stars effect */
144
- .shooting-stars {
145
- position: fixed;
146
- top: 0;
147
- left: 0;
148
- width: 100%;
149
- height: 100%;
150
- pointer-events: none;
151
- z-index: -1;
152
- overflow: hidden;
153
- }
154
-
155
- .shooting-star {
156
- position: absolute;
157
- height: 2px;
158
- background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
159
- transform: rotate(-45deg);
160
- animation: shooting-star-animation 6s linear infinite;
161
- border-radius: 100px;
162
- opacity: 0;
163
- filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
164
- }
165
-
166
- @keyframes shooting-star-animation {
167
- 0% {
168
- opacity: 0;
169
- transform: translateX(0) translateY(0) rotate(-45deg);
170
- width: 0;
171
- }
172
- 1% {
173
- opacity: 1;
174
- }
175
- 5% {
176
- width: 100px;
177
- opacity: 1;
178
- }
179
- 10% {
180
- width: 0;
181
- opacity: 0;
182
- transform: translateX(-500px) translateY(500px) rotate(-45deg);
183
- }
184
- 100% {
185
- opacity: 0;
186
- transform: translateX(-500px) translateY(500px) rotate(-45deg);
187
- width: 0;
188
- }
189
- }
190
-
191
- /* Cosmic dust particles */
192
- .cosmic-dust {
193
- position: fixed;
194
- top: 0;
195
- left: 0;
196
- width: 100%;
197
- height: 100%;
198
- pointer-events: none;
199
- z-index: -1;
200
- }
201
-
202
- .dust-particle {
203
- position: absolute;
204
- width: 2px;
205
- height: 2px;
206
- background-color: rgba(255, 255, 255, 0.5);
207
- border-radius: 50%;
208
- animation: dust-float 15s infinite linear;
209
- }
210
-
211
- @keyframes dust-float {
212
- 0% {
213
- transform: translateY(0) translateX(0) rotate(0deg);
214
- opacity: 0;
215
- }
216
- 10% {
217
- opacity: 0.8;
218
- }
219
- 90% {
220
- opacity: 0.8;
221
- }
222
- 100% {
223
- transform: translateY(-100vh) translateX(20px) rotate(360deg);
224
- opacity: 0;
225
- }
226
- }
227
-
228
- /* Enhanced Sidebar */
229
- .sidebar {
230
- position: fixed;
231
- top: 0;
232
- left: 0;
233
- height: 100vh;
234
- width: var(--sidebar-width);
235
- border-right: 1px solid var(--cosmic-border);
236
- display: flex;
237
- flex-direction: column;
238
- transition: all 0.3s ease;
239
- z-index: 100;
240
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
241
- overflow-x: hidden;
242
- background: var(--cosmic-sidebar-bg);
243
- backdrop-filter: blur(12px);
244
- }
245
-
246
- .sidebar.collapsed {
247
- width: var(--sidebar-collapsed-width);
248
- }
249
-
250
- .sidebar-header {
251
- display: flex;
252
- align-items: center;
253
- padding: 1.5rem;
254
- border-bottom: 1px solid var(--cosmic-border);
255
- background: rgba(15, 23, 42, 0.5);
256
- }
257
-
258
- .sidebar-header .app-logo {
259
- width: 40px;
260
- height: 40px;
261
- display: flex;
262
- align-items: center;
263
- justify-content: center;
264
- font-size: 1.8rem;
265
- color: var(--cosmic-bright-blue);
266
- margin-right: 1rem;
267
- animation: pulse 3s infinite ease-in-out;
268
- position: relative;
269
- }
270
-
271
- .sidebar-header .app-logo::before {
272
- content: "";
273
- position: absolute;
274
- width: 100%;
275
- height: 100%;
276
- border-radius: 50%;
277
- background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
278
- animation: pulse-ring 3s infinite ease-in-out;
279
- }
280
-
281
- @keyframes pulse-ring {
282
- 0% {
283
- transform: scale(0.8);
284
- opacity: 0.3;
285
- }
286
- 50% {
287
- transform: scale(1.2);
288
- opacity: 0.6;
289
- }
290
- 100% {
291
- transform: scale(0.8);
292
- opacity: 0.3;
293
- }
294
- }
295
-
296
- @keyframes pulse {
297
- 0%,
298
- 100% {
299
- transform: scale(1);
300
- opacity: 1;
301
- }
302
- 50% {
303
- transform: scale(1.1);
304
- opacity: 0.8;
305
- }
306
- }
307
-
308
- .sidebar-header h2 {
309
- font-size: 1.3rem;
310
- font-weight: 600;
311
- background: linear-gradient(135deg, var(--cosmic-bright-blue), var(--cosmic-violet));
312
- -webkit-background-clip: text;
313
- background-clip: text;
314
- color: transparent;
315
- white-space: nowrap;
316
- transition: opacity 0.3s ease;
317
- }
318
-
319
- .sidebar.collapsed .sidebar-header h2 {
320
- opacity: 0;
321
- width: 0;
322
- }
323
-
324
- .sidebar-menu {
325
- flex: 1;
326
- padding: 1.5rem 0;
327
- overflow-y: auto;
328
- }
329
-
330
- .sidebar-item {
331
- display: flex;
332
- align-items: center;
333
- padding: 0.8rem 1.5rem;
334
- color: var(--cosmic-text-secondary);
335
- text-decoration: none;
336
- transition: all 0.3s ease;
337
- border-left: 3px solid transparent;
338
- margin-bottom: 0.5rem;
339
- position: relative;
340
- overflow: hidden;
341
- }
342
-
343
- .sidebar-item::before {
344
- content: "";
345
- position: absolute;
346
- top: 0;
347
- left: 0;
348
- width: 100%;
349
- height: 100%;
350
- background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
351
- transform: translateX(-100%);
352
- transition: transform 0.5s ease;
353
- }
354
-
355
- .sidebar-item:hover {
356
- background: rgba(30, 58, 138, 0.2);
357
- color: var(--cosmic-text);
358
- }
359
-
360
- .sidebar-item:hover::before {
361
- transform: translateX(100%);
362
- }
363
-
364
- .sidebar-item.active {
365
- border-left-color: var(--cosmic-bright-blue);
366
- background: rgba(30, 58, 138, 0.3);
367
- color: var(--cosmic-bright-blue);
368
- }
369
-
370
- .sidebar-item i {
371
- font-size: 1.3rem;
372
- margin-right: 1rem;
373
- min-width: 24px;
374
- text-align: center;
375
- }
376
-
377
- .sidebar-item span {
378
- white-space: nowrap;
379
- transition: opacity 0.3s ease;
380
- }
381
-
382
- .sidebar.collapsed .sidebar-item span {
383
- opacity: 0;
384
- width: 0;
385
- }
386
-
387
- .sidebar-footer {
388
- padding: 1.5rem;
389
- border-top: 1px solid var(--cosmic-border);
390
- display: flex;
391
- align-items: center;
392
- justify-content: space-between;
393
- background: rgba(15, 23, 42, 0.5);
394
- }
395
-
396
- .new-chat-btn {
397
- display: flex;
398
- align-items: center;
399
- background: linear-gradient(135deg, var(--cosmic-purple), var(--cosmic-bright-blue));
400
- color: white;
401
- border: none;
402
- padding: 0.7rem 1rem;
403
- border-radius: var(--border-radius-md);
404
- cursor: pointer;
405
- font-family: "Quicksand", sans-serif;
406
- font-weight: 500;
407
- transition: all 0.3s ease;
408
- flex: 1;
409
- position: relative;
410
- overflow: hidden;
411
- }
412
-
413
- .new-chat-btn::after {
414
- content: "";
415
- position: absolute;
416
- top: -50%;
417
- left: -50%;
418
- width: 200%;
419
- height: 200%;
420
- background: linear-gradient(
421
- to bottom right,
422
- rgba(255, 255, 255, 0) 0%,
423
- rgba(255, 255, 255, 0.1) 50%,
424
- rgba(255, 255, 255, 0) 100%
425
- );
426
- transform: rotate(45deg);
427
- opacity: 0;
428
- transition: opacity 0.3s ease;
429
- }
430
-
431
- .new-chat-btn:hover {
432
- transform: translateY(-2px);
433
- box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
434
- }
435
-
436
- .new-chat-btn:hover::after {
437
- opacity: 1;
438
- animation: shine 1.5s ease;
439
- }
440
-
441
- @keyframes shine {
442
- 0% {
443
- left: -50%;
444
- opacity: 0;
445
- }
446
- 50% {
447
- opacity: 1;
448
- }
449
- 100% {
450
- left: 150%;
451
- opacity: 0;
452
- }
453
- }
454
-
455
- .new-chat-btn i {
456
- margin-right: 0.5rem;
457
- }
458
-
459
- .new-chat-btn span {
460
- white-space: nowrap;
461
- transition: opacity 0.3s ease;
462
- }
463
-
464
- .sidebar.collapsed .new-chat-btn span {
465
- opacity: 0;
466
- width: 0;
467
- }
468
-
469
- .sidebar.collapsed .new-chat-btn {
470
- padding: 0.7rem;
471
- justify-content: center;
472
- }
473
-
474
- .sidebar-toggle {
475
- background: transparent;
476
- border: none;
477
- color: var(--cosmic-text-secondary);
478
- cursor: pointer;
479
- font-size: 1.2rem;
480
- display: flex;
481
- align-items: center;
482
- justify-content: center;
483
- padding: 0.5rem;
484
- border-radius: 50%;
485
- transition: all 0.3s ease;
486
- margin-left: 0.5rem;
487
- }
488
-
489
- .sidebar-toggle:hover {
490
- background: rgba(59, 130, 246, 0.2);
491
- color: var(--cosmic-text);
492
- }
493
-
494
- .sidebar.collapsed .sidebar-toggle i {
495
- transform: rotate(180deg);
496
- }
497
-
498
- /* Mobile Sidebar Toggle */
499
- .mobile-sidebar-toggle {
500
- display: none;
501
- background: transparent;
502
- border: none;
503
- color: var(--cosmic-text);
504
- font-size: 1.5rem;
505
- cursor: pointer;
506
- }
507
-
508
- /* Main Container */
509
- .app-container {
510
- display: flex;
511
- flex-direction: column;
512
- height: 100vh;
513
- margin-left: var(--sidebar-width);
514
- padding: var(--spacing-md);
515
- position: relative;
516
- z-index: 1;
517
- transition: margin-left 0.3s ease;
518
- }
519
-
520
- body.sidebar-collapsed .app-container {
521
- margin-left: var(--sidebar-collapsed-width);
522
- }
523
-
524
- /* Header */
525
- .app-header {
526
- display: flex;
527
- justify-content: flex-end;
528
- align-items: center;
529
- padding: var(--spacing-md) 0;
530
- margin-bottom: var(--spacing-lg);
531
- }
532
-
533
- .app-controls {
534
- display: flex;
535
- gap: var(--spacing-md);
536
- align-items: center;
537
- }
538
-
539
- .theme-toggle {
540
- background: none;
541
- border: none;
542
- color: var(--cosmic-text);
543
- cursor: pointer;
544
- font-size: 1.5rem;
545
- transition: transform 0.3s ease;
546
- }
547
-
548
- .theme-toggle:hover {
549
- transform: rotate(30deg);
550
- color: var(--cosmic-bright-blue);
551
- }
552
-
553
- .feature-toggle {
554
- background: rgba(15, 23, 42, 0.4);
555
- border: 1px solid var(--cosmic-border);
556
- color: var(--cosmic-text);
557
- padding: var(--spacing-xs) var(--spacing-sm);
558
- border-radius: var(--border-radius-sm);
559
- cursor: pointer;
560
- font-size: 0.9rem;
561
- transition: all 0.3s ease;
562
- backdrop-filter: blur(10px);
563
- display: flex;
564
- align-items: center;
565
- gap: 0.5rem;
566
- position: relative;
567
- overflow: hidden;
568
- }
569
-
570
- .feature-toggle::before {
571
- content: "";
572
- position: absolute;
573
- top: 0;
574
- left: -100%;
575
- width: 100%;
576
- height: 100%;
577
- background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
578
- transition: left 0.5s ease;
579
- }
580
-
581
- .feature-toggle:hover {
582
- background: rgba(30, 58, 138, 0.5);
583
- color: white;
584
- border-color: var(--cosmic-bright-blue);
585
- }
586
-
587
- .feature-toggle:hover::before {
588
- left: 100%;
589
- }
590
-
591
- /* Completely redesigned chat container to show more of the background */
592
- .chat-container {
593
- flex: 1;
594
- display: flex;
595
- flex-direction: column;
596
- border-radius: var(--border-radius-lg);
597
- overflow: hidden;
598
- position: relative;
599
- background: transparent;
600
- }
601
-
602
- /* Holographic frame effect */
603
- .chat-container::before {
604
- content: "";
605
- position: absolute;
606
- top: 0;
607
- left: 0;
608
- right: 0;
609
- bottom: 0;
610
- border: 1px solid rgba(96, 165, 250, 0.3);
611
- border-radius: var(--border-radius-lg);
612
- box-shadow: 0 0 15px rgba(59, 130, 246, 0.3), inset 0 0 15px rgba(59, 130, 246, 0.3);
613
- pointer-events: none;
614
- z-index: 1;
615
- }
616
-
617
- /* Holographic scan line effect */
618
- .chat-container::after {
619
- content: "";
620
- position: absolute;
621
- top: -100%;
622
- left: 0;
623
- right: 0;
624
- height: 10px;
625
- background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
626
- opacity: 0.5;
627
- z-index: 2;
628
- animation: scan-line 8s linear infinite;
629
- pointer-events: none;
630
- }
631
-
632
- @keyframes scan-line {
633
- 0% {
634
- top: -5%;
635
- }
636
- 100% {
637
- top: 105%;
638
- }
639
- }
640
-
641
- /* Messages Area - Completely redesigned to be more transparent */
642
- .messages {
643
- flex: 1;
644
- overflow-y: auto;
645
- padding: var(--spacing-lg);
646
- display: flex;
647
- flex-direction: column;
648
- gap: var(--spacing-md);
649
- scroll-behavior: smooth;
650
- max-height: calc(100vh - 220px);
651
- min-height: 300px;
652
- position: relative;
653
- z-index: 3;
654
- }
655
-
656
- .messages::-webkit-scrollbar {
657
- width: 4px;
658
- }
659
-
660
- .messages::-webkit-scrollbar-track {
661
- background: transparent;
662
- margin: 0.5rem 0;
663
- }
664
-
665
- .messages::-webkit-scrollbar-thumb {
666
- background: rgba(96, 165, 250, 0.5);
667
- border-radius: 10px;
668
- }
669
-
670
- .messages::-webkit-scrollbar-thumb:hover {
671
- background: var(--cosmic-bright-blue);
672
- }
673
-
674
- /* Redesigned message bubbles to be more futuristic and space-themed */
675
- .message {
676
- max-width: 85%;
677
- padding: var(--spacing-md) var(--spacing-lg);
678
- border-radius: var(--border-radius-md);
679
- line-height: 1.6;
680
- animation: fadeIn var(--animation-fast) ease-out;
681
- position: relative;
682
- overflow: visible;
683
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
684
- backdrop-filter: blur(8px);
685
- }
686
-
687
- @keyframes fadeIn {
688
- from {
689
- opacity: 0;
690
- transform: translateY(10px);
691
- }
692
- to {
693
- opacity: 1;
694
- transform: translateY(0);
695
- }
696
- }
697
-
698
- .user-message {
699
- align-self: flex-end;
700
- background: linear-gradient(135deg, rgba(124, 58, 237, 0.7), rgba(30, 58, 138, 0.7));
701
- color: white;
702
- border-bottom-right-radius: 4px;
703
- position: relative;
704
- border: 1px solid rgba(139, 92, 246, 0.3);
705
- }
706
-
707
- /* Glowing border effect for user messages */
708
- .user-message::before {
709
- content: "";
710
- position: absolute;
711
- top: -1px;
712
- left: -1px;
713
- right: -1px;
714
- bottom: -1px;
715
- border-radius: var(--border-radius-md);
716
- border-bottom-right-radius: 4px;
717
- background: linear-gradient(135deg, rgba(124, 58, 237, 0), rgba(96, 165, 250, 0.5));
718
- z-index: -1;
719
- animation: glow 3s infinite alternate;
720
- }
721
-
722
- @keyframes glow {
723
- 0% {
724
- opacity: 0.3;
725
- box-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
726
- }
727
- 100% {
728
- opacity: 0.6;
729
- box-shadow: 0 0 15px rgba(96, 165, 250, 0.8);
730
- }
731
- }
732
-
733
- .user-message::after {
734
- content: "";
735
- position: absolute;
736
- bottom: -8px;
737
- right: 0;
738
- width: 16px;
739
- height: 8px;
740
- background: rgba(30, 58, 138, 0.7);
741
- clip-path: polygon(0 0, 100% 0, 100% 100%);
742
- }
743
-
744
- .bot-message {
745
- align-self: flex-start;
746
- background: rgba(15, 23, 42, 0.6);
747
- color: var(--cosmic-text);
748
- border: 1px solid rgba(96, 165, 250, 0.3);
749
- border-bottom-left-radius: 4px;
750
- position: relative;
751
- }
752
-
753
- /* Subtle pulse effect for bot messages */
754
- .bot-message::before {
755
- content: "";
756
- position: absolute;
757
- top: -1px;
758
- left: -1px;
759
- right: -1px;
760
- bottom: -1px;
761
- border-radius: var(--border-radius-md);
762
- border-bottom-left-radius: 4px;
763
- background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(15, 23, 42, 0));
764
- z-index: -1;
765
- animation: subtle-pulse 4s infinite alternate;
766
- }
767
-
768
- @keyframes subtle-pulse {
769
- 0% {
770
- opacity: 0.2;
771
- box-shadow: 0 0 5px rgba(96, 165, 250, 0.3);
772
- }
773
- 100% {
774
- opacity: 0.4;
775
- box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
776
- }
777
- }
778
-
779
- .bot-message::after {
780
- content: "";
781
- position: absolute;
782
- bottom: -8px;
783
- left: 0;
784
- width: 16px;
785
- height: 8px;
786
- background: rgba(15, 23, 42, 0.6);
787
- clip-path: polygon(0 0, 100% 0, 0 100%);
788
- }
789
-
790
- .message-content {
791
- overflow-wrap: break-word;
792
- word-break: break-word;
793
- max-width: 100%;
794
- width: 100%;
795
- padding: 0.5rem 0;
796
- }
797
-
798
- .message-time {
799
- font-size: 0.7rem;
800
- opacity: 0.8;
801
- margin-top: var(--spacing-xs);
802
- text-align: right;
803
- color: var(--cosmic-text-secondary);
804
- font-family: "Space Mono", monospace;
805
- }
806
-
807
- .user-message .message-time {
808
- color: rgba(255, 255, 255, 0.8);
809
- }
810
-
811
- /* Futuristic avatar design */
812
- .message-avatar {
813
- width: 36px;
814
- height: 36px;
815
- border-radius: 50%;
816
- position: absolute;
817
- bottom: -12px;
818
- display: flex;
819
- align-items: center;
820
- justify-content: center;
821
- font-size: 0.9rem;
822
- color: white;
823
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
824
- }
825
-
826
- .user-message .message-avatar {
827
- right: -12px;
828
- background: linear-gradient(135deg, var(--cosmic-purple), var(--cosmic-pink));
829
- border: 2px solid rgba(15, 23, 42, 0.8);
830
- animation: user-avatar-pulse 3s infinite alternate;
831
- }
832
-
833
- @keyframes user-avatar-pulse {
834
- 0% {
835
- box-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
836
- }
837
- 100% {
838
- box-shadow: 0 0 15px rgba(192, 38, 211, 0.8);
839
- }
840
- }
841
-
842
- .bot-message .message-avatar {
843
- left: -12px;
844
- background: linear-gradient(135deg, var(--cosmic-bright-blue), var(--cosmic-accent-blue));
845
- border: 2px solid rgba(15, 23, 42, 0.8);
846
- animation: bot-avatar-pulse 3s infinite alternate;
847
- }
848
-
849
- @keyframes bot-avatar-pulse {
850
- 0% {
851
- box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
852
- }
853
- 100% {
854
- box-shadow: 0 0 15px rgba(30, 58, 138, 0.8);
855
- }
856
- }
857
-
858
- /* Markdown Content */
859
- .markdown-content {
860
- line-height: 1.7;
861
- font-size: 0.95rem;
862
- }
863
-
864
- .markdown-content p {
865
- margin: 0.75rem 0;
866
- }
867
-
868
- .markdown-content h1 {
869
- font-size: 1.5rem;
870
- margin: 1.25rem 0 0.75rem 0;
871
- font-weight: 600;
872
- color: var(--cosmic-bright-blue);
873
- }
874
-
875
- .markdown-content h2 {
876
- font-size: 1.3rem;
877
- margin: 1rem 0 0.6rem 0;
878
- font-weight: 600;
879
- color: var(--cosmic-bright-blue);
880
- }
881
-
882
- .markdown-content h3 {
883
- font-size: 1.1rem;
884
- margin: 0.8rem 0 0.5rem 0;
885
- font-weight: 600;
886
- color: var(--cosmic-bright-blue);
887
- }
888
-
889
- .markdown-content ul,
890
- .markdown-content ol {
891
- margin: 0.75rem 0 0.75rem 1.75rem;
892
- padding-left: 0.5rem;
893
- }
894
-
895
- .markdown-content li {
896
- margin: 0.4rem 0;
897
- line-height: 1.6;
898
- }
899
-
900
- .markdown-content code:not([class]) {
901
- background: rgba(15, 23, 42, 0.6);
902
- padding: 0.2rem 0.4rem;
903
- border-radius: var(--border-radius-sm);
904
- font-family: "Space Mono", monospace;
905
- font-size: 0.85em;
906
- color: var(--cosmic-bright-blue);
907
- }
908
-
909
- /* Code Block Styling */
910
- .code-block {
911
- position: relative;
912
- background: rgba(5, 11, 32, 0.8);
913
- border-radius: var(--border-radius-sm);
914
- margin: 1rem 0;
915
- padding: 1.25rem 1rem;
916
- font-family: "Space Mono", monospace;
917
- overflow-x: auto;
918
- border: 1px solid var(--cosmic-border);
919
- }
920
-
921
- .code-block pre {
922
- margin: 0;
923
- white-space: pre-wrap;
924
- font-family: inherit;
925
- line-height: 1.5;
926
- font-size: 0.85rem;
927
- }
928
-
929
- .code-language {
930
- position: absolute;
931
- top: 0;
932
- right: 0;
933
- background: var(--cosmic-accent-blue);
934
- color: white;
935
- font-size: 0.7rem;
936
- padding: 0.25rem 0.75rem;
937
- border-bottom-left-radius: var(--border-radius-sm);
938
- text-transform: uppercase;
939
- font-weight: 600;
940
- }
941
-
942
- .copy-code {
943
- position: absolute;
944
- top: 0.5rem;
945
- right: 0.5rem;
946
- background: var(--cosmic-accent-blue);
947
- color: white;
948
- border: none;
949
- border-radius: var(--border-radius-sm);
950
- padding: 0.25rem 0.5rem;
951
- font-size: 0.75rem;
952
- cursor: pointer;
953
- opacity: 0;
954
- transition: all 0.3s ease;
955
- display: flex;
956
- align-items: center;
957
- gap: 0.25rem;
958
- }
959
-
960
- .copy-code:hover {
961
- background: var(--cosmic-bright-blue);
962
- }
963
-
964
- .code-block:hover .copy-code {
965
- opacity: 1;
966
- }
967
-
968
- /* Typing Indicator */
969
- .typing {
970
- display: flex;
971
- gap: var(--spacing-xs);
972
- padding: var(--spacing-sm) var(--spacing-md);
973
- align-self: flex-start;
974
- background: rgba(15, 23, 42, 0.6);
975
- border-radius: var(--border-radius-md);
976
- margin-bottom: var(--spacing-md);
977
- position: relative;
978
- overflow: hidden;
979
- }
980
-
981
- .typing::before {
982
- content: "";
983
- position: absolute;
984
- top: 0;
985
- left: 0;
986
- right: 0;
987
- bottom: 0;
988
- background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(124, 58, 237, 0.1));
989
- animation: typing-glow 2s infinite alternate;
990
- }
991
-
992
- @keyframes typing-glow {
993
- 0% {
994
- opacity: 0.2;
995
- }
996
- 100% {
997
- opacity: 0.5;
998
- }
999
- }
1000
-
1001
- .typing-dot {
1002
- width: 8px;
1003
- height: 8px;
1004
- background: var(--cosmic-bright-blue);
1005
- border-radius: 50%;
1006
- animation: typing var(--animation-fast) infinite ease-in-out;
1007
- position: relative;
1008
- z-index: 1;
1009
- }
1010
-
1011
- .typing-dot:nth-child(1) {
1012
- animation-delay: 0s;
1013
- }
1014
- .typing-dot:nth-child(2) {
1015
- animation-delay: 0.2s;
1016
- }
1017
- .typing-dot:nth-child(3) {
1018
- animation-delay: 0.4s;
1019
- }
1020
-
1021
- @keyframes typing {
1022
- 0%,
1023
- 60%,
1024
- 100% {
1025
- transform: translateY(0);
1026
- opacity: 0.6;
1027
- }
1028
- 30% {
1029
- transform: translateY(-5px);
1030
- opacity: 1;
1031
- }
1032
- }
1033
-
1034
- /* Enhanced Input Area - Futuristic design */
1035
- .input-area {
1036
- display: flex;
1037
- gap: var(--spacing-sm);
1038
- padding: var(--spacing-md);
1039
- position: relative;
1040
- background: transparent;
1041
- z-index: 3;
1042
- }
1043
-
1044
- /* Holographic border for input area */
1045
- .input-area::before {
1046
- content: "";
1047
- position: absolute;
1048
- top: 0;
1049
- left: 0;
1050
- right: 0;
1051
- height: 1px;
1052
- background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
1053
- }
1054
-
1055
- /* Futuristic input field */
1056
- #chatInput {
1057
- flex: 1;
1058
- border: 1px solid rgba(96, 165, 250, 0.3);
1059
- color: var(--cosmic-text);
1060
- padding: var(--spacing-md);
1061
- border-radius: var(--border-radius-md);
1062
- outline: none;
1063
- font-family: "Quicksand", sans-serif;
1064
- transition: all 0.3s ease;
1065
- backdrop-filter: blur(8px);
1066
- resize: none;
1067
- min-height: 50px;
1068
- max-height: 150px;
1069
- background: rgba(15, 23, 42, 0.4);
1070
- box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
1071
- }
1072
-
1073
- #chatInput:focus {
1074
- border-color: var(--cosmic-bright-blue);
1075
- box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
1076
- }
1077
-
1078
- #chatInput::placeholder {
1079
- color: var(--cosmic-text-secondary);
1080
- opacity: 0.7;
1081
- }
1082
-
1083
- #fileInput {
1084
- display: none;
1085
- }
1086
-
1087
- /* Futuristic buttons */
1088
- .input-button {
1089
- background: rgba(15, 23, 42, 0.4);
1090
- border: 1px solid rgba(96, 165, 250, 0.3);
1091
- color: var(--cosmic-text);
1092
- width: 45px;
1093
- height: 45px;
1094
- border-radius: 50%;
1095
- display: flex;
1096
- align-items: center;
1097
- justify-content: center;
1098
- cursor: pointer;
1099
- transition: all 0.3s ease;
1100
- backdrop-filter: blur(8px);
1101
- flex-shrink: 0;
1102
- position: relative;
1103
- overflow: hidden;
1104
- }
1105
-
1106
- .input-button::after {
1107
- content: "";
1108
- position: absolute;
1109
- top: 0;
1110
- left: 0;
1111
- width: 100%;
1112
- height: 100%;
1113
- background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
1114
- opacity: 0;
1115
- transition: opacity 0.3s ease;
1116
- }
1117
-
1118
- .input-button:hover {
1119
- background: rgba(30, 58, 138, 0.6);
1120
- color: white;
1121
- transform: translateY(-2px);
1122
- border-color: var(--cosmic-bright-blue);
1123
- box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
1124
- }
1125
-
1126
- .input-button:hover::after {
1127
- opacity: 1;
1128
- animation: button-pulse 1.5s infinite alternate;
1129
- }
1130
-
1131
- @keyframes button-pulse {
1132
- 0% {
1133
- opacity: 0.3;
1134
- }
1135
- 100% {
1136
- opacity: 0.7;
1137
- }
1138
- }
1139
-
1140
- .input-button i {
1141
- font-size: 1.2rem;
1142
- position: relative;
1143
- z-index: 1;
1144
- }
1145
-
1146
- .send-btn {
1147
- background: linear-gradient(135deg, var(--cosmic-purple), var(--cosmic-accent-blue));
1148
- border: none;
1149
- color: white;
1150
- }
1151
-
1152
- .send-btn::before {
1153
- content: "";
1154
- position: absolute;
1155
- top: 0;
1156
- left: 0;
1157
- right: 0;
1158
- bottom: 0;
1159
- background: linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(30, 58, 138, 0.5));
1160
- border-radius: 50%;
1161
- z-index: -1;
1162
- opacity: 0;
1163
- transition: opacity 0.3s ease;
1164
- }
1165
-
1166
- .send-btn:hover::before {
1167
- opacity: 1;
1168
- animation: send-pulse 1.5s infinite alternate;
1169
- }
1170
-
1171
- @keyframes send-pulse {
1172
- 0% {
1173
- box-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
1174
- }
1175
- 100% {
1176
- box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
1177
- }
1178
- }
1179
-
1180
- /* Feature Showcase */
1181
- .feature-showcase {
1182
- display: none;
1183
- padding: var(--spacing-lg);
1184
- border-radius: var(--border-radius-lg);
1185
- margin-bottom: var(--spacing-lg);
1186
- border: 1px solid rgba(96, 165, 250, 0.3);
1187
- box-shadow: 0 10px 30px var(--cosmic-shadow);
1188
- background: rgba(15, 23, 42, 0.4);
1189
- backdrop-filter: blur(12px);
1190
- position: relative;
1191
- overflow: hidden;
1192
- }
1193
-
1194
- .feature-showcase::before {
1195
- content: "";
1196
- position: absolute;
1197
- top: 0;
1198
- left: 0;
1199
- right: 0;
1200
- height: 1px;
1201
- background: linear-gradient(90deg, transparent, var(--cosmic-bright-blue), transparent);
1202
- opacity: 0.7;
1203
- }
1204
-
1205
- .feature-showcase.active {
1206
- display: block;
1207
- animation: slideDown var(--animation-fast) ease-out;
1208
- }
1209
-
1210
- @keyframes slideDown {
1211
- from {
1212
- opacity: 0;
1213
- transform: translateY(-20px);
1214
- }
1215
- to {
1216
- opacity: 1;
1217
- transform: translateY(0);
1218
- }
1219
- }
1220
-
1221
- .feature-grid {
1222
- display: grid;
1223
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
1224
- gap: var(--spacing-md);
1225
- }
1226
-
1227
- .feature-card {
1228
- background: rgba(15, 23, 42, 0.5);
1229
- border: 1px solid rgba(96, 165, 250, 0.2);
1230
- border-radius: var(--border-radius-md);
1231
- padding: var(--spacing-md);
1232
- transition: all 0.3s ease;
1233
- cursor: pointer;
1234
- position: relative;
1235
- overflow: hidden;
1236
- }
1237
-
1238
- .feature-card::before {
1239
- content: "";
1240
- position: absolute;
1241
- top: 0;
1242
- left: 0;
1243
- width: 4px;
1244
- height: 100%;
1245
- background: linear-gradient(to bottom, var(--cosmic-bright-blue), var(--cosmic-purple));
1246
- }
1247
-
1248
- .feature-card::after {
1249
- content: "";
1250
- position: absolute;
1251
- top: 0;
1252
- left: 0;
1253
- width: 100%;
1254
- height: 100%;
1255
- background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent);
1256
- opacity: 0;
1257
- transition: opacity 0.3s ease;
1258
- }
1259
-
1260
- .feature-card:hover {
1261
- transform: translateY(-5px);
1262
- box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
1263
- border-color: var(--cosmic-bright-blue);
1264
- }
1265
-
1266
- .feature-card:hover::after {
1267
- opacity: 1;
1268
- }
1269
-
1270
- .feature-card h3 {
1271
- margin-bottom: var(--spacing-sm);
1272
- font-weight: 600;
1273
- color: var(--cosmic-bright-blue);
1274
- }
1275
-
1276
- .feature-card p {
1277
- font-size: 0.9rem;
1278
- color: var(--cosmic-text-secondary);
1279
- line-height: 1.5;
1280
- }
1281
-
1282
- .feature-icon {
1283
- font-size: 2rem;
1284
- margin-bottom: var(--spacing-sm);
1285
- background: linear-gradient(135deg, var(--cosmic-bright-blue), var(--cosmic-purple));
1286
- -webkit-background-clip: text;
1287
- background-clip: text;
1288
- color: transparent;
1289
- position: relative;
1290
- }
1291
-
1292
- .feature-icon::after {
1293
- content: "";
1294
- position: absolute;
1295
- width: 30px;
1296
- height: 30px;
1297
- background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
1298
- border-radius: 50%;
1299
- left: 0;
1300
- top: 0;
1301
- z-index: -1;
1302
- }
1303
-
1304
- /* Responsive Design */
1305
- @media (max-width: 992px) {
1306
- .sidebar {
1307
- transform: translateX(-100%);
1308
- box-shadow: none;
1309
- }
1310
-
1311
- .sidebar.active {
1312
- transform: translateX(0);
1313
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
1314
- }
1315
-
1316
- .app-container {
1317
- margin-left: 0;
1318
- }
1319
-
1320
- .mobile-sidebar-toggle {
1321
- display: block;
1322
- }
1323
-
1324
- .app-header {
1325
- justify-content: space-between;
1326
- }
1327
- }
1328
-
1329
- @media (max-width: 768px) {
1330
- .app-header {
1331
- flex-direction: row;
1332
- gap: var(--spacing-sm);
1333
- }
1334
-
1335
- .message {
1336
- max-width: 90%;
1337
- padding: var(--spacing-sm) var(--spacing-md);
1338
- }
1339
-
1340
- .feature-grid {
1341
- grid-template-columns: 1fr;
1342
- }
1343
-
1344
- .messages {
1345
- padding: var(--spacing-md);
1346
- max-height: calc(100vh - 180px);
1347
- }
1348
-
1349
- .code-block {
1350
- padding: 0.75rem;
1351
- font-size: 0.8rem;
1352
- }
1353
-
1354
- .input-area {
1355
- padding: var(--spacing-sm);
1356
- }
1357
-
1358
- #chatInput {
1359
- padding: var(--spacing-sm);
1360
- }
1361
- }
1362
-
1363
- /* Accessibility */
1364
- @media (prefers-reduced-motion: reduce) {
1365
- * {
1366
- animation-duration: 0.01ms !important;
1367
- animation-iteration-count: 1 !important;
1368
- transition-duration: 0.01ms !important;
1369
- scroll-behavior: auto !important;
1370
- }
1371
- }
 
1
+ // Theme toggle
2
+ const themeToggler = document.getElementById('themeToggler');
3
+ themeToggler.addEventListener('click', () => {
4
+ document.body.classList.toggle('light_mode');
5
+ themeToggler.innerHTML = document.body.classList.contains('light_mode') ? "<i class='bx bx-moon'></i>" : "<i class='bx bx-sun'></i>";
6
+ });
7
+
8
+ // Chat bar functionality
9
+ const chatBar = document.getElementById('chatBar');
10
+ const suggests = document.querySelector('.suggests');
11
+ const inputField = document.querySelector('.prompt__form-input');
12
+ const processingDots = document.getElementById('processingDots');
13
+ const welcomeText = document.getElementById('welcome-text');
14
+
15
+ // Bubble customization
16
+ const bubbleToggle = document.getElementById('bubbleToggle');
17
+ let bubbleStyles = ['bubble-rounded', 'bubble-sharp', 'bubble-starry'];
18
+ let currentBubbleIndex = 0;
19
+
20
+ function applyBubbleStyle() {
21
+ const userMessages = document.querySelectorAll('.chat-message.user');
22
+ userMessages.forEach(msg => {
23
+ bubbleStyles.forEach(style => msg.classList.remove(style));
24
+ msg.classList.add(bubbleStyles[currentBubbleIndex]);
25
+ });
26
+ }
27
+
28
+ bubbleToggle.addEventListener('click', () => {
29
+ currentBubbleIndex = (currentBubbleIndex + 1) % bubbleStyles.length;
30
+ applyBubbleStyle();
31
+ });
32
+
33
+ function addMessage(content, isUser = false) {
34
+ const messageDiv = document.createElement('div');
35
+ messageDiv.classList.add('chat-message');
36
+ if (isUser) {
37
+ messageDiv.classList.add('user');
38
+ messageDiv.classList.add(bubbleStyles[currentBubbleIndex]); // Apply current bubble style
39
+ } else {
40
+ messageDiv.classList.add('bot');
41
+ }
42
+ messageDiv.textContent = content;
43
+ chatBar.appendChild(messageDiv);
44
+ if (chatBar.scrollTop + chatBar.clientHeight >= chatBar.scrollHeight - 100) {
45
+ chatBar.scrollTop = chatBar.scrollHeight;
46
+ }
47
+ }
48
+
49
+ // Hide suggestions and welcome text when typing starts
50
+ inputField.addEventListener('input', () => {
51
+ const input = inputField.value.trim();
52
+ if (input.length > 0) {
53
+ suggests.classList.add('hidden');
54
+ welcomeText.classList.add('hidden');
55
+ } else {
56
+ suggests.classList.remove('hidden');
57
+ }
58
+ });
59
+
60
+ // Keyboard interaction: Enter to send
61
+ inputField.addEventListener('keypress', (e) => {
62
+ if (e.key === 'Enter') {
63
+ e.preventDefault();
64
+ sendMessage();
65
+ }
66
+ });
67
+
68
+ // Send message function
69
+ function sendMessage() {
70
+ const input = inputField.value.trim();
71
+ if (!input) return;
72
+
73
+ const sendButton = document.getElementById('sendButton');
74
+ sendButton.disabled = true;
75
+ processingDots.classList.add('active');
76
+
77
+ addMessage(input, true);
78
+ inputField.value = '';
79
+
80
+ fetch('/api/chat', {
81
+ method: 'POST',
82
+ headers: { 'Content-Type': 'application/json' },
83
+ body: JSON.stringify({ query: input })
84
+ })
85
+ .then(res => res.json())
86
+ .then(data => {
87
+ if (data.response) {
88
+ addMessage(data.response);
89
+ suggests.classList.add('hidden');
90
+ } else {
91
+ alert(data.detail || 'Something went wrong!');
92
+ }
93
+ })
94
+ .catch(error => {
95
+ alert('Failed to process the query locally!');
96
+ })
97
+ .finally(() => {
98
+ sendButton.disabled = false;
99
+ processingDots.classList.remove('active');
100
+ });
101
+ }
102
+
103
+ // Send button click
104
+ document.getElementById('sendButton').addEventListener('click', sendMessage);
105
+
106
+ // Placeholder functionality for other buttons
107
+ document.getElementById('deepSearchButton').addEventListener('click', () => {
108
+ alert('Initiating DeepSearch... (Functionality to be implemented)');
109
+ });
110
+ document.getElementById('thinkButton').addEventListener('click', () => {
111
+ alert('Activating Think mode... (Functionality to be implemented)');
112
+ });
113
+ document.getElementById('fileInput').addEventListener('change', (e) => {
114
+ const file = e.target.files[0];
115
+ if (file) alert(`File selected: ${file.name} (Processing to be implemented)`);
116
+ });
117
+
118
+ // Initialize stars
119
+ function initializeStars() {
120
+ const starsContainer = document.getElementById('starsContainer');
121
+ for (let i = 0; i < 100; i++) {
122
+ const star = document.createElement('div');
123
+ star.className = 'star';
124
+ const x = Math.random() * 100;
125
+ const y = Math.random() * 100;
126
+ const size = Math.random() * 2 + 1;
127
+ const delay = Math.random() * 3;
128
+ star.style.left = `${x}%`;
129
+ star.style.top = `${y}%`;
130
+ star.style.width = `${size}px`;
131
+ star.style.height = `${size}px`;
132
+ star.style.animationDelay = `${delay}s`;
133
+ starsContainer.appendChild(star);
134
+ }
135
+ }
136
+
137
+ // Call initializeStars on page load
138
+ document.addEventListener('DOMContentLoaded', initializeStars);
139
+
140
+ // Starry background effects (optional, kept from your original)
141
+ document.addEventListener('mousemove', (e) => {
142
+ let x = e.clientX / window.innerWidth;
143
+ let y = e.clientY / window.innerHeight;
144
+ document.querySelector('.stars').style.transform = `translate(${x * 50}px, ${y * 50}px)`;
145
+ });
146
+ window.addEventListener('scroll', () => {
147
+ const scrollPosition = window.scrollY;
148
+ const stars = document.querySelector('.stars');
149
+ stars.style.animationDuration = `${100 - scrollPosition / 10}s`;
150
+ });