File size: 37,682 Bytes
5572f8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3c9a666
 
 
 
 
 
 
5572f8e
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BookWright - Professional Book Design Tool</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#2563eb',
                        secondary: '#0ea5e9',
                        accent: '#8b5cf6',
                        dark: '#1e293b',
                        light: '#f8fafc'
                    },
                    fontFamily: {
                        sans: ['Inter', 'sans-serif']
                    }
                }
            }
        }
    </script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
        
        body {
            font-family: 'Inter', sans-serif;
            overflow: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        .canvas-container {
            position: relative;
            overflow: auto;
            background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
                              linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
                              linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
                              linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
            background-size: 20px 20px;
            background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        }
        
        .book-page {
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
            border: 1px solid #cbd5e1;
            background: white;
        }
        
        .grid-guide {
            position: absolute;
            border-style: dashed;
            pointer-events: none;
        }
        
        .tool-icon {
            @apply w-10 h-10 flex items-center justify-center rounded-md text-indigo-700 hover:bg-indigo-100 transition-all cursor-pointer;
        }
        
        .draggable-item {
            @apply cursor-grab active:cursor-grabbing select-none;
        }
        
        .draggable-item:hover {
            transform: translateY(-2px);
            filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1));
        }
        
        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        
        ::-webkit-scrollbar-track {
            background: #f1f5f9;
        }
        
        ::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }
    </style>
</head>
<body class="bg-slate-50 text-slate-800 flex flex-col h-screen">
    <!-- Top Toolbar -->
    <header class="bg-white border-b border-slate-200 py-2 px-4 shadow-sm">
        <div class="flex items-center justify-between">
            <div class="flex items-center space-x-6">
                <div class="flex items-center">
                    <span class="text-indigo-700 mr-2">
                        <i class="fas fa-book text-2xl"></i>
                    </span>
                    <h1 class="text-xl font-bold text-indigo-700">BookWright</h1>
                </div>
                
                <div class="flex items-center space-x-2">
                    <button class="px-4 py-1.5 bg-indigo-600 hover:bg-indigo-700 text-white rounded-md text-sm font-medium transition-colors">
                        <i class="fas fa-plus mr-1"></i> New Project
                    </button>
                    <button class="px-4 py-1.5 bg-white border border-slate-300 hover:bg-slate-50 rounded-md text-sm font-medium transition-colors">
                        <i class="fas fa-folder-open mr-1"></i> Open
                    </button>
                    <button class="px-4 py-1.5 bg-white border border-slate-300 hover:bg-slate-50 rounded-md text-sm font-medium transition-colors">
                        <i class="fas fa-save mr-1"></i> Save
                    </button>
                </div>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="flex space-x-2">
                    <button id="printBtn" class="flex items-center px-4 py-1.5 bg-emerald-600 hover:bg-emerald-700 text-white rounded-md text-sm font-medium transition-colors">
                        <i class="fas fa-print mr-2"></i> Export
                    </button>
                    <button id="settingsBtn" class="flex items-center px-3 py-1.5 bg-white border border-slate-300 hover:bg-slate-50 rounded-md text-sm font-medium transition-colors">
                        <i class="fas fa-cog"></i>
                    </button>
                </div>
                
                <div class="flex items-center">
                    <div class="h-8 w-8 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-700 font-bold mr-2">
                        U
                    </div>
                    <span class="font-medium text-sm">User</span>
                </div>
            </div>
        </div>
    </header>
    
    <!-- Main Content Area -->
    <div class="flex flex-1 overflow-hidden">
        <!-- Left Panel (Collapsible) -->
        <aside class="bg-white border-r border-slate-200 w-64 flex flex-col transition-all" id="leftPanel">
            <div class="p-3 bg-white border-b border-slate-200 flex items-center justify-between">
                <h2 class="font-semibold text-slate-700">Design Tools</h2>
                <button id="collapseLeftBtn" class="text-slate-400 hover:text-slate-600">
                    <i class="fas fa-chevron-left"></i>
                </button>
            </div>
            
            <div class="flex-1 overflow-y-auto p-3">
                <!-- Templates Section -->
                <div class="mb-6">
                    <div class="flex items-center justify-between mb-3">
                        <h3 class="font-medium text-slate-700">Templates</h3>
                        <button class="text-sm text-indigo-600 hover:text-indigo-800">View All</button>
                    </div>
                    <div class="grid grid-cols-2 gap-3">
                        <div class="rounded border border-slate-200 overflow-hidden cursor-pointer hover:shadow-md transition-all">
                            <div class="h-20 bg-indigo-100 flex items-center justify-center">
                                <span class="bg-white rounded py-1 px-2 text-xs text-indigo-700">Novel</span>
                            </div>
                        </div>
                        <div class="rounded border border-slate-200 overflow-hidden cursor-pointer hover:shadow-md transition-all">
                            <div class="h-20 bg-amber-100 flex items-center justify-center">
                                <span class="bg-white rounded py-1 px-2 text-xs text-amber-700">Cookbook</span>
                            </div>
                        </div>
                        <div class="rounded border border-slate-200 overflow-hidden cursor-pointer hover:shadow-md transition-all">
                            <div class="h-20 bg-blue-100 flex items-center justify-center">
                                <span class="bg-white rounded py-1 px-2 text-xs text-blue-700">Textbook</span>
                            </div>
                        </div>
                        <div class="rounded border border-slate-200 overflow-hidden cursor-pointer hover:shadow-md transition-all">
                            <div class="h-20 bg-purple-100 flex items-center justify-center">
                                <span class="bg-white rounded py-1 px-2 text-xs text-purple-700">Portfolio</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Elements Section -->
                <div class="mb-6">
                    <h3 class="font-medium text-slate-700 mb-3">Elements</h3>
                    <div class="flex flex-wrap gap-2 mb-4">
                        <button class="py-1.5 px-3 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded transition-colors">
                            <i class="fas fa-heading mr-1"></i> Text
                        </button>
                        <button class="py-1.5 px-3 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded transition-colors">
                            <i class="fas fa-image mr-1"></i> Image
                        </button>
                        <button class="py-1.5 px-3 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded transition-colors">
                            <i class="fas fa-table mr-1"></i> Table
                        </button>
                    </div>
                    <div class="flex flex-wrap gap-2">
                        <button class="py-1.5 px-3 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded transition-colors">
                            <i class="fas fa-quote-right mr-1"></i> Blockquote
                        </button>
                        <button class="py-1.5 px-3 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded transition-colors">
                            <i class="fas fa-square mr-1"></i> Shape
                        </button>
                        <button class="py-1.5 px-3 bg-slate-100 hover:bg-slate-200 text-slate-700 text-sm rounded transition-colors">
                            <i class="fas fa-arrows-alt-h mr-1"></i> Line
                        </button>
                    </div>
                </div>
                
                <!-- Text Tools Section -->
                <div class="mb-6">
                    <h3 class="font-medium text-slate-700 mb-3">Text Tools</h3>
                    <div class="flex flex-wrap gap-2">
                        <button class="tool-icon">
                            <i class="fas fa-bold"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-italic"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-underline"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-align-left"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-align-center"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-align-right"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-align-justify"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-list-ul"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-list-ol"></i>
                        </button>
                    </div>
                    <div class="mt-3">
                        <label class="text-xs text-slate-500 mb-1 block">Font Family</label>
                        <select class="w-full text-sm border border-slate-200 rounded px-2 py-1.5 focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500">
                            <option>Playfair Display</option>
                            <option>Roboto</option>
                            <option>Merriweather</option>
                            <option>Georgia</option>
                        </select>
                    </div>
                    <div class="mt-3 grid grid-cols-2 gap-3">
                        <div>
                            <label class="text-xs text-slate-500 mb-1 block">Font Size</label>
                            <select class="w-full text-sm border border-slate-200 rounded px-2 py-1.5 focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500">
                                <option>9pt</option>
                                <option>10pt</option>
                                <option>11pt</option>
                                <option selected>12pt</option>
                                <option>14pt</option>
                                <option>16pt</option>
                                <option>18pt</option>
                            </select>
                        </div>
                        <div>
                            <label class="text-xs text-slate-500 mb-1 block">Line Spacing</label>
                            <select class="w-full text-sm border border-slate-200 rounded px-2 py-1.5 focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500">
                                <option>Single</option>
                                <option selected>1.15</option>
                                <option>1.5</option>
                                <option>Double</option>
                            </select>
                        </div>
                    </div>
                </div>
                
                <!-- HTML Editor -->
                <div>
                    <h3 class="font-medium text-slate-700 mb-3">HTML Editor</h3>
                    <button class="w-full py-2 bg-slate-100 hover:bg-slate-200 rounded-md text-sm font-medium text-slate-700 transition-colors">
                        <i class="fas fa-code mr-2"></i> Edit Source Code
                    </button>
                </div>
            </div>
        </aside>
        
        <!-- Main Canvas Area -->
        <main class="flex-1 overflow-hidden flex flex-col">
            <div class="p-2 bg-slate-100 border-b border-slate-200">
                <div class="flex items-center justify-between">
                    <div class="flex space-x-2">
                        <button class="tool-icon">
                            <i class="fas fa-search-plus"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-search-minus"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-expand-arrows-alt"></i>
                        </button>
                        <div class="border-l border-slate-300 mx-2"></div>
                        <button class="tool-icon">
                            <i class="fas fa-border-none"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-ruler"></i>
                        </button>
                        <button class="tool-icon">
                            <i class="fas fa-lightbulb"></i>
                        </button>
                    </div>
                    
                    <div class="flex items-center space-x-4">
                        <div class="flex items-center text-sm">
                            <label class="text-slate-600 mr-2">Zoom:</label>
                            <select class="bg-white border border-slate-300 rounded py-1 px-2 text-sm">
                                <option>100%</option>
                                <option>75%</option>
                                <option selected>Fit to Screen</option>
                            </select>
                        </div>
                        
                        <div class="flex items-center text-sm">
                            <label class="text-slate-600 mr-2">Template:</label>
                            <select class="bg-white border border-slate-300 rounded py-1 px-2 text-sm">
                                <option selected>Novel (6"×9")</option>
                                <option>Cookbook (8.5"×11")</option>
                                <option>Textbook (8.25"×10.75")</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Interactive Canvas -->
            <div class="flex-1 overflow-auto canvas-container flex items-center justify-center" id="canvasContainer">
                <div class="relative">
                    <!-- Bleed Area -->
                    <div class="absolute inset-0 -inset-4 border border-red-300 rounded-sm pointer-events-none"></div>
                    
                    <!-- Margin Guides -->
                    <div class="grid-guide top-10 border-t border-blue-200 border-dashed w-full"></div>
                    <div class="grid-guide bottom-10 border-t border-blue-200 border-dashed w-full"></div>
                    <div class="grid-guide left-20 border-l border-blue-200 border-dashed h-full"></div>
                    <div class="grid-guide right-20 border-l border-blue-200 border-dashed h-full"></div>
                    
                    <!-- Book Page -->
                    <div class="book-page bg-white w-[600px] h-[780px] relative overflow-hidden">
                        <!-- Page content would be interactive and dynamic in the real app -->
                        <div class="p-10 h-full">
                            <h1 class="text-3xl font-serif font-bold text-slate-800 mb-6 draggable-item" draggable="true">Chapter One: The Beginning</h1>
                            
                            <div class="draggable-item" draggable="true">
                                <p class="mb-4 leading-relaxed">
                                    It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair...
                                </p>
                                
                                <p class="mb-4 leading-relaxed">
                                    There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France.
                                </p>
                            </div>
                            
                            <div class="flex justify-center my-8 draggable-item" draggable="true">
                                <div class="bg-slate-200 border-2 border-dashed rounded-xl w-64 h-40 flex items-center justify-center text-slate-500">
                                    <i class="fas fa-image text-3xl mr-2"></i> Placeholder Image
                                </div>
                            </div>
                            
                            <div class="draggable-item" draggable="true">
                                <p class="leading-relaxed">
                                    My father's family name being Pirrip, and my Christian name Philip, my infant tongue could make of both names nothing longer or more explicit than Pip. So, I called myself Pip, and came to be called Pip.
                                </p>
                            </div>
                            
                            <div class="mt-8 p-4 border-l-4 border-indigo-500 bg-indigo-50 draggable-item" draggable="true">
                                <p class="italic leading-relaxed">
                                    "Character counts in moments of conflict, not comfort. How we respond when tested defines who we truly are."
                                </p>
                                <p class="mt-2 text-slate-600">- Wisdom to Remember</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        
        <!-- Right Panel -->
        <aside class="bg-white border-l border-slate-200 w-64 flex flex-col">
            <div class="p-3 bg-white border-b border-slate-200 flex items-center justify-between">
                <h2 class="font-semibold text-slate-700">Properties</h2>
                <button id="collapseRightBtn" class="text-slate-400 hover:text-slate-600">
                    <i class="fas fa-chevron-right"></i>
                </button>
            </div>
            
            <div class="flex-1 overflow-y-auto">
                <!-- Tabs for Properties -->
                <div class="border-b border-slate-200 px-3">
                    <div class="flex">
                        <button class="py-2 px-3 font-medium text-sm text-indigo-600 border-b-2 border-indigo-600">Layers</button>
                        <button class="py-2 px-3 font-medium text-sm text-slate-500 hover:text-slate-700">Styles</button>
                        <button class="py-2 px-3 font-medium text-sm text-slate-500 hover:text-slate-700">Settings</button>
                    </div>
                </div>
                
                <!-- Layers Panel -->
                <div class="p-3">
                    <div class="flex items-center justify-between mb-2">
                        <h3 class="font-medium text-slate-700">Page Elements</h3>
                        <button class="text-slate-500 hover:text-slate-700">
                            <i class="fas fa-sort"></i>
                        </button>
                    </div>
                    
                    <ul class="space-y-2">
                        <li class="flex items-center justify-between p-2 bg-indigo-50 border border-indigo-100 rounded">
                            <div class="flex items-center">
                                <i class="fas fa-heading text-indigo-600 mr-2"></i>
                                <span class="text-sm">Chapter Title</span>
                            </div>
                            <div class="flex space-x-1">
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-lock"></i>
                                </button>
                            </div>
                        </li>
                        <li class="flex items-center justify-between p-2 hover:bg-slate-50 rounded">
                            <div class="flex items-center">
                                <i class="fas fa-font text-blue-600 mr-2"></i>
                                <span class="text-sm">Paragraph 1</span>
                            </div>
                            <div class="flex space-x-1">
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-lock"></i>
                                </button>
                            </div>
                        </li>
                        <li class="flex items-center justify-between p-2 hover:bg-slate-50 rounded">
                            <div class="flex items-center">
                                <i class="fas fa-font text-blue-600 mr-2"></i>
                                <span class="text-sm">Paragraph 2</span>
                            </div>
                            <div class="flex space-x-1">
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-lock"></i>
                                </button>
                            </div>
                        </li>
                        <li class="flex items-center justify-between p-2 hover:bg-slate-50 rounded">
                            <div class="flex items-center">
                                <i class="fas fa-image text-green-600 mr-2"></i>
                                <span class="text-sm">Landscape Image</span>
                            </div>
                            <div class="flex space-x-1">
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-lock"></i>
                                </button>
                            </div>
                        </li>
                        <li class="flex items-center justify-between p-2 hover:bg-slate-50 rounded">
                            <div class="flex items-center">
                                <i class="fas fa-font text-blue-600 mr-2"></i>
                                <span class="text-sm">Paragraph 3</span>
                            </div>
                            <div class="flex space-x-1">
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-lock"></i>
                                </button>
                            </div>
                        </li>
                        <li class="flex items-center justify-between p-2 bg-indigo-50 border border-indigo-100 rounded">
                            <div class="flex items-center">
                                <i class="fas fa-quote-right text-purple-600 mr-2"></i>
                                <span class="text-sm">Blockquote</span>
                            </div>
                            <div class="flex space-x-1">
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="w-6 h-6 text-slate-500 hover:text-slate-700">
                                    <i class="fas fa-lock"></i>
                                </button>
                            </div>
                        </li>
                    </ul>
                </div>
                
                <!-- Style Controls -->
                <div class="border-t border-slate-200 p-3">
                    <div class="flex justify-between items-center mb-3">
                        <h3 class="font-medium text-slate-700">Element Styles</h3>
                        <button class="text-sm text-indigo-600 hover:text-indigo-800">Save as Style</button>
                    </div>
                    
                    <div class="space-y-4">
                        <div>
                            <label class="block text-xs text-slate-500 mb-1">Font Family</label>
                            <select class="w-full text-sm border border-slate-200 rounded px-2 py-1.5 focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500">
                                <option>Georgia</option>
                                <option>Times New Roman</option>
                                <option selected>Playfair Display</option>
                                <option>Merriweather</option>
                            </select>
                        </div>
                        
                        <div>
                            <label class="block text-xs text-slate-500 mb-1">Font Size</label>
                            <div class="flex items-center gap-2">
                                <input type="range" min="8" max="72" value="18" class="w-full">
                                <span class="text-sm w-10">18pt</span>
                            </div>
                        </div>
                        
                        <div>
                            <label class="block text-xs text-slate-500 mb-1">Alignment</label>
                            <div class="flex gap-1">
                                <button class="flex-1 py-1.5 bg-indigo-600 text-white rounded-md text-sm">
                                    <i class="fas fa-align-left"></i>
                                </button>
                                <button class="flex-1 py-1.5 bg-white border border-slate-200 rounded-md text-sm">
                                    <i class="fas fa-align-center"></i>
                                </button>
                                <button class="flex-1 py-1.5 bg-white border border-slate-200 rounded-md text-sm">
                                    <i class="fas fa-align-right"></i>
                                </button>
                                <button class="flex-1 py-1.5 bg-white border border-slate-200 rounded-md text-sm">
                                    <i class="fas fa-align-justify"></i>
                                </button>
                            </div>
                        </div>
                        
                        <div>
                            <label class="block text-xs text-slate-500 mb-1">Text Color</label>
                            <div class="flex gap-2">
                                <div class="w-6 h-6 rounded border border-slate-300 bg-slate-800 cursor-pointer"></div>
                                <div class="w-6 h-6 rounded border border-slate-300 bg-indigo-600 cursor-pointer ring-2 ring-indigo-500"></div>
                                <div class="w-6 h-6 rounded border border-slate-300 bg-red-600 cursor-pointer"></div>
                                <div class="w-6 h-6 rounded border border-slate-300 bg-green-600 cursor-pointer"></div>
                                <div class="relative">
                                    <div class="w-6 h-6 rounded border border-slate-300 cursor-pointer flex items-center justify-center">
                                        <i class="fas fa-plus text-xs text-slate-500"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="grid grid-cols-2 gap-3">
                            <div>
                                <label class="block text-xs text-slate-500 mb-1">Line Height</label>
                                <select class="w-full text-sm border border-slate-200 rounded px-2 py-1.5 focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500">
                                    <option>1.0</option>
                                    <option>1.15</option>
                                    <option selected>1.3</option>
                                    <option>1.5</option>
                                    <option>2.0</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-xs text-slate-500 mb-1">Paragraph Space</label>
                                <select class="w-full text-sm border border-slate-200 rounded px-2 py-1.5 focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500">
                                    <option>0</option>
                                    <option>4pt</option>
                                    <option selected>8pt</option>
                                    <option>12pt</option>
                                    <option>16pt</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </aside>
    </div>
    
    <!-- Bottom Toolbar -->
    <footer class="bg-white border-t border-slate-200 py-2 px-4 flex items-center justify-between">
        <div class="flex items-center space-x-4">
            <button class="p-1 w-8 h-8 rounded hover:bg-slate-100">
                <i class="fas fa-fast-backward text-slate-500"></i>
            </button>
            <button class="p-1 w-8 h-8 rounded hover:bg-slate-100">
                <i class="fas fa-step-backward text-slate-500"></i>
            </button>
            <div class="text-sm text-slate-600">
                Page <span class="font-medium">1</span> of <span class="font-medium">56</span>
            </div>
            <button class="p-1 w-8 h-8 rounded hover:bg-slate-100">
                <i class="fas fa-step-forward text-slate-500"></i>
            </button>
            <button class="p-1 w-8 h-8 rounded hover:bg-slate-100">
                <i class="fas fa-fast-forward text-slate-500"></i>
            </button>
        </div>
        
        <div class="flex items-center space-x-4">
            <div class="flex items-center text-sm text-slate-600">
                <i class="fas fa-info-circle mr-2 text-indigo-600"></i>
                <span>Intelligent layout applied</span>
            </div>
            <div class="flex items-center">
                <div class="h-2 w-2 rounded-full bg-green-500 mr-2"></div>
                <span class="text-sm text-slate-600">Autosave complete</span>
            </div>
        </div>
        
        <div class="flex items-center space-x-2">
            <button class="flex items-center px-3 py-1 bg-slate-100 hover:bg-slate-200 rounded-md text-sm font-medium text-slate-700 transition-colors">
                <i class="fas fa-history mr-2"></i> History
            </button>
            <button class="flex items-center px-3 py-1 bg-indigo-100 hover:bg-indigo-200 rounded-md text-sm font-medium text-indigo-700 transition-colors">
                <i class="fas fa-play-circle mr-2"></i> Preview
            </button>
        </div>
    </footer>
    
    <script>
        // Collapse/Expand panels
        document.getElementById('collapseLeftBtn').addEventListener('click', function() {
            document.getElementById('leftPanel').classList.toggle('w-16');
            document.getElementById('leftPanel').classList.toggle('w-64');
        });
        
        document.getElementById('collapseRightBtn').addEventListener('click', function() {
            document.getElementById('rightPanel').classList.toggle('w-16');
            document.getElementById('rightPanel').classList.toggle('w-64');
        });
        
        // Export modal functionality
        document.getElementById('printBtn').addEventListener('click', function() {
            alert('Export functionality would open a modal in the production version');
        });
        
        // Draggable item functionality
        const draggableItems = document.querySelectorAll('.draggable-item');
        draggableItems.forEach(item => {
            item.addEventListener('dragstart', function(e) {
                e.dataTransfer.setData('text/plain', 'dragged-element');
                this.classList.add('opacity-50');
            });
            
            item.addEventListener('dragend', function() {
                this.classList.remove('opacity-50');
            });
        });
        
        // Canvas hover effect
        const canvasContainer = document.getElementById('canvasContainer');
        canvasContainer.addEventListener('dragover', function(e) {
            e.preventDefault();
            this.classList.add('bg-blue-50');
        });
        
        canvasContainer.addEventListener('dragleave', function() {
            this.classList.remove('bg-blue-50');
        });
        
        canvasContainer.addEventListener('drop', function(e) {
            e.preventDefault();
            this.classList.remove('bg-blue-50');
            // In a real app, we would handle the element placement
        });
    </script>
    <!-- Add this to check if libraries loaded -->
    <script>
        console.log('React:', typeof React);
        console.log('Fabric:', typeof fabric);
        console.log('ReactDOM:', typeof ReactDOM);
        console.log('React components:', document.querySelectorAll('[data-reactroot]'));
    </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=Samsailo/ooh-ggf" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>