File size: 42,856 Bytes
a9baedd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NextGen Builder - AI-Powered Website Builder with Next.js Support</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://unpkg.com/konva@8.3.2/konva.min.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Inter', sans-serif;
        }
        
        .sidebar {
            transition: all 0.3s ease;
        }
        
        .component-item {
            transition: all 0.2s ease;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }
        
        .component-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(79, 70, 229, 0.1);
        }
        
        .dropzone {
            min-height: 300px;
            border: 2px dashed rgba(79, 70, 229, 0.3);
            transition: all 0.3s ease;
            background-color: rgba(249, 250, 251, 0.5);
        }
        
        .dropzone.active {
            border-color: #4F46E5;
            background-color: rgba(79, 70, 229, 0.05);
        }
        
        .property-panel {
            transition: all 0.3s ease;
            box-shadow: -2px 0 4px rgba(0,0,0,0.02);
        }
        
        .code-editor {
            font-family: 'Fira Code', monospace;
        }
        
        .ai-suggestion {
            animation: pulse 2s infinite;
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(124, 58, 237, 0.03) 100%);
        }
        
        .konva-stage {
            background-color: #f9fafb;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        }
        
        .template-card:hover .template-overlay {
            opacity: 1;
        }
        
        .template-overlay {
            opacity: 0;
            transition: opacity 0.3s ease;
            background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
        }
        
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.2); }
            70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
            100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
        }
        
        .gradient-text {
            background: linear-gradient(90deg, #4F46E5 0%, #9333EA 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .countdown-timer {
            font-family: 'Space Mono', monospace;
            font-weight: bold;
        }
    </style>
</head>
<body class="bg-gray-50 h-screen overflow-hidden">
    <div class="flex flex-col h-full">
        <!-- Top Navigation -->
        <header class="bg-white shadow-sm py-3 px-6 flex items-center justify-between border-b border-gray-200">
            <div class="flex items-center space-x-4">
                <div class="text-indigo-600 font-bold text-2xl flex items-center">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 mr-2" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                        <rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
                        <line x1="8" y1="21" x2="16" y2="21"></line>
                        <line x1="12" y1="17" x2="12" y2="21"></line>
                    </svg>
                    <span class="gradient-text">NextGen Builder</span>
                </div>
                <div class="hidden md:flex space-x-1">
                    <button class="px-3 py-1 rounded-md hover:bg-indigo-50 text-indigo-600 flex items-center">
                        <i class="fas fa-home mr-1"></i> Home
                    </button>
                    <button class="px-3 py-1 rounded-md hover:bg-indigo-50 text-gray-600 flex items-center">
                        <i class="fas fa-file-import mr-1"></i> Templates
                    </button>
                    <button class="px-3 py-1 rounded-md hover:bg-indigo-50 text-gray-600 flex items-center">
                        <i class="fas fa-project-diagram mr-1"></i> Projects
                    </button>
                    <button class="px-3 py-1 rounded-md hover:bg-indigo-50 text-gray-600 flex items-center">
                        <i class="fas fa-users mr-1"></i> Team
                    </button>
                </div>
            </div>
            <div class="flex items-center space-x-3">
                <div class="relative group">
                    <button class="px-3 py-1 rounded-md hover:bg-gray-100 text-gray-600 flex items-center">
                        <i class="fas fa-bell"></i>
                        <span class="absolute -top-1 -right-1 h-3 w-3 rounded-full bg-red-500"></span>
                    </button>
                    <div class="absolute right-0 mt-2 w-72 bg-white rounded-md shadow-lg py-1 z-50 invisible group-hover:visible">
                        <div class="px-4 py-2 text-sm border-b border-gray-200">Notifications</div>
                        <div class="px-4 py-2 text-sm hover:bg-gray-50">New template available</div>
                        <div class="px-4 py-2 text-sm hover:bg-gray-50">AI suggestions ready</div>
                    </div>
                </div>
                <button class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 flex items-center">
                    <i class="fas fa-rocket mr-2"></i> Deploy
                </button>
                <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 cursor-pointer">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </header>

        <!-- Main Content Area -->
        <div class="flex flex-1 overflow-hidden">
            <!-- Left Sidebar - Components -->
            <div class="sidebar w-64 bg-white border-r border-gray-200 flex flex-col">
                <div class="p-4 border-b border-gray-200">
                    <div class="flex justify-between items-center">
                        <h3 class="font-semibold text-gray-700 flex items-center">
                            <i class="fas fa-cubes mr-2 text-indigo-500"></i>
                            Components
                        </h3>
                        <div class="relative">
                            <select class="appearance-none bg-gray-100 border-0 rounded text-xs py-1 pl-2 pr-6 text-gray-600 focus:ring-0">
                                <option>All Categories</option>
                                <option>Layout</option>
                                <option>UI Elements</option>
                                <option>Media</option>
                                <option>Forms</option>
                                <option>Special</option>
                                <option>AI Components</option>
                            </select>
                            <i class="fas fa-chevron-down absolute right-1 top-1 text-xs text-gray-500 pointer-events-none"></i>
                        </div>
                    </div>
                </div>
                <div class="p-4 space-y-3 overflow-y-auto flex-1">
                    <!-- AI Components -->
                    <div class="mt-2 mb-1">
                        <h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">AI Components</h4>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-gradient-to-br from-indigo-100 to-purple-100 rounded-md flex items-center justify-center text-indigo-600 mr-3">
                                <i class="fas fa-robot"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">AI Page Generator</h4>
                                <p class="text-xs text-gray-500">Generate complete pages with AI</p>
                            </div>
                        </div>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-gradient-to-br from-blue-100 to-cyan-100 rounded-md flex items-center justify-center text-blue-600 mr-3">
                                <i class="fas fa-font"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">AI Copywriter</h4>
                                <p class="text-xs text-gray-500">Generate optimized content</p>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Layout Components -->
                    <div class="mt-4 mb-1">
                        <h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Layout</h4>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-indigo-100 rounded-md flex items-center justify-center text-indigo-600 mr-3">
                                <i class="fas fa-heading"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Header</h4>
                                <p class="text-xs text-gray-500">Navigation bar with logo</p>
                            </div>
                        </div>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-blue-100 rounded-md flex items-center justify-center text-blue-600 mr-3">
                                <i class="fas fa-image"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Hero Section</h4>
                                <p class="text-xs text-gray-500">Full-width banner</p>
                            </div>
                        </div>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-green-100 rounded-md flex items-center justify-center text-green-600 mr-3">
                                <i class="fas fa-columns"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Grid Layout</h4>
                                <p class="text-xs text-gray-500">Responsive column system</p>
                            </div>
                        </div>
                    </div>
                    
                    <!-- UI Elements -->
                    <div class="mt-4 mb-1">
                        <h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">UI Elements</h4>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-purple-100 rounded-md flex items-center justify-center text-purple-600 mr-3">
                                <i class="fas fa-icons"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Icon Set</h4>
                                <p class="text-xs text-gray-500">Font Awesome collection</p>
                            </div>
                        </div>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-yellow-100 rounded-md flex items-center justify-center text-yellow-600 mr-3">
                                <i class="fas fa-toggle-on"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Buttons</h4>
                                <p class="text-xs text-gray-500">Various button styles</p>
                            </div>
                        </div>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-red-100 rounded-md flex items-center justify-center text-red-600 mr-3">
                                <i class="fas fa-bell"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Alert Box</h4>
                                <p class="text-xs text-gray-500">Notification messages</p>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Next.js Specific -->
                    <div class="mt-4 mb-1">
                        <h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Next.js</h4>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-gray-100 rounded-md flex items-center justify-center text-gray-600 mr-3">
                                <i class="fas fa-code-branch"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">API Route</h4>
                                <p class="text-xs text-gray-500">Next.js API endpoint</p>
                            </div>
                        </div>
                    </div>
                    <div class="component-item bg-white p-3 rounded-md border border-gray-200 cursor-move" draggable="true">
                        <div class="flex items-center">
                            <div class="w-8 h-8 bg-gray-100 rounded-md flex items-center justify-center text-gray-600 mr-3">
                                <i class="fas fa-server"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-700">Server Component</h4>
                                <p class="text-xs text-gray-500">Next.js 13+ feature</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="p-4 border-t border-gray-200">
                    <button class="w-full py-2 bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-md hover:opacity-90 flex items-center justify-center">
                        <i class="fas fa-magic mr-2"></i> AI Component
                    </button>
                </div>
            </div>

            <!-- Main Canvas -->
            <div class="flex-1 flex flex-col overflow-hidden">
                <!-- Toolbar -->
                <div class="bg-white border-b border-gray-200 p-3 flex items-center justify-between">
                    <div class="flex space-x-2">
                        <button class="p-2 rounded-md hover:bg-gray-100 text-gray-600">
                            <i class="fas fa-undo"></i>
                        </button>
                        <button class="p-2 rounded-md hover:bg-gray-100 text-gray-600">
                            <i class="fas fa-redo"></i>
                        </button>
                        <button class="p-2 rounded-md hover:bg-gray-100 text-gray-600">
                            <i class="fas fa-save"></i>
                        </button>
                        <button class="p-2 rounded-md hover:bg-gray-100 text-gray-600">
                            <i class="fas fa-copy"></i>
                        </button>
                    </div>
                    <div class="flex space-x-2">
                        <button class="px-3 py-1 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-700 flex items-center">
                            <i class="fas fa-desktop mr-2"></i> Desktop
                        </button>
                        <button class="px-3 py-1 rounded-md hover:bg-gray-100 text-gray-600 flex items-center">
                            <i class="fas fa-tablet-alt mr-2"></i> Tablet
                        </button>
                        <button class="px-3 py-1 rounded-md hover:bg-gray-100 text-gray-600 flex items-center">
                            <i class="fas fa-mobile-alt mr-2"></i> Mobile
                        </button>
                    </div>
                    <div class="flex space-x-2">
                        <button class="px-3 py-1 rounded-md hover:bg-gray-100 text-gray-600 flex items-center">
                            <i class="fas fa-eye mr-2"></i> Preview
                        </button>
                        <button class="px-3 py-1 rounded-md bg-indigo-600 text-white hover:bg-indigo-700 flex items-center">
                            <i class="fas fa-code mr-2"></i> Code
                        </button>
                        <button class="px-3 py-1 rounded-md bg-gray-800 text-white hover:bg-gray-900 flex items-center">
                            <i class="fab fa-github mr-2"></i> GitHub
                        </button>
                    </div>
                </div>

                <!-- Canvas Area -->
                <div class="flex-1 overflow-auto p-6 bg-gray-100">
                    <div class="max-w-4xl mx-auto bg-white rounded-lg shadow-md overflow-hidden">
                        <!-- Dropzone for components -->
                        <div id="canvas-dropzone" class="dropzone p-6">
                            <div class="text-center py-10">
                                <i class="fas fa-arrow-circle-down text-4xl text-gray-300 mb-3"></i>
                                <p class="text-gray-500">Drag components here or click to browse templates</p>
                                <button id="import-template-btn" class="mt-4 px-4 py-2 bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-md hover:opacity-90">
                                    <i class="fas fa-file-import mr-2"></i> Import Template
                                </button>
                                <button id="ai-generate-btn" class="mt-4 ml-3 px-4 py-2 bg-gradient-to-r from-blue-600 to-cyan-600 text-white rounded-md hover:opacity-90">
                                    <i class="fas fa-robot mr-2"></i> AI Generate Page
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Right Sidebar - Properties & AI -->
            <div class="property-panel w-80 bg-white border-l border-gray-200 flex flex-col">
                <div class="p-4 border-b border-gray-200">
                    <div class="flex justify-between items-center">
                        <h3 class="font-semibold text-gray-700 flex items-center">
                            <i class="fas fa-sliders-h mr-2 text-indigo-500"></i>
                            Properties
                        </h3>
                        <div class="flex space-x-1">
                            <button class="p-1 rounded-md hover:bg-gray-100 text-gray-600">
                                <i class="fas fa-history"></i>
                            </button>
                            <button class="p-1 rounded-md hover:bg-gray-100 text-gray-600">
                                <i class="fas fa-cog"></i>
                            </button>
                            <button class="p-1 rounded-md hover:bg-gray-100 text-gray-600">
                                <i class="fas fa-expand"></i>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="flex-1 overflow-y-auto p-4 space-y-6">
                    <!-- Selected Component Properties -->
                    <div>
                        <h4 class="text-sm font-medium text-gray-500 mb-2">SELECTED COMPONENT</h4>
                        <div class="bg-gray-50 p-3 rounded-md">
                            <p class="text-gray-400 italic">No component selected</p>
                        </div>
                    </div>

                    <!-- Brand Kit -->
                    <div>
                        <h4 class="text-sm font-medium text-gray-500 mb-2">BRAND KIT</h4>
                        <div class="bg-gray-50 p-3 rounded-md">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 mr-3">
                                    <i class="fas fa-palette"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-700">Brand Colors</h4>
                                    <div class="flex mt-1 space-x-1">
                                        <div class="w-4 h-4 rounded-full bg-indigo-600"></div>
                                        <div class="w-4 h-4 rounded-full bg-purple-600"></div>
                                        <div class="w-4 h-4 rounded-full bg-gray-800"></div>
                                    </div>
                                </div>
                            </div>
                            <button class="w-full py-1 text-xs bg-white border border-gray-200 rounded-md hover:bg-gray-50">
                                Edit Brand Kit
                            </button>
                        </div>
                    </div>

                    <!-- AI Suggestions -->
                    <div class="ai-suggestion p-4 rounded-md border border-indigo-100">
                        <div class="flex items-start mb-3">
                            <div class="w-8 h-8 rounded-full bg-gradient-to-br from-indigo-100 to-purple-100 flex items-center justify-center text-indigo-600 mr-3">
                                <i class="fas fa-robot"></i>
                            </div>
                            <div>
                                <h4 class="font-medium text-indigo-700">AI Design Assistant</h4>
                                <p class="text-xs text-indigo-600">Try these suggestions</p>
                            </div>
                        </div>
                        <div class="space-y-2">
                            <button class="w-full text-left px-3 py-2 bg-white rounded-md text-sm text-gray-700 hover:bg-indigo-50 border border-indigo-100">
                                "Make this section more modern"
                            </button>
                            <button class="w-full text-left px-3 py-2 bg-white rounded-md text-sm text-gray-700 hover:bg-indigo-50 border border-indigo-100">
                                "Suggest color palette"
                            </button>
                            <button class="w-full text-left px-3 py-2 bg-white rounded-md text-sm text-gray-700 hover:bg-indigo-50 border border-indigo-100">
                                "Generate content for this component"
                            </button>
                        </div>
                        <div class="mt-3">
                            <div class="relative">
                                <input type="text" class="w-full p-2 pr-10 text-sm border border-indigo-200 rounded-md" placeholder="Ask AI for help...">
                                <button class="absolute right-2 top-2 text-indigo-600">
                                    <i class="fas fa-paper-plane"></i>
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- Export Options -->
                    <div>
                        <h4 class="text-sm font-medium text-gray-500 mb-2">EXPORT OPTIONS</h4>
                        <div class="space-y-2">
                            <button class="w-full text-left px-3 py-2 bg-white rounded-md text-sm text-gray-700 hover:bg-gray-50 border border-gray-200 flex items-center">
                                <i class="fab fa-react text-blue-500 mr-2"></i>
                                Next.js Project
                            </button>
                            <button class="w-full text-left px-3 py-2 bg-white rounded-md text-sm text-gray-700 hover:bg-gray-50 border border-gray-200 flex items-center">
                                <i class="fab fa-html5 text-orange-500 mr-2"></i>
                                Static HTML/CSS
                            </button>
                            <button class="w-full text-left px-3 py-2 bg-white rounded-md text-sm text-gray-700 hover:bg-gray-50 border border-gray-200 flex items-center">
                                <i class="fas fa-file-code text-blue-400 mr-2"></i>
                                JSON Schema
                            </button>
                        </div>
                    </div>
                </div>
                <div class="p-4 border-t border-gray-200">
                    <button class="w-full py-2 bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-md hover:opacity-90 flex items-center justify-center">
                        <i class="fas fa-download mr-2"></i> Export Project
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- AI Generation Modal -->
    <div id="ai-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] overflow-hidden">
            <div class="p-4 border-b border-gray-200 flex justify-between items-center">
                <h3 class="font-semibold text-lg">AI Page Generator</h3>
                <button class="text-gray-500 hover:text-gray-700" id="close-ai-modal">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div class="p-4">
                <div class="mb-4">
                    <label class="block text-sm font-medium text-gray-700 mb-2">Describe the page you want to create</label>
                    <textarea class="w-full p-3 border border-gray-300 rounded-md h-32" placeholder="e.g. 'A modern landing page for a SaaS product with a hero section, features grid, testimonials, and pricing table'"></textarea>
                </div>
                <div class="grid grid-cols-2 gap-4 mb-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-2">Page Type</label>
                        <select class="w-full p-2 border border-gray-300 rounded-md">
                            <option>Landing Page</option>
                            <option>Blog Post</option>
                            <option>Product Page</option>
                            <option>Portfolio</option>
                            <option>Dashboard</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-2">Style</label>
                        <select class="w-full p-2 border border-gray-300 rounded-md">
                            <option>Modern</option>
                            <option>Minimal</option>
                            <option>Corporate</option>
                            <option>Creative</option>
                            <option>Elegant</option>
                        </select>
                    </div>
                </div>
                <div class="flex justify-end">
                    <button class="px-4 py-2 bg-gradient-to-r from-blue-600 to-cyan-600 text-white rounded-md hover:opacity-90">
                        <i class="fas fa-robot mr-2"></i> Generate Page
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- Template Import Modal -->
    <div id="template-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[80vh] overflow-hidden">
            <div class="p-4 border-b border-gray-200 flex justify-between items-center">
                <h3 class="font-semibold text-lg">Import Next.js Template</h3>
                <button class="text-gray-500 hover:text-gray-700" id="close-template-modal">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div class="p-4 border-b border-gray-200">
                <div class="relative">
                    <input type="text" class="w-full p-2 pl-10 border border-gray-300 rounded-md" placeholder="Search templates...">
                    <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
                </div>
            </div>
            <div class="p-4">
                <div class="mb-4">
                    <h4 class="font-medium text-gray-700 mb-2">Import Source</h4>
                    <div class="grid grid-cols-3 gap-4">
                        <div class="border border-gray-200 rounded-md p-4 text-center cursor-pointer hover:bg-gray-50">
                            <i class="fas fa-file-import text-3xl text-indigo-500 mb-2"></i>
                            <p class="text-sm">Local File</p>
                        </div>
                        <div class="border border-gray-200 rounded-md p-4 text-center cursor-pointer hover:bg-gray-50">
                            <i class="fab fa-github text-3xl text-gray-800 mb-2"></i>
                            <p class="text-sm">GitHub Repo</p>
                        </div>
                        <div class="border border-gray-200 rounded-md p-4 text-center cursor-pointer hover:bg-gray-50">
                            <i class="fas fa-cloud text-3xl text-blue-500 mb-2"></i>
                            <p class="text-sm">Template Library</p>
                        </div>
                    </div>
                </div>
                
                <h4 class="font-medium text-gray-700 mb-2">Popular Templates</h4>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="template-list">
                    <div class="template-card border border-gray-200 rounded-md overflow-hidden hover:shadow-md transition-shadow cursor-pointer relative h-48">
                        <div class="template-overlay absolute inset-0 flex items-end p-4">
                            <div>
                                <h4 class="font-medium text-white">SaaS Landing</h4>
                                <p class="text-xs text-gray-200">Modern Next.js template</p>
                            </div>
                        </div>
                    </div>
                    <div class="template-card border border-gray-200 rounded-md overflow-hidden hover:shadow-md transition-shadow cursor-pointer relative h-48">
                        <div class="template-overlay absolute inset-0 flex items-end p-4">
                            <div>
                                <h4 class="font-medium text-white">E-commerce</h4>
                                <p class="text-xs text-gray-200">Shopify integration</p>
                            </div>
                        </div>
                    </div>
                    <div class="template-card border border-gray-200 rounded-md overflow-hidden hover:shadow-md transition-shadow cursor-pointer relative h-48">
                        <div class="template-overlay absolute inset-0 flex items-end p-4">
                            <div>
                                <h4 class="font-medium text-white">Portfolio</h4>
                                <p class="text-xs text-gray-200">Creative showcase</p>
                            </div>
                        </div>
                    </div>
                    <div class="template-card border border-gray-200 rounded-md overflow-hidden hover:shadow-md transition-shadow cursor-pointer relative h-48">
                        <div class="template-overlay absolute inset-0 flex items-end p-4">
                            <div>
                                <h4 class="font-medium text-white">Blog</h4>
                                <p class="text-xs text-gray-200">MDX supported</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Initialize Konva stage for the canvas
            const stage = new Konva.Stage({
                container: 'canvas-dropzone',
                width: document.querySelector('#canvas-dropzone').offsetWidth,
                height: document.querySelector('#canvas-dropzone').offsetHeight,
            });
            
            const layer = new Konva.Layer();
            stage.add(layer);
            
            // Modal controls
            const aiModal = document.getElementById('ai-modal');
            const templateModal = document.getElementById('template-modal');
            const aiGenerateBtn = document.getElementById('ai-generate-btn');
            const importTemplateBtn = document.getElementById('import-template-btn');
            const closeAiModal = document.getElementById('close-ai-modal');
            const closeTemplateModal = document.getElementById('close-template-modal');
            
            aiGenerateBtn.addEventListener('click', function() {
                aiModal.classList.remove('hidden');
            });
            
            importTemplateBtn.addEventListener('click', function() {
                templateModal.classList.remove('hidden');
            });
            
            closeAiModal.addEventListener('click', function() {
                aiModal.classList.add('hidden');
            });
            
            closeTemplateModal.addEventListener('click', function() {
                templateModal.classList.add('hidden');
            });
            
            // Template selection
            const templateCards = document.querySelectorAll('.template-card');
            templateCards.forEach(card => {
                card.addEventListener('click', function() {
                    const templateName = this.querySelector('h4').innerText;
                    const dropzone = document.getElementById('canvas-dropzone');
                    
                    dropzone.innerHTML = `
                        <div class="p-6">
                            <div class="bg-white p-4 rounded-md border border-gray-200 shadow-sm mb-3">
                                <div class="flex justify-between items-center mb-2">
                                    <h4 class="font-medium text-gray-700">${templateName} Template</h4>
                                    <div class="flex space-x-2">
                                        <button class="text-gray-400 hover:text-gray-600">
                                            <i class="fas fa-cog"></i>
                                        </button>
                                    </div>
                                </div>
                                <div class="text-xs text-gray-500">Imported template with multiple components</div>
                            </div>
                            <div class="text-center text-sm text-gray-500 mt-4">
                                <p>Template successfully imported. Start customizing!</p>
                            </div>
                        </div>
                    `;
                    
                    templateModal.classList.add('hidden');
                });
            });
            
            // Drag and Drop functionality
            const components = document.querySelectorAll('.component-item');
            const dropzone = document.getElementById('canvas-dropzone');
            
            components.forEach(component => {
                component.addEventListener('dragstart', function(e) {
                    const componentName = this.querySelector('h4').innerText;
                    e.dataTransfer.setData('text/plain', componentName);
                    component.classList.add('opacity-50');
                });
                
                component.addEventListener('dragend', function() {
                    component.classList.remove('opacity-50');
                });
            });
            
            dropzone.addEventListener('dragover', function(e) {
                e.preventDefault();
                dropzone.classList.add('active');
            });
            
            dropzone.addEventListener('dragleave', function() {
                dropzone.classList.remove('active');
            });
            
            dropzone.addEventListener('drop', function(e) {
                e.preventDefault();
                dropzone.classList.remove('active');
                
                const componentName = e.dataTransfer.getData('text/plain');
                
                // Create a new component in the dropzone
                const newComponent = document.createElement('div');
                newComponent.className = 'bg-white p-4 rounded-md border border-gray-200 shadow-sm mb-3';
                newComponent.innerHTML = `
                    <div class="flex justify-between items-center mb-2">
                        <h4 class="font-medium text-gray-700">${componentName}</h4>
                        <div class="flex space-x-2">
                            <button class="text-gray-400 hover:text-gray-600">
                                <i class="fas fa-cog"></i>
                            </button>
                            <button class="text-gray-400 hover:text-gray-600">
                                <i class="fas fa-trash"></i>
                            </button>
                        </div>
                    </div>
                    ${getComponentPreview(componentName)}
                `;
                
                // Replace the placeholder if it exists
                if (dropzone.querySelector('.text-center')) {
                    dropzone.innerHTML = '';
                }
                
                dropzone.appendChild(newComponent);
                
                // Initialize component-specific functionality
                initComponent(componentName, newComponent);
            });
            
            // Helper functions
            function getComponentPreview(name) {
                const previews = {
                    'AI Page Generator': `
                        <div class="p-4 bg-blue-50 rounded-md text-center">
                            <i class="fas fa-robot text-3xl text-blue-500 mb-2"></i>
                            <p class="text-sm text-blue-700">AI-generated page content</p>
                        </div>
                    `,
                    'AI Copywriter': `
                        <div class="p-4 bg-indigo-50 rounded-md">
                            <p class="text-sm text-indigo-700">AI-generated content will appear here</p>
                        </div>
                    `,
                    'API Route': `
                        <div class="p-3 bg-gray-100 rounded text-xs font-mono">
                            // pages/api/example.js<br>
                            export default function handler(req, res) {<br>
                            &nbsp;&nbsp;res.status(200).json({ name: 'John Doe' })<br>
                            }
                        </div>
                    `,
                    'Server Component': `
                        <div class="p-3 bg-gray-100 rounded text-xs font-mono">
                            // app/page.js<br>
                            export default function Page() {<br>
                            &nbsp;&nbsp;const data = await fetchData();<br>
                            &nbsp;&nbsp;return &lt;div&gt;{data}&lt;/div&gt;<br>
                            }
                        </div>
                    `,
                    'Default': `
                        <div class="text-xs text-gray-500 italic">Component preview</div>
                    `
                };
                
                return previews[name] || previews['Default'];
            }
            
            function initComponent(name, element) {
                // Initialize component-specific functionality
                console.log(`Initializing ${name} component`);
            }
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Yashomx/test-website" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>