XXXMARK commited on
Commit
1e520af
·
verified ·
1 Parent(s): 918bcc1

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +157 -142
index.html CHANGED
@@ -6,7 +6,9 @@
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
  <title>FLUX KLEIN | Next-Gen Generative Interface</title>
8
  <script src="https://cdn.tailwindcss.com"></script>
9
- <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
 
 
10
  <style>
11
  :root {
12
  --neon-cyan: #00f3ff;
@@ -264,22 +266,58 @@
264
  }
265
  }
266
 
267
- /* Custom scrollbar for sidebar */
 
 
 
 
 
 
 
268
  .sidebar-scroll::-webkit-scrollbar {
269
- width: 4px;
270
  }
271
 
272
  .sidebar-scroll::-webkit-scrollbar-track {
273
- background: transparent;
 
274
  }
275
 
276
  .sidebar-scroll::-webkit-scrollbar-thumb {
277
- background: rgba(0, 243, 255, 0.3);
278
- border-radius: 2px;
 
279
  }
280
 
281
  .sidebar-scroll::-webkit-scrollbar-thumb:hover {
282
- background: rgba(0, 243, 255, 0.6);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
284
  </style>
285
  </head>
@@ -293,9 +331,12 @@
293
  <!-- Header -->
294
  <header class="h-16 glass-panel border-b border-white/10 flex items-center justify-between px-6 z-20 shrink-0">
295
  <div class="flex items-center gap-3">
296
- <div class="w-8 h-8 rounded bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center shadow-[0_0_15px_rgba(0,243,255,0.5)]">
297
- <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
298
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.384-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" />
 
 
 
299
  </svg>
300
  </div>
301
  <div>
@@ -311,7 +352,8 @@
311
  </svg>
312
  How to Use
313
  </button>
314
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="text-xs text-gray-400 hover:text-cyan-400 transition-colors border border-gray-700 px-3 py-1 rounded-full hover:border-cyan-400">
 
315
  Built with anycoder
316
  </a>
317
  <div class="flex items-center gap-2 text-xs text-gray-400">
@@ -324,10 +366,12 @@
324
  <!-- Main Workspace -->
325
  <main class="flex-1 flex overflow-hidden relative z-10">
326
 
327
- <!-- Left Control Panel -->
328
- <aside class="w-80 glass-panel border-r border-white/10 flex flex-col shrink-0 transition-all duration-300 relative" id="sidebar">
329
- <!-- Scrollable Content Area -->
330
- <div class="flex-1 overflow-y-auto sidebar-scroll relative" id="sidebarContent">
 
 
331
  <!-- Prompt Section -->
332
  <div class="p-5 border-b border-white/5">
333
  <label class="flex justify-between text-xs font-semibold text-cyan-400 mb-2 uppercase tracking-wider">
@@ -388,7 +432,7 @@
388
  </div>
389
 
390
  <!-- Advanced Params -->
391
- <div class="p-5 pb-24">
392
  <label class="text-xs font-semibold text-gray-400 mb-3 uppercase tracking-wider block">Synthesis Parameters</label>
393
  <div class="grid grid-cols-2 gap-3">
394
  <div>
@@ -405,30 +449,71 @@
405
  </div>
406
  </div>
407
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  <!-- Quick Tips -->
409
  <div class="mt-5 p-3 rounded bg-cyan-500/5 border border-cyan-500/20">
410
  <div class="flex items-start gap-2">
411
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-cyan-400 mt-0.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
412
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" />
 
 
413
  </svg>
414
  <div>
415
  <p class="text-[10px] text-cyan-300 font-medium mb-1">Pro Tip</p>
416
- <p class="text-[10px] text-gray-400 leading-relaxed">Higher Main Structure values create denser base patterns. Combine with Auxiliary layers for complex results.</p>
 
417
  </div>
418
  </div>
419
  </div>
420
- </div>
421
- </div>
422
 
423
- <!-- Scroll Indicator -->
424
- <div class="scroll-indicator visible" id="scrollIndicator">
425
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-cyan-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
426
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3" />
427
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  </div>
429
 
430
  <!-- Fixed Generate Button Area -->
431
- <div class="absolute bottom-0 left-0 right-0 p-5 bg-gradient-to-t from-[#0a0a0f] via-[#0a0a0f] to-transparent pt-8">
432
  <button id="generateBtn" onclick="startGeneration()" class="w-full group relative overflow-hidden rounded bg-gradient-to-r from-cyan-600 to-blue-600 p-3 text-white font-bold tracking-widest uppercase transition-all hover:shadow-[0_0_20px_rgba(0,243,255,0.4)] active:scale-95">
433
  <span class="relative z-10 flex items-center justify-center gap-2">
434
  Execute Synthesis
@@ -473,13 +558,15 @@
473
  <canvas id="artCanvas" width="1024" height="1024" class="w-full h-full object-contain crt-flicker"></canvas>
474
 
475
  <!-- Overlay UI -->
476
- <div id="canvasOverlay" class="absolute inset-0 flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm transition-opacity duration-500 z-20">
 
477
  <div class="text-cyan-400 font-mono text-xs mb-2 tracking-widest">READY TO INITIALIZE</div>
478
  <div class="text-gray-500 text-xs">Awaiting Input Stream...</div>
479
  </div>
480
 
481
  <!-- Loading State -->
482
- <div id="loadingState" class="absolute inset-0 flex flex-col items-center justify-center bg-black/90 z-30 hidden">
 
483
  <div class="loader-ring mb-4">
484
  <div></div>
485
  <div></div>
@@ -506,14 +593,16 @@
506
 
507
  <div class="flex-1 overflow-y-auto p-3 space-y-3" id="archiveList">
508
  <!-- Archive Item Template -->
509
- <div class="group relative aspect-square rounded border border-white/5 bg-black/40 overflow-hidden cursor-pointer hover:border-cyan-500/50 transition-all">
 
510
  <img src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=400&auto=format&fit=crop" class="w-full h-full object-cover opacity-60 group-hover:opacity-100 transition-opacity grayscale group-hover:grayscale-0">
511
  <div class="absolute bottom-0 left-0 w-full bg-gradient-to-t from-black to-transparent p-2">
512
  <div class="text-[10px] text-white truncate">Neon Genesis</div>
513
  <div class="text-[9px] text-gray-500">02:14 PM</div>
514
  </div>
515
  </div>
516
- <div class="group relative aspect-square rounded border border-white/5 bg-black/40 overflow-hidden cursor-pointer hover:border-cyan-500/50 transition-all">
 
517
  <img src="https://images.unsplash.com/photo-1633167606207-d840b5070fc2?q=80&w=400&auto=format&fit=crop" class="w-full h-full object-cover opacity-60 group-hover:opacity-100 transition-opacity grayscale group-hover:grayscale-0">
518
  <div class="absolute bottom-0 left-0 w-full bg-gradient-to-t from-black to-transparent p-2">
519
  <div class="text-[10px] text-white truncate">Quantum Flux</div>
@@ -528,11 +617,15 @@
528
  <!-- How to Use Guide Modal -->
529
  <div class="guide-modal" id="guideModal">
530
  <div class="glass-panel rounded-lg w-full max-w-2xl mx-4 guide-content">
531
- <div class="p-6 border-b border-white/10 flex items-center justify-between sticky top-0 bg-[#0a0a0f]/95 backdrop-blur-sm z-10">
 
532
  <div class="flex items-center gap-3">
533
- <div class="w-10 h-10 rounded-lg bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center">
534
- <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
535
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
 
 
 
536
  </svg>
537
  </div>
538
  <div>
@@ -551,13 +644,15 @@
551
  <!-- Quick Start -->
552
  <div class="p-4 rounded-lg bg-cyan-500/5 border border-cyan-500/20">
553
  <h3 class="text-sm font-semibold text-cyan-400 mb-2 flex items-center gap-2">
554
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
 
555
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
556
  </svg>
557
  Quick Start
558
  </h3>
559
  <ol class="text-xs text-gray-300 space-y-2 list-decimal list-inside leading-relaxed">
560
- <li>Enter a descriptive prompt in the <strong>Input Prompt</strong> field (or click Randomize for inspiration)</li>
 
561
  <li>Adjust the <strong>Reference Layers</strong> sliders to control visual complexity</li>
562
  <li>Set your preferred <strong>Seed</strong> for reproducible results, or use random</li>
563
  <li>Click <strong>Execute Synthesis</strong> to generate your artwork</li>
@@ -568,8 +663,10 @@
568
  <!-- Layer Controls -->
569
  <div>
570
  <h3 class="text-sm font-semibold text-purple-400 mb-3 flex items-center gap-2">
571
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
572
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
 
 
573
  </svg>
574
  Understanding Reference Layers
575
  </h3>
@@ -579,21 +676,24 @@
579
  <div class="w-3 h-3 rounded-full bg-purple-500"></div>
580
  <span class="text-xs font-medium text-white">Main Structure</span>
581
  </div>
582
- <p class="text-[11px] text-gray-400">Controls the density and size of base noise patterns. Higher values create more complex, dense foundational imagery with larger organic shapes.</p>
 
583
  </div>
584
  <div class="p-3 rounded bg-white/5 border border-white/10">
585
  <div class="flex items-center gap-2 mb-1">
586
  <div class="w-3 h-3 rounded-full bg-pink-500"></div>
587
  <span class="text-xs font-medium text-white">Auxiliary A (Texture)</span>
588
  </div>
589
- <p class="text-[11px] text-gray-400">Adds geometric elements—squares, triangles, and lines. Perfect for creating structured, architectural, or crystalline effects.</p>
 
590
  </div>
591
  <div class="p-3 rounded bg-white/5 border border-white/10">
592
  <div class="flex items-center gap-2 mb-1">
593
  <div class="w-3 h-3 rounded-full bg-cyan-500"></div>
594
  <span class="text-xs font-medium text-white">Auxiliary B (Lighting)</span>
595
  </div>
596
- <p class="text-[11px] text-gray-400">Injects light beams and flow-field effects using screen blending. Creates ethereal glows, aurora-like streaks, and atmospheric depth.</p>
 
597
  </div>
598
  </div>
599
  </div>
@@ -601,22 +701,28 @@
601
  <!-- Parameters -->
602
  <div>
603
  <h3 class="text-sm font-semibold text-gray-300 mb-3 flex items-center gap-2">
604
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
605
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" />
 
 
606
  </svg>
607
  Synthesis Parameters
608
  </h3>
609
  <div class="space-y-2 text-xs text-gray-400">
610
- <p><strong class="text-gray-300">Seed:</strong> A numerical starting point for the random generator. Same seed + same settings = identical output. Use this to refine or reproduce results.</p>
611
- <p><strong class="text-gray-300">Guidance:</strong> Affects how strictly the algorithm follows internal rules. Standard is balanced; High Fidelity creates cleaner edges; Abstract embraces chaos.</p>
 
 
612
  </div>
613
  </div>
614
 
615
  <!-- Tips -->
616
  <div class="p-4 rounded-lg bg-gradient-to-r from-purple-500/10 to-pink-500/10 border border-purple-500/20">
617
  <h3 class="text-sm font-semibold text-purple-300 mb-2 flex items-center gap-2">
618
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
619
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" />
 
 
620
  </svg>
621
  Pro Tips
622
  </h3>
@@ -645,7 +751,8 @@
645
  <!-- Tour Overlay -->
646
  <div class="fixed inset-0 z-50 pointer-events-none hidden" id="tourOverlay">
647
  <div class="absolute inset-0 bg-black/50"></div>
648
- <div class="absolute bg-cyan-500/20 border-2 border-cyan-400 rounded-lg transition-all duration-500" id="tourHighlight"></div>
 
649
  <div class="absolute p-4 glass-panel rounded-lg max-w-xs transition-all duration-500" id="tourTooltip">
650
  <p class="text-xs text-white mb-2" id="tourText"></p>
651
  <button onclick="nextTourStep()" class="text-xs bg-cyan-600 hover:bg-cyan-500 text-white px-3 py-1 rounded transition-colors">Next</button>
@@ -670,96 +777,4 @@
670
  };
671
  const prompts = [
672
  "Cybernetic organism in a rain-soaked metropolis",
673
- "Abstract geometric landscape floating in void",
674
- "Bioluminescent forest at midnight",
675
- "Retro-futuristic car speeding through neon tunnel",
676
- "Crystalline structure reflecting aurora borealis"
677
- ];
678
- // --- Initialization ---
679
- function resizeCanvases() {
680
- bgCanvas.width = window.innerWidth;
681
- bgCanvas.height = window.innerHeight;
682
- // Art canvas stays fixed logical size but scales via CSS
683
- }
684
- window.addEventListener('resize', resizeCanvases);
685
- resizeCanvases();
686
- // --- Sidebar Scroll Detection ---
687
- const sidebarContent = document.getElementById('sidebarContent');
688
- const scrollIndicator = document.getElementById('scrollIndicator');
689
-
690
- function updateScrollIndicator() {
691
- const scrollTop = sidebarContent.scrollTop;
692
- const scrollHeight = sidebarContent.scrollHeight - sidebarContent.clientHeight;
693
- if (scrollTop >= scrollHeight - 10) {
694
- scrollIndicator.classList.remove('visible');
695
- } else {
696
- scrollIndicator.classList.add('visible');
697
- }
698
- }
699
- sidebarContent.addEventListener('scroll', updateScrollIndicator);
700
- updateScrollIndicator();
701
- // --- Particle System for Background ---
702
- const particles = [];
703
- class Particle {
704
- constructor() {
705
- this.x = Math.random() * bgCanvas.width;
706
- this.y = Math.random() * bgCanvas.height;
707
- this.vx = (Math.random() - 0.5) * 0.5;
708
- this.vy = (Math.random() - 0.5) * 0.5;
709
- this.size = Math.random() * 2;
710
- this.color = Math.random() > 0.5 ? 'rgba(0, 243, 255, ' : 'rgba(188, 19, 254, ';
711
- }
712
- update() {
713
- this.x += this.vx;
714
- this.y += this.vy;
715
- if (this.x < 0 || this.x > bgCanvas.width) this.vx *= -1;
716
- if (this.y < 0 || this.y > bgCanvas.height) this.vy *= -1;
717
- }
718
- draw() {
719
- bgCtx.beginPath();
720
- bgCtx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
721
- bgCtx.fillStyle = this.color + (Math.random() * 0.5 + 0.1) + ')';
722
- bgCtx.fill();
723
- }
724
- }
725
- for (let i = 0; i < 50; i++) particles.push(new Particle());
726
-
727
- function animateBg() {
728
- bgCtx.clearRect(0, 0, bgCanvas.width, bgCanvas.height);
729
- particles.forEach(p => {
730
- p.update();
731
- p.draw();
732
- });
733
- // Draw connecting lines
734
- bgCtx.strokeStyle = 'rgba(255,255,255,0.03)';
735
- bgCtx.lineWidth = 1;
736
- for (let i = 0; i < particles.length; i++) {
737
- for (let j = i; j < particles.length; j++) {
738
- const dx = particles[i].x - particles[j].x;
739
- const dy = particles[i].y - particles[j].y;
740
- const dist = Math.sqrt(dx * dx + dy * dy);
741
- if (dist < 150) {
742
- bgCtx.beginPath();
743
- bgCtx.moveTo(particles[i].x, particles[i].y);
744
- bgCtx.lineTo(particles[j].x, particles[j].y);
745
- bgCtx.stroke();
746
- }
747
- }
748
- }
749
- requestAnimationFrame(animateBg);
750
- }
751
- animateBg();
752
- // --- UI Logic ---
753
- function randomizePrompt() {
754
- const r = Math.floor(Math.random() * prompts.length);
755
- document.getElementById('promptInput').value = prompts[r];
756
- }
757
-
758
- function clearPrompt() {
759
- document.getElementById('promptInput').value = '';
760
- }
761
-
762
- function updateLayer(id, val) {
763
- state.layers[id] = parseInt(val);
764
- document.getElementById(`${id}-val`).innerText = val + '%';
765
- document.getElementById(`bar-${id}`).style.width
 
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
  <title>FLUX KLEIN | Next-Gen Generative Interface</title>
8
  <script src="https://cdn.tailwindcss.com"></script>
9
+ <link
10
+ href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"
11
+ rel="stylesheet">
12
  <style>
13
  :root {
14
  --neon-cyan: #00f3ff;
 
266
  }
267
  }
268
 
269
+ /* Custom scrollbar for sidebar - FULL HEIGHT */
270
+ .sidebar-scroll {
271
+ overflow-y: auto;
272
+ overflow-x: hidden;
273
+ scrollbar-width: thin;
274
+ scrollbar-color: rgba(0, 243, 255, 0.3) transparent;
275
+ }
276
+
277
  .sidebar-scroll::-webkit-scrollbar {
278
+ width: 5px;
279
  }
280
 
281
  .sidebar-scroll::-webkit-scrollbar-track {
282
+ background: rgba(0, 0, 0, 0.3);
283
+ border-radius: 3px;
284
  }
285
 
286
  .sidebar-scroll::-webkit-scrollbar-thumb {
287
+ background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
288
+ border-radius: 3px;
289
+ box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
290
  }
291
 
292
  .sidebar-scroll::-webkit-scrollbar-thumb:hover {
293
+ background: linear-gradient(180deg, var(--neon-purple), var(--neon-cyan));
294
+ box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
295
+ }
296
+
297
+ /* Sidebar container with full height scrollbar */
298
+ .sidebar-container {
299
+ display: flex;
300
+ flex-direction: column;
301
+ height: 100%;
302
+ }
303
+
304
+ .sidebar-scroll-area {
305
+ flex: 1;
306
+ overflow-y: auto;
307
+ overflow-x: hidden;
308
+ padding-bottom: 100px;
309
+ }
310
+
311
+ /* Fixed generate button at bottom */
312
+ .generate-button-container {
313
+ position: absolute;
314
+ bottom: 0;
315
+ left: 0;
316
+ right: 0;
317
+ padding: 20px;
318
+ background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.8) 60%, transparent 100%);
319
+ backdrop-filter: blur(10px);
320
+ z-index: 10;
321
  }
322
  </style>
323
  </head>
 
331
  <!-- Header -->
332
  <header class="h-16 glass-panel border-b border-white/10 flex items-center justify-between px-6 z-20 shrink-0">
333
  <div class="flex items-center gap-3">
334
+ <div
335
+ class="w-8 h-8 rounded bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center shadow-[0_0_15px_rgba(0,243,255,0.5)]">
336
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-white" fill="none" viewBox="0 0 24 24"
337
+ stroke="currentColor">
338
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
339
+ d="M19.428 15.428a2 2 0 00-1.022-.547l-2.384-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" />
340
  </svg>
341
  </div>
342
  <div>
 
352
  </svg>
353
  How to Use
354
  </button>
355
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank"
356
+ class="text-xs text-gray-400 hover:text-cyan-400 transition-colors border border-gray-700 px-3 py-1 rounded-full hover:border-cyan-400">
357
  Built with anycoder
358
  </a>
359
  <div class="flex items-center gap-2 text-xs text-gray-400">
 
366
  <!-- Main Workspace -->
367
  <main class="flex-1 flex overflow-hidden relative z-10">
368
 
369
+ <!-- Left Control Panel with Full Height Scrollbar -->
370
+ <aside class="w-80 glass-panel border-r border-white/10 flex flex-col shrink-0 transition-all duration-300 relative sidebar-container" id="sidebar">
371
+
372
+ <!-- Scrollable Content Area - Full Height -->
373
+ <div class="sidebar-scroll sidebar-scroll-area" id="sidebarContent">
374
+
375
  <!-- Prompt Section -->
376
  <div class="p-5 border-b border-white/5">
377
  <label class="flex justify-between text-xs font-semibold text-cyan-400 mb-2 uppercase tracking-wider">
 
432
  </div>
433
 
434
  <!-- Advanced Params -->
435
+ <div class="p-5">
436
  <label class="text-xs font-semibold text-gray-400 mb-3 uppercase tracking-wider block">Synthesis Parameters</label>
437
  <div class="grid grid-cols-2 gap-3">
438
  <div>
 
449
  </div>
450
  </div>
451
 
452
+ <!-- Additional params for more scroll content -->
453
+ <div class="mt-4 space-y-3">
454
+ <div>
455
+ <label class="text-[10px] text-gray-500 block mb-1">Steps</label>
456
+ <input type="range" min="10" max="100" value="50" class="w-full">
457
+ <div class="flex justify-between text-[10px] text-gray-500 mt-1">
458
+ <span>Fast</span>
459
+ <span>Quality</span>
460
+ </div>
461
+ </div>
462
+ <div>
463
+ <label class="text-[10px] text-gray-500 block mb-1">CFG Scale</label>
464
+ <input type="range" min="1" max="20" value="7.5" step="0.5" class="w-full">
465
+ </div>
466
+ <div>
467
+ <label class="text-[10px] text-gray-500 block mb-1">Sampler</label>
468
+ <select class="w-full glass-input rounded px-2 py-1 text-xs text-gray-300 bg-black">
469
+ <option>Euler a</option>
470
+ <option>DPM++ 2M Karras</option>
471
+ <option>DDIM</option>
472
+ <option>UniPC</option>
473
+ </select>
474
+ </div>
475
+ </div>
476
+
477
  <!-- Quick Tips -->
478
  <div class="mt-5 p-3 rounded bg-cyan-500/5 border border-cyan-500/20">
479
  <div class="flex items-start gap-2">
480
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-cyan-400 mt-0.5 shrink-0" fill="none"
481
+ viewBox="0 0 24 24" stroke="currentColor">
482
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
483
+ d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" />
484
  </svg>
485
  <div>
486
  <p class="text-[10px] text-cyan-300 font-medium mb-1">Pro Tip</p>
487
+ <p class="text-[10px] text-gray-400 leading-relaxed">Higher Main Structure values create denser base
488
+ patterns. Combine with Auxiliary layers for complex results.</p>
489
  </div>
490
  </div>
491
  </div>
 
 
492
 
493
+ <!-- More content to demonstrate scroll -->
494
+ <div class="mt-5 space-y-3">
495
+ <div class="p-3 rounded bg-white/5 border border-white/10">
496
+ <label class="text-xs font-semibold text-gray-300 mb-2 block">Style Presets</label>
497
+ <div class="grid grid-cols-3 gap-2">
498
+ <button class="p-2 text-[10px] border border-white/10 rounded hover:bg-cyan-500/20 hover:border-cyan-500/50 transition-colors">Cyberpunk</button>
499
+ <button class="p-2 text-[10px] border border-white/10 rounded hover:bg-purple-500/20 hover:border-purple-500/50 transition-colors">Fantasy</button>
500
+ <button class="p-2 text-[10px] border border-white/10 rounded hover:bg-pink-500/20 hover:border-pink-500/50 transition-colors">Abstract</button>
501
+ </div>
502
+ </div>
503
+ <div class="p-3 rounded bg-white/5 border border-white/10">
504
+ <label class="text-xs font-semibold text-gray-300 mb-2 block">Aspect Ratio</label>
505
+ <div class="flex gap-2">
506
+ <button class="flex-1 p-2 text-[10px] border border-cyan-500/50 bg-cyan-500/10 rounded">1:1</button>
507
+ <button class="flex-1 p-2 text-[10px] border border-white/10 rounded hover:bg-white/5">16:9</button>
508
+ <button class="flex-1 p-2 text-[10px] border border-white/10 rounded hover:bg-white/5">9:16</button>
509
+ </div>
510
+ </div>
511
+ </div>
512
+ </div>
513
  </div>
514
 
515
  <!-- Fixed Generate Button Area -->
516
+ <div class="generate-button-container">
517
  <button id="generateBtn" onclick="startGeneration()" class="w-full group relative overflow-hidden rounded bg-gradient-to-r from-cyan-600 to-blue-600 p-3 text-white font-bold tracking-widest uppercase transition-all hover:shadow-[0_0_20px_rgba(0,243,255,0.4)] active:scale-95">
518
  <span class="relative z-10 flex items-center justify-center gap-2">
519
  Execute Synthesis
 
558
  <canvas id="artCanvas" width="1024" height="1024" class="w-full h-full object-contain crt-flicker"></canvas>
559
 
560
  <!-- Overlay UI -->
561
+ <div id="canvasOverlay"
562
+ class="absolute inset-0 flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm transition-opacity duration-500 z-20">
563
  <div class="text-cyan-400 font-mono text-xs mb-2 tracking-widest">READY TO INITIALIZE</div>
564
  <div class="text-gray-500 text-xs">Awaiting Input Stream...</div>
565
  </div>
566
 
567
  <!-- Loading State -->
568
+ <div id="loadingState"
569
+ class="absolute inset-0 flex flex-col items-center justify-center bg-black/90 z-30 hidden">
570
  <div class="loader-ring mb-4">
571
  <div></div>
572
  <div></div>
 
593
 
594
  <div class="flex-1 overflow-y-auto p-3 space-y-3" id="archiveList">
595
  <!-- Archive Item Template -->
596
+ <div
597
+ class="group relative aspect-square rounded border border-white/5 bg-black/40 overflow-hidden cursor-pointer hover:border-cyan-500/50 transition-all">
598
  <img src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=400&auto=format&fit=crop" class="w-full h-full object-cover opacity-60 group-hover:opacity-100 transition-opacity grayscale group-hover:grayscale-0">
599
  <div class="absolute bottom-0 left-0 w-full bg-gradient-to-t from-black to-transparent p-2">
600
  <div class="text-[10px] text-white truncate">Neon Genesis</div>
601
  <div class="text-[9px] text-gray-500">02:14 PM</div>
602
  </div>
603
  </div>
604
+ <div
605
+ class="group relative aspect-square rounded border border-white/5 bg-black/40 overflow-hidden cursor-pointer hover:border-cyan-500/50 transition-all">
606
  <img src="https://images.unsplash.com/photo-1633167606207-d840b5070fc2?q=80&w=400&auto=format&fit=crop" class="w-full h-full object-cover opacity-60 group-hover:opacity-100 transition-opacity grayscale group-hover:grayscale-0">
607
  <div class="absolute bottom-0 left-0 w-full bg-gradient-to-t from-black to-transparent p-2">
608
  <div class="text-[10px] text-white truncate">Quantum Flux</div>
 
617
  <!-- How to Use Guide Modal -->
618
  <div class="guide-modal" id="guideModal">
619
  <div class="glass-panel rounded-lg w-full max-w-2xl mx-4 guide-content">
620
+ <div
621
+ class="p-6 border-b border-white/10 flex items-center justify-between sticky top-0 bg-[#0a0a0f]/95 backdrop-blur-sm z-10">
622
  <div class="flex items-center gap-3">
623
+ <div
624
+ class="w-10 h-10 rounded-lg bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center">
625
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-white" fill="none" viewBox="0 0 24 24"
626
+ stroke="currentColor">
627
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
628
+ d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
629
  </svg>
630
  </div>
631
  <div>
 
644
  <!-- Quick Start -->
645
  <div class="p-4 rounded-lg bg-cyan-500/5 border border-cyan-500/20">
646
  <h3 class="text-sm font-semibold text-cyan-400 mb-2 flex items-center gap-2">
647
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
648
+ stroke="currentColor">
649
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
650
  </svg>
651
  Quick Start
652
  </h3>
653
  <ol class="text-xs text-gray-300 space-y-2 list-decimal list-inside leading-relaxed">
654
+ <li>Enter a descriptive prompt in the <strong>Input Prompt</strong> field (or click Randomize for
655
+ inspiration)</li>
656
  <li>Adjust the <strong>Reference Layers</strong> sliders to control visual complexity</li>
657
  <li>Set your preferred <strong>Seed</strong> for reproducible results, or use random</li>
658
  <li>Click <strong>Execute Synthesis</strong> to generate your artwork</li>
 
663
  <!-- Layer Controls -->
664
  <div>
665
  <h3 class="text-sm font-semibold text-purple-400 mb-3 flex items-center gap-2">
666
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
667
+ stroke="currentColor">
668
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
669
+ d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
670
  </svg>
671
  Understanding Reference Layers
672
  </h3>
 
676
  <div class="w-3 h-3 rounded-full bg-purple-500"></div>
677
  <span class="text-xs font-medium text-white">Main Structure</span>
678
  </div>
679
+ <p class="text-[11px] text-gray-400">Controls the density and size of base noise patterns. Higher values
680
+ create more complex, dense foundational imagery with larger organic shapes.</p>
681
  </div>
682
  <div class="p-3 rounded bg-white/5 border border-white/10">
683
  <div class="flex items-center gap-2 mb-1">
684
  <div class="w-3 h-3 rounded-full bg-pink-500"></div>
685
  <span class="text-xs font-medium text-white">Auxiliary A (Texture)</span>
686
  </div>
687
+ <p class="text-[11px] text-gray-400">Adds geometric elements—squares, triangles, and lines. Perfect for
688
+ creating structured, architectural, or crystalline effects.</p>
689
  </div>
690
  <div class="p-3 rounded bg-white/5 border border-white/10">
691
  <div class="flex items-center gap-2 mb-1">
692
  <div class="w-3 h-3 rounded-full bg-cyan-500"></div>
693
  <span class="text-xs font-medium text-white">Auxiliary B (Lighting)</span>
694
  </div>
695
+ <p class="text-[11px] text-gray-400">Injects light beams and flow-field effects using screen blending.
696
+ Creates ethereal glows, aurora-like streaks, and atmospheric depth.</p>
697
  </div>
698
  </div>
699
  </div>
 
701
  <!-- Parameters -->
702
  <div>
703
  <h3 class="text-sm font-semibold text-gray-300 mb-3 flex items-center gap-2">
704
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
705
+ stroke="currentColor">
706
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
707
+ d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" />
708
  </svg>
709
  Synthesis Parameters
710
  </h3>
711
  <div class="space-y-2 text-xs text-gray-400">
712
+ <p><strong class="text-gray-300">Seed:</strong> A numerical starting point for the random generator. Same
713
+ seed + same settings = identical output. Use this to refine or reproduce results.</p>
714
+ <p><strong class="text-gray-300">Guidance:</strong> Affects how strictly the algorithm follows internal
715
+ rules. Standard is balanced; High Fidelity creates cleaner edges; Abstract embraces chaos.</p>
716
  </div>
717
  </div>
718
 
719
  <!-- Tips -->
720
  <div class="p-4 rounded-lg bg-gradient-to-r from-purple-500/10 to-pink-500/10 border border-purple-500/20">
721
  <h3 class="text-sm font-semibold text-purple-300 mb-2 flex items-center gap-2">
722
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
723
+ stroke="currentColor">
724
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
725
+ d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" />
726
  </svg>
727
  Pro Tips
728
  </h3>
 
751
  <!-- Tour Overlay -->
752
  <div class="fixed inset-0 z-50 pointer-events-none hidden" id="tourOverlay">
753
  <div class="absolute inset-0 bg-black/50"></div>
754
+ <div class="absolute bg-cyan-500/20 border-2 border-cyan-400 rounded-lg transition-all duration-500"
755
+ id="tourHighlight"></div>
756
  <div class="absolute p-4 glass-panel rounded-lg max-w-xs transition-all duration-500" id="tourTooltip">
757
  <p class="text-xs text-white mb-2" id="tourText"></p>
758
  <button onclick="nextTourStep()" class="text-xs bg-cyan-600 hover:bg-cyan-500 text-white px-3 py-1 rounded transition-colors">Next</button>
 
777
  };
778
  const prompts = [
779
  "Cybernetic organism in a rain-soaked metropolis",
780
+ "Abstract