File size: 25,450 Bytes
0766c66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* ============================================================

   Codle AI Platform β€” Premium Dark Theme

   Full glassmorphism + neon glow + smooth animations

   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg-deep:        #03000a;
  --bg-surface:     rgba(13, 10, 25, 0.6);
  --bg-card:        rgba(18, 12, 38, 0.65);
  --bg-glass:       rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --border:         rgba(139, 92, 246, 0.15);
  --border-bright:  rgba(236, 72, 153, 0.45);
  --indigo:         #8b5cf6;
  --indigo-bright:  #a78bfa;
  --indigo-dim:     #6d28d9;
  --violet:         #f472b6;
  --cyan:           #06b6d4;
  --emerald:        #10b981;
  --rose:           #ef4444;
  --amber:          #f59e0b;
  --text-primary:   #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted:     #64748b;
  --glow-indigo:    0 0 25px rgba(139, 92, 246, 0.4), 0 0 50px rgba(139, 92, 246, 0.15);
  --glow-pink:      0 0 25px rgba(236, 72, 153, 0.4);
  --glow-cyan:      0 0 25px rgba(6, 182, 212, 0.4);
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

body {
  background: var(--bg-deep) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  color: var(--text-primary) !important;
  overflow-x: hidden;
}

/* ── Gradio container override ───────────────────────────── */
.gradio-container {
  max-width: 1440px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

.gradio-container > .main {
  padding: 0 24px 48px !important;
}

/* ── Particle canvas (injected by JS) ───────────────────── */
#codle-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────── */
#codle-header {
  position: relative;
  background: rgba(6,8,16,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  box-shadow: 0 1px 0 rgba(99,102,241,0.12);
  z-index: 10;
}

#codle-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#codle-title {
  background: linear-gradient(90deg, #a78bfa, #f472b6, #06b6d4) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 800 !important;
  letter-spacing: 3px !important;
  animation: text-glow 4s ease-in-out infinite alternate !important;
}
@keyframes text-glow {
  from { filter: drop-shadow(0 0 2px rgba(139, 92, 246, 0.25)); }
  to { filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.65)); }
}

/* Remove old subtitle and badges β€” no longer rendered */
#codle-subtitle,
#codle-badges,
.codle-badge { display: none !important; }

/* ── Glass card base ─────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.glass-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), var(--glow-indigo);
  transform: translateY(-2px);
}

/* ── Section labels ──────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--indigo-bright);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, var(--indigo), var(--cyan));
  border-radius: 2px;
}

/* ── Tab nav (override Gradio) ───────────────────────────── */
.tab-nav {
  background: rgba(6,8,16,0.8) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  padding: 4px !important;
  margin-bottom: 20px !important;
  backdrop-filter: blur(12px) !important;
}

.tab-nav button {
  background: transparent !important;
  border: none !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 18px !important;
  transition: all var(--transition) !important;
  cursor: pointer !important;
}

.tab-nav button:hover {
  background: var(--bg-glass-hover) !important;
  color: var(--text-primary) !important;
}

.tab-nav button.selected {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(56,189,248,0.15)) !important;
  color: var(--indigo-bright) !important;
  box-shadow: 0 0 12px rgba(99,102,241,0.2) !important;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(270deg, #8b5cf6, #ec4899, #06b6d4) !important;
  background-size: 600% 600% !important;
  animation: gradient-shift 8s ease infinite !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 11px 24px !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition) !important;
  box-shadow: 0 4px 18px rgba(139,92,246,0.5) !important;
  position: relative !important;
  overflow: hidden !important;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.12));
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 8px 24px rgba(79,70,229,0.65) !important;
  filter: brightness(1.08) !important;
}

.btn-primary:hover::after { opacity: 1; }

.btn-primary:active {
  transform: translateY(0) scale(0.99) !important;
}

.btn-glass {
  background: var(--bg-glass) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
  padding: 9px 18px !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  transition: all var(--transition) !important;
  backdrop-filter: blur(8px) !important;
}

.btn-glass:hover {
  background: var(--bg-glass-hover) !important;
  border-color: var(--border-bright) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 12px rgba(99,102,241,0.15) !important;
}

/* ── Inputs & Dropdowns (Gradio override) ────────────────── */
.gr-input, input[type=text], select, textarea,
.block.svelte-1gfkfd6, .wrap.svelte-1gfkfd6 {
  background: rgba(13,17,23,0.9) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
  font-family: 'Inter', sans-serif !important;
}

.gr-input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--indigo) !important;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.14) !important;
  outline: none !important;
}

/* ── Code editor ─────────────────────────────────────────── */
.code-editor-wrap .cm-editor {
  background: #060c18 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 0.88rem !important;
}

.code-editor-wrap .cm-editor.cm-focused {
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3) !important;
}

/* ── Output markdown ─────────────────────────────────────── */
.output-panel {
  background: rgba(6,8,16,0.9) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 24px !important;
  min-height: 0;        /* removed forced min-height β€” content drives height */
  color: var(--text-primary) !important;
  line-height: 1.75 !important;
  font-size: 0.93rem !important;
}

/* Explanation tab still benefits from a comfortable minimum */
#tab-explain .output-panel {
  min-height: 280px;
}

.output-panel h1, .output-panel h2, .output-panel h3 {
  color: var(--indigo-bright) !important;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 6px !important;
  margin-bottom: 12px !important;
}

.output-panel code {
  background: rgba(30,41,59,0.8) !important;
  color: var(--cyan) !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 0.85em !important;
}

.output-panel pre {
  background: rgba(4,6,14,0.95) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 14px !important;
  overflow-x: auto;
}

.output-panel pre code {
  background: transparent !important;
  color: #e2e8f0 !important;
  padding: 0 !important;
}

.output-panel ul, .output-panel ol {
  padding-left: 22px !important;
}

.output-panel li { margin-bottom: 6px !important; }

/* ── Skeleton loader ─────────────────────────────────────── */
.skeleton-block {
  background: linear-gradient(90deg,
    rgba(30,41,59,0.5) 25%,
    rgba(51,65,85,0.6) 50%,
    rgba(30,41,59,0.5) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toast notifications ─────────────────────────────────── */
#codle-toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.codle-toast {
  background: rgba(13,17,23,0.96);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 0.87rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-indigo);
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
}

.codle-toast.toast-success { border-color: rgba(52,211,153,0.45); }
.codle-toast.toast-error   { border-color: rgba(248,113,113,0.45); }
.codle-toast.toast-info    { border-color: rgba(99,102,241,0.45); }

@keyframes toast-in {
  from { opacity:0; transform:translateX(40px) scale(0.9); }
  to   { opacity:1; transform:translateX(0) scale(1); }
}

@keyframes toast-out {
  from { opacity:1; transform:translateX(0) scale(1); }
  to   { opacity:0; transform:translateX(40px) scale(0.9); }
}

/* ── Complexity dashboard ────────────────────────────────── */
#complexity-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.complexity-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 12px !important;
  text-align: center;
  transition: all var(--transition) !important;
  cursor: default;
}

.complexity-card:hover {
  border-color: var(--border-bright) !important;
  box-shadow: 0 6px 20px rgba(139,92,246,0.28), var(--glow-indigo) !important;
  transform: translateY(-4px) scale(1.02) !important;
}

.complexity-card .badge-O {
  font-family: 'Fira Code', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--indigo-bright);
  display: block;
  margin-bottom: 4px;
}

.complexity-card .badge-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Complexity class color mapping */
.complexity-card.class-constant    .badge-O { color: var(--emerald); }
.complexity-card.class-log         .badge-O { color: var(--cyan); }
.complexity-card.class-linear      .badge-O { color: var(--indigo-bright); }
.complexity-card.class-linearithmic .badge-O { color: var(--violet); }
.complexity-card.class-quadratic   .badge-O { color: var(--amber); }
.complexity-card.class-exponential .badge-O { color: var(--rose); }

/* ── Complexity chart β€” only visible after analysis ──────── */
#complexity-chart-wrap {
  position: relative;
  width: 100%;
  height: 0;
  border: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(6,8,16,0.9);
  border-radius: var(--radius-md);
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), border 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* JS adds .has-chart to reveal it */
#complexity-chart-wrap.has-chart {
  height: 220px !important;
  border: 1px solid var(--border) !important;
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}


#complexity-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Complexity output panel β€” no wasted min-height ─────── */
#cx-output-wrap .output-panel,
.cx-report-panel {
  min-height: 0 !important;
}

/* ── Complexity placeholder text ─────────────────────────── */
.cx-placeholder {
  color: rgba(148,163,184,0.45);
  text-align: center;
  padding: 28px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ── Execution flow canvas ───────────────────────────────── */
#flow-canvas-container {
  position: relative;
  width: 100%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99,102,241,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(34,211,238,0.06) 0%, transparent 60%),
              rgba(6,8,16,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
}

#flow-canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 480px !important;
}

.flow-controls {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(6,8,16,0.8);
  border-top: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
}

.flow-controls label {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.flow-speed-slider {
  -webkit-appearance: none;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--indigo) var(--val, 50%), rgba(30,41,59,0.8) var(--val, 50%));
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.flow-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--indigo-bright);
  box-shadow: 0 0 8px var(--indigo);
  cursor: pointer;
}

/* ── Code translator split view ──────────────────────────── */
.translator-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .translator-split { grid-template-columns: 1fr; }
}

.split-pane-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  display: inline-block;
}

.split-pane-label.original  { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.split-pane-label.converted { background: rgba(34,211,238,0.12); color: #67e8f9; }

/* ── Export toolbar ──────────────────────────────────────── */
.export-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* ── Command palette ─────────────────────────────────────── */
#codle-cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,6,14,0.85);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  backdrop-filter: blur(8px);
}

#codle-cmd-overlay.open { display: flex; }

#codle-cmd-box {
  background: rgba(13,17,23,0.98);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 540px;
  max-width: 90vw;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), var(--glow-indigo);
  overflow: hidden;
  animation: cmd-in 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cmd-in {
  from { opacity:0; transform:scale(0.92) translateY(-16px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

#codle-cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.cmd-item {
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition);
  font-size: 0.88rem;
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--bg-glass-hover);
}

.cmd-item .cmd-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.cmd-item .cmd-label { color: var(--text-primary); }
.cmd-item .cmd-shortcut {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(30,41,59,0.6);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
}

/* ── Kbd hint strip ──────────────────────────────────────── */
#codle-kbd-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 10px 0;
  border-top: 1px solid rgba(30,41,59,0.4);
  margin-top: 8px;
}

kbd {
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(51,65,85,0.6);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Duplicate complexity chart wrap styling removed to support collapsible layout */

/* ── Gradio label override ───────────────────────────────── */
label.svelte-1b6s6s, .svelte-1gfkfd6 > label {
  color: var(--text-secondary) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.55); }

/* ── Checkbox override ───────────────────────────────────── */
input[type=checkbox] {
  accent-color: var(--indigo) !important;
  width: 16px !important;
  height: 16px !important;
}

/* ── File download button ────────────────────────────────── */
.gr-file-preview {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
}

/* ── Fade-in utility ─────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  #codle-header { padding: 14px 18px; }
  #codle-title  { font-size: 1.35rem; }
  .gradio-container > .main { padding: 0 12px 32px !important; }
}

@media (max-width: 600px) {
  #codle-badges { display: none; }
  .flow-controls { flex-direction: column; align-items: flex-start; }
}

/* Hide Gradio footer (Use via API, Built with Gradio, Settings) */
footer, .footer, .built-with-gradio, [class*="footer"] {
  display: none !important;
}

/* Glass card styling for layouts */
.glass-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  padding: 24px !important;
  margin-bottom: 24px !important;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition) !important;
}

.glass-card:hover {
  border-color: var(--border-bright) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), var(--glow-indigo) !important;
  transform: translateY(-2px) !important;
}

/* Premium styling for Gradio Examples & Datasets */
.gr-samples, .gr-examples, div[class*="examples-container"] {
  background: transparent !important;
  border: none !important;
  margin-top: 16px !important;
}

.gr-samples table, .gr-examples table, table[class*="table"] {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

.gr-samples th, .gr-examples th, th[class*="table-header"] {
  background: rgba(6,8,16,0.92) !important;
  color: var(--indigo-bright) !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  padding: 14px 20px !important;
  border-bottom: 1px solid var(--border) !important;
  text-align: left !important;
}

.gr-samples td, .gr-examples td, td[class*="table-cell"] {
  padding: 14px 20px !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid rgba(99,102,241,0.08) !important;
  background: rgba(13,17,23,0.3) !important;
  transition: all var(--transition) !important;
  font-size: 0.85rem !important;
}

.gr-samples tr:last-child td, .gr-examples tr:last-child td {
  border-bottom: none !important;
}

.gr-samples tr:hover td, .gr-examples tr:hover td {
  background: rgba(99,102,241,0.06) !important;
  color: var(--text-primary) !important;
  cursor: pointer !important;
}

/* Glowing outline for inputs on focus */
.gr-input:focus, input:focus, select:focus, textarea:focus, .cm-editor.cm-focused {
  border-color: var(--indigo-bright) !important;
  box-shadow: 0 0 15px rgba(99,102,241,0.38) !important;
}