File size: 31,281 Bytes
0e01eec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80fcc8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e01eec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80fcc8
0e01eec
 
 
 
 
 
 
 
 
d80fcc8
0e01eec
 
d80fcc8
0e01eec
 
d80fcc8
0e01eec
 
d80fcc8
0e01eec
 
d80fcc8
0e01eec
 
d80fcc8
 
0e01eec
 
 
 
 
 
 
d80fcc8
 
0e01eec
 
 
 
 
 
 
d80fcc8
0e01eec
 
 
 
 
 
 
 
 
 
d80fcc8
0e01eec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80fcc8
0e01eec
 
d80fcc8
0e01eec
 
d80fcc8
0e01eec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80fcc8
0e01eec
 
 
 
 
 
d80fcc8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e01eec
 
 
 
 
 
 
 
 
d80fcc8
0e01eec
 
 
d80fcc8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e01eec
 
 
d80fcc8
0e01eec
 
 
 
 
 
d80fcc8
 
 
 
 
 
 
 
 
 
 
0e01eec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d80fcc8
 
0e01eec
 
 
 
 
d80fcc8
 
 
 
0e01eec
d80fcc8
 
 
 
 
 
 
 
 
 
0e01eec
d80fcc8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e01eec
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text2Video AI Generator</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">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #f8fafc;
        }
        
        .gradient-bg {
            background: linear-gradient(135deg, #6e8efb, #a777e3);
        }
        
        .video-preview {
            aspect-ratio: 16/9;
            background: linear-gradient(45deg, #e0e7ff, #f3e8ff);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        
        .video-preview::before {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(255,255,255,0.3) 0%,
                rgba(255,255,255,0) 60%
            );
            transform: rotate(30deg);
            animation: shine 3s infinite;
        }
        
        @keyframes shine {
            0% { transform: rotate(30deg) translate(-30%, -30%); }
            100% { transform: rotate(30deg) translate(30%, 30%); }
        }
        
        .loading-bar {
            width: 0%;
            transition: width 0.3s ease;
        }
        
        .animate-pulse {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        .textarea-placeholder::placeholder {
            color: #94a3b8;
            opacity: 0.7;
        }
        
        .video-thumbnail {
            position: relative;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
        }
        
        .video-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
        }
        
        .play-button {
            width: 60px;
            height: 60px;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .play-button:hover {
            transform: scale(1.1);
            background: rgba(255,255,255,0.3);
        }
        
        .video-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 16px;
            background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 12px;
        }
        
        /* Animation for generating state */
        @keyframes generating {
            0% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
            100% { transform: translateY(0); }
        }
        
        .generating-animation {
            animation: generating 1.5s infinite ease-in-out;
        }
    </style>
</head>
<body class="min-h-screen">
    <div class="gradient-bg text-white">
        <div class="container mx-auto px-4 py-12">
            <header class="flex justify-between items-center mb-12">
                <div class="flex items-center space-x-2">
                    <i class="fas fa-video text-2xl"></i>
                    <h1 class="text-2xl font-bold">Text2Video AI</h1>
                </div>
                <nav class="hidden md:flex space-x-6">
                    <a href="#" class="hover:underline">Home</a>
                    <a href="#" class="hover:underline">Templates</a>
                    <a href="#" class="hover:underline">Pricing</a>
                    <a href="#" class="hover:underline">About</a>
                </nav>
                <button class="md:hidden text-xl">
                    <i class="fas fa-bars"></i>
                </button>
            </header>
            
            <div class="text-center mb-16">
                <h2 class="text-4xl md:text-5xl font-bold mb-4">Turn Your Ideas Into Videos</h2>
                <p class="text-xl opacity-90 max-w-2xl mx-auto">Describe your vision and our AI will generate a professional video in minutes</p>
            </div>
        </div>
    </div>
    
    <main class="container mx-auto px-4 py-12 -mt-20">
        <div class="bg-white rounded-xl shadow-2xl overflow-hidden">
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 p-8">
                <!-- Input Section -->
                <div>
                    <div class="mb-8">
                        <h3 class="text-2xl font-semibold mb-4 text-gray-800">Describe Your Video</h3>
                        <div class="relative">
                            <textarea 
                                id="prompt-input"
                                class="w-full h-64 p-4 border border-gray-200 rounded-lg textarea-placeholder focus:ring-2 focus:ring-purple-500 focus:border-transparent"
                                placeholder="Example: A futuristic cityscape at sunset with flying cars and neon lights. The camera pans across the skyline showing advanced technology and happy people enjoying life in this utopian future..."
                            ></textarea>
                            <div class="absolute bottom-4 right-4 flex space-x-2">
                                <button class="p-2 text-gray-500 hover:text-purple-600">
                                    <i class="fas fa-microphone"></i>
                                </button>
                                <button id="enhance-prompt" class="p-2 text-gray-500 hover:text-purple-600">
                                    <i class="fas fa-magic"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-8">
                        <h4 class="text-lg font-medium mb-3 text-gray-700">Video Style</h4>
                        <div class="grid grid-cols-2 md:grid-cols-3 gap-3">
                            <button class="style-option py-2 px-4 border rounded-lg hover:border-purple-500 hover:bg-purple-50" data-style="cinematic">
                                <i class="fas fa-film mr-2"></i> Cinematic
                            </button>
                            <button class="style-option py-2 px-4 border rounded-lg hover:border-purple-500 hover:bg-purple-50" data-style="animated">
                                <i class="fas fa-paint-brush mr-2"></i> Animated
                            </button>
                            <button class="style-option py-2 px-4 border rounded-lg hover:border-purple-500 hover:bg-purple-50" data-style="business">
                                <i class="fas fa-chart-line mr-2"></i> Business
                            </button>
                            <button class="style-option py-2 px-4 border rounded-lg hover:border-purple-500 hover:bg-purple-50" data-style="3d">
                                <i class="fas fa-gamepad mr-2"></i> 3D
                            </button>
                            <button class="style-option py-2 px-4 border rounded-lg hover:border-purple-500 hover:bg-purple-50" data-style="sketch">
                                <i class="fas fa-pencil-alt mr-2"></i> Sketch
                            </button>
                            <button class="style-option py-2 px-4 border rounded-lg hover:border-purple-500 hover:bg-purple-50" data-style="custom">
                                <i class="fas fa-plus mr-2"></i> Custom
                            </button>
                        </div>
                    </div>
                    
                    <div class="mb-8">
                        <h4 class="text-lg font-medium mb-3 text-gray-700">Video Length</h4>
                        <div class="flex items-center space-x-4">
                            <input type="range" id="length-slider" min="15" max="120" value="30" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
                            <span id="length-value" class="text-gray-700 font-medium">30s</span>
                        </div>
                    </div>
                    
                    <div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4">
                        <button id="generate-btn" class="flex-1 bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded-lg font-medium flex items-center justify-center">
                            <i class="fas fa-play-circle mr-2"></i> Generate Video
                        </button>
                        <button id="random-example" class="flex-1 border border-gray-300 hover:bg-gray-50 text-gray-700 py-3 px-6 rounded-lg font-medium flex items-center justify-center">
                            <i class="fas fa-random mr-2"></i> Random Example
                        </button>
                    </div>
                </div>
                
                <!-- Output Section -->
                <div>
                    <div class="mb-6">
                        <h3 class="text-2xl font-semibold mb-4 text-gray-800">Video Preview</h3>
                        <div class="video-preview shadow-lg">
                            <div id="preview-content" class="text-center p-8 z-10 w-full">
                                <i class="fas fa-video text-5xl text-purple-400 mb-4"></i>
                                <p class="text-gray-500">Your generated video will appear here</p>
                            </div>
                        </div>
                    </div>
                    
                    <div id="progress-container" class="hidden mb-6">
                        <div class="flex justify-between mb-2">
                            <span class="text-sm font-medium text-gray-700">Generating your video...</span>
                            <span id="progress-percent" class="text-sm font-medium text-purple-600">0%</span>
                        </div>
                        <div class="w-full bg-gray-200 rounded-full h-2.5">
                            <div id="loading-bar" class="loading-bar bg-purple-600 h-2.5 rounded-full"></div>
                        </div>
                    </div>
                    
                    <div id="result-actions" class="hidden">
                        <div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4">
                            <button id="download-btn" class="flex-1 bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded-lg font-medium flex items-center justify-center">
                                <i class="fas fa-download mr-2"></i> Download
                            </button>
                            <button id="regenerate-btn" class="flex-1 border border-purple-600 text-purple-600 hover:bg-purple-50 py-3 px-6 rounded-lg font-medium flex items-center justify-center">
                                <i class="fas fa-redo mr-2"></i> Regenerate
                            </button>
                            <button id="share-btn" class="flex-1 border border-gray-300 hover:bg-gray-50 text-gray-700 py-3 px-6 rounded-lg font-medium flex items-center justify-center">
                                <i class="fas fa-share-alt mr-2"></i> Share
                            </button>
                        </div>
                    </div>
                    
                    <div class="mt-8 bg-gray-50 p-4 rounded-lg">
                        <h4 class="text-lg font-medium mb-3 text-gray-700">Tips for Best Results</h4>
                        <ul class="space-y-2 text-gray-600">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mt-1 mr-2"></i>
                                <span>Be specific about scenes, colors, and mood</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mt-1 mr-2"></i>
                                <span>Mention camera movements (zoom, pan, etc.)</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mt-1 mr-2"></i>
                                <span>Include details about characters or objects</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </main>
    
    <section class="bg-gray-50 py-16">
        <div class="container mx-auto px-4">
            <h2 class="text-3xl font-bold text-center mb-12">How It Works</h2>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                <div class="bg-white p-6 rounded-xl shadow-md text-center">
                    <div class="w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4">
                        <i class="fas fa-keyboard text-purple-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">1. Describe Your Video</h3>
                    <p class="text-gray-600">Write a detailed description of what you want to see in your video. The more details you provide, the better the results.</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-md text-center">
                    <div class="w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4">
                        <i class="fas fa-cogs text-purple-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">2. AI Generates Content</h3>
                    <p class="text-gray-600">Our advanced AI processes your description and creates a unique video with visuals, motion, and effects.</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-md text-center">
                    <div class="w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4">
                        <i class="fas fa-film text-purple-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">3. Download & Share</h3>
                    <p class="text-gray-600">Preview your video, make adjustments if needed, then download in HD quality or share directly to social media.</p>
                </div>
            </div>
        </div>
    </section>
    
    <footer class="bg-gray-900 text-white py-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="text-xl font-bold mb-4">Text2Video AI</h3>
                    <p class="text-gray-400">Transforming ideas into visual stories with the power of artificial intelligence.</p>
                </div>
                <div>
                    <h4 class="font-semibold mb-4">Product</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="#" class="hover:text-white">Features</a></li>
                        <li><a href="#" class="hover:text-white">Pricing</a></li>
                        <li><a href="#" class="hover:text-white">Templates</a></li>
                        <li><a href="#" class="hover:text-white">API</a></li>
                    </ul>
                </div>
                <div>
                    <h4 class="font-semibold mb-4">Resources</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="#" class="hover:text-white">Blog</a></li>
                        <li><a href="#" class="hover:text-white">Help Center</a></li>
                        <li><a href="#" class="hover:text-white">Tutorials</a></li>
                        <li><a href="#" class="hover:text-white">Community</a></li>
                    </ul>
                </div>
                <div>
                    <h4 class="font-semibold mb-4">Connect</h4>
                    <div class="flex space-x-4 mb-4">
                        <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-purple-600">
                            <i class="fab fa-twitter"></i>
                        </a>
                        <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-purple-600">
                            <i class="fab fa-facebook-f"></i>
                        </a>
                        <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-purple-600">
                            <i class="fab fa-instagram"></i>
                        </a>
                        <a href="#" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center hover:bg-purple-600">
                            <i class="fab fa-linkedin-in"></i>
                        </a>
                    </div>
                    <p class="text-gray-400">Subscribe to our newsletter</p>
                    <div class="mt-2 flex">
                        <input type="email" placeholder="Your email" class="px-4 py-2 bg-gray-800 text-white rounded-l-lg focus:outline-none focus:ring-1 focus:ring-purple-500 w-full">
                        <button class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded-r-lg">
                            <i class="fas fa-paper-plane"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
                <p>© 2023 Text2Video AI. All rights reserved.</p>
            </div>
        </div>
    </footer>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // DOM Elements
            const generateBtn = document.getElementById('generate-btn');
            const previewContent = document.getElementById('preview-content');
            const progressContainer = document.getElementById('progress-container');
            const loadingBar = document.getElementById('loading-bar');
            const progressPercent = document.getElementById('progress-percent');
            const resultActions = document.getElementById('result-actions');
            const promptInput = document.getElementById('prompt-input');
            const lengthSlider = document.getElementById('length-slider');
            const lengthValue = document.getElementById('length-value');
            const randomExampleBtn = document.getElementById('random-example');
            const enhancePromptBtn = document.getElementById('enhance-prompt');
            const downloadBtn = document.getElementById('download-btn');
            const regenerateBtn = document.getElementById('regenerate-btn');
            const shareBtn = document.getElementById('share-btn');
            
            // Video thumbnails for different styles
            const videoThumbnails = {
                cinematic: 'https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80',
                animated: 'https://images.unsplash.com/photo-1627855437693-dcc7b0c4ba8b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80',
                business: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80',
                '3d': 'https://images.unsplash.com/photo-1635070041078-e363dbe005cb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80',
                sketch: 'https://images.unsplash.com/photo-1549388604-817d15aa0110?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80',
                custom: 'https://images.unsplash.com/photo-1574717024453-354dd9a0c6a7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80'
            };
            
            // Current selected style
            let selectedStyle = 'cinematic';
            
            // Update video length display
            lengthSlider.addEventListener('input', function() {
                lengthValue.textContent = `${this.value}s`;
            });
            
            // Style option selection
            const styleOptions = document.querySelectorAll('.style-option');
            styleOptions.forEach(option => {
                option.addEventListener('click', function() {
                    styleOptions.forEach(opt => {
                        opt.classList.remove('border-purple-500', 'bg-purple-50', 'text-purple-600');
                    });
                    this.classList.add('border-purple-500', 'bg-purple-50', 'text-purple-600');
                    selectedStyle = this.dataset.style;
                });
            });
            
            // Random example button
            const examples = [
                "A serene beach at sunrise with golden sand and gentle waves. The camera slowly pans across the shoreline, capturing seagulls flying overhead and a lone sailboat in the distance. The scene transitions to a close-up of footprints in the sand leading toward the water.",
                "A futuristic cyberpunk city at night with neon lights reflecting on wet streets. Flying cars zoom between towering skyscrapers as holographic advertisements flicker in the rain. The camera follows a mysterious figure in a high-tech trench coat walking through the crowded streets.",
                "An animated explainer video showing how solar panels work. Friendly cartoon characters demonstrate sunlight hitting photovoltaic cells, creating electricity that powers a happy home. The animation includes clear labels and cheerful music in the background.",
                "A time-lapse of a bustling city square from morning to night. People rush by in fast motion as shadows grow longer. The camera remains fixed while lights in office buildings turn on one by one, creating a beautiful pattern against the darkening sky."
            ];
            
            randomExampleBtn.addEventListener('click', function() {
                const randomExample = examples[Math.floor(Math.random() * examples.length)];
                promptInput.value = randomExample;
                
                // Show a toast notification
                showToast('Random example loaded!', 'success');
            });
            
            // Enhance prompt button
            enhancePromptBtn.addEventListener('click', function() {
                if (promptInput.value.trim() === '') {
                    showToast('Please enter some text first', 'error');
                    return;
                }
                
                // Simulate AI enhancing the prompt
                const enhancedPrompt = enhancePrompt(promptInput.value);
                promptInput.value = enhancedPrompt;
                
                // Show a toast notification
                showToast('Prompt enhanced with AI!', 'success');
            });
            
            // Generate video simulation
            generateBtn.addEventListener('click', function() {
                if (promptInput.value.trim() === '') {
                    showToast('Please enter a description for your video', 'error');
                    return;
                }
                
                // Show loading state
                generateBtn.disabled = true;
                generateBtn.innerHTML = '<i class="fas fa-spinner animate-spin mr-2"></i> Generating...';
                
                // Clear previous content and show generating animation
                previewContent.innerHTML = `
                    <div class="flex flex-col items-center justify-center h-full">
                        <div class="generating-animation mb-4">
                            <i class="fas fa-video text-5xl text-purple-400"></i>
                        </div>
                        <p class="text-gray-500">Creating your ${selectedStyle} video...</p>
                    </div>
                `;
                
                progressContainer.classList.remove('hidden');
                resultActions.classList.add('hidden');
                
                // Simulate progress
                let progress = 0;
                const interval = setInterval(() => {
                    progress += Math.random() * 10;
                    if (progress > 100) progress = 100;
                    
                    loadingBar.style.width = `${progress}%`;
                    progressPercent.textContent = `${Math.floor(progress)}%`;
                    
                    if (progress === 100) {
                        clearInterval(interval);
                        setTimeout(() => {
                            // Show result with the selected style thumbnail
                            showGeneratedVideo();
                        }, 500);
                    }
                }, 300);
            });
            
            // Regenerate button
            regenerateBtn.addEventListener('click', function() {
                generateBtn.click();
            });
            
            // Download button
            downloadBtn.addEventListener('click', function() {
                showToast('Video download started!', 'success');
                // In a real app, this would trigger an actual download
            });
            
            // Share button
            shareBtn.addEventListener('click', function() {
                showToast('Share options displayed', 'info');
                // In a real app, this would show share options
            });
            
            // Function to show generated video
            function showGeneratedVideo() {
                previewContent.innerHTML = `
                    <div class="video-thumbnail" style="background-image: url('${videoThumbnails[selectedStyle]}')">
                        <div class="video-overlay">
                            <button class="play-button">
                                <i class="fas fa-play text-white text-xl"></i>
                            </button>
                        </div>
                        <div class="video-info">
                            <h4 class="text-white font-medium">${selectedStyle.charAt(0).toUpperCase() + selectedStyle.slice(1)} Style Video</h4>
                            <p class="text-white text-opacity-80 text-sm">${lengthSlider.value} seconds • Based on: "${promptInput.value.substring(0, 50)}${promptInput.value.length > 50 ? '...' : ''}"</p>
                        </div>
                    </div>
                `;
                
                progressContainer.classList.add('hidden');
                resultActions.classList.remove('hidden');
                generateBtn.disabled = false;
                generateBtn.innerHTML = '<i class="fas fa-play-circle mr-2"></i> Generate Video';
                
                // Show success toast
                showToast('Video generated successfully!', 'success');
            }
            
            // Function to enhance prompt (simulated)
            function enhancePrompt(prompt) {
                const enhancements = [
                    "Add cinematic lighting and dramatic angles to ",
                    "Create an animated version of ",
                    "Transform this into a professional business presentation about ",
                    "Generate a 3D rendered scene of ",
                    "Make a sketch-style illustration of ",
                    "Add futuristic elements to "
                ];
                
                const details = [
                    " with vibrant colors and dynamic camera movements.",
                    ", ensuring high production quality and professional polish.",
                    ". Include smooth transitions between scenes.",
                    ". Add appropriate background music and sound effects.",
                    ". Focus on creating emotional impact through visuals.",
                    ". Optimize for social media sharing."
                ];
                
                const randomEnhancement = enhancements[Math.floor(Math.random() * enhancements.length)];
                const randomDetail = details[Math.floor(Math.random() * details.length)];
                
                return randomEnhancement + prompt + randomDetail;
            }
            
            // Function to show toast notifications
            function showToast(message, type) {
                const toast = document.createElement('div');
                toast.className = `fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-lg text-white ${
                    type === 'success' ? 'bg-green-500' : 
                    type === 'error' ? 'bg-red-500' : 
                    'bg-blue-500'
                }`;
                toast.textContent = message;
                document.body.appendChild(toast);
                
                setTimeout(() => {
                    toast.classList.add('opacity-0', 'transition-opacity', 'duration-300');
                    setTimeout(() => {
                        toast.remove();
                    }, 300);
                }, 3000);
            }
        });
    </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=Amin44/app" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>