File size: 37,112 Bytes
20339a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>إنشاء فيديو - صانع مجاني</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');
        
        * {
            font-family: 'Tajawal', sans-serif;
        }
        
        .scene-card {
            transition: all 0.3s ease;
            cursor: move;
        }
        
        .scene-card:hover {
            transform: scale(1.02);
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }
        
        .scene-card.dragging {
            opacity: 0.5;
            transform: scale(0.95);
        }
        
        .timeline-track {
            background: repeating-linear-gradient(90deg, #e5e7eb, #e5e7eb 1px, transparent 1px, transparent 50px);
        }
        
        .preview-window {
            background: #000;
        }
        
        .tool-button {
            transition: all 0.2s ease;
        }
        
        .tool-button:hover {
            background: rgba(147, 51, 234, 0.1);
            color: #9333ea;
        }
        
        .tool-button.active {
            background: #9333ea;
            color: white;
        }
        
        .fade-in {
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Top Header -->
    <header class="bg-white shadow-sm border-b">
        <div class="px-6 py-3 flex justify-between items-center">
            <div class="flex items-center gap-4">
                <a href="dashboard.html" class="text-gray-600 hover:text-gray-800">
                    <i data-feather="arrow-right" class="w-6 h-6"></i>
                </a>
                <div>
                    <h1 class="text-xl font-bold">إنشاء فيديو جديد</h1>
                    <p class="text-xs text-gray-600">تم الحفظ تلقائياً منذ 5 ثواني</p>
                </div>
            </div>
            <div class="flex items-center gap-3">
                <button class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg transition">
                    <i data-feather="save" class="w-5 h-5 inline"></i>
                    حفظ
                </button>
                <button onclick="previewVideo()" class="px-4 py-2 bg-gray-800 text-white rounded-lg font-bold hover:bg-gray-900 transition">
                    <i data-feather="eye" class="w-5 h-5 inline"></i>
                    معاينة
                </button>
                <button onclick="exportVideo()" class="px-4 py-2 bg-purple-600 text-white rounded-lg font-bold hover:bg-purple-700 transition">
                    <i data-feather="download" class="w-5 h-5 inline"></i>
                    تصدير
                </button>
            </div>
        </div>
    </header>

    <div class="flex h-screen pt-14">
        <!-- Left Sidebar - Tools -->
        <aside class="w-20 bg-white border-l shadow-sm">
            <div class="p-4 space-y-2">
                <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center active" data-tool="select">
                    <i data-feather="mouse-pointer" class="w-5 h-5"></i>
                </button>
                <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="text">
                    <i data-feather="type" class="w-5 h-5"></i>
                </button>
                <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="sticker">
                    <i data-feather="smile" class="w-5 h-5"></i>
                </button>
                <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="image">
                    <i data-feather="image" class="w-5 h-5"></i>
                </button>
                <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="audio">
                    <i data-feather="volume-2" class="w-5 h-5"></i>
                </button>
                <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="transition">
                    <i data-feather="shuffle" class="w-5 h-5"></i>
                </button>
                <div class="border-t pt-2">
                    <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="cut">
                        <i data-feather="scissors" class="w-5 h-5"></i>
                    </button>
                    <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="copy">
                        <i data-feather="copy" class="w-5 h-5"></i>
                    </button>
                    <button class="tool-button w-12 h-12 rounded-lg flex items-center justify-center" data-tool="delete">
                        <i data-feather="trash-2" class="w-5 h-5"></i>
                    </button>
                </div>
            </div>
        </aside>

        <!-- Main Content Area -->
        <main class="flex-1 overflow-hidden flex flex-col">
            <!-- Text Input Area -->
            <div class="bg-white border-b p-4">
                <div class="max-w-4xl mx-auto">
                    <label class="block text-sm font-bold mb-2">النص أو السكربت</label>
                    <textarea id="scriptText" class="w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-600" rows="3" placeholder="اكتب نصك هنا...">فيديو تعليمي عن أهمية التسويق الرقمي في العصر الحديث. سنستعرض أفضل الاستراتيجيات التي يمكن تطبيقها لنجاح أي مشروع تجاري.</textarea>
                    <div class="flex gap-2 mt-2">
                        <button onclick="generateScenes()" class="text-sm bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition">
                            <i data-feather="zap" class="w-4 h-4 inline"></i>
                            توليد مشاهد تلقائي
                        </button>
                        <button onclick="translateText()" class="text-sm bg-gray-200 text-gray-800 px-4 py-2 rounded-lg hover:bg-gray-300 transition">
                            <i data-feather="globe" class="w-4 h-4 inline"></i>
                            ترجمة
                        </button>
                        <button onclick="generateVoice()" class="text-sm bg-gray-200 text-gray-800 px-4 py-2 rounded-lg hover:bg-gray-300 transition">
                            <i data-feather="mic" class="w-4 h-4 inline"></i>
                            توليد صوت
                        </button>
                    </div>
                </div>
            </div>

            <!-- Preview Area -->
            <div class="flex-1 flex p-4 gap-4 overflow-hidden">
                <!-- Video Preview -->
                <div class="flex-1 flex flex-col">
                    <div class="flex-1 bg-white rounded-xl shadow-sm p-4 flex flex-col">
                        <div class="flex items-center justify-between mb-4">
                            <h3 class="font-bold">المعاينة</h3>
                            <div class="flex gap-2">
                                <button class="p-2 text-gray-600 hover:bg-gray-100 rounded">
                                    <i data-feather="maximize" class="w-4 h-4"></i>
                                </button>
                                <button class="p-2 text-gray-600 hover:bg-gray-100 rounded">
                                    <i data-feather="volume-x" class="w-4 h-4"></i>
                                </button>
                            </div>
                        </div>
                        <div class="preview-window flex-1 rounded-lg flex items-center justify-center relative">
                            <img src="https://static.photos/technology/640x360/5" alt="Preview" class="w-full h-full object-cover rounded-lg">
                            <div class="absolute inset-0 flex items-center justify-center">
                                <button onclick="playPause()" class="bg-white bg-opacity-90 rounded-full p-4 hover:bg-opacity-100 transition">
                                    <i data-feather="play" class="w-8 h-8 text-purple-600"></i>
                                </button>
                            </div>
                            <!-- Overlay Elements -->
                            <div class="absolute bottom-4 left-4 right-4 text-white text-center">
                                <h2 class="text-2xl font-bold mb-2 drop-shadow-lg">عنوان الفيديو</h2>
                                <p class="text-lg drop-shadow">نص توضيحي يظهر على الفيديو</p>
                            </div>
                        </div>
                    </div>

                    <!-- Timeline -->
                    <div class="bg-white rounded-xl shadow-sm p-4 mt-4">
                        <div class="flex items-center gap-4 mb-3">
                            <button class="p-2 hover:bg-gray-100 rounded">
                                <i data-feather="play" class="w-5 h-5"></i>
                            </button>
                            <div class="flex-1 text-center text-sm text-gray-600">
                                00:15 / 01:30
                            </div>
                        </div>
                        <div class="timeline-track h-24 rounded border relative overflow-hidden">
                            <!-- Timeline Scenes -->
                            <div class="absolute h-full flex gap-1 p-1" style="right: 0;">
                                <div class="bg-purple-500 rounded flex-1 flex items-center justify-center text-white text-xs">
                                    المشهد 1
                                </div>
                                <div class="bg-blue-500 rounded flex-1 flex items-center justify-center text-white text-xs">
                                    المشهد 2
                                </div>
                                <div class="bg-green-500 rounded flex-1 flex items-center justify-center text-white text-xs">
                                    المشهد 3
                                </div>
                            </div>
                        </div>
                        <div class="flex items-center gap-2 mt-2 text-sm text-gray-600">
                            <button class="hover:text-gray-800">
                                <i data-feather="zoom-out" class="w-4 h-4 inline"></i>
                            </button>
                            <span>50%</span>
                            <button class="hover:text-gray-800">
                                <i data-feather="zoom-in" class="w-4 h-4 inline"></i>
                            </button>
                        </div>
                    </div>
                </div>

                <!-- Scenes Panel -->
                <div class="w-96 bg-white rounded-xl shadow-sm p-4">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="font-bold">المشاهد</h3>
                        <button onclick="addScene()" class="text-purple-600 hover:bg-purple-50 p-2 rounded transition">
                            <i data-feather="plus" class="w-5 h-5"></i>
                        </button>
                    </div>
                    <div class="space-y-3 overflow-y-auto max-h-[600px]">
                        <!-- Scene 1 -->
                        <div class="scene-card bg-gray-50 rounded-lg p-4 border-2 border-transparent hover:border-purple-600">
                            <div class="flex items-start gap-3">
                                <div class="w-20 h-14 bg-gray-200 rounded-lg overflow-hidden flex-shrink-0">
                                    <img src="https://static.photos/technology/80x56/1" alt="Scene" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center gap-2 mb-1">
                                        <span class="font-bold text-sm">المشهد 1</span>
                                        <span class="text-xs text-gray-600">00:00 - 00:15</span>
                                    </div>
                                    <p class="text-sm text-gray-700">فيديو تعليمي عن أهمية التسويق الرقمي في العصر الحديث.</p>
                                    <div class="flex gap-2 mt-2">
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="edit-2" class="w-3 h-3 inline"></i>
                                        </button>
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="copy" class="w-3 h-3 inline"></i>
                                        </button>
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="trash-2" class="w-3 h-3 inline"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Scene 2 -->
                        <div class="scene-card bg-gray-50 rounded-lg p-4 border-2 border-transparent hover:border-purple-600">
                            <div class="flex items-start gap-3">
                                <div class="w-20 h-14 bg-gray-200 rounded-lg overflow-hidden flex-shrink-0">
                                    <img src="https://static.photos/technology/80x56/2" alt="Scene" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center gap-2 mb-1">
                                        <span class="font-bold text-sm">المشهد 2</span>
                                        <span class="text-xs text-gray-600">00:15 - 00:30</span>
                                    </div>
                                    <p class="text-sm text-gray-700">سنستعرض أفضل الاستراتيجيات التي يمكن تطبيقها لنجاح أي مشروع.</p>
                                    <div class="flex gap-2 mt-2">
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="edit-2" class="w-3 h-3 inline"></i>
                                        </button>
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="copy" class="w-3 h-3 inline"></i>
                                        </button>
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="trash-2" class="w-3 h-3 inline"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Scene 3 -->
                        <div class="scene-card bg-gray-50 rounded-lg p-4 border-2 border-transparent hover:border-purple-600">
                            <div class="flex items-start gap-3">
                                <div class="w-20 h-14 bg-gray-200 rounded-lg overflow-hidden flex-shrink-0">
                                    <img src="https://static.photos/technology/80x56/3" alt="Scene" class="w-full h-full object-cover">
                                </div>
                                <div class="flex-1">
                                    <div class="flex items-center gap-2 mb-1">
                                        <span class="font-bold text-sm">المشهد 3</span>
                                        <span class="text-xs text-gray-600">00:30 - 00:45</span>
                                    </div>
                                    <p class="text-sm text-gray-700">التجاري والنمو المستمر في السوق الرقمي.</p>
                                    <div class="flex gap-2 mt-2">
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="edit-2" class="w-3 h-3 inline"></i>
                                        </button>
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="copy" class="w-3 h-3 inline"></i>
                                        </button>
                                        <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                            <i data-feather="trash-2" class="w-3 h-3 inline"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

        <!-- Right Sidebar - Properties -->
        <aside class="w-80 bg-white border-r shadow-sm overflow-y-auto">
            <div class="p-4">
                <h3 class="font-bold mb-4">خصائص المشهد</h3>
                
                <!-- Aspect Ratio -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">حجم الفيديو</label>
                    <div class="grid grid-cols-3 gap-2">
                        <button class="p-3 border-2 border-purple-600 bg-purple-50 rounded-lg">
                            <div class="aspect-[9/16] bg-purple-200 rounded mb-1"></div>
                            <div class="text-xs">9:16</div>
                        </button>
                        <button class="p-3 border rounded-lg hover:bg-gray-50">
                            <div class="aspect-square bg-gray-200 rounded mb-1"></div>
                            <div class="text-xs">1:1</div>
                        </button>
                        <button class="p-3 border rounded-lg hover:bg-gray-50">
                            <div class="aspect-[16/9] bg-gray-200 rounded mb-1"></div>
                            <div class="text-xs">16:9</div>
                        </button>
                    </div>
                </div>

                <!-- Text Properties -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">نص الفيديو</label>
                    <input type="text" class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-600" placeholder="عنوان الفيديو">
                    <textarea class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-600 mt-2 h-20" placeholder="نص توضيحي"></textarea>
                </div>

                <!-- Voice Settings -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">الصوت</label>
                    <select class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-600">
                        <option>صوت ذكوري (فصحى)</option>
                        <option>صوت انثائي (فصحى)</option>
                        <option>صوت ذكوري (مصري)</option>
                        <option>صوت انثائي (مصري)</option>
                        <option>بدون صوت</option>
                    </select>
                    <div class="mt-2">
                        <label class="text-sm text-gray-600">سرعة الصوت</label>
                        <input type="range" class="w-full" min="0.5" max="2" step="0.1" value="1">
                    </div>
                </div>

                <!-- Font Settings -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">الخط</label>
                    <select class="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-600">
                        <option>Tajawal</option>
                        <option>Cairo</option>
                        <option>Amiri</option>
                        <option>Scheherazade</option>
                    </select>
                    <div class="flex gap-2 mt-2">
                        <input type="number" class="w-20 px-2 py-1 border rounded" placeholder="حجم" value="24">
                        <input type="color" class="w-20 h-8 border rounded" value="#000000">
                        <button class="px-2 py-1 border rounded hover:bg-gray-50">
                            <i data-feather="bold" class="w-4 h-4"></i>
                        </button>
                        <button class="px-2 py-1 border rounded hover:bg-gray-50">
                            <i data-feather="italic" class="w-4 h-4"></i>
                        </button>
                    </div>
                </div>

                <!-- Background Music -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">موسيقى خلفية</label>
                    <div class="space-y-2">
                        <div class="flex items-center justify-between p-2 border rounded">
                            <div class="flex items-center gap-2">
                                <i data-feather="music" class="w-4 h-4 text-gray-600"></i>
                                <span class="text-sm">Upbeat Corporate</span>
                            </div>
                            <button class="text-gray-600 hover:text-gray-800">
                                <i data-feather="play" class="w-4 h-4"></i>
                            </button>
                        </div>
                        <button class="w-full text-sm text-purple-600 hover:bg-purple-50 p-2 rounded border border-purple-600">
                            <i data-feather="plus" class="w-4 h-4 inline"></i>
                            تصفح المكتبة
                        </button>
                    </div>
                </div>

                <!-- Transitions -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">الانتقالات</label>
                    <div class="grid grid-cols-3 gap-2">
                        <button class="p-2 border rounded hover:bg-gray-50">لا شيء</button>
                        <button class="p-2 border-2 border-purple-600 bg-purple-50 rounded">تلاشي</button>
                        <button class="p-2 border rounded hover:bg-gray-50">انزلاق</button>
                        <button class="p-2 border rounded hover:bg-gray-50">تكبير</button>
                        <button class="p-2 border rounded hover:bg-gray-50">دوران</button>
                        <button class="p-2 border rounded hover:bg-gray-50">محو</button>
                    </div>
                </div>

                <!-- Filters -->
                <div class="mb-6">
                    <label class="block text-sm font-bold mb-2">الفلاتر</label>
                    <div class="grid grid-cols-3 gap-2">
                        <button class="p-2 text-xs border rounded hover:bg-gray-50">عادي</button>
                        <button class="p-2 text-xs border rounded hover:bg-gray-50">أبيض وأسود</button>
                        <button class="p-2 text-xs border rounded hover:bg-gray-50">دفء</button>
                        <button class="p-2 text-xs border rounded hover:bg-gray-50">برودة</button>
                        <button class="p-2 text-xs border rounded hover:bg-gray-50">ساطع</button>
                        <button class="p-2 text-xs border rounded hover:bg-gray-50">داكن</button>
                    </div>
                </div>
            </div>
        </aside>
    </div>

    <script>
        // Initialize Feather Icons
        feather.replace();

        // Tool Selection
        document.querySelectorAll('.tool-button').forEach(button => {
            button.addEventListener('click', function() {
                document.querySelectorAll('.tool-button').forEach(b => b.classList.remove('active'));
                this.classList.add('active');
            });
        });

        // Generate Scenes
        function generateScenes() {
            const notification = document.createElement('div');
            notification.className = 'fixed top-20 left-4 bg-green-500 text-white px-6 py-4 rounded-lg shadow-lg z-50 fade-in';
            notification.innerHTML = `
                <div class="flex items-center gap-3">
                    <i data-feather="check-circle" class="w-5 h-5"></i>
                    <span>تم إنشاء 3 مشاهد تلقائياً</span>
                </div>
            `;
            document.body.appendChild(notification);
            feather.replace();
            
            setTimeout(() => notification.remove(), 3000);
        }

        // Translate Text
        function translateText() {
            const modal = document.createElement('div');
            modal.className = 'fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4';
            modal.innerHTML = `
                <div class="bg-white rounded-2xl max-w-md w-full p-6">
                    <h3 class="text-xl font-bold mb-4">ترجمة النص</h3>
                    <div class="space-y-4">
                        <div>
                            <label class="text-sm font-bold">من لغة</label>
                            <select class="w-full px-3 py-2 border rounded-lg mt-1">
                                <option>العربية</option>
                                <option>English</option>
                            </select>
                        </div>
                        <div>
                            <label class="text-sm font-bold">إلى لغة</label>
                            <select class="w-full px-3 py-2 border rounded-lg mt-1">
                                <option>English</option>
                                <option>العربية</option>
                            </select>
                        </div>
                        <div class="flex gap-3">
                            <button onclick="this.closest('.fixed').remove()" class="flex-1 bg-gray-200 text-gray-800 py-2 rounded-lg font-bold">
                                إلغاء
                            </button>
                            <button onclick="this.closest('.fixed').remove()" class="flex-1 bg-purple-600 text-white py-2 rounded-lg font-bold">
                                ترجمة
                            </button>
                        </div>
                    </div>
                </div>
            `;
            document.body.appendChild(modal);
            feather.replace();
        }

        // Generate Voice
        function generateVoice() {
            const notification = document.createElement('div');
            notification.className = 'fixed top-20 left-4 bg-blue-500 text-white px-6 py-4 rounded-lg shadow-lg z-50 fade-in';
            notification.innerHTML = `
                <div class="flex items-center gap-3">
                    <div class="animate-spin">
                        <i data-feather="loader" class="w-5 h-5"></i>
                    </div>
                    <span>جاري توليد الصوت...</span>
                </div>
            `;
            document.body.appendChild(notification);
            feather.replace();
            
            setTimeout(() => {
                notification.innerHTML = `
                    <div class="flex items-center gap-3">
                        <i data-feather="check-circle" class="w-5 h-5"></i>
                        <span>تم توليد الصوت بنجاح</span>
                    </div>
                `;
                feather.replace();
                setTimeout(() => notification.remove(), 2000);
            }, 2000);
        }

        // Add Scene
        function addScene() {
            const scenesContainer = document.querySelector('.space-y-3');
            const newScene = document.createElement('div');
            newScene.className = 'scene-card bg-gray-50 rounded-lg p-4 border-2 border-transparent hover:border-purple-600 fade-in';
            newScene.innerHTML = `
                <div class="flex items-start gap-3">
                    <div class="w-20 h-14 bg-gray-200 rounded-lg overflow-hidden flex-shrink-0">
                        <img src="https://static.photos/technology/80x56/${Math.floor(Math.random() * 100)}" alt="Scene" class="w-full h-full object-cover">
                    </div>
                    <div class="flex-1">
                        <div class="flex items-center gap-2 mb-1">
                            <span class="font-bold text-sm">المشهد ${scenesContainer.children.length + 1}</span>
                            <span class="text-xs text-gray-600">00:45 - 01:00</span>
                        </div>
                        <p class="text-sm text-gray-700">مشهد جديد</p>
                        <div class="flex gap-2 mt-2">
                            <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                <i data-feather="edit-2" class="w-3 h-3 inline"></i>
                            </button>
                            <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                <i data-feather="copy" class="w-3 h-3 inline"></i>
                            </button>
                            <button class="text-xs bg-white px-2 py-1 rounded hover:bg-gray-100">
                                <i data-feather="trash-2" class="w-3 h-3 inline"></i>
                            </button>
                        </div>
                    </div>
                </div>
            `;
            scenesContainer.insertBefore(newScene, scenesContainer.firstChild);
            feather.replace();
        }

        // Preview Video
        function previewVideo() {
            const modal = document.createElement('div');
            modal.className = 'fixed inset-0 bg-black bg-opacity-90 z-50 flex items-center justify-center p-4';
            modal.innerHTML = `
                <div class="relative max-w-4xl w-full">
                    <button onclick="this.closest('.fixed').remove()" class="absolute -top-12 left-0 text-white">
                        <i data-feather="x" class="w-8 h-8"></i>
                    </button>
                    <div class="bg-black rounded-lg aspect-video flex items-center justify-center">
                        <img src="https://static.photos/technology/1024x576/10" alt="Preview" class="w-full h-full object-contain">
                    </div>
                    <div class="flex items-center justify-center gap-4 mt-4">
                        <button class="text-white hover:text-gray-300">
                            <i data-feather="skip-back" class="w-6 h-6"></i>
                        </button>
                        <button class="text-white hover:text-gray-300">
                            <i data-feather="play" class="w-8 h-8"></i>
                        </button>
                        <button class="text-white hover:text-gray-300">
                            <i data-feather="skip-forward" class="w-6 h-6"></i>
                        </button>
                    </div>
                </div>
            `;
            document.body.appendChild(modal);
            feather.replace();
        }

        // Export Video
        function exportVideo() {
            const modal = document.createElement('div');
            modal.className = 'fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4';
            modal.innerHTML = `
                <div class="bg-white rounded-2xl max-w-md w-full p-6">
                    <h3 class="text-xl font-bold mb-4">تصدير الفيديو</h3>
                    <div class="space-y-4">
                        <div>
                            <label class="text-sm font-bold">جودة الفيديو</label>
                            <select class="w-full px-3 py-2 border rounded-lg mt-1">
                                <option>720p (HD)</option>
                                <option>1080p (Full HD) - للمشتركين</option>
                                <option>4K (Ultra HD) - للمشتركين</option>
                            </select>
                        </div>
                        <div>
                            <label class="text-sm font-bold">صيغة الملف</label>
                            <select class="w-full px-3 py-2 border rounded-lg mt-1">
                                <option>MP4</option>
                                <option>MOV</option>
                                <option>WebM</option>
                            </select>
                        </div>
                        <div class="flex gap-3">
                            <button onclick="this.closest('.fixed').remove()" class="flex-1 bg-gray-200 text-gray-800 py-2 rounded-lg font-bold">
                                إلغاء
                            </button>
                            <button onclick="startExport()" class="flex-1 bg-purple-600 text-white py-2 rounded-lg font-bold">
                                بدء التصدير
                            </button>
                        </div>
                    </div>
                </div>
            `;
            document.body.appendChild(modal);
            feather.replace();
        }

        function startExport() {
            document.querySelector('.fixed').remove();
            const notification = document.createElement('div');
            notification.className = 'fixed top-20 left-4 bg-green-500 text-white px-6 py-4 rounded-lg shadow-lg z-50 fade-in';
            notification.innerHTML = `
                <div class="flex items-center gap-3">
                    <div class="animate-spin">
                        <i data-feather="loader" class="w-5 h-5"></i>
                    </div>
                    <span>جاري تصدير الفيديو...</span>
                </div>
            `;
            document.body.appendChild(notification);
            feather.replace();
            
            setTimeout(() => {
                notification.innerHTML = `
                    <div class="flex items-center gap-3">
                        <i data-feather="download" class="w-5 h-5"></i>
                        <span>اكتمل التصدير! جاري التحميل...</span>
                    </div>
                `;
                feather.replace();
                setTimeout(() => notification.remove(), 3000);
            }, 3000);
        }

        // Play/Pause
        let isPlaying = false;
        function playPause() {
            const playButton = document.querySelector('.preview-window button i');
            isPlaying = !isPlaying;
            playButton.setAttribute('data-feather', isPlaying ? 'pause' : 'play');
            feather.replace();
        }

        // Auto-save
        setInterval(() => {
            const saveIndicator = document.querySelector('.text-xs.text-gray-600');
            if (saveIndicator) {
                saveIndicator.textContent = 'تم الحفظ الآن';
                setTimeout(() => {
                    saveIndicator.textContent = 'تم الحفظ تلقائياً الآن';
                }, 2000);
            }
        }, 30000);
    </script>
</body>
</html>