resumesearch commited on
Commit
fe23536
·
verified ·
1 Parent(s): ba97fd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +148 -214
app.py CHANGED
@@ -109,13 +109,22 @@ def safe_chat_stream(convo: List[Dict], max_ctx: int, max_rep: int, models: List
109
  if not trimmed_convo or count_tokens(" ".join([msg["content"] for msg in trimmed_convo]), m) > current_model_max_context:
110
  raise ValueError(f"Conversation too long for model '{m}' even after trimming. Max context: {current_model_max_context} tokens.")
111
 
112
- stream = client.chat.completions.create(
113
- model=m,
114
- messages=trimmed_convo,
115
- max_tokens=max_rep,
116
- temperature=TEMPERATURE,
117
- stream=True,
118
- )
 
 
 
 
 
 
 
 
 
119
  reply = ""
120
  for chunk in stream:
121
  delta = chunk.choices[0].delta.content or ""
@@ -124,12 +133,17 @@ def safe_chat_stream(convo: List[Dict], max_ctx: int, max_rep: int, models: List
124
 
125
  usage = None
126
  try:
127
- usage_resp = client.chat.completions.create(
128
- model=m,
129
- messages=trimmed_convo + [{"role": "assistant", "content": reply}],
130
- max_tokens=1,
131
- temperature=0,
132
- )
 
 
 
 
 
133
  usage = usage_resp.usage
134
  except Exception:
135
  prompt_tokens_est = count_tokens(" ".join([msg["content"] for msg in trimmed_convo]), m)
@@ -244,7 +258,10 @@ SYNTHWAVE_CSS = """
244
  /* Global green synthwave styles */
245
  html.dark.gradio-container,
246
  body.gradio-container {
247
- background: linear-gradient(to bottom, #000a0a 0%, #001a1a 40%, #003333 70%, #004d4d 100%) !important;
 
 
 
248
  background-attachment: fixed !important;
249
  font-family: 'Exo 2', 'Orbitron', monospace !important;
250
  color: #ff1493 !important; /* HOT PINK for all text */
@@ -253,19 +270,20 @@ body.gradio-container {
253
  }
254
 
255
  /* Multiple animated elements for depth */
256
- body.gradio-container::before {
257
- content: "";
258
  position: fixed;
259
- top: 0;
260
  left: 0;
261
  width: 100%;
262
- height: 100%;
263
  background-image:
264
- linear-gradient(rgba(0, 255, 136, 0.03) 2px, transparent 2px),
265
- linear-gradient(90deg, rgba(0, 255, 136, 0.03) 2px, transparent 2px);
266
  background-size: 50px 50px;
267
- animation: grid-move 10s linear infinite;
 
268
  z-index: -1;
 
269
  }
270
 
271
  /* Animated stars */
@@ -277,19 +295,15 @@ body.gradio-container::after {
277
  width: 100%;
278
  height: 100%;
279
  background-image:
280
- radial-gradient(2px 2px at 20px 30px, #00ff88, transparent),
281
- radial-gradient(2px 2px at 40px 70px, #00ffcc, transparent),
282
- radial-gradient(1px 1px at 50px 90px, white, transparent),
283
- radial-gradient(1px 1px at 130px 40px, white, transparent);
284
  background-repeat: repeat;
285
  background-size: 200px 200px;
286
- animation: stars-move 200s linear infinite;
287
  z-index: -2;
288
- }
289
-
290
- @keyframes grid-move {
291
- 0% { transform: translate(0, 0); }
292
- 100% { transform: translate(50px, 50px); }
293
  }
294
 
295
  @keyframes stars-move {
@@ -297,39 +311,48 @@ body.gradio-container::after {
297
  to { transform: translateY(-2000px); }
298
  }
299
 
300
- /* Main container with green theme */
301
  gradio-app {
302
- --background-fill-primary: rgba(0, 26, 26, 0.85) !important;
303
  --background-fill-secondary: rgba(0, 13, 13, 0.95) !important;
304
  --border-color-accent: #00ff88 !important;
305
- --border-color-primary: #00ff8833 !important;
306
  --color-accent: #00ff88 !important;
307
  --color-text-primary: #ff1493 !important; /* HOT PINK */
308
  --color-text-secondary: #ff69b4 !important; /* LIGHTER HOT PINK */
309
  --button-primary-background-color: #00ff88 !important;
310
  --button-primary-text-color: #001a1a !important;
311
- --shadow-color: rgba(0, 255, 136, 0.5) !important;
312
- --block-background-fill: rgba(0, 26, 26, 0.7) !important;
313
- --block-border-color: #00ff8866 !important;
314
- --block-shadow: 0 0 30px rgba(0, 255, 136, 0.4), 0 0 60px rgba(0, 255, 204, 0.2) !important;
315
  }
316
 
317
- /* Headers with jade neon glow */
 
 
 
 
 
 
 
 
 
 
 
 
318
  h1 {
319
  font-family: 'Audiowide', cursive !important;
320
  color: #ff1493 !important; /* HOT PINK */
321
  text-shadow:
 
322
  0 0 20px #ff1493,
323
- 0 0 40px #ff1493,
324
- 0 0 60px #ff1493,
325
- 0 0 80px #ff69b4,
326
- 0 0 100px #ff69b4,
327
- 0 0 120px #ff69b4,
328
- 0 0 140px #ff69b4 !important;
329
  font-size: 4em !important;
330
  letter-spacing: 6px !important;
331
  position: relative;
332
- animation: jade-glow 2s ease-in-out infinite alternate;
333
  }
334
 
335
  h1::before {
@@ -341,24 +364,16 @@ h1::before {
341
  background: none;
342
  color: #ff1493;
343
  text-shadow:
 
344
  0 0 20px #ff1493,
345
- 0 0 40px #ff1493,
346
- 0 0 60px #ff1493,
347
- 0 0 80px #ff69b4,
348
- 0 0 100px #ff69b4,
349
- 0 0 120px #ff69b4,
350
- 0 0 140px #ff69b4;
351
- filter: blur(3px);
352
- }
353
-
354
- @keyframes jade-glow {
355
- from { filter: brightness(1) drop-shadow(0 0 20px #00ff88); }
356
- to { filter: brightness(1.2) drop-shadow(0 0 40px #00ffcc); }
357
  }
358
 
359
  h2, h3, h4, h5, h6 {
360
  color: #ff1493 !important; /* HOT PINK */
361
- text-shadow: 0 0 15px #ff1493 !important;
362
  font-family: 'Exo 2', sans-serif !important;
363
  font-weight: 700 !important;
364
  letter-spacing: 2px !important;
@@ -375,131 +390,85 @@ p, .prose {
375
 
376
  /* Input fields with jade synthwave style */
377
  input[type="text"], textarea, select, .gr-dropdown {
378
- background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 204, 0.05) 100%) !important;
379
- border: 2px solid #00ff88 !important;
380
  color: #ff1493 !important; /* HOT PINK */
381
  box-shadow:
382
- inset 0 0 20px rgba(0, 255, 136, 0.2),
383
- 0 0 30px rgba(0, 255, 136, 0.3) !important;
384
  backdrop-filter: blur(10px) !important;
385
  font-family: 'Exo 2', monospace !important;
386
  font-size: 1.1em !important;
387
  font-weight: 400 !important;
388
  padding: 12px !important;
 
389
  }
390
 
391
  input[type="text"]:focus, textarea:focus {
392
  border-color: #00ffcc !important;
393
  box-shadow:
394
- inset 0 0 30px rgba(0, 255, 204, 0.3),
395
- 0 0 40px rgba(0, 255, 204, 0.5) !important;
396
  color: #ff1493 !important; /* HOT PINK */
397
- background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 204, 0.1) 100%) !important;
398
  }
399
 
400
- /* Chatbot styling with jade theme */
401
  #component-chat {
402
- background: linear-gradient(135deg, rgba(0, 26, 26, 0.8) 0%, rgba(0, 51, 51, 0.6) 100%) !important;
403
  border: 2px solid #00ff8866 !important;
404
  box-shadow:
405
- 0 0 40px rgba(0, 255, 136, 0.3),
406
- inset 0 0 40px rgba(0, 255, 136, 0.1) !important;
407
  position: relative;
408
  overflow: hidden;
409
  }
410
 
411
- #component-chat::before {
412
- content: "";
413
- position: absolute;
414
- top: -50%;
415
- left: -50%;
416
- width: 200%;
417
- height: 200%;
418
- background: linear-gradient(45deg, transparent, #00ff8811, transparent);
419
- animation: chat-shine 3s linear infinite;
420
- }
421
-
422
- @keyframes chat-shine {
423
- 0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
424
- 100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
425
- }
426
-
427
  #component-chat .message.user {
428
- background: linear-gradient(135deg, #00ff8833 0%, #00cc6633 100%) !important;
429
  color: #ff1493 !important; /* HOT PINK */
430
- border: 1px solid #00ff8866 !important;
431
- box-shadow: 0 0 20px rgba(0, 255, 136, 0.3) !important;
 
 
432
  font-size: 1.05em !important;
433
  font-weight: 400 !important;
434
  }
435
 
436
  #component-chat .message.bot {
437
- background: linear-gradient(135deg, #00ffcc22 0%, #0099cc22 100%) !important;
438
  color: #ff1493 !important; /* HOT PINK */
439
- border: 1px solid #00ffcc44 !important;
440
- box-shadow: 0 0 20px rgba(0, 255, 204, 0.2) !important;
 
 
441
  font-size: 1.05em !important;
442
  font-weight: 400 !important;
443
  }
444
 
445
- /* Buttons with jade energy */
446
  .gr-button-primary {
447
  background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%) !important;
448
  color: #001a1a !important;
449
  border: none !important;
450
  box-shadow:
451
- 0 0 30px rgba(0, 255, 136, 0.6),
452
- 0 4px 15px rgba(0, 0, 0, 0.3),
453
- inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
454
  text-transform: uppercase !important;
455
  letter-spacing: 3px !important;
456
  font-weight: 900 !important;
457
  font-size: 1.1em !important;
458
  position: relative;
459
  overflow: hidden;
460
- transition: all 0.3s ease !important;
461
- }
462
-
463
- .gr-button-primary::before {
464
- content: "";
465
- position: absolute;
466
- top: 0;
467
- left: -100%;
468
- width: 100%;
469
- height: 100%;
470
- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
471
- transition: left 0.5s;
472
- }
473
-
474
- .gr-button-primary::after {
475
- content: "";
476
- position: absolute;
477
- top: 50%;
478
- left: 50%;
479
- width: 0;
480
- height: 0;
481
- background: rgba(255, 255, 255, 0.3);
482
- border-radius: 50%;
483
- transform: translate(-50%, -50%);
484
- transition: width 0.6s, height 0.6s;
485
- }
486
-
487
- .gr-button-primary:hover::before {
488
- left: 100%;
489
- }
490
-
491
- .gr-button-primary:hover::after {
492
- width: 300px;
493
- height: 300px;
494
  }
495
 
496
  .gr-button-primary:hover {
497
  background: linear-gradient(135deg, #00ffaa 0%, #00ff88 100%) !important;
498
  box-shadow:
499
- 0 0 50px rgba(0, 255, 136, 0.8),
500
- 0 4px 20px rgba(0, 0, 0, 0.4),
501
- inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
502
- transform: translateY(-2px) scale(1.02);
503
  }
504
 
505
  .gr-button-secondary {
@@ -507,40 +476,21 @@ input[type="text"]:focus, textarea:focus {
507
  color: #ff1493 !important; /* HOT PINK */
508
  border: 2px solid #00ffcc !important;
509
  box-shadow:
510
- 0 0 20px rgba(0, 255, 204, 0.4),
511
- inset 0 0 20px rgba(0, 255, 204, 0.1) !important;
512
  text-transform: uppercase !important;
513
  letter-spacing: 2px !important;
514
  font-weight: 700 !important;
515
  font-size: 1em !important;
516
- position: relative;
517
- overflow: hidden;
518
- transition: all 0.3s ease !important;
519
- }
520
-
521
- .gr-button-secondary::before {
522
- content: "";
523
- position: absolute;
524
- top: 50%;
525
- left: 50%;
526
- width: 0;
527
- height: 100%;
528
- background: rgba(0, 255, 204, 0.2);
529
- transform: translate(-50%, -50%);
530
- transition: width 0.3s;
531
- }
532
-
533
- .gr-button-secondary:hover::before {
534
- width: 100%;
535
  }
536
 
537
  .gr-button-secondary:hover {
538
  background: rgba(0, 255, 204, 0.1) !important;
539
  color: #ff69b4 !important; /* LIGHTER HOT PINK on hover */
540
  box-shadow:
541
- 0 0 30px rgba(0, 255, 204, 0.6),
542
- inset 0 0 25px rgba(0, 255, 204, 0.2) !important;
543
- transform: scale(1.05);
544
  }
545
 
546
  /* Sliders with jade glow */
@@ -596,48 +546,23 @@ input[type="text"]:focus, textarea:focus {
596
  background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 204, 0.15) 100%) !important;
597
  }
598
 
599
- /* Status display with jade pulse */
600
  #status_display {
601
- background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 255, 204, 0.15) 100%) !important;
602
  border: 2px solid #00ff88 !important;
603
  color: #ff1493 !important; /* HOT PINK */
604
- text-shadow: 0 0 10px rgba(255, 20, 147, 0.8) !important;
605
  padding: 20px !important;
606
  margin: 30px 0 !important;
607
  box-shadow:
608
- 0 0 40px rgba(0, 255, 136, 0.4),
609
- inset 0 0 30px rgba(0, 255, 136, 0.1) !important;
610
  font-weight: 700 !important;
611
  text-transform: uppercase !important;
612
  letter-spacing: 2px !important;
613
  font-size: 1.2em !important;
614
  position: relative;
615
  overflow: hidden;
616
- animation: status-pulse 2s ease-in-out infinite;
617
- }
618
-
619
- @keyframes status-pulse {
620
- 0%, 100% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.4), inset 0 0 30px rgba(0, 255, 136, 0.1); }
621
- 50% { box-shadow: 0 0 60px rgba(0, 255, 136, 0.6), inset 0 0 40px rgba(0, 255, 136, 0.2); }
622
- }
623
-
624
- #status_display::before {
625
- content: "";
626
- position: absolute;
627
- top: -2px;
628
- left: -2px;
629
- right: -2px;
630
- bottom: -2px;
631
- background: linear-gradient(45deg, #00ff88, #00ffcc, #00ff88);
632
- z-index: -1;
633
- opacity: 0.7;
634
- filter: blur(10px);
635
- animation: status-border 3s linear infinite;
636
- }
637
-
638
- @keyframes status-border {
639
- 0% { transform: rotate(0deg); }
640
- 100% { transform: rotate(360deg); }
641
  }
642
 
643
  /* File upload with jade style */
@@ -884,26 +809,37 @@ function forceDarkMode() {
884
  }
885
  document.addEventListener('DOMContentLoaded', forceDarkMode);
886
 
887
- // Add jade orb element and animations
888
  document.addEventListener('DOMContentLoaded', () => {
 
 
 
 
 
 
 
 
 
 
889
  // Create jade orb
890
  const orb = document.createElement('div');
891
  orb.className = 'jade-orb';
892
  document.body.appendChild(orb);
893
 
894
- // Create floating particles
895
- for (let i = 0; i < 30; i++) {
896
  const particle = document.createElement('div');
897
  particle.style.position = 'fixed';
898
- particle.style.width = Math.random() * 4 + 'px';
899
  particle.style.height = particle.style.width;
900
- particle.style.background = i % 2 === 0 ? '#ff1493' : '#ff69b4'; // Hot pink particles
901
  particle.style.borderRadius = '50%';
902
  particle.style.left = Math.random() * 100 + '%';
903
  particle.style.top = Math.random() * 100 + '%';
904
- particle.style.boxShadow = `0 0 ${Math.random() * 10 + 5}px currentColor`;
905
- particle.style.animation = `particle-float ${Math.random() * 20 + 10}s linear infinite`;
906
  particle.style.zIndex = '-1';
 
907
  document.body.appendChild(particle);
908
  }
909
 
@@ -921,29 +857,27 @@ const style = document.createElement('style');
921
  style.textContent = `
922
  @keyframes particle-float {
923
  from { transform: translateY(100vh) rotate(0deg); opacity: 0; }
924
- 10% { opacity: 1; }
925
- 90% { opacity: 1; }
926
- to { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
927
  }
928
  `;
929
  document.head.appendChild(style);
930
 
931
- // Add subtle CRT flicker effect
932
- setInterval(() => {
933
- if (Math.random() > 0.98) {
934
- document.body.style.opacity = '0.99';
935
- setTimeout(() => { document.body.style.opacity = '1'; }, 50);
936
- }
937
- }, 100);
938
-
939
- // Dynamic glow effect on mouse
940
- document.addEventListener('mousemove', (e) => {
941
- const glow = document.querySelector('.jade-orb');
942
- if (glow) {
943
- const x = (e.clientX / window.innerWidth - 0.5) * 30;
944
- const y = (e.clientY / window.innerHeight - 0.5) * 30;
945
- glow.style.transform = `translate(${x}px, ${y}px)`;
946
- }
947
  });
948
  """
949
 
 
109
  if not trimmed_convo or count_tokens(" ".join([msg["content"] for msg in trimmed_convo]), m) > current_model_max_context:
110
  raise ValueError(f"Conversation too long for model '{m}' even after trimming. Max context: {current_model_max_context} tokens.")
111
 
112
+ # Use appropriate parameter based on model
113
+ completion_params = {
114
+ "model": m,
115
+ "messages": trimmed_convo,
116
+ "temperature": TEMPERATURE,
117
+ "stream": True,
118
+ }
119
+
120
+ # Check if model needs max_completion_tokens instead of max_tokens
121
+ if m in ["o4-mini", "o3", "o3-pro"]:
122
+ completion_params["max_completion_tokens"] = max_rep
123
+ else:
124
+ completion_params["max_tokens"] = max_rep
125
+
126
+ stream = client.chat.completions.create(**completion_params)
127
+
128
  reply = ""
129
  for chunk in stream:
130
  delta = chunk.choices[0].delta.content or ""
 
133
 
134
  usage = None
135
  try:
136
+ usage_params = {
137
+ "model": m,
138
+ "messages": trimmed_convo + [{"role": "assistant", "content": reply}],
139
+ "temperature": 0,
140
+ }
141
+ if m in ["o4-mini", "o3", "o3-pro"]:
142
+ usage_params["max_completion_tokens"] = 1
143
+ else:
144
+ usage_params["max_tokens"] = 1
145
+
146
+ usage_resp = client.chat.completions.create(**usage_params)
147
  usage = usage_resp.usage
148
  except Exception:
149
  prompt_tokens_est = count_tokens(" ".join([msg["content"] for msg in trimmed_convo]), m)
 
258
  /* Global green synthwave styles */
259
  html.dark.gradio-container,
260
  body.gradio-container {
261
+ background:
262
+ radial-gradient(ellipse at top, #001a1a 0%, transparent 60%),
263
+ radial-gradient(ellipse at bottom, #004d4d 0%, transparent 60%),
264
+ linear-gradient(to bottom, #000a0a 0%, #001a1a 30%, #002626 60%, #003333 100%) !important;
265
  background-attachment: fixed !important;
266
  font-family: 'Exo 2', 'Orbitron', monospace !important;
267
  color: #ff1493 !important; /* HOT PINK for all text */
 
270
  }
271
 
272
  /* Multiple animated elements for depth */
273
+ .grid-background {
 
274
  position: fixed;
275
+ bottom: 0;
276
  left: 0;
277
  width: 100%;
278
+ height: 50%;
279
  background-image:
280
+ linear-gradient(rgba(0, 255, 136, 0.02) 1px, transparent 1px),
281
+ linear-gradient(90deg, rgba(0, 255, 136, 0.02) 1px, transparent 1px);
282
  background-size: 50px 50px;
283
+ transform: perspective(400px) rotateX(70deg);
284
+ transform-origin: center bottom;
285
  z-index: -1;
286
+ opacity: 0.8;
287
  }
288
 
289
  /* Animated stars */
 
295
  width: 100%;
296
  height: 100%;
297
  background-image:
298
+ radial-gradient(1px 1px at 20px 30px, #00ff8866, transparent),
299
+ radial-gradient(1px 1px at 40px 70px, #00ffcc66, transparent),
300
+ radial-gradient(0.5px 0.5px at 50px 90px, #ffffff44, transparent),
301
+ radial-gradient(0.5px 0.5px at 130px 40px, #ffffff44, transparent);
302
  background-repeat: repeat;
303
  background-size: 200px 200px;
304
+ animation: stars-move 600s linear infinite; /* Very slow */
305
  z-index: -2;
306
+ opacity: 0.4;
 
 
 
 
307
  }
308
 
309
  @keyframes stars-move {
 
311
  to { transform: translateY(-2000px); }
312
  }
313
 
314
+ /* Main container with green theme - refined */
315
  gradio-app {
316
+ --background-fill-primary: rgba(0, 26, 26, 0.9) !important;
317
  --background-fill-secondary: rgba(0, 13, 13, 0.95) !important;
318
  --border-color-accent: #00ff88 !important;
319
+ --border-color-primary: #00ff8844 !important;
320
  --color-accent: #00ff88 !important;
321
  --color-text-primary: #ff1493 !important; /* HOT PINK */
322
  --color-text-secondary: #ff69b4 !important; /* LIGHTER HOT PINK */
323
  --button-primary-background-color: #00ff88 !important;
324
  --button-primary-text-color: #001a1a !important;
325
+ --shadow-color: rgba(0, 255, 136, 0.3) !important;
326
+ --block-background-fill: rgba(0, 26, 26, 0.8) !important;
327
+ --block-border-color: #00ff8855 !important;
328
+ --block-shadow: 0 8px 32px rgba(0, 255, 136, 0.15), 0 0 0 1px rgba(0, 255, 136, 0.1) !important;
329
  }
330
 
331
+ /* Add a subtle vignette effect */
332
+ .vignette-overlay {
333
+ position: fixed;
334
+ top: 0;
335
+ left: 0;
336
+ width: 100%;
337
+ height: 100%;
338
+ background: radial-gradient(circle at center, transparent 0%, rgba(0, 10, 10, 0.4) 100%);
339
+ pointer-events: none;
340
+ z-index: 10;
341
+ }
342
+
343
+ /* Headers with jade neon glow - more subtle */
344
  h1 {
345
  font-family: 'Audiowide', cursive !important;
346
  color: #ff1493 !important; /* HOT PINK */
347
  text-shadow:
348
+ 0 0 10px #ff1493,
349
  0 0 20px #ff1493,
350
+ 0 0 30px #ff69b4,
351
+ 0 0 40px #ff69b4 !important;
 
 
 
 
352
  font-size: 4em !important;
353
  letter-spacing: 6px !important;
354
  position: relative;
355
+ /* Removed pulsing animation for less distraction */
356
  }
357
 
358
  h1::before {
 
364
  background: none;
365
  color: #ff1493;
366
  text-shadow:
367
+ 0 0 10px #ff1493,
368
  0 0 20px #ff1493,
369
+ 0 0 30px #ff69b4;
370
+ filter: blur(2px);
371
+ opacity: 0.5;
 
 
 
 
 
 
 
 
 
372
  }
373
 
374
  h2, h3, h4, h5, h6 {
375
  color: #ff1493 !important; /* HOT PINK */
376
+ text-shadow: 0 0 8px #ff149350 !important; /* Softer glow */
377
  font-family: 'Exo 2', sans-serif !important;
378
  font-weight: 700 !important;
379
  letter-spacing: 2px !important;
 
390
 
391
  /* Input fields with jade synthwave style */
392
  input[type="text"], textarea, select, .gr-dropdown {
393
+ background: linear-gradient(135deg, rgba(0, 26, 26, 0.95) 0%, rgba(0, 51, 51, 0.9) 100%) !important;
394
+ border: 2px solid #00ff8866 !important;
395
  color: #ff1493 !important; /* HOT PINK */
396
  box-shadow:
397
+ inset 0 2px 8px rgba(0, 0, 0, 0.3),
398
+ 0 0 20px rgba(0, 255, 136, 0.1) !important;
399
  backdrop-filter: blur(10px) !important;
400
  font-family: 'Exo 2', monospace !important;
401
  font-size: 1.1em !important;
402
  font-weight: 400 !important;
403
  padding: 12px !important;
404
+ transition: all 0.2s ease !important;
405
  }
406
 
407
  input[type="text"]:focus, textarea:focus {
408
  border-color: #00ffcc !important;
409
  box-shadow:
410
+ inset 0 2px 8px rgba(0, 0, 0, 0.2),
411
+ 0 0 30px rgba(0, 255, 204, 0.3) !important;
412
  color: #ff1493 !important; /* HOT PINK */
413
+ background: linear-gradient(135deg, rgba(0, 51, 51, 0.95) 0%, rgba(0, 77, 77, 0.9) 100%) !important;
414
  }
415
 
416
+ /* Chatbot styling with jade theme - removed animation */
417
  #component-chat {
418
+ background: linear-gradient(135deg, rgba(0, 26, 26, 0.9) 0%, rgba(0, 51, 51, 0.7) 100%) !important;
419
  border: 2px solid #00ff8866 !important;
420
  box-shadow:
421
+ 0 0 20px rgba(0, 255, 136, 0.2),
422
+ inset 0 0 20px rgba(0, 255, 136, 0.05) !important;
423
  position: relative;
424
  overflow: hidden;
425
  }
426
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
  #component-chat .message.user {
428
+ background: linear-gradient(135deg, rgba(0, 51, 51, 0.9) 0%, rgba(0, 77, 77, 0.8) 100%) !important;
429
  color: #ff1493 !important; /* HOT PINK */
430
+ border: 1px solid #00ff8844 !important;
431
+ box-shadow:
432
+ 0 4px 12px rgba(0, 0, 0, 0.3),
433
+ 0 0 20px rgba(0, 255, 136, 0.1) !important;
434
  font-size: 1.05em !important;
435
  font-weight: 400 !important;
436
  }
437
 
438
  #component-chat .message.bot {
439
+ background: linear-gradient(135deg, rgba(0, 26, 26, 0.95) 0%, rgba(0, 51, 51, 0.9) 100%) !important;
440
  color: #ff1493 !important; /* HOT PINK */
441
+ border: 1px solid #00ffcc33 !important;
442
+ box-shadow:
443
+ 0 4px 12px rgba(0, 0, 0, 0.3),
444
+ 0 0 20px rgba(0, 255, 204, 0.1) !important;
445
  font-size: 1.05em !important;
446
  font-weight: 400 !important;
447
  }
448
 
449
+ /* Buttons with jade energy - subtle hover */
450
  .gr-button-primary {
451
  background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%) !important;
452
  color: #001a1a !important;
453
  border: none !important;
454
  box-shadow:
455
+ 0 4px 15px rgba(0, 255, 136, 0.3),
456
+ 0 2px 5px rgba(0, 0, 0, 0.2) !important;
 
457
  text-transform: uppercase !important;
458
  letter-spacing: 3px !important;
459
  font-weight: 900 !important;
460
  font-size: 1.1em !important;
461
  position: relative;
462
  overflow: hidden;
463
+ transition: all 0.2s ease !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
464
  }
465
 
466
  .gr-button-primary:hover {
467
  background: linear-gradient(135deg, #00ffaa 0%, #00ff88 100%) !important;
468
  box-shadow:
469
+ 0 6px 20px rgba(0, 255, 136, 0.4),
470
+ 0 2px 5px rgba(0, 0, 0, 0.3) !important;
471
+ transform: translateY(-1px);
 
472
  }
473
 
474
  .gr-button-secondary {
 
476
  color: #ff1493 !important; /* HOT PINK */
477
  border: 2px solid #00ffcc !important;
478
  box-shadow:
479
+ 0 0 10px rgba(0, 255, 204, 0.2),
480
+ inset 0 0 10px rgba(0, 255, 204, 0.05) !important;
481
  text-transform: uppercase !important;
482
  letter-spacing: 2px !important;
483
  font-weight: 700 !important;
484
  font-size: 1em !important;
485
+ transition: all 0.2s ease !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  }
487
 
488
  .gr-button-secondary:hover {
489
  background: rgba(0, 255, 204, 0.1) !important;
490
  color: #ff69b4 !important; /* LIGHTER HOT PINK on hover */
491
  box-shadow:
492
+ 0 0 15px rgba(0, 255, 204, 0.3),
493
+ inset 0 0 15px rgba(0, 255, 204, 0.1) !important;
 
494
  }
495
 
496
  /* Sliders with jade glow */
 
546
  background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 204, 0.15) 100%) !important;
547
  }
548
 
549
+ /* Status display with jade style - no pulsing */
550
  #status_display {
551
+ background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 204, 0.1) 100%) !important;
552
  border: 2px solid #00ff88 !important;
553
  color: #ff1493 !important; /* HOT PINK */
554
+ text-shadow: 0 0 5px rgba(255, 20, 147, 0.4) !important;
555
  padding: 20px !important;
556
  margin: 30px 0 !important;
557
  box-shadow:
558
+ 0 0 20px rgba(0, 255, 136, 0.2),
559
+ inset 0 0 15px rgba(0, 255, 136, 0.05) !important;
560
  font-weight: 700 !important;
561
  text-transform: uppercase !important;
562
  letter-spacing: 2px !important;
563
  font-size: 1.2em !important;
564
  position: relative;
565
  overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  }
567
 
568
  /* File upload with jade style */
 
809
  }
810
  document.addEventListener('DOMContentLoaded', forceDarkMode);
811
 
812
+ // Add jade orb element and minimal particles
813
  document.addEventListener('DOMContentLoaded', () => {
814
+ // Create vignette overlay
815
+ const vignette = document.createElement('div');
816
+ vignette.className = 'vignette-overlay';
817
+ document.body.appendChild(vignette);
818
+
819
+ // Create perspective grid
820
+ const grid = document.createElement('div');
821
+ grid.className = 'grid-background';
822
+ document.body.appendChild(grid);
823
+
824
  // Create jade orb
825
  const orb = document.createElement('div');
826
  orb.className = 'jade-orb';
827
  document.body.appendChild(orb);
828
 
829
+ // Create fewer, slower floating particles
830
+ for (let i = 0; i < 15; i++) {
831
  const particle = document.createElement('div');
832
  particle.style.position = 'fixed';
833
+ particle.style.width = Math.random() * 3 + 1 + 'px';
834
  particle.style.height = particle.style.width;
835
+ particle.style.background = i % 2 === 0 ? '#ff149333' : '#ff69b433'; // Semi-transparent hot pink
836
  particle.style.borderRadius = '50%';
837
  particle.style.left = Math.random() * 100 + '%';
838
  particle.style.top = Math.random() * 100 + '%';
839
+ particle.style.boxShadow = `0 0 ${Math.random() * 5 + 2}px currentColor`;
840
+ particle.style.animation = `particle-float ${Math.random() * 30 + 20}s linear infinite`;
841
  particle.style.zIndex = '-1';
842
+ particle.style.opacity = '0.3';
843
  document.body.appendChild(particle);
844
  }
845
 
 
857
  style.textContent = `
858
  @keyframes particle-float {
859
  from { transform: translateY(100vh) rotate(0deg); opacity: 0; }
860
+ 20% { opacity: 0.3; }
861
+ 80% { opacity: 0.3; }
862
+ to { transform: translateY(-100vh) rotate(180deg); opacity: 0; }
863
  }
864
  `;
865
  document.head.appendChild(style);
866
 
867
+ // Very subtle CRT flicker effect
868
+ let flickerInterval;
869
+ document.addEventListener('DOMContentLoaded', () => {
870
+ flickerInterval = setInterval(() => {
871
+ if (Math.random() > 0.995) {
872
+ document.body.style.opacity = '0.99';
873
+ setTimeout(() => { document.body.style.opacity = '1'; }, 30);
874
+ }
875
+ }, 500);
876
+ });
877
+
878
+ // Clean up on page unload
879
+ window.addEventListener('unload', () => {
880
+ if (flickerInterval) clearInterval(flickerInterval);
 
 
881
  });
882
  """
883