File size: 25,569 Bytes
8e4579a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
custom_css = """

/* ===== GLOBAL BACKGROUND (BRIGHTER PURPLE) ===== */

body, .gradio-container {

    background:

        radial-gradient(circle at top, #4c1d95 0%, #1e1b4b 35%, #020617 75%),

        linear-gradient(135deg, #312e81 0%, #020617 100%) !important;

    color: #f1f5f9 !important;

    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;

}



#main_header h1 {

    font-size: 58px !important;

    line-height: 1.2;

}





/* ===== TAB HOME ACTIVE ===== */

button[aria-selected="true"] {

    color: #c084fc !important;

    border-bottom: 2px solid #c084fc !important;

}



/* ===== HOME WRAPPER ===== */

#home-wrapper {

    max-width: 1180px;

    margin: auto;

    padding: 64px 24px;

}



/* ===== TITLE ===== */

#home-title {

    font-size: 46px;

    font-weight: 900;

    line-height: 1.15;

    letter-spacing: -0.6px;

    background: linear-gradient(

        90deg,

        #a5b4fc,

        #60a5fa,

        #34d399

    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    margin-bottom: 20px;

}



/* ===== MAIN DESCRIPTION (THIS PROJECT IMPLEMENTS...) ===== */

#home-desc {

    font-size: 19px;

    font-weight: 500;

    line-height: 1.7;

    max-width: 950px;

    margin-top: 8px;

    background: linear-gradient(

        90deg,

        #e0e7ff,

        #bae6fd

    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

}



/* ===== GRID ===== */

.pipeline-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 28px;

    margin-top: 52px;

}



/* ===== PIPELINE CARD ===== */

.pipeline-card {

    background: linear-gradient(

        165deg,

        rgba(76, 29, 149, 0.75),

        rgba(15, 23, 42, 0.95)

    );

    border-radius: 20px;

    padding: 28px;

    box-shadow:

        0 12px 35px rgba(0,0,0,0.45),

        inset 0 0 0 1px rgba(192,132,252,0.18);

    transition: all 0.3s ease;

}



.pipeline-card:hover {

    transform: translateY(-6px);

    box-shadow:

        0 20px 50px rgba(0,0,0,0.65),

        inset 0 0 0 1px rgba(192,132,252,0.35);

}



/* ===== PIPELINE TITLE ===== */

.pipeline-title {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 21px;

    font-weight: 800;

    background: linear-gradient(

        90deg,

        #c4b5fd,

        #93c5fd

    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    margin-bottom: 12px;

}



/* ===== PIPELINE TEXT ===== */

.pipeline-card p {

    font-size: 15.5px;

    line-height: 1.7;

    opacity: 0.95;

}



/* ===== FOOTER TEXT (DESIGNED FOR...) ===== */

#home-wrapper > p {

    margin-top: 38px;

    font-size: 17px;

    font-weight: 600;

    background: linear-gradient(

        90deg,

        #ddd6fe,

        #a5b4fc

    );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

}









##################################

/* === 1. TỔNG QUAN NỀN & FONT === */

body, .gradio-container {

    background: linear-gradient(135deg, #0f172a 0%, #110e1b 100%) !important;

    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

}



/* === 2. TIÊU ĐỀ ẤN TƯỢNG (GRADIENT TEXT) === */

h1 {

    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    font-weight: 800 !important;

    text-align: center;

    margin-bottom: 1rem !important;

    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));

}



h2, h3, p, label, span {

    color: #e2e8f0 !important;

}



/* === 3. KHỐI CHỨA (GLASSMORPHISM) === */

.block, .panel {

    background: rgba(30, 41, 59, 0.4) !important;

    border: 1px solid rgba(255, 255, 255, 0.08) !important;

    backdrop-filter: blur(8px);

    border-radius: 12px !important;

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);

}



/* === 4. NÚT BẤM (NEON GLOW) === */

/* Nút chính (Primary) */

button.primary {

    background: linear-gradient(90deg, #4f46e5 0%, #9333ea 100%) !important;

    border: none !important;

    color: white !important;

    font-weight: bold;

    transition: all 0.3s ease;

    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);

}



button.primary:hover {

    transform: translateY(-2px);

    box-shadow: 0 0 25px rgba(147, 51, 234, 0.6);

    filter: brightness(1.2);

}



/* Nút phụ (Secondary/Clear) */

button.secondary {

    background: rgba(255, 255, 255, 0.1) !important;

    border: 1px solid rgba(255, 255, 255, 0.2) !important;

    color: #cbd5e1 !important;

}

button.secondary:hover {

    background: rgba(255, 255, 255, 0.2) !important;

}



/* === 5. INPUT & DROPDOWN === */

input, textarea, select, .gr-input {

    background-color: #1e293b !important;

    border: 1px solid #475569 !important;

    color: #f8fafc !important;

    border-radius: 8px !important;

}



input:focus, textarea:focus {

    border-color: #818cf8 !important;

    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;

}



/* === 6. TAB NAVIGATION === */

.tab-nav button {

    font-weight: bold;

    color: #94a3b8 !important;

    border-bottom: 2px solid transparent;

}



.tab-nav button.selected {

    color: #c084fc !important; /* Màu tím sáng */

    border-bottom: 2px solid #c084fc !important;

    text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);

}



/* === 7. CHATBOT AREA === */

#chatbot {

    height: 500px; 

    overflow-y: auto; 

    background-color: rgba(15, 23, 42, 0.6) !important;

    border: 1px solid rgba(148, 163, 184, 0.1);

    border-radius: 12px;

}



/* Bong bóng chat (Tùy chỉnh sâu hơn cần can thiệp HTML class của Gradio, 

nhưng đây là nền tảng chung) */

.message-row.user-row .message {

    background: linear-gradient(to right, #2563eb, #3b82f6) !important;

    border-radius: 12px 12px 0 12px !important;

}

.message-row.bot-row .message {

    background: #334155 !important;

    border-radius: 12px 12px 12px 0 !important;

}



/* === 8. SCROLLBAR TÙY CHỈNH === */

::-webkit-scrollbar {

    width: 8px;

    height: 8px;

}

::-webkit-scrollbar-track {

    background: #0f172a; 

}

::-webkit-scrollbar-thumb {

    background: #475569; 

    border-radius: 4px;

}

::-webkit-scrollbar-thumb:hover {

    background: #64748b; 

}

#chatbot {

    background: linear-gradient(180deg, #0b1220, #0f172a);

    border-radius: 18px;

    padding: 12px;

}



#chat_header {

    background: rgba(255,255,255,0.04);

    padding: 16px;

    border-radius: 16px;

    margin-bottom: 10px;

}



.gr-chat-message.user {

    background: linear-gradient(135deg, #6d28d9, #9333ea);

    color: white;

    border-radius: 16px;

}



.gr-chat-message.bot {

    background: rgba(255,255,255,0.06);

    color: #e5e7eb;

    border-radius: 16px;

}

#ai_header .ai-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 14px 18px;

    border-radius: 14px;

    background: linear-gradient(

        135deg,

        rgba(99,102,241,0.12),

        rgba(168,85,247,0.08)

    );

    border: 1px solid rgba(255,255,255,0.06);

    box-shadow: 0 10px 30px rgba(0,0,0,0.25);

}



#ai_header .ai-left {

    display: flex;

    align-items: center;

    gap: 14px;

}



#ai_header .ai-avatar {

    width: 44px;

    height: 44px;

    border-radius: 12px;

    background: linear-gradient(135deg, #6366f1, #a855f7);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;

}



#ai_header .ai-title {

    font-size: 22px;

    font-weight: 700;

    color: white;

}



#ai_header .ai-subtitle {

    font-size: 13px;

    opacity: 0.75;

}



#ai_header .ai-status {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 13px;

    font-weight: 600;

    color: #22c55e;

}



#ai_header .pulse {

    width: 14px;

    height: 14px;

    background: #22c55e;

    border-radius: 50%;

    animation: pulse 1.4s infinite;

}



@keyframes pulse {

    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }

    70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }

    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }

}



/* Nút gửi (mũi tên) */

button.gr-button {

    height: 64px !important;        /* Cao hơn */

    min-width: 72px !important;     /* Rộng hơn */

    border-radius: 14px !important; /* Bo tròn đẹp */

    font-size: 100px !important;     /* To hơn (fallback) */

}

#send_btn_to {

    font-size: 24px !important;  /* Chỉnh cỡ mũi tên to lên */

    height: 55px !important;     /* Chỉnh chiều cao nút to lên */

}

/* SVG mũi tên bên trong */

button.gr-button svg {

    width: 36px !important;

    height: 34px !important;

}

/* Bubble AI trả lời */

.ai-message,

.gr-chatbot .message.bot {

    background: linear-gradient(

        135deg,

        rgba(99, 102, 241, 0.18),

        rgba(168, 85, 247, 0.18)

    );

    border: 1px solid rgba(139, 92, 246, 0.35);

    border-radius: 16px;

    padding: 16px 18px;

    color: #e5e7eb;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

    backdrop-filter: blur(6px);

}

/* Bubble user */

.gr-chatbot .message.user {

    background: linear-gradient(

        135deg,

        #6366f1,

        #8b5cf6

    );

    border-radius: 16px;

    padding: 14px 16px;

    color: white;

    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);

}

.suggestion-btn,

button.suggestion {

    background: linear-gradient(

        135deg,

        rgba(255, 255, 255, 0.06),

        rgba(255, 255, 255, 0.02)

    );

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 14px;

    padding: 14px 18px;

    color: #e5e7eb;

    font-weight: 500;

    transition: all 0.25s ease;

    backdrop-filter: blur(6px);

}

.suggestion-btn:hover,

button.suggestion:hover {

    transform: translateY(-2px) scale(1.02);

    background: linear-gradient(

        135deg,

        rgba(99, 102, 241, 0.35),

        rgba(168, 85, 247, 0.35)

    );

    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.35);

}

.suggestion-btn span:first-child {

    font-size: 18px;

    margin-right: 8px;

}



/* Base style cho 3 nút */

button.btn-blue {

    background: linear-gradient(135deg, #2563eb, #3b82f6);

    box-shadow: 0 8px 22px rgba(59,130,246,0.45);

}



button.btn-purple {

    background: linear-gradient(135deg, #7c3aed, #a855f7);

    box-shadow: 0 8px 22px rgba(168,85,247,0.45);

}



button.btn-pink {

    background: linear-gradient(135deg, #db2777, #ec4899);

    box-shadow: 0 8px 22px rgba(236,72,153,0.45);

}



/* Hover chung */

button.btn-blue:hover,

button.btn-purple:hover,

button.btn-pink:hover {

    transform: translateY(-2px) scale(1.03);

    filter: brightness(1.15);

}





/* --- HIỆU ỨNG PHÁT SÁNG KHI ẤN (ACTIVE/FOCUS) --- */



/* 1. Nút Xanh (Blue) - Phát sáng xanh dương */

button.btn-blue:active, 

button.btn-blue:focus {

    /* Lớp 1: Sáng tâm, Lớp 2: Tỏa rộng ra ngoài */

    box-shadow: 0 0 15px rgba(59, 130, 246, 1), 0 0 30px rgba(59, 130, 246, 0.7) !important;

    transform: scale(0.98); /* Nhún nhẹ xuống tạo cảm giác bấm thật */

    border-color: #f9a8d4 !important; /* Viền sáng lên */

}





/* 2. Nút Tím (Purple) - Phát sáng tím mộng mơ */

button.btn-purple:active, 

button.btn-purple:focus {

    box-shadow: 0 0 15px rgba(168, 85, 247, 1), 0 0 30px rgba(168, 85, 247, 0.7) !important;

    transform: scale(0.98);

    border-color: #d8b4fe !important;

}



/* 3. Nút Hồng (Pink) - Phát sáng hồng rực */

button.btn-pink:active, 

button.btn-pink:focus {

    box-shadow: 0 0 15px rgba(236, 72, 153, 1), 0 0 30px rgba(236, 72, 153, 0.7) !important;

    transform: scale(0.98);

    border-color: #f9a8d4 !important;

}



/* Tùy chỉnh ô nhập liệu */

#custom_msg textarea {

    background-color: #13141f !important;  /* Nền rất tối (gần đen) để nổi chữ */

    border: 2px solid #4f46e5 !important;   /* Viền màu tím xanh (Indigo) */

    border-radius: 12px !important;         /* Bo tròn góc mềm mại */

    color: #ffffff !important;              /* Chữ màu trắng sáng */

    font-size: 20px !important;             /* Chữ to rõ hơn */

    transition: all 0.3s ease;              /* Hiệu ứng chuyển động mượt */

}



/* 2. Hiệu ứng khi bấm chuột vào (Focus) */

#custom_msg textarea:focus {

    border-color: #a855f7 !important;       /* Đổi viền sang màu tím sáng hơn */

    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5) !important; /* Hiệu ứng phát sáng (Glow) */

    background-color: #1e1e2e !important;   /* Nền sáng lên một chút */

}



/* 3. Tùy chỉnh placeholder (dòng chữ mờ gợi ý) */

#custom_msg textarea::placeholder {

    color: #8888aa !important;              /* Màu chữ gợi ý xám xanh dễ đọc */

    font-style: italic;

}

/* 1. Trạng thái bình thường (Chưa nhập gì) */

#custom_msg textarea {

    background-color: #13141f !important;  

    border: 2px solid #4f46e5 !important;   /* Viền Tím tối */

    border-radius: 12px !important;

    color: #ffffff !important;

    transition: all 0.3s ease;

}



/* 2. Trạng thái Focus (Khi bấm chuột vào để gõ) */

#custom_msg textarea:focus {

    border-color: #a855f7 !important;       /* Viền Tím sáng */

    background-color: #1e1e2e !important;

}



/* 3. TRẠNG THÁI QUAN TRỌNG: KHI CÓ VĂN BẢN (Text detected) */

/* Logic: Khi không còn hiện placeholder (tức là đã có chữ) thì phát sáng */

#custom_msg textarea:not(:placeholder-shown) {

    border-color: #d946ef !important;       /* Chuyển sang viền Hồng rực (Magenta) */

    box-shadow: 0 0 20px rgba(217, 70, 239, 0.5) !important; /* Hiệu ứng Neon Glow mạnh */

    background-color: #2e1065 !important;   /* Nền hơi ửng tím */

}



/* Tùy chỉnh màu chữ placeholder cho đẹp */

#custom_msg textarea::placeholder {

    color: #6b7280 !important;

}

Để làm cho vùng tiêu đề (ai-header) có viền màu và hiệu ứng phát sáng nhẹ (glow), bạn cần thêm CSS vào class .ai-header.



Dưới đây là đoạn code CSS tối ưu để tạo cảm giác "công nghệ" nhưng vẫn tinh tế, không bị chói mắt.



Cách thực hiện

Bạn thêm đoạn CSS sau vào biến custom_css của bạn:



CSS



/* Thêm vào phần custom_css */

/* 1. Định nghĩa chuyển động phát sáng */

@keyframes permanent-glow {

    0% {

        box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); /* Sáng nhẹ */

        border-color: rgba(139, 92, 246, 0.4);

    }

    50% {

        box-shadow: 0 0 25px rgba(139, 92, 246, 0.75); /* Sáng rực rỡ nhất */

        border-color: rgba(139, 92, 246, 0.9);

    }

    100% {

        box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); /* Quay về sáng nhẹ */

        border-color: rgba(139, 92, 246, 0.4);

    }

}



/* 2. Áp dụng vào class .ai-header */

.ai-header {

    /* Các thuộc tính cơ bản giữ nguyên */

    border-radius: 12px !important;

    background: rgba(30, 25, 45, 0.6) !important;

    padding: 15px 20px !important;

    

    /* Kích hoạt hiệu ứng phát sáng vĩnh viễn */

    /* animation: tên_keyframe | thời_gian | kiểu_chạy | lặp_vô_tận */

    animation: permanent-glow 3s infinite ease-in-out !important;

    

    border: 1px solid rgba(139, 92, 246, 0.5) !important; /* Giá trị mặc định */

}



#custom_msg textarea {

    /* 1. Nền tối pha chút tím và trong suốt (Match với Header) */

    background: rgba(30, 25, 45, 0.6) !important; 

    

    /* 2. Viền tím mảnh, tinh tế hơn viền đậm cũ */

    border: 1px solid rgba(139, 92, 246, 0.5) !important; 

    

    /* 3. Hiệu ứng tỏa sáng nhẹ (Soft Glow) */

    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2) !important;

    

    /* 4. Bo góc đồng bộ */

    border-radius: 12px !important;

    

    /* Màu chữ trắng sáng */

    color: #ffffff !important;

    

    /* Hiệu ứng chuyển đổi mượt */

    transition: all 0.3s ease-in-out;

}



/* --- KHI BẤM VÀO (FOCUS) --- */

#custom_msg textarea:focus {

    /* Sáng rực lên giống trạng thái active của Header */

    border-color: rgba(139, 92, 246, 1.0) !important; /* Viền rõ hơn */

    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6) !important; /* Tỏa sáng mạnh hơn */

    

    /* Nền đậm hơn chút để dễ đọc chữ khi đang gõ */

    background: rgba(30, 25, 45, 0.9) !important; 

}



/* --- (TÙY CHỌN) KHI CÓ CHỮ THÌ ĐỔI MÀU KHÁC --- */

/* Nếu bạn muốn giữ hiệu ứng "có chữ thì đổi màu hồng" như cũ thì giữ đoạn này */

/* Nếu muốn đồng bộ màu tím luôn thì XÓA đoạn này đi */

#custom_msg textarea:not(:placeholder-shown) {

    border-color: #d946ef !important; /* Hồng Magenta */

    box-shadow: 0 0 20px rgba(217, 70, 239, 0.4) !important;



#custom_msg textarea {

    /* 1. Nền trong suốt hơn (0.3) để thấy background phía sau */

    background: rgba(30, 25, 45, 0.3) !important; 

    

    /* 2. Hiệu ứng làm mờ hậu cảnh (QUAN TRỌNG để giống kính) */

    backdrop-filter: blur(10px) !important;

    -webkit-backdrop-filter: blur(10px) !important; /* Cho Safari/Mac */

    

    /* 3. Viền tím mảnh giống Header */

    border: 1px solid rgba(139, 92, 246, 0.5) !important; 

    

    /* 4. Phát sáng nhẹ */

    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2) !important;

    

    /* 5. Màu chữ và bo góc */

    color: #ffffff !important;

    border-radius: 12px !important;

}



/* Khi bấm vào để gõ */

#custom_msg textarea:focus {

    /* Tăng độ đậm nền lên một chút để dễ đọc chữ hơn */

    background: rgba(30, 25, 45, 0.7) !important; 

    border-color: rgba(139, 92, 246, 1.0) !important;

    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5) !important;

}



/* Nhắm vào hàng chứa ô input và nút */

#input_row_container {

    /* 1. Loại bỏ bóng/viền mặc định của Gradio gây ra cái "viền trắng" */

    box-shadow: none !important;

    border: none !important;

    background: transparent !important; /* Làm nền trong suốt */



    /* 2. (Tùy chọn) Nếu bạn muốn tạo một viền tím bao quanh CẢ ô nhập và nút */

    /* Nếu không thích thì xóa 4 dòng dưới đi */

    /*

    border: 1px solid rgba(139, 92, 246, 0.3) !important;

    border-radius: 14px !important; 

    padding: 4px !important;

    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1) !important;

    */

}



/* Đảm bảo các phần tử con bên trong (nếu có container phụ) cũng trong suốt */

#input_row_container > * {

    background: transparent !important;

    border: none !important;

    box-shadow: none !important;

}

/* --- CSS CHO THANH NAVIGATION (NAVBAR) --- */



/* 1. Tác động vào container chứa các nút bấm */

.custom-nav > .tab-nav {

    border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important; /* Đường kẻ mờ ngăn cách header */

    margin-bottom: 20px !important; /* Khoảng cách với nội dung bên dưới */

}



/* 2. Các nút bấm (Tab Button) */

.custom-nav button {

    font-size: 18px !important;    /* Chữ to */

    font-weight: 700 !important;   /* Chữ đậm */

    color: #9ca3af !important;     /* Màu xám mặc định */

    transition: all 0.3s ease;

    border: none !important;

    background: transparent !important;

    padding: 10px 20px !important; /* Khoảng cách xung quanh chữ */

}



/* 3. TRẠNG THÁI ĐƯỢC CHỌN (SELECTED) - QUAN TRỌNG */

.custom-nav button.selected {

    color: #e879f9 !important; /* Chữ màu Hồng tím */

    

    /* Hiệu ứng chữ phát sáng (Neon Text) */

    text-shadow: 0 0 15px rgba(232, 121, 249, 0.8), 

                 0 0 30px rgba(217, 70, 239, 0.4) !important;

                 

    /* Gạch chân phát sáng */

    border-bottom: 3px solid #e879f9 !important;

    box-shadow: 0 4px 15px -5px rgba(232, 121, 249, 0.5) !important; /* Bóng sáng dưới chân */

}



/* 4. Hiệu ứng khi rê chuột (Hover) */

.custom-nav button:hover {

    color: #d8b4fe !important;

    text-shadow: 0 0 10px rgba(216, 180, 254, 0.5) !important;

    background: rgba(255, 255, 255, 0.05) !important; /* Nền sáng nhẹ khi rê vào */

    border-radius: 8px 8px 0 0 !important;

}





/* --- TÙY BIẾN KHUNG CHATBOT --- */



/* 1. Xóa nền xám mặc định của toàn bộ khung chat */

#chatbot {

    background: transparent !important;

    border: none !important;

    height: 500px !important; /* Tăng chiều cao lên chút cho thoáng */

}



/* 2. TÙY BIẾN BONG BÓNG TIN NHẮN CỦA BOT (AI) */

/* Gradio thường dùng class .bot hoặc .message.bot */

#chatbot .bot, 

#chatbot .message.bot {

    /* Hiệu ứng kính mờ (Glassmorphism) giống Header */

    background: rgba(30, 25, 45, 0.6) !important;

    border: 1px solid rgba(139, 92, 246, 0.4) !important; /* Viền tím nhạt */

    backdrop-filter: blur(5px) !important;

    

    /* Bo góc: Góc trên bên trái vuông (tạo cảm giác bong bóng nói) */

    border-radius: 4px 20px 20px 20px !important;

    

    /* Màu chữ và hiệu ứng */

    color: #e2e8f0 !important; /* Trắng xám dễ đọc */

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;

    padding: 15px !important;

}



/* 3. TÙY BIẾN BONG BÓNG TIN NHẮN CỦA USER (NGƯỜI DÙNG) */

#chatbot .user, 

#chatbot .message.user {

    /* Màu Gradient Tím - Hồng (Nổi bật) */

    background: linear-gradient(135deg, #7c3aed, #db2777) !important;

    border: none !important;

    

    /* Bo góc: Góc trên bên phải vuông */

    border-radius: 20px 4px 20px 20px !important;

    

    /* Màu chữ trắng tinh */

    color: #ffffff !important;

    font-weight: 500 !important;

    

    /* Phát sáng nhẹ */

    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.4) !important;

    padding: 15px !important;

}



/* 4. Tùy chỉnh Avatar (nếu có) */

#chatbot .avatar img {

    border: 2px solid #a855f7 !important; /* Viền avatar màu tím */

    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);

}



/* 5. Ẩn thanh Label thừa thãi (nếu show_label=False chưa ẩn hết) */

#chatbot > .label {

    display: none !important;

}



/* CSS cho tiêu đề chính "E-commerce AI Prediction & Assistant" */





#main_header h1 {

    /* 1. Viền màu tím (sử dụng mã màu tím từ các nút bấm của bạn) */

    border: 2px solid #7c3aed !important;



    /* 2. Hiệu ứng phát sáng màu tím (box-shadow) */

    /* offset-x | offset-y | blur-radius | color (với độ trong suốt) */

    box-shadow: 0 0 20px rgba(124, 58, 237, 0.6) !important;



    /* 3. Bo tròn góc để viền mềm mại hơn */

    border-radius: 12px !important;



    /* 4. Thêm khoảng cách giữa chữ và viền */

    padding: 10px 20px !important;



    /* 5. Căn giữa văn bản (nếu chưa được căn giữa) */

    text-align: center !important;



    /* 6. Đảm bảo màu chữ trắng để nổi bật trên nền tối */

    color: white !important;



    /* 7. Hiệu ứng chuyển đổi mượt mà (cho hover) */

    transition: all 0.3s ease-in-out;



}



/* (Tùy chọn) Hiệu ứng khi di chuột vào (hover) để sáng mạnh hơn */

#main_header h1:hover {

    border-color: #a855f7 !important; /* Màu tím sáng hơn */

    box-shadow: 0 0 30px rgba(168, 85, 247, 0.8) !important; /* Phát sáng mạnh hơn và rộng hơn */

}



/* Khung chứa (Container) - Hiệu ứng kính mờ */

.bi-header-container {

    background: rgba(255, 255, 255, 0.04); /* Nền siêu mờ */

    border: 1px solid rgba(255, 255, 255, 0.1); /* Viền mỏng */

    border-radius: 20px; /* Bo góc tròn trịa */

    padding: 30px;

    text-align: center;

    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); /* Bóng đổ tạo chiều sâu */

    backdrop-filter: blur(8px); /* Làm mờ hậu cảnh sau kính */

    margin-bottom: 20px;

}



/* Tiêu đề chính - Chữ Gradient chuyển màu */

.bi-title {

    font-size: 2.5rem !important;

    font-weight: 800 !important;

    margin-bottom: 10px;

    text-transform: uppercase;

    letter-spacing: 2px;

    

    /* Tạo màu Gradient Tím -> Xanh */

    background: linear-gradient(to right, #c084fc, #6366f1, #3b82f6);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

}



/* Phụ đề - Màu xám sáng */

.bi-subtitle {

    font-size: 1.1rem;

    color: #cbd5e1;

    font-weight: 300;

    line-height: 1.6;

}

.bi-subtitle i {

    color: #94a3b8;

    font-size: 0.9rem;

}



.glow-input {

    border: 2px solid #7c3aed !important; /* Màu tím chủ đạo */

    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4) !important; /* Hiệu ứng phát sáng */

    border-radius: 8px !important;

    transition: all 0.3s ease-in-out !important;

}

.glow-input:focus-within {

    box-shadow: 0 0 20px rgba(124, 58, 237, 0.7) !important;

    border-color: #a78bfa !important;

}





"""