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

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +1 -778
index.html CHANGED
@@ -1,780 +1,3 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
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;
15
- --neon-pink: #ff00aa;
16
- --neon-purple: #bc13fe;
17
- --glass-bg: rgba(10, 10, 15, 0.7);
18
- --glass-border: rgba(255, 255, 255, 0.1);
19
- }
20
-
21
- body {
22
- font-family: 'Inter', sans-serif;
23
- background-color: #050505;
24
- color: #e0e0e0;
25
- overflow: hidden;
26
- }
27
-
28
- h1,
29
- h2,
30
- h3,
31
- .brand-font {
32
- font-family: 'Space Grotesk', sans-serif;
33
- }
34
-
35
- /* Custom Scrollbar */
36
- ::-webkit-scrollbar {
37
- width: 6px;
38
- }
39
-
40
- ::-webkit-scrollbar-track {
41
- background: #0a0a0a;
42
- }
43
-
44
- ::-webkit-scrollbar-thumb {
45
- background: #333;
46
- border-radius: 3px;
47
- }
48
-
49
- ::-webkit-scrollbar-thumb:hover {
50
- background: var(--neon-cyan);
51
- }
52
-
53
- /* Glassmorphism Utilities */
54
- .glass-panel {
55
- background: var(--glass-bg);
56
- backdrop-filter: blur(12px);
57
- -webkit-backdrop-filter: blur(12px);
58
- border: 1px solid var(--glass-border);
59
- box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
60
- }
61
-
62
- .glass-input {
63
- background: rgba(0, 0, 0, 0.4);
64
- border: 1px solid rgba(255, 255, 255, 0.1);
65
- transition: all 0.3s ease;
66
- }
67
-
68
- .glass-input:focus {
69
- border-color: var(--neon-cyan);
70
- box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
71
- outline: none;
72
- }
73
-
74
- /* Animations */
75
- @keyframes pulse-glow {
76
-
77
- 0%,
78
- 100% {
79
- box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
80
- }
81
-
82
- 50% {
83
- box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
84
- }
85
- }
86
-
87
- @keyframes scanline {
88
- 0% {
89
- transform: translateY(-100%);
90
- }
91
-
92
- 100% {
93
- transform: translateY(100%);
94
- }
95
- }
96
-
97
- .scanline-overlay {
98
- position: absolute;
99
- top: 0;
100
- left: 0;
101
- width: 100%;
102
- height: 100%;
103
- background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
104
- background-size: 100% 4px;
105
- pointer-events: none;
106
- z-index: 10;
107
- }
108
-
109
- .crt-flicker {
110
- animation: flicker 0.15s infinite;
111
- }
112
-
113
- @keyframes flicker {
114
- 0% {
115
- opacity: 0.97;
116
- }
117
-
118
- 50% {
119
- opacity: 1;
120
- }
121
-
122
- 100% {
123
- opacity: 0.98;
124
- }
125
- }
126
-
127
- /* Loader */
128
- .loader-ring {
129
- display: inline-block;
130
- position: relative;
131
- width: 24px;
132
- height: 24px;
133
- }
134
-
135
- .loader-ring div {
136
- box-sizing: border-box;
137
- display: block;
138
- position: absolute;
139
- width: 20px;
140
- height: 20px;
141
- margin: 2px;
142
- border: 2px solid var(--neon-cyan);
143
- border-radius: 50%;
144
- animation: loader-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
145
- border-color: var(--neon-cyan) transparent transparent transparent;
146
- }
147
-
148
- .loader-ring div:nth-child(1) {
149
- animation-delay: -0.45s;
150
- }
151
-
152
- .loader-ring div:nth-child(2) {
153
- animation-delay: -0.3s;
154
- }
155
-
156
- .loader-ring div:nth-child(3) {
157
- animation-delay: -0.15s;
158
- }
159
-
160
- @keyframes loader-ring {
161
- 0% {
162
- transform: rotate(0deg);
163
- }
164
-
165
- 100% {
166
- transform: rotate(360deg);
167
- }
168
- }
169
-
170
- /* Range Slider Styling */
171
- input[type=range] {
172
- -webkit-appearance: none;
173
- width: 100%;
174
- background: transparent;
175
- }
176
-
177
- input[type=range]::-webkit-slider-thumb {
178
- -webkit-appearance: none;
179
- height: 16px;
180
- width: 16px;
181
- border-radius: 50%;
182
- background: var(--neon-cyan);
183
- cursor: pointer;
184
- margin-top: -6px;
185
- box-shadow: 0 0 10px var(--neon-cyan);
186
- }
187
-
188
- input[type=range]::-webkit-slider-runnable-track {
189
- width: 100%;
190
- height: 4px;
191
- cursor: pointer;
192
- background: #333;
193
- border-radius: 2px;
194
- }
195
-
196
- /* Grid Background */
197
- .bg-grid {
198
- background-size: 40px 40px;
199
- background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
200
- linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
201
- mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
202
- }
203
-
204
- .layer-active {
205
- border-color: var(--neon-cyan);
206
- background: rgba(0, 243, 255, 0.1);
207
- }
208
-
209
- /* Guide Modal Styles */
210
- .guide-modal {
211
- position: fixed;
212
- inset: 0;
213
- background: rgba(0, 0, 0, 0.85);
214
- backdrop-filter: blur(8px);
215
- z-index: 100;
216
- display: flex;
217
- align-items: center;
218
- justify-content: center;
219
- opacity: 0;
220
- pointer-events: none;
221
- transition: opacity 0.3s ease;
222
- }
223
-
224
- .guide-modal.active {
225
- opacity: 1;
226
- pointer-events: auto;
227
- }
228
-
229
- .guide-content {
230
- max-height: 80vh;
231
- overflow-y: auto;
232
- }
233
-
234
- /* Scroll indicator */
235
- .scroll-indicator {
236
- position: absolute;
237
- bottom: 80px;
238
- left: 50%;
239
- transform: translateX(-50%);
240
- width: 40px;
241
- height: 40px;
242
- border-radius: 50%;
243
- background: linear-gradient(180deg, transparent 0%, rgba(0, 243, 255, 0.1) 100%);
244
- display: flex;
245
- align-items: center;
246
- justify-content: center;
247
- animation: bounce 2s infinite;
248
- pointer-events: none;
249
- opacity: 0;
250
- transition: opacity 0.3s ease;
251
- }
252
-
253
- .scroll-indicator.visible {
254
- opacity: 1;
255
- }
256
-
257
- @keyframes bounce {
258
-
259
- 0%,
260
- 100% {
261
- transform: translateX(-50%) translateY(0);
262
- }
263
-
264
- 50% {
265
- transform: translateX(-50%) translateY(-8px);
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>
324
-
325
- <body class="h-screen w-screen flex flex-col text-sm selection:bg-cyan-500 selection:text-black">
326
-
327
- <!-- Background Canvas for Particles -->
328
- <canvas id="bgCanvas" class="fixed top-0 left-0 w-full h-full -z-10"></canvas>
329
- <div class="fixed top-0 left-0 w-full h-full bg-grid -z-10 pointer-events-none"></div>
330
-
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>
343
- <h1 class="text-xl font-bold tracking-wider text-white">FLUX <span class="text-cyan-400">KLEIN</span></h1>
344
- <p class="text-[10px] text-gray-400 uppercase tracking-[0.2em]">Generative Synthesis Core v4.2</p>
345
- </div>
346
- </div>
347
-
348
- <div class="hidden md:flex items-center gap-6">
349
- <button onclick="toggleGuide()" class="flex items-center gap-2 text-xs text-cyan-400 hover:text-cyan-300 transition-colors border border-cyan-500/30 px-3 py-1.5 rounded-full hover:border-cyan-400 hover:bg-cyan-500/10">
350
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
351
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
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">
360
- <span class="w-2 h-2 rounded-full bg-green-500 animate-pulse"></span>
361
- SYSTEM ONLINE
362
- </div>
363
- </div>
364
- </header>
365
-
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">
378
- <span>Input Prompt</span>
379
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
380
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
381
- </svg>
382
- </label>
383
- <textarea id="promptInput" class="w-full h-24 glass-input rounded p-3 text-gray-200 placeholder-gray-600 resize-none focus:ring-1 focus:ring-cyan-500" placeholder="Describe your vision here... (e.g., Cyberpunk city in neon rain)"></textarea>
384
-
385
- <div class="mt-3 flex gap-2">
386
- <button onclick="randomizePrompt()" class="flex-1 py-1.5 text-xs border border-white/10 rounded hover:bg-white/5 text-gray-400 transition-colors">Randomize</button>
387
- <button onclick="clearPrompt()" class="flex-1 py-1.5 text-xs border border-white/10 rounded hover:bg-white/5 text-gray-400 transition-colors">Clear</button>
388
- </div>
389
- </div>
390
-
391
- <!-- Reference Layers -->
392
- <div class="p-5 border-b border-white/5">
393
- <label class="text-xs font-semibold text-purple-400 mb-3 uppercase tracking-wider block">Reference Layers</label>
394
-
395
- <div class="space-y-4">
396
- <!-- Layer Main -->
397
- <div class="group relative">
398
- <div class="flex items-center justify-between mb-1">
399
- <span class="text-xs text-gray-300">Main Structure</span>
400
- <span class="text-[10px] text-gray-500" id="main-val">80%</span>
401
- </div>
402
- <input type="range" min="0" max="100" value="80" class="w-full" oninput="updateLayer('main', this.value)">
403
- <div class="h-1 w-full bg-gray-800 rounded mt-1 overflow-hidden">
404
- <div id="bar-main" class="h-full bg-purple-500 transition-all duration-100" style="width: 80%"></div>
405
- </div>
406
- </div>
407
-
408
- <!-- Layer Aux A -->
409
- <div class="group relative">
410
- <div class="flex items-center justify-between mb-1">
411
- <span class="text-xs text-gray-300">Auxiliary A (Texture)</span>
412
- <span class="text-[10px] text-gray-500" id="auxa-val">45%</span>
413
- </div>
414
- <input type="range" min="0" max="100" value="45" class="w-full" oninput="updateLayer('auxa', this.value)">
415
- <div class="h-1 w-full bg-gray-800 rounded mt-1 overflow-hidden">
416
- <div id="bar-auxa" class="h-full bg-pink-500 transition-all duration-100" style="width: 45%"></div>
417
- </div>
418
- </div>
419
-
420
- <!-- Layer Aux B -->
421
- <div class="group relative">
422
- <div class="flex items-center justify-between mb-1">
423
- <span class="text-xs text-gray-300">Auxiliary B (Lighting)</span>
424
- <span class="text-[10px] text-gray-500" id="auxb-val">60%</span>
425
- </div>
426
- <input type="range" min="0" max="100" value="60" class="w-full" oninput="updateLayer('auxb', this.value)">
427
- <div class="h-1 w-full bg-gray-800 rounded mt-1 overflow-hidden">
428
- <div id="bar-auxb" class="h-full bg-cyan-500 transition-all duration-100" style="width: 60%"></div>
429
- </div>
430
- </div>
431
- </div>
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>
439
- <label class="text-[10px] text-gray-500 block mb-1">Seed</label>
440
- <input type="number" id="seedInput" class="w-full glass-input rounded px-2 py-1 text-xs text-gray-300" value="10294">
441
- </div>
442
- <div>
443
- <label class="text-[10px] text-gray-500 block mb-1">Guidance</label>
444
- <select class="w-full glass-input rounded px-2 py-1 text-xs text-gray-300 bg-black">
445
- <option>Standard</option>
446
- <option>High Fidelity</option>
447
- <option>Abstract</option>
448
- </select>
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
520
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 group-hover:translate-x-1 transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor">
521
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3" />
522
- </svg>
523
- </span>
524
- <div class="absolute inset-0 bg-white/20 translate-y-full group-hover:translate-y-0 transition-transform duration-300"></div>
525
- </button>
526
- </div>
527
- </aside>
528
-
529
- <!-- Center Canvas Area -->
530
- <section class="flex-1 relative bg-black/40 flex flex-col">
531
- <!-- Toolbar -->
532
- <div class="h-10 border-b border-white/5 flex items-center justify-between px-4 bg-black/20">
533
- <div class="flex items-center gap-4">
534
- <span class="text-xs text-gray-500">CANVAS: <span class="text-gray-300">1024x1024</span></span>
535
- <span class="text-xs text-gray-500">MODE: <span class="text-cyan-400">REALTIME</span></span>
536
- </div>
537
- <div class="flex items-center gap-2">
538
- <button onclick="downloadImage()" class="p-1.5 rounded hover:bg-white/10 text-gray-400 hover:text-white transition-colors" title="Download">
539
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
540
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
541
- </svg>
542
- </button>
543
- <button onclick="resetCanvas()" class="p-1.5 rounded hover:bg-white/10 text-gray-400 hover:text-white transition-colors" title="Reset">
544
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
545
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
546
- </svg>
547
- </button>
548
- </div>
549
- </div>
550
-
551
- <!-- The Canvas -->
552
- <div class="flex-1 relative flex items-center justify-center p-8 overflow-hidden" id="canvasContainer">
553
- <div class="relative w-full max-w-3xl aspect-square shadow-2xl border border-white/10 bg-black group">
554
- <!-- Scanlines -->
555
- <div class="scanline-overlay opacity-20"></div>
556
-
557
- <!-- Actual Drawing Canvas -->
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>
573
- <div></div>
574
- <div></div>
575
- </div>
576
- <div class="text-cyan-400 font-mono text-xs tracking-widest animate-pulse">SYNTHESIZING NEURAL PATHWAYS...
577
- </div>
578
- <div class="w-64 h-1 bg-gray-800 mt-4 rounded overflow-hidden">
579
- <div id="progressBar" class="h-full bg-cyan-500 w-0 transition-all duration-100"></div>
580
- </div>
581
- <div id="statusText" class="text-[10px] text-gray-500 mt-2 font-mono">Initializing tensors...</div>
582
- </div>
583
- </div>
584
- </div>
585
- </section>
586
-
587
- <!-- Right Archives Panel -->
588
- <aside class="w-64 glass-panel border-l border-white/10 flex flex-col shrink-0 hidden lg:flex">
589
- <div class="p-4 border-b border-white/10 flex justify-between items-center">
590
- <h3 class="text-xs font-bold text-gray-300 uppercase tracking-wider">Archives</h3>
591
- <span class="text-[10px] bg-white/10 px-2 py-0.5 rounded text-gray-400">12 Items</span>
592
- </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>
609
- <div class="text-[9px] text-gray-500">Yesterday</div>
610
- </div>
611
- </div>
612
- </div>
613
- </aside>
614
-
615
- </main>
616
-
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>
632
- <h2 class="text-lg font-bold text-white brand-font">How to Use FLUX KLEIN</h2>
633
- <p class="text-xs text-gray-400">Complete guide to generative synthesis</p>
634
- </div>
635
- </div>
636
- <button onclick="toggleGuide()" class="p-2 rounded-lg hover:bg-white/10 text-gray-400 hover:text-white transition-colors">
637
- <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
638
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
639
- </svg>
640
- </button>
641
- </div>
642
-
643
- <div class="p-6 space-y-6">
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>
659
- <li>Download or save to Archives when satisfied</li>
660
- </ol>
661
- </div>
662
-
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>
673
- <div class="grid gap-3">
674
- <div class="p-3 rounded bg-white/5 border border-white/10">
675
- <div class="flex items-center gap-2 mb-1">
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>
700
-
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>
729
- <ul class="text-xs text-gray-300 space-y-1.5 list-disc list-inside">
730
- <li>Combine low Main Structure (20-30%) with high Auxiliary B for minimalist light paintings</li>
731
- <li>Use similar seed values (e.g., 1000, 1001, 1002) to explore variations of a theme</li>
732
- <li>All three layers at maximum create intense, maximalist compositions—great for album art</li>
733
- <li>The Archives panel saves your last 20 generations automatically</li>
734
- </ul>
735
- </div>
736
- </div>
737
-
738
- <div class="p-6 border-t border-white/10 flex justify-end gap-3 sticky bottom-0 bg-[#0a0a0f]/95 backdrop-blur-sm">
739
- <button onclick="toggleGuide()" class="px-4 py-2 text-xs text-gray-400 hover:text-white transition-colors">Close</button>
740
- <button onclick="startTour(); toggleGuide();" class="px-4 py-2 text-xs bg-cyan-600 hover:bg-cyan-500 text-white rounded transition-colors flex items-center gap-2">
741
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
742
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />
743
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
744
- </svg>
745
- Start Interactive Tour
746
- </button>
747
- </div>
748
- </div>
749
- </div>
750
-
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>
759
- </div>
760
- </div>
761
-
762
- <script>
763
- // --- Configuration & State ---
764
- const canvas = document.getElementById('artCanvas');
765
- const ctx = canvas.getContext('2d');
766
- const bgCanvas = document.getElementById('bgCanvas');
767
- const bgCtx = bgCanvas.getContext('2d');
768
- let state = {
769
- prompt: '',
770
- layers: {
771
- main: 80,
772
- auxa: 45,
773
- auxb: 60
774
- },
775
- seed: 10294,
776
- isGenerating: false
777
- };
778
- const prompts = [
779
  "Cybernetic organism in a rain-soaked metropolis",
780
  "Abstract
 
1
+ const prompts = [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  "Cybernetic organism in a rain-soaked metropolis",
3
  "Abstract