OpceanAI commited on
Commit
1144d6f
Β·
verified Β·
1 Parent(s): 4a0396b

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +174 -665
app.py CHANGED
@@ -1,12 +1,10 @@
1
  import gradio as gr
2
- import os
3
 
4
  # ─── Custom CSS ───────────────────────────────────────────────────────────────
5
  custom_css = """
6
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');
7
 
8
  :root {
9
- /* Dark theme (default) */
10
  --bg-primary: #09090b;
11
  --bg-secondary: #111113;
12
  --bg-tertiary: #18181b;
@@ -15,51 +13,38 @@ custom_css = """
15
  --bg-glass: rgba(255, 255, 255, 0.04);
16
  --bg-glass-strong: rgba(255, 255, 255, 0.07);
17
  --bg-input: rgba(255, 255, 255, 0.04);
18
-
19
  --border-primary: rgba(255, 255, 255, 0.08);
20
  --border-secondary: rgba(255, 255, 255, 0.12);
21
  --border-focus: rgba(255, 255, 255, 0.25);
22
- --border-glass: rgba(255, 255, 255, 0.1);
23
-
24
  --text-primary: #fafafa;
25
  --text-secondary: #a1a1aa;
26
  --text-tertiary: #52525b;
27
  --text-inverse: #09090b;
28
-
29
  --accent: #22c55e;
30
  --accent-soft: rgba(34, 197, 94, 0.12);
31
  --accent-glow: rgba(34, 197, 94, 0.25);
32
-
33
  --purple: #a855f7;
34
  --purple-soft: rgba(168, 85, 247, 0.12);
35
  --blue: #3b82f6;
36
- --blue-soft: rgba(59, 130, 246, 0.12);
37
-
38
  --blur-sm: 8px;
39
  --blur-md: 16px;
40
  --blur-lg: 24px;
41
  --blur-xl: 40px;
42
-
43
  --radius-sm: 6px;
44
  --radius-md: 10px;
45
  --radius-lg: 14px;
46
  --radius-xl: 20px;
47
  --radius-full: 9999px;
48
-
49
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
50
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
51
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
52
  --shadow-glow: 0 0 40px rgba(34, 197, 94, 0.15);
53
-
54
- --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
55
- --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
56
-
57
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
58
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
59
- --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
60
  }
61
 
62
- /* Light theme */
63
  [data-theme="light"] {
64
  --bg-primary: #ffffff;
65
  --bg-secondary: #f4f4f5;
@@ -69,52 +54,34 @@ custom_css = """
69
  --bg-glass: rgba(255, 255, 255, 0.7);
70
  --bg-glass-strong: rgba(255, 255, 255, 0.85);
71
  --bg-input: rgba(0, 0, 0, 0.03);
72
-
73
  --border-primary: rgba(0, 0, 0, 0.08);
74
  --border-secondary: rgba(0, 0, 0, 0.12);
75
  --border-focus: rgba(0, 0, 0, 0.25);
76
- --border-glass: rgba(255, 255, 255, 0.5);
77
-
78
  --text-primary: #09090b;
79
  --text-secondary: #52525b;
80
  --text-tertiary: #a1a1aa;
81
  --text-inverse: #fafafa;
82
-
83
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
84
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
85
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
86
  }
87
 
88
- /* ─── Reset & Base ─────────────────────────────────────────────────────────── */
89
- *, *::before, *::after {
90
- box-sizing: border-box;
91
- margin: 0;
92
- padding: 0;
93
- }
94
 
95
- html {
96
- scroll-behavior: smooth;
97
- -webkit-text-size-adjust: 100%;
98
- overflow-y: auto !important;
99
- overflow-x: hidden !important;
100
- }
101
 
102
  body {
103
  font-family: var(--font-sans) !important;
104
  font-size: 14px !important;
105
  line-height: 1.6 !important;
106
- letter-spacing: -0.01em !important;
107
  color: var(--text-primary) !important;
108
  background: var(--bg-primary) !important;
109
  -webkit-font-smoothing: antialiased !important;
110
- -moz-osx-font-smoothing: grayscale !important;
111
  overflow-x: hidden !important;
112
  overflow-y: auto !important;
113
  min-height: 100vh !important;
114
- height: auto !important;
115
  }
116
 
117
- /* ─── Grain Overlay ────────────────────────────────────────────────────────── */
118
  body::before {
119
  content: '';
120
  position: fixed;
@@ -127,7 +94,6 @@ body::before {
127
  background-size: 128px 128px;
128
  }
129
 
130
- /* ─── Gradient Orbs (Background Depth) ─────────────────────────────────────── */
131
  body::after {
132
  content: '';
133
  position: fixed;
@@ -142,39 +108,21 @@ body::after {
142
  opacity: 0.4;
143
  }
144
 
145
- /* ─── Gradio Container ─────────────────────────────────────────────────────── */
146
- .gradio-container {
147
- background: transparent !important;
148
- padding: 0 !important;
149
- max-width: 100% !important;
150
- margin: 0 !important;
151
- height: auto !important;
152
- min-height: auto !important;
153
- }
154
-
155
- .gradio-container > .main {
156
- background: transparent !important;
157
- padding: 0 !important;
158
- max-width: 100% !important;
159
- margin: 0 !important;
160
- height: auto !important;
161
- }
162
-
163
  .gradio-container > .main > .wrap {
164
  background: transparent !important;
165
  padding: 0 !important;
166
  max-width: 100% !important;
167
  margin: 0 !important;
168
  height: auto !important;
169
- max-height: none !important;
170
  }
171
 
172
- /* ─── Navbar / Top Bar ─────────────────────────────────────────────────────── */
173
  .navbar {
174
  position: fixed;
175
- top: 0;
176
- left: 0;
177
- right: 0;
178
  z-index: 1000;
179
  display: flex;
180
  align-items: center;
@@ -184,69 +132,34 @@ body::after {
184
  backdrop-filter: blur(var(--blur-lg));
185
  -webkit-backdrop-filter: blur(var(--blur-lg));
186
  border-bottom: 1px solid var(--border-primary);
187
- transition: background var(--transition-base), border-color var(--transition-base);
188
- }
189
-
190
- .navbar-brand {
191
- display: flex;
192
- align-items: center;
193
- gap: 10px;
194
- text-decoration: none;
195
  }
196
 
 
197
  .navbar-logo {
198
- width: 28px;
199
- height: 28px;
200
  border-radius: var(--radius-md);
201
  background: linear-gradient(135deg, var(--accent), var(--purple));
202
- display: flex;
203
- align-items: center;
204
- justify-content: center;
205
- font-weight: 800;
206
- font-size: 14px;
207
- color: var(--text-inverse);
208
  box-shadow: var(--shadow-glow);
209
  }
210
-
211
- .navbar-title {
212
- font-size: 15px;
213
- font-weight: 700;
214
- letter-spacing: -0.03em;
215
- color: var(--text-primary);
216
- }
217
-
218
- .navbar-actions {
219
- display: flex;
220
- align-items: center;
221
- gap: 8px;
222
- }
223
 
224
  .theme-toggle {
225
- width: 36px;
226
- height: 36px;
227
  border-radius: var(--radius-full);
228
  background: var(--bg-card);
229
  border: 1px solid var(--border-primary);
230
  color: var(--text-secondary);
231
  cursor: pointer;
232
- display: flex;
233
- align-items: center;
234
- justify-content: center;
235
  transition: all var(--transition-fast);
236
  }
 
 
237
 
238
- .theme-toggle:hover {
239
- background: var(--bg-card-hover);
240
- border-color: var(--border-secondary);
241
- color: var(--text-primary);
242
- }
243
-
244
- .theme-toggle svg {
245
- width: 16px;
246
- height: 16px;
247
- }
248
-
249
- /* ─── Hero Section ─────────────────────────────────────────────────────────── */
250
  .hero {
251
  padding: 120px 24px 60px;
252
  text-align: center;
@@ -255,12 +168,27 @@ body::after {
255
  position: relative;
256
  }
257
 
258
- .hero-title-container {
259
- position: relative;
260
- display: inline-block;
 
 
 
 
261
  margin-bottom: 24px;
 
 
262
  }
263
 
 
 
 
 
 
 
 
 
 
264
  .hero-title {
265
  font-size: clamp(3.5rem, 10vw, 7rem) !important;
266
  font-weight: 900 !important;
@@ -284,24 +212,14 @@ body::after {
284
  transition: filter 0.3s ease, transform 0.3s ease;
285
  cursor: default;
286
  }
287
-
288
- .hero-letter:hover {
289
- filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6));
290
- transform: translateY(-5px) scale(1.1);
291
- }
292
-
293
- .hero-space {
294
- display: inline-block;
295
- width: 0.3em;
296
- }
297
 
298
  .hero-glow-bg {
299
  position: absolute;
300
- top: 50%;
301
- left: 50%;
302
  transform: translate(-50%, -50%);
303
- width: 120%;
304
- height: 120%;
305
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.15) 0%, rgba(168, 85, 247, 0.08) 40%, transparent 70%);
306
  z-index: 1;
307
  pointer-events: none;
@@ -309,114 +227,29 @@ body::after {
309
  filter: blur(40px);
310
  }
311
 
312
- .hero-badge {
313
- display: inline-flex;
314
- align-items: center;
315
- gap: 6px;
316
- padding: 6px 14px;
317
- border-radius: var(--radius-full);
318
- background: var(--bg-glass);
319
- border: 1px solid var(--border-primary);
320
- font-size: 12px;
321
- font-weight: 500;
322
- color: var(--text-secondary);
323
- margin-bottom: 24px;
324
- backdrop-filter: blur(var(--blur-sm));
325
- -webkit-backdrop-filter: blur(var(--blur-sm));
326
- }
327
-
328
- .hero-badge-dot {
329
- width: 6px;
330
- height: 6px;
331
- border-radius: 50%;
332
- background: var(--accent);
333
- box-shadow: 0 0 8px var(--accent-glow);
334
- animation: pulse 2s ease-in-out infinite;
335
- }
336
 
337
- @keyframes pulse {
338
- 0%, 100% { opacity: 1; transform: scale(1); }
339
- 50% { opacity: 0.6; transform: scale(1.2); }
340
- }
341
-
342
- .hero h1 {
343
- font-size: clamp(2.5rem, 6vw, 4rem) !important;
344
- font-weight: 800 !important;
345
- letter-spacing: -0.04em !important;
346
- line-height: 1.1 !important;
347
- margin-bottom: 16px !important;
348
- background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
349
- -webkit-background-clip: text;
350
- -webkit-text-fill-color: transparent;
351
- background-clip: text;
352
- }
353
-
354
- .hero p {
355
- font-size: 18px;
356
- color: var(--text-secondary);
357
- max-width: 560px;
358
- margin: 0 auto 32px;
359
- line-height: 1.7;
360
- }
361
-
362
- .hero-cta {
363
- display: flex;
364
- align-items: center;
365
- justify-content: center;
366
- gap: 12px;
367
- flex-wrap: wrap;
368
- }
369
 
370
  .btn {
371
- display: inline-flex;
372
- align-items: center;
373
- gap: 8px;
374
  padding: 10px 20px;
375
  border-radius: var(--radius-md);
376
  font-family: var(--font-sans);
377
- font-size: 14px;
378
- font-weight: 600;
379
- letter-spacing: -0.01em;
380
  cursor: pointer;
381
  transition: all var(--transition-fast);
382
  text-decoration: none;
383
  border: none;
384
  }
 
 
 
 
385
 
386
- .btn-primary {
387
- background: var(--text-primary);
388
- color: var(--text-inverse);
389
- }
390
-
391
- .btn-primary:hover {
392
- opacity: 0.85;
393
- transform: translateY(-1px);
394
- box-shadow: var(--shadow-md);
395
- }
396
-
397
- .btn-secondary {
398
- background: var(--bg-card);
399
- color: var(--text-primary);
400
- border: 1px solid var(--border-primary);
401
- }
402
-
403
- .btn-secondary:hover {
404
- background: var(--bg-card-hover);
405
- border-color: var(--border-secondary);
406
- }
407
-
408
- /* ─── Features Section ─────────────────────────────────────────────────────── */
409
- .features {
410
- padding: 40px 24px 60px;
411
- max-width: 1100px;
412
- margin: 0 auto;
413
- }
414
-
415
- .features-grid {
416
- display: grid;
417
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
418
- gap: 16px;
419
- }
420
 
421
  .feature-card {
422
  padding: 24px;
@@ -429,54 +262,29 @@ body::after {
429
  position: relative;
430
  overflow: hidden;
431
  }
432
-
433
  .feature-card::before {
434
  content: '';
435
- position: absolute;
436
- inset: 0;
437
  background: linear-gradient(135deg, transparent 0%, var(--bg-card-hover) 100%);
438
  opacity: 0;
439
  transition: opacity var(--transition-base);
440
  }
441
-
442
- .feature-card:hover {
443
- border-color: var(--border-secondary);
444
- transform: translateY(-2px);
445
- box-shadow: var(--shadow-lg);
446
- }
447
-
448
- .feature-card:hover::before {
449
- opacity: 1;
450
- }
451
 
452
  .feature-icon {
453
- width: 40px;
454
- height: 40px;
455
  border-radius: var(--radius-md);
456
  background: var(--bg-card);
457
  border: 1px solid var(--border-primary);
458
- display: flex;
459
- align-items: center;
460
- justify-content: center;
461
  margin-bottom: 16px;
462
  color: var(--accent);
463
  }
 
 
464
 
465
- .feature-card h3 {
466
- font-size: 15px;
467
- font-weight: 600;
468
- letter-spacing: -0.02em;
469
- margin-bottom: 8px;
470
- color: var(--text-primary);
471
- }
472
-
473
- .feature-card p {
474
- font-size: 13px;
475
- color: var(--text-secondary);
476
- line-height: 1.6;
477
- }
478
-
479
- /* ─── Chat Section ─────────────────────────────────────────────────────────── */
480
  .chat-section {
481
  padding: 40px 24px 80px;
482
  max-width: 900px;
@@ -492,93 +300,48 @@ body::after {
492
  -webkit-backdrop-filter: blur(var(--blur-lg));
493
  overflow: hidden;
494
  box-shadow: var(--shadow-lg);
 
495
  }
496
 
497
  .chat-header {
498
  padding: 16px 20px;
499
  border-bottom: 1px solid var(--border-primary);
500
- display: flex;
501
- align-items: center;
502
- gap: 12px;
503
  background: var(--bg-glass-strong);
504
  }
 
 
 
505
 
506
- .chat-header-dot {
507
- width: 8px;
508
- height: 8px;
509
- border-radius: 50%;
510
- background: var(--accent);
511
- box-shadow: 0 0 12px var(--accent-glow);
 
 
 
512
  }
513
-
514
- .chat-header h3 {
 
 
 
 
 
 
 
 
515
  font-size: 13px;
516
  font-weight: 600;
517
- letter-spacing: -0.01em;
518
- color: var(--text-primary);
519
- }
520
-
521
- .chat-header span {
522
- font-size: 12px;
523
- color: var(--text-tertiary);
524
- margin-left: auto;
525
- }
526
-
527
- /* ─── Sidebar (inline, not full-page) ─────────────────────────────────────── */
528
- .gradio-container .sidebar,
529
- .gradio-container aside {
530
- background: var(--bg-glass-strong) !important;
531
- backdrop-filter: blur(var(--blur-lg)) !important;
532
- -webkit-backdrop-filter: blur(var(--blur-lg)) !important;
533
- border: 1px solid var(--border-primary) !important;
534
- border-radius: var(--radius-lg) !important;
535
- padding: 20px !important;
536
- margin: 0 auto 24px !important;
537
- max-width: 400px !important;
538
- min-width: auto !important;
539
- width: 100% !important;
540
- box-shadow: var(--shadow-md) !important;
541
- }
542
-
543
- .sidebar h1, aside h1 {
544
- font-family: var(--font-sans) !important;
545
- font-size: 18px !important;
546
- font-weight: 700 !important;
547
- letter-spacing: -0.03em !important;
548
- color: var(--text-primary) !important;
549
- margin-bottom: 8px !important;
550
- }
551
-
552
- .sidebar p, aside p {
553
- font-size: 13px !important;
554
- color: var(--text-secondary) !important;
555
- line-height: 1.6 !important;
556
- }
557
-
558
- .sidebar button, aside button {
559
- margin-top: 12px !important;
560
- padding: 10px 16px !important;
561
- height: 40px !important;
562
- background: var(--text-primary) !important;
563
- color: var(--text-inverse) !important;
564
- border: none !important;
565
- border-radius: var(--radius-md) !important;
566
- font-family: var(--font-sans) !important;
567
- font-size: 13px !important;
568
- font-weight: 600 !important;
569
- cursor: pointer !important;
570
- transition: all var(--transition-fast) !important;
571
- }
572
-
573
- .sidebar button:hover, aside button:hover {
574
- opacity: 0.85 !important;
575
- transform: translateY(-1px) !important;
576
  }
 
577
 
578
- /* ─── Gradio Overrides ─────────────────────────────────────────────────────── */
579
-
580
- .chatbot,
581
- div[data-testid="chatbot"] {
582
  background: transparent !important;
583
  border: none !important;
584
  border-radius: 0 !important;
@@ -586,65 +349,16 @@ div[data-testid="chatbot"] {
586
  height: 480px !important;
587
  max-height: 480px !important;
588
  }
 
589
 
590
- .chatbot .message-wrap,
591
- div[data-testid="chatbot"] .message-wrap {
592
- padding: 16px !important;
593
- background: transparent !important;
594
- }
595
-
596
- .message {
597
- max-width: 80% !important;
598
- padding: 10px 14px !important;
599
- border-radius: var(--radius-md) !important;
600
- font-family: var(--font-sans) !important;
601
- font-size: 13px !important;
602
- line-height: 1.6 !important;
603
- }
604
-
605
- .message.user, .user.message {
606
- background: var(--bg-glass-strong) !important;
607
- color: var(--text-primary) !important;
608
- align-self: flex-end !important;
609
- border: 1px solid var(--border-primary) !important;
610
- border-bottom-right-radius: var(--radius-sm) !important;
611
- backdrop-filter: blur(var(--blur-sm)) !important;
612
- -webkit-backdrop-filter: blur(var(--blur-sm)) !important;
613
- }
614
-
615
- .message.bot, .bot.message {
616
- background: var(--bg-card) !important;
617
- color: var(--text-secondary) !important;
618
- align-self: flex-start !important;
619
- border: 1px solid var(--border-primary) !important;
620
- border-bottom-left-radius: var(--radius-sm) !important;
621
- }
622
 
623
- .message code {
624
- font-family: var(--font-mono) !important;
625
- font-size: 12px !important;
626
- background: var(--bg-tertiary) !important;
627
- border: 1px solid var(--border-primary) !important;
628
- border-radius: var(--radius-sm) !important;
629
- padding: 2px 6px !important;
630
- color: var(--accent) !important;
631
- }
632
-
633
- .message pre {
634
- font-family: var(--font-mono) !important;
635
- font-size: 12px !important;
636
- background: var(--bg-secondary) !important;
637
- border: 1px solid var(--border-primary) !important;
638
- border-radius: var(--radius-md) !important;
639
- padding: 12px !important;
640
- color: var(--text-secondary) !important;
641
- overflow-x: auto !important;
642
- margin-top: 8px !important;
643
- }
644
 
645
- textarea,
646
- input[type="text"],
647
- .scroll-hide {
648
  background: var(--bg-input) !important;
649
  border: 1px solid var(--border-primary) !important;
650
  border-radius: var(--radius-md) !important;
@@ -656,16 +370,8 @@ input[type="text"],
656
  transition: border-color var(--transition-fast) !important;
657
  caret-color: var(--accent) !important;
658
  }
659
-
660
- textarea:focus, input[type="text"]:focus {
661
- border-color: var(--border-focus) !important;
662
- outline: none !important;
663
- box-shadow: 0 0 0 3px var(--accent-soft) !important;
664
- }
665
-
666
- textarea::placeholder, input[type="text"]::placeholder {
667
- color: var(--text-tertiary) !important;
668
- }
669
 
670
  button[variant="primary"], .submit-btn {
671
  background: var(--text-primary) !important;
@@ -680,11 +386,7 @@ button[variant="primary"], .submit-btn {
680
  cursor: pointer !important;
681
  transition: all var(--transition-fast) !important;
682
  }
683
-
684
- button[variant="primary"]:hover, .submit-btn:hover {
685
- opacity: 0.85;
686
- transform: translateY(-1px);
687
- }
688
 
689
  button[variant="secondary"] {
690
  background: transparent !important;
@@ -697,12 +399,7 @@ button[variant="secondary"] {
697
  padding: 0 14px !important;
698
  transition: all var(--transition-fast) !important;
699
  }
700
-
701
- button[variant="secondary"]:hover {
702
- border-color: var(--border-secondary) !important;
703
- color: var(--text-primary) !important;
704
- background: var(--bg-card) !important;
705
- }
706
 
707
  label span, .label-wrap span {
708
  font-family: var(--font-mono) !important;
@@ -713,12 +410,7 @@ label span, .label-wrap span {
713
  text-transform: uppercase !important;
714
  }
715
 
716
- .block, .gr-block {
717
- background: transparent !important;
718
- border-color: var(--border-primary) !important;
719
- border-radius: var(--radius-lg) !important;
720
- box-shadow: none !important;
721
- }
722
 
723
  .examples td {
724
  background: var(--bg-card) !important;
@@ -731,43 +423,21 @@ label span, .label-wrap span {
731
  cursor: pointer !important;
732
  transition: all var(--transition-fast) !important;
733
  }
 
734
 
735
- .examples td:hover {
736
- border-color: var(--border-secondary) !important;
737
- color: var(--text-primary) !important;
738
- background: var(--bg-card-hover) !important;
739
- }
740
-
741
- /* ─── Scrollbar ────────────────────────────────────────────────────────────── */
742
  ::-webkit-scrollbar { width: 4px; height: 4px; }
743
  ::-webkit-scrollbar-track { background: transparent; }
744
  ::-webkit-scrollbar-thumb { background: var(--border-secondary); border-radius: 99px; }
745
  ::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
746
  * { scrollbar-width: thin !important; scrollbar-color: var(--border-secondary) transparent !important; }
747
 
748
- /* ─── Footer ───────────────────────────────────────────────────────────────── */
749
- .footer {
750
- padding: 24px;
751
- text-align: center;
752
- border-top: 1px solid var(--border-primary);
753
- color: var(--text-tertiary);
754
- font-size: 12px;
755
- }
756
 
757
- .footer a {
758
- color: var(--text-secondary);
759
- text-decoration: none;
760
- transition: color var(--transition-fast);
761
- }
762
-
763
- .footer a:hover {
764
- color: var(--text-primary);
765
- }
766
-
767
- /* ─── Hide Gradio Footer ───────────────────────────────────────────────────── */
768
  footer, .footer, .built-with { display: none !important; }
769
 
770
- /* ─── Animations (anime.js handles all) ────────────────────────────────────── */
771
  .hero { opacity: 0; }
772
  .hero-badge { opacity: 0; }
773
  .hero-glow-bg { opacity: 0; }
@@ -780,30 +450,18 @@ footer, .footer, .built-with { display: none !important; }
780
  .chat-container { opacity: 0; }
781
  .footer { opacity: 0; }
782
 
783
- /* ─── Responsive ───────────────────────────────────────────────────────────── */
784
  @media (max-width: 768px) {
785
  .navbar { padding: 10px 16px; }
786
  .hero { padding: 100px 16px 40px; }
787
- .hero h1 { font-size: 2rem !important; }
788
  .hero p { font-size: 15px; }
789
  .features { padding: 24px 16px 40px; }
790
  .chat-section { padding: 24px 16px 60px; }
791
  .message { max-width: 90% !important; }
792
-
793
- .gradio-container .sidebar,
794
- .gradio-container aside {
795
- max-width: 100% !important;
796
- margin: 0 0 16px !important;
797
- }
798
  }
799
 
800
- /* ─── Reduced Motion ───────────────────────────────────────────────────────── */
801
  @media (prefers-reduced-motion: reduce) {
802
- *, *::before, *::after {
803
- animation-duration: 0.01ms !important;
804
- animation-iteration-count: 1 !important;
805
- transition-duration: 0.01ms !important;
806
- }
807
  }
808
  """
809
 
@@ -812,9 +470,7 @@ custom_js = """
812
  (function() {
813
  const script = document.createElement('script');
814
  script.src = 'https://cdn.jsdelivr.net/npm/animejs@4.0.0/lib/anime.min.js';
815
- script.onload = function() {
816
- initAnimations();
817
- };
818
  document.head.appendChild(script);
819
  })();
820
 
@@ -832,12 +488,9 @@ function toggleTheme() {
832
  document.documentElement.setAttribute('data-theme', next);
833
  localStorage.setItem('theme', next);
834
  updateThemeIcon(next);
835
- anime({
836
- targets: '.theme-toggle',
837
- rotate: [0, 360],
838
- duration: 400,
839
- easing: 'easeInOutQuad'
840
- });
841
  }
842
 
843
  function updateThemeIcon(theme) {
@@ -867,217 +520,67 @@ function setupNavbar() {
867
  function initAnimations() {
868
  const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
869
  if (prefersReduced) {
870
- document.querySelectorAll('.hero, .hero-badge, .hero-letter, .hero-glow-bg, .hero p, .hero-cta, .features-grid, .feature-card, .chat-section, .footer').forEach(el => {
871
- el.style.opacity = '1';
872
- });
873
  return;
874
  }
875
 
876
  // Navbar slide down
877
- anime({
878
- targets: '.navbar',
879
- translateY: [-60, 0],
880
- opacity: [0, 1],
881
- duration: 600,
882
- easing: 'easeOutExpo'
883
- });
884
 
885
- // Hero entrance timeline
886
  const heroTL = anime.timeline({ easing: 'easeOutExpo' });
887
  heroTL
888
- .add({
889
- targets: '.hero-badge',
890
- opacity: [0, 1],
891
- translateY: [15, 0],
892
- scale: [0.95, 1],
893
- duration: 500
894
- })
895
- .add({
896
- targets: '.hero-glow-bg',
897
- opacity: [0, 1],
898
- scale: [0.8, 1],
899
- duration: 800,
900
- easing: 'easeOutQuad'
901
- }, '-=300')
902
- .add({
903
- targets: '.hero-letter',
904
- opacity: [0, 1],
905
- translateY: [40, 0],
906
- scale: [0.8, 1],
907
- delay: anime.stagger(80, { start: 100 }),
908
- duration: 800,
909
- easing: 'easeOutElastic(1, .6)'
910
- }, '-=600')
911
- .add({
912
- targets: '.hero p',
913
- opacity: [0, 1],
914
- translateY: [20, 0],
915
- duration: 600
916
- }, '-=400')
917
- .add({
918
- targets: '.hero-cta',
919
- opacity: [0, 1],
920
- translateY: [20, 0],
921
- duration: 600
922
- }, '-=350');
923
-
924
- // Floating orbs animation
925
- anime({
926
- targets: 'body::after',
927
- translateX: ['-52%', '-48%'],
928
- translateY: ['-2%', '2%'],
929
- duration: 8000,
930
- loop: true,
931
- direction: 'alternate',
932
- easing: 'easeInOutSine'
933
- });
934
-
935
- // Feature cards stagger on scroll
936
- const scrollObserver = anime.scroll('.features', {
937
- repeat: false,
938
- threshold: 0.2,
939
- onEnter: () => {
940
- anime({
941
- targets: '.feature-card',
942
- opacity: [0, 1],
943
- translateY: [30, 0],
944
- delay: anime.stagger(120, { start: 100 }),
945
- duration: 700,
946
- easing: 'easeOutExpo'
947
- });
948
- }
949
- });
950
-
951
- // Chat section on scroll
952
- anime.scroll('.chat-section', {
953
- repeat: false,
954
- threshold: 0.15,
955
- onEnter: () => {
956
- anime({
957
- targets: '.chat-container',
958
- opacity: [0, 1],
959
- translateY: [25, 0],
960
- scale: [0.98, 1],
961
- duration: 600,
962
- easing: 'easeOutExpo'
963
- });
964
- }
965
- });
966
-
967
- // Footer on scroll
968
- anime.scroll('.footer', {
969
- repeat: false,
970
- threshold: 0.5,
971
- onEnter: () => {
972
- anime({
973
- targets: '.footer',
974
- opacity: [0, 1],
975
- translateY: [15, 0],
976
- duration: 500,
977
- easing: 'easeOutExpo'
978
- });
979
- }
980
- });
981
-
982
- // Button hover micro-interactions
983
  document.querySelectorAll('.btn-primary').forEach(btn => {
984
- btn.addEventListener('mouseenter', () => {
985
- anime({
986
- targets: btn,
987
- scale: 1.03,
988
- duration: 200,
989
- easing: 'easeOutQuad'
990
- });
991
- });
992
- btn.addEventListener('mouseleave', () => {
993
- anime({
994
- targets: btn,
995
- scale: 1,
996
- duration: 200,
997
- easing: 'easeOutQuad'
998
- });
999
- });
1000
  });
1001
-
1002
  document.querySelectorAll('.btn-secondary').forEach(btn => {
1003
- btn.addEventListener('mouseenter', () => {
1004
- anime({
1005
- targets: btn,
1006
- scale: 1.02,
1007
- duration: 200,
1008
- easing: 'easeOutQuad'
1009
- });
1010
- });
1011
- btn.addEventListener('mouseleave', () => {
1012
- anime({
1013
- targets: btn,
1014
- scale: 1,
1015
- duration: 200,
1016
- easing: 'easeOutQuad'
1017
- });
1018
- });
1019
  });
1020
 
1021
- // Feature card hover
1022
  document.querySelectorAll('.feature-card').forEach(card => {
1023
- card.addEventListener('mouseenter', () => {
1024
- anime({
1025
- targets: card.querySelector('.feature-icon'),
1026
- scale: 1.1,
1027
- rotate: '5deg',
1028
- duration: 300,
1029
- easing: 'easeOutQuad'
1030
- });
1031
- });
1032
- card.addEventListener('mouseleave', () => {
1033
- anime({
1034
- targets: card.querySelector('.feature-icon'),
1035
- scale: 1,
1036
- rotate: '0deg',
1037
- duration: 300,
1038
- easing: 'easeOutQuad'
1039
- });
1040
- });
1041
  });
1042
 
1043
  // Logo pulse
1044
- anime({
1045
- targets: '.navbar-logo',
1046
- boxShadow: [
1047
- '0 0 20px rgba(34, 197, 94, 0.15)',
1048
- '0 0 35px rgba(34, 197, 94, 0.3)',
1049
- '0 0 20px rgba(34, 197, 94, 0.15)'
1050
- ],
1051
- duration: 3000,
1052
- loop: true,
1053
- easing: 'easeInOutSine'
1054
- });
1055
 
1056
  // Badge dot pulse
1057
- anime({
1058
- targets: '.hero-badge-dot',
1059
- scale: [1, 1.3, 1],
1060
- opacity: [1, 0.6, 1],
1061
- duration: 2000,
1062
- loop: true,
1063
- easing: 'easeInOutSine'
1064
- });
1065
 
1066
- // Chat header dot pulse
1067
- anime({
1068
- targets: '.chat-header-dot',
1069
- scale: [1, 1.4, 1],
1070
- opacity: [1, 0.5, 1],
1071
- duration: 2500,
1072
- loop: true,
1073
- easing: 'easeInOutSine'
1074
- });
1075
  }
1076
 
1077
- document.addEventListener('DOMContentLoaded', () => {
1078
- initTheme();
1079
- setupNavbar();
1080
- });
1081
  """
1082
 
1083
  # ─── App ──────────────────────────────────────────────────────────────────────
@@ -1118,7 +621,7 @@ with gr.Blocks(
1118
  shadow_drop_lg="none",
1119
  )
1120
  ) as demo:
1121
- # ─── Landing Page (HTML sections) ─────────────────────────────────────
1122
  gr.HTML("""
1123
  <section class="hero">
1124
  <div class="hero-badge">
@@ -1126,7 +629,7 @@ with gr.Blocks(
1126
  Powered by Featherless AI
1127
  </div>
1128
  <div class="hero-title-container">
1129
- <h1 class="hero-title" id="hero-title">
1130
  <span class="hero-letter">Y</span><span class="hero-letter">u</span><span class="hero-letter">u</span><span class="hero-letter">k</span><span class="hero-letter">i</span><span class="hero-space"> </span><span class="hero-letter">R</span><span class="hero-letter">x</span><span class="hero-letter">G</span>
1131
  </h1>
1132
  <div class="hero-glow-bg"></div>
@@ -1149,6 +652,7 @@ with gr.Blocks(
1149
  </section>
1150
  """)
1151
 
 
1152
  gr.HTML("""
1153
  <section class="features">
1154
  <div class="features-grid">
@@ -1177,20 +681,25 @@ with gr.Blocks(
1177
  </section>
1178
  """)
1179
 
1180
- # ─── Chat Section ─────────────────────────────────────────────────────
1181
- with gr.Sidebar():
1182
- gr.Markdown("# Yuuki-RxG")
1183
- gr.Markdown(
1184
- "Modelo servido via featherless-ai. "
1185
- "Inicia sesiΓ³n con tu cuenta de Hugging Face para acceder a la inferencia."
1186
- )
1187
- login_btn = gr.LoginButton("Iniciar sesiΓ³n")
 
 
 
1188
 
1189
- gr.load(
1190
- "models/OpceanAI/Yuuki-RxG",
1191
- accept_token=login_btn,
1192
- provider="featherless-ai",
1193
- )
 
 
1194
 
1195
  # ─── Footer ───────────────────────────────────────────────────────────
1196
  gr.HTML("""
 
1
  import gradio as gr
 
2
 
3
  # ─── Custom CSS ───────────────────────────────────────────────────────────────
4
  custom_css = """
5
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');
6
 
7
  :root {
 
8
  --bg-primary: #09090b;
9
  --bg-secondary: #111113;
10
  --bg-tertiary: #18181b;
 
13
  --bg-glass: rgba(255, 255, 255, 0.04);
14
  --bg-glass-strong: rgba(255, 255, 255, 0.07);
15
  --bg-input: rgba(255, 255, 255, 0.04);
 
16
  --border-primary: rgba(255, 255, 255, 0.08);
17
  --border-secondary: rgba(255, 255, 255, 0.12);
18
  --border-focus: rgba(255, 255, 255, 0.25);
 
 
19
  --text-primary: #fafafa;
20
  --text-secondary: #a1a1aa;
21
  --text-tertiary: #52525b;
22
  --text-inverse: #09090b;
 
23
  --accent: #22c55e;
24
  --accent-soft: rgba(34, 197, 94, 0.12);
25
  --accent-glow: rgba(34, 197, 94, 0.25);
 
26
  --purple: #a855f7;
27
  --purple-soft: rgba(168, 85, 247, 0.12);
28
  --blue: #3b82f6;
 
 
29
  --blur-sm: 8px;
30
  --blur-md: 16px;
31
  --blur-lg: 24px;
32
  --blur-xl: 40px;
 
33
  --radius-sm: 6px;
34
  --radius-md: 10px;
35
  --radius-lg: 14px;
36
  --radius-xl: 20px;
37
  --radius-full: 9999px;
 
38
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
39
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
40
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
41
  --shadow-glow: 0 0 40px rgba(34, 197, 94, 0.15);
42
+ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
43
+ --font-mono: 'JetBrains Mono', monospace;
 
 
44
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
45
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
 
46
  }
47
 
 
48
  [data-theme="light"] {
49
  --bg-primary: #ffffff;
50
  --bg-secondary: #f4f4f5;
 
54
  --bg-glass: rgba(255, 255, 255, 0.7);
55
  --bg-glass-strong: rgba(255, 255, 255, 0.85);
56
  --bg-input: rgba(0, 0, 0, 0.03);
 
57
  --border-primary: rgba(0, 0, 0, 0.08);
58
  --border-secondary: rgba(0, 0, 0, 0.12);
59
  --border-focus: rgba(0, 0, 0, 0.25);
 
 
60
  --text-primary: #09090b;
61
  --text-secondary: #52525b;
62
  --text-tertiary: #a1a1aa;
63
  --text-inverse: #fafafa;
 
64
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
65
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
66
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
67
  }
68
 
69
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
 
 
 
 
70
 
71
+ html { scroll-behavior: smooth; overflow-y: auto !important; overflow-x: hidden !important; }
 
 
 
 
 
72
 
73
  body {
74
  font-family: var(--font-sans) !important;
75
  font-size: 14px !important;
76
  line-height: 1.6 !important;
 
77
  color: var(--text-primary) !important;
78
  background: var(--bg-primary) !important;
79
  -webkit-font-smoothing: antialiased !important;
 
80
  overflow-x: hidden !important;
81
  overflow-y: auto !important;
82
  min-height: 100vh !important;
 
83
  }
84
 
 
85
  body::before {
86
  content: '';
87
  position: fixed;
 
94
  background-size: 128px 128px;
95
  }
96
 
 
97
  body::after {
98
  content: '';
99
  position: fixed;
 
108
  opacity: 0.4;
109
  }
110
 
111
+ .gradio-container,
112
+ .gradio-container > .main,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  .gradio-container > .main > .wrap {
114
  background: transparent !important;
115
  padding: 0 !important;
116
  max-width: 100% !important;
117
  margin: 0 !important;
118
  height: auto !important;
119
+ min-height: auto !important;
120
  }
121
 
122
+ /* Navbar */
123
  .navbar {
124
  position: fixed;
125
+ top: 0; left: 0; right: 0;
 
 
126
  z-index: 1000;
127
  display: flex;
128
  align-items: center;
 
132
  backdrop-filter: blur(var(--blur-lg));
133
  -webkit-backdrop-filter: blur(var(--blur-lg));
134
  border-bottom: 1px solid var(--border-primary);
 
 
 
 
 
 
 
 
135
  }
136
 
137
+ .navbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
138
  .navbar-logo {
139
+ width: 28px; height: 28px;
 
140
  border-radius: var(--radius-md);
141
  background: linear-gradient(135deg, var(--accent), var(--purple));
142
+ display: flex; align-items: center; justify-content: center;
143
+ font-weight: 800; font-size: 14px; color: var(--text-inverse);
 
 
 
 
144
  box-shadow: var(--shadow-glow);
145
  }
146
+ .navbar-title { font-size: 15px; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); }
147
+ .navbar-actions { display: flex; align-items: center; gap: 8px; }
 
 
 
 
 
 
 
 
 
 
 
148
 
149
  .theme-toggle {
150
+ width: 36px; height: 36px;
 
151
  border-radius: var(--radius-full);
152
  background: var(--bg-card);
153
  border: 1px solid var(--border-primary);
154
  color: var(--text-secondary);
155
  cursor: pointer;
156
+ display: flex; align-items: center; justify-content: center;
 
 
157
  transition: all var(--transition-fast);
158
  }
159
+ .theme-toggle:hover { background: var(--bg-card-hover); border-color: var(--border-secondary); color: var(--text-primary); }
160
+ .theme-toggle svg { width: 16px; height: 16px; }
161
 
162
+ /* Hero */
 
 
 
 
 
 
 
 
 
 
 
163
  .hero {
164
  padding: 120px 24px 60px;
165
  text-align: center;
 
168
  position: relative;
169
  }
170
 
171
+ .hero-badge {
172
+ display: inline-flex; align-items: center; gap: 6px;
173
+ padding: 6px 14px;
174
+ border-radius: var(--radius-full);
175
+ background: var(--bg-glass);
176
+ border: 1px solid var(--border-primary);
177
+ font-size: 12px; font-weight: 500; color: var(--text-secondary);
178
  margin-bottom: 24px;
179
+ backdrop-filter: blur(var(--blur-sm));
180
+ -webkit-backdrop-filter: blur(var(--blur-sm));
181
  }
182
 
183
+ .hero-badge-dot {
184
+ width: 6px; height: 6px;
185
+ border-radius: 50%;
186
+ background: var(--accent);
187
+ box-shadow: 0 0 8px var(--accent-glow);
188
+ }
189
+
190
+ .hero-title-container { position: relative; display: inline-block; margin-bottom: 24px; }
191
+
192
  .hero-title {
193
  font-size: clamp(3.5rem, 10vw, 7rem) !important;
194
  font-weight: 900 !important;
 
212
  transition: filter 0.3s ease, transform 0.3s ease;
213
  cursor: default;
214
  }
215
+ .hero-letter:hover { filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6)); transform: translateY(-5px) scale(1.1); }
216
+ .hero-space { display: inline-block; width: 0.3em; }
 
 
 
 
 
 
 
 
217
 
218
  .hero-glow-bg {
219
  position: absolute;
220
+ top: 50%; left: 50%;
 
221
  transform: translate(-50%, -50%);
222
+ width: 120%; height: 120%;
 
223
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.15) 0%, rgba(168, 85, 247, 0.08) 40%, transparent 70%);
224
  z-index: 1;
225
  pointer-events: none;
 
227
  filter: blur(40px);
228
  }
229
 
230
+ .hero p { font-size: 18px; color: var(--text-secondary); max-width: 560px; margin: 0 auto 32px; line-height: 1.7; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
 
232
+ .hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
  .btn {
235
+ display: inline-flex; align-items: center; gap: 8px;
 
 
236
  padding: 10px 20px;
237
  border-radius: var(--radius-md);
238
  font-family: var(--font-sans);
239
+ font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
 
 
240
  cursor: pointer;
241
  transition: all var(--transition-fast);
242
  text-decoration: none;
243
  border: none;
244
  }
245
+ .btn-primary { background: var(--text-primary); color: var(--text-inverse); }
246
+ .btn-primary:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: var(--shadow-md); }
247
+ .btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-primary); }
248
+ .btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-secondary); }
249
 
250
+ /* Features */
251
+ .features { padding: 40px 24px 60px; max-width: 1100px; margin: 0 auto; }
252
+ .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
 
254
  .feature-card {
255
  padding: 24px;
 
262
  position: relative;
263
  overflow: hidden;
264
  }
 
265
  .feature-card::before {
266
  content: '';
267
+ position: absolute; inset: 0;
 
268
  background: linear-gradient(135deg, transparent 0%, var(--bg-card-hover) 100%);
269
  opacity: 0;
270
  transition: opacity var(--transition-base);
271
  }
272
+ .feature-card:hover { border-color: var(--border-secondary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
273
+ .feature-card:hover::before { opacity: 1; }
 
 
 
 
 
 
 
 
274
 
275
  .feature-icon {
276
+ width: 40px; height: 40px;
 
277
  border-radius: var(--radius-md);
278
  background: var(--bg-card);
279
  border: 1px solid var(--border-primary);
280
+ display: flex; align-items: center; justify-content: center;
 
 
281
  margin-bottom: 16px;
282
  color: var(--accent);
283
  }
284
+ .feature-card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--text-primary); }
285
+ .feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
286
 
287
+ /* Chat Section */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  .chat-section {
289
  padding: 40px 24px 80px;
290
  max-width: 900px;
 
300
  -webkit-backdrop-filter: blur(var(--blur-lg));
301
  overflow: hidden;
302
  box-shadow: var(--shadow-lg);
303
+ margin-bottom: 20px;
304
  }
305
 
306
  .chat-header {
307
  padding: 16px 20px;
308
  border-bottom: 1px solid var(--border-primary);
309
+ display: flex; align-items: center; gap: 12px;
 
 
310
  background: var(--bg-glass-strong);
311
  }
312
+ .chat-header-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
313
+ .chat-header h3 { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); }
314
+ .chat-header span { font-size: 12px; color: var(--text-tertiary); margin-left: auto; }
315
 
316
+ /* Auth */
317
+ .auth-box {
318
+ background: var(--bg-glass);
319
+ border: 1px solid var(--border-primary);
320
+ border-radius: var(--radius-lg);
321
+ padding: 20px;
322
+ margin-bottom: 20px;
323
+ backdrop-filter: blur(var(--blur-md));
324
+ -webkit-backdrop-filter: blur(var(--blur-md));
325
  }
326
+ .auth-box p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
327
+ .auth-box button {
328
+ width: 100%;
329
+ padding: 10px 16px;
330
+ height: 42px;
331
+ background: var(--text-primary);
332
+ color: var(--text-inverse);
333
+ border: none;
334
+ border-radius: var(--radius-md);
335
+ font-family: var(--font-sans);
336
  font-size: 13px;
337
  font-weight: 600;
338
+ cursor: pointer;
339
+ transition: all var(--transition-fast);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  }
341
+ .auth-box button:hover { opacity: 0.85; transform: translateY(-1px); }
342
 
343
+ /* Gradio Overrides */
344
+ .chatbot, div[data-testid="chatbot"] {
 
 
345
  background: transparent !important;
346
  border: none !important;
347
  border-radius: 0 !important;
 
349
  height: 480px !important;
350
  max-height: 480px !important;
351
  }
352
+ .chatbot .message-wrap, div[data-testid="chatbot"] .message-wrap { padding: 16px !important; background: transparent !important; }
353
 
354
+ .message { max-width: 80% !important; padding: 10px 14px !important; border-radius: var(--radius-md) !important; font-family: var(--font-sans) !important; font-size: 13px !important; line-height: 1.6 !important; }
355
+ .message.user, .user.message { background: var(--bg-glass-strong) !important; color: var(--text-primary) !important; align-self: flex-end !important; border: 1px solid var(--border-primary) !important; border-bottom-right-radius: var(--radius-sm) !important; backdrop-filter: blur(var(--blur-sm)) !important; -webkit-backdrop-filter: blur(var(--blur-sm)) !important; }
356
+ .message.bot, .bot.message { background: var(--bg-card) !important; color: var(--text-secondary) !important; align-self: flex-start !important; border: 1px solid var(--border-primary) !important; border-bottom-left-radius: var(--radius-sm) !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
 
358
+ .message code { font-family: var(--font-mono) !important; font-size: 12px !important; background: var(--bg-tertiary) !important; border: 1px solid var(--border-primary) !important; border-radius: var(--radius-sm) !important; padding: 2px 6px !important; color: var(--accent) !important; }
359
+ .message pre { font-family: var(--font-mono) !important; font-size: 12px !important; background: var(--bg-secondary) !important; border: 1px solid var(--border-primary) !important; border-radius: var(--radius-md) !important; padding: 12px !important; color: var(--text-secondary) !important; overflow-x: auto !important; margin-top: 8px !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
 
361
+ textarea, input[type="text"], .scroll-hide {
 
 
362
  background: var(--bg-input) !important;
363
  border: 1px solid var(--border-primary) !important;
364
  border-radius: var(--radius-md) !important;
 
370
  transition: border-color var(--transition-fast) !important;
371
  caret-color: var(--accent) !important;
372
  }
373
+ textarea:focus, input[type="text"]:focus { border-color: var(--border-focus) !important; outline: none !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }
374
+ textarea::placeholder, input[type="text"]::placeholder { color: var(--text-tertiary) !important; }
 
 
 
 
 
 
 
 
375
 
376
  button[variant="primary"], .submit-btn {
377
  background: var(--text-primary) !important;
 
386
  cursor: pointer !important;
387
  transition: all var(--transition-fast) !important;
388
  }
389
+ button[variant="primary"]:hover, .submit-btn:hover { opacity: 0.85; transform: translateY(-1px); }
 
 
 
 
390
 
391
  button[variant="secondary"] {
392
  background: transparent !important;
 
399
  padding: 0 14px !important;
400
  transition: all var(--transition-fast) !important;
401
  }
402
+ button[variant="secondary"]:hover { border-color: var(--border-secondary) !important; color: var(--text-primary) !important; background: var(--bg-card) !important; }
 
 
 
 
 
403
 
404
  label span, .label-wrap span {
405
  font-family: var(--font-mono) !important;
 
410
  text-transform: uppercase !important;
411
  }
412
 
413
+ .block, .gr-block { background: transparent !important; border-color: var(--border-primary) !important; border-radius: var(--radius-lg) !important; box-shadow: none !important; }
 
 
 
 
 
414
 
415
  .examples td {
416
  background: var(--bg-card) !important;
 
423
  cursor: pointer !important;
424
  transition: all var(--transition-fast) !important;
425
  }
426
+ .examples td:hover { border-color: var(--border-secondary) !important; color: var(--text-primary) !important; background: var(--bg-card-hover) !important; }
427
 
 
 
 
 
 
 
 
428
  ::-webkit-scrollbar { width: 4px; height: 4px; }
429
  ::-webkit-scrollbar-track { background: transparent; }
430
  ::-webkit-scrollbar-thumb { background: var(--border-secondary); border-radius: 99px; }
431
  ::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
432
  * { scrollbar-width: thin !important; scrollbar-color: var(--border-secondary) transparent !important; }
433
 
434
+ .footer { padding: 24px; text-align: center; border-top: 1px solid var(--border-primary); color: var(--text-tertiary); font-size: 12px; }
435
+ .footer a { color: var(--text-secondary); text-decoration: none; transition: color var(--transition-fast); }
436
+ .footer a:hover { color: var(--text-primary); }
 
 
 
 
 
437
 
 
 
 
 
 
 
 
 
 
 
 
438
  footer, .footer, .built-with { display: none !important; }
439
 
440
+ /* Animation states */
441
  .hero { opacity: 0; }
442
  .hero-badge { opacity: 0; }
443
  .hero-glow-bg { opacity: 0; }
 
450
  .chat-container { opacity: 0; }
451
  .footer { opacity: 0; }
452
 
 
453
  @media (max-width: 768px) {
454
  .navbar { padding: 10px 16px; }
455
  .hero { padding: 100px 16px 40px; }
456
+ .hero-title { font-size: clamp(2.5rem, 8vw, 4rem) !important; }
457
  .hero p { font-size: 15px; }
458
  .features { padding: 24px 16px 40px; }
459
  .chat-section { padding: 24px 16px 60px; }
460
  .message { max-width: 90% !important; }
 
 
 
 
 
 
461
  }
462
 
 
463
  @media (prefers-reduced-motion: reduce) {
464
+ *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
 
 
 
 
465
  }
466
  """
467
 
 
470
  (function() {
471
  const script = document.createElement('script');
472
  script.src = 'https://cdn.jsdelivr.net/npm/animejs@4.0.0/lib/anime.min.js';
473
+ script.onload = function() { initAnimations(); };
 
 
474
  document.head.appendChild(script);
475
  })();
476
 
 
488
  document.documentElement.setAttribute('data-theme', next);
489
  localStorage.setItem('theme', next);
490
  updateThemeIcon(next);
491
+ if (typeof anime !== 'undefined') {
492
+ anime({ targets: '.theme-toggle', rotate: [0, 360], duration: 400, easing: 'easeInOutQuad' });
493
+ }
 
 
 
494
  }
495
 
496
  function updateThemeIcon(theme) {
 
520
  function initAnimations() {
521
  const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
522
  if (prefersReduced) {
523
+ document.querySelectorAll('.hero, .hero-badge, .hero-letter, .hero-glow-bg, .hero p, .hero-cta, .features-grid, .feature-card, .chat-section, .footer').forEach(el => { el.style.opacity = '1'; });
 
 
524
  return;
525
  }
526
 
527
  // Navbar slide down
528
+ anime({ targets: '.navbar', translateY: [-60, 0], opacity: [0, 1], duration: 600, easing: 'easeOutExpo' });
 
 
 
 
 
 
529
 
530
+ // Hero timeline
531
  const heroTL = anime.timeline({ easing: 'easeOutExpo' });
532
  heroTL
533
+ .add({ targets: '.hero-badge', opacity: [0, 1], translateY: [15, 0], scale: [0.95, 1], duration: 500 })
534
+ .add({ targets: '.hero-glow-bg', opacity: [0, 1], scale: [0.8, 1], duration: 800, easing: 'easeOutQuad' }, '-=300')
535
+ .add({ targets: '.hero-letter', opacity: [0, 1], translateY: [40, 0], scale: [0.8, 1], delay: anime.stagger(80, { start: 100 }), duration: 800, easing: 'easeOutElastic(1, .6)' }, '-=600')
536
+ .add({ targets: '.hero p', opacity: [0, 1], translateY: [20, 0], duration: 600 }, '-=400')
537
+ .add({ targets: '.hero-cta', opacity: [0, 1], translateY: [20, 0], duration: 600 }, '-=350');
538
+
539
+ // Floating orbs
540
+ anime({ targets: 'body::after', translateX: ['-52%', '-48%'], translateY: ['-2%', '2%'], duration: 8000, loop: true, direction: 'alternate', easing: 'easeInOutSine' });
541
+
542
+ // Features scroll
543
+ anime.scroll('.features', { repeat: false, threshold: 0.2, onEnter: () => {
544
+ anime({ targets: '.feature-card', opacity: [0, 1], translateY: [30, 0], delay: anime.stagger(120, { start: 100 }), duration: 700, easing: 'easeOutExpo' });
545
+ }});
546
+
547
+ // Chat scroll
548
+ anime.scroll('.chat-section', { repeat: false, threshold: 0.15, onEnter: () => {
549
+ anime({ targets: '.chat-container', opacity: [0, 1], translateY: [25, 0], scale: [0.98, 1], duration: 600, easing: 'easeOutExpo' });
550
+ }});
551
+
552
+ // Footer scroll
553
+ anime.scroll('.footer', { repeat: false, threshold: 0.5, onEnter: () => {
554
+ anime({ targets: '.footer', opacity: [0, 1], translateY: [15, 0], duration: 500, easing: 'easeOutExpo' });
555
+ }});
556
+
557
+ // Button hover
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
558
  document.querySelectorAll('.btn-primary').forEach(btn => {
559
+ btn.addEventListener('mouseenter', () => anime({ targets: btn, scale: 1.03, duration: 200, easing: 'easeOutQuad' }));
560
+ btn.addEventListener('mouseleave', () => anime({ targets: btn, scale: 1, duration: 200, easing: 'easeOutQuad' }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
  });
 
562
  document.querySelectorAll('.btn-secondary').forEach(btn => {
563
+ btn.addEventListener('mouseenter', () => anime({ targets: btn, scale: 1.02, duration: 200, easing: 'easeOutQuad' }));
564
+ btn.addEventListener('mouseleave', () => anime({ targets: btn, scale: 1, duration: 200, easing: 'easeOutQuad' }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565
  });
566
 
567
+ // Card hover
568
  document.querySelectorAll('.feature-card').forEach(card => {
569
+ card.addEventListener('mouseenter', () => anime({ targets: card.querySelector('.feature-icon'), scale: 1.1, rotate: '5deg', duration: 300, easing: 'easeOutQuad' }));
570
+ card.addEventListener('mouseleave', () => anime({ targets: card.querySelector('.feature-icon'), scale: 1, rotate: '0deg', duration: 300, easing: 'easeOutQuad' }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
  });
572
 
573
  // Logo pulse
574
+ anime({ targets: '.navbar-logo', boxShadow: ['0 0 20px rgba(34,197,94,0.15)', '0 0 35px rgba(34,197,94,0.3)', '0 0 20px rgba(34,197,94,0.15)'], duration: 3000, loop: true, easing: 'easeInOutSine' });
 
 
 
 
 
 
 
 
 
 
575
 
576
  // Badge dot pulse
577
+ anime({ targets: '.hero-badge-dot', scale: [1, 1.3, 1], opacity: [1, 0.6, 1], duration: 2000, loop: true, easing: 'easeInOutSine' });
 
 
 
 
 
 
 
578
 
579
+ // Chat dot pulse
580
+ anime({ targets: '.chat-header-dot', scale: [1, 1.4, 1], opacity: [1, 0.5, 1], duration: 2500, loop: true, easing: 'easeInOutSine' });
 
 
 
 
 
 
 
581
  }
582
 
583
+ document.addEventListener('DOMContentLoaded', () => { initTheme(); setupNavbar(); });
 
 
 
584
  """
585
 
586
  # ─── App ──────────────────────────────────────────────────────────────────────
 
621
  shadow_drop_lg="none",
622
  )
623
  ) as demo:
624
+ # ──��� Hero ─────────────────────────────────────────────────────────────
625
  gr.HTML("""
626
  <section class="hero">
627
  <div class="hero-badge">
 
629
  Powered by Featherless AI
630
  </div>
631
  <div class="hero-title-container">
632
+ <h1 class="hero-title">
633
  <span class="hero-letter">Y</span><span class="hero-letter">u</span><span class="hero-letter">u</span><span class="hero-letter">k</span><span class="hero-letter">i</span><span class="hero-space"> </span><span class="hero-letter">R</span><span class="hero-letter">x</span><span class="hero-letter">G</span>
634
  </h1>
635
  <div class="hero-glow-bg"></div>
 
652
  </section>
653
  """)
654
 
655
+ # ─── Features ─────────────────────────────────────────────────────────
656
  gr.HTML("""
657
  <section class="features">
658
  <div class="features-grid">
 
681
  </section>
682
  """)
683
 
684
+ # ─── Chat ─────────────────────────────────────────────────────────────
685
+ with gr.Column(elem_classes="chat-section"):
686
+ gr.HTML("""
687
+ <div class="chat-container" id="chat">
688
+ <div class="chat-header">
689
+ <span class="chat-header-dot"></span>
690
+ <h3>Chat con Yuuki-RxG</h3>
691
+ <span>Featherless AI</span>
692
+ </div>
693
+ </div>
694
+ """)
695
 
696
+ login_btn = gr.LoginButton("Iniciar sesiΓ³n con Hugging Face", elem_classes="auth-box")
697
+
698
+ gr.load(
699
+ "models/OpceanAI/Yuuki-RxG",
700
+ accept_token=login_btn,
701
+ provider="featherless-ai",
702
+ )
703
 
704
  # ─── Footer ───────────────────────────────────────────────────────────
705
  gr.HTML("""