File size: 35,240 Bytes
5864416
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cosmo DL - Space Themed yt-dlp UI</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        cosmic: {
                            100: '#e0e7ff',
                            200: '#c7d2fe',
                            300: '#a5b4fc',
                            400: '#818cf8',
                            500: '#6366f1',
                            600: '#4f46e5',
                            700: '#4338ca',
                            800: '#3730a3',
                            900: '#312e81',
                        },
                        nebula: {
                            100: '#f0f9ff',
                            200: '#e0f2fe',
                            300: '#bae6fd',
                            400: '#7dd3fc',
                            500: '#38bdf8',
                            600: '#0284c7',
                            700: '#0369a1',
                            800: '#075985',
                            900: '#0c4a6e',
                        },
                        galaxy: {
                            100: '#f5f3ff',
                            200: '#ede9fe',
                            300: '#ddd6fe',
                            400: '#c4b5fd',
                            500: '#a78bfa',
                            600: '#8b5cf6',
                            700: '#7c3aed',
                            800: '#6d28d9',
                            900: '#5b21b6',
                        }
                    },
                    animation: {
                        'pulse-slow': 'pulse 6s infinite cubic-bezier(0.4, 0, 0.6, 1)',
                        'float': 'float 6s ease-in-out infinite',
                        'star-pulse': 'starPulse 4s ease-in-out infinite',
                    },
                    keyframes: {
                        float: {
                            '0%, 100%': { transform: 'translateY(0)' },
                            '50%': { transform: 'translateY(-10px)' },
                        },
                        starPulse: {
                            '0%, 100%': { opacity: '0.2' },
                            '50%': { opacity: '1' },
                        }
                    }
                }
            }
        }
    </script>
    <style>
        body {
            background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
            min-height: 100vh;
            overflow-x: hidden;
            color: white;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .stars {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }

        .star {
            position: absolute;
            background: white;
            border-radius: 50%;
            animation: starPulse var(--duration) ease-in-out infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.2; }
            50% { opacity: 1; }
        }

        .comet {
            position: absolute;
            width: 6px;
            height: 6px;
            background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
            border-radius: 50%;
            transform: rotate(45deg) translateX(-100px);
            animation: cometFly 15s linear infinite;
            opacity: 0;
        }

        @keyframes cometFly {
            0% {
                transform: translateX(-100px) translateY(-100px) rotate(45deg);
                opacity: 1;
            }
            70% {
                opacity: 1;
            }
            100% {
                transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px)) rotate(45deg);
                opacity: 0;
            }
        }

        .gradient-border {
            position: relative;
            border-radius: 1rem;
        }

        .gradient-border::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 1rem;
            background: linear-gradient(45deg, #6366f1, #8b5cf6, #38bdf8);
            background-size: 200% 200%;
            z-index: -1;
            animation: gradient 8s ease infinite;
        }

        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .progress-bar {
            height: 6px;
            background: linear-gradient(90deg, #6366f1, #8b5cf6);
            border-radius: 3px;
            transition: width 0.3s ease;
        }

        .download-card {
            backdrop-filter: blur(10px);
            background: rgba(15, 23, 42, 0.7);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .format-option:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        }

        .format-option.selected {
            border-color: #6366f1;
            background: rgba(99, 102, 241, 0.1);
        }

        .tab-button.active {
            border-bottom: 2px solid #6366f1;
            color: #6366f1;
        }
    </style>
</head>
<body>
    <div class="stars" id="stars"></div>
    <div class="comet" id="comet"></div>

    <div class="container mx-auto px-4 py-12 max-w-6xl">
        <header class="flex flex-col items-center mb-12 animate-float">
            <div class="flex items-center space-x-4 mb-4">
                <div class="w-16 h-16 rounded-full bg-gradient-to-br from-nebula-500 to-cosmic-600 flex items-center justify-center shadow-lg">
                    <i class="fas fa-satellite text-3xl text-white"></i>
                </div>
                <h1 class="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-nebula-400 to-cosmic-400">
                    Cosmo<span class="text-white"> DL</span>
                </h1>
            </div>
            <p class="text-nebula-300 text-center max-w-lg">
                The interstellar media downloader powered by yt-dlp. Download videos from across the galaxy!
            </p>
        </header>

        <main class="gradient-border p-1 rounded-xl mb-12">
            <div class="bg-gray-900 rounded-xl p-6">
                <div class="flex space-x-4 mb-6 border-b border-gray-800 pb-2">
                    <button class="tab-button active px-4 py-2 font-medium text-nebula-300 hover:text-white transition" data-tab="download">
                        <i class="fas fa-download mr-2"></i> Download
                    </button>
                    <button class="tab-button px-4 py-2 font-medium text-nebula-300 hover:text-white transition" data-tab="settings">
                        <i class="fas fa-cog mr-2"></i> Settings
                    </button>
                    <button class="tab-button px-4 py-2 font-medium text-nebula-300 hover:text-white transition" data-tab="queue">
                        <i class="fas fa-list mr-2"></i> Queue
                    </button>
                </div>

                <!-- Download Tab -->
                <div id="download-tab" class="tab-content">
                    <div class="mb-6">
                        <label for="url" class="block text-nebula-300 mb-2 font-medium">Enter Video URL</label>
                        <div class="flex space-x-2">
                            <input type="text" id="url" placeholder="https://www.youtube.com/watch?v=..." 
                                   class="flex-1 bg-gray-800 border border-gray-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                            <button id="fetch-btn" class="bg-cosmic-600 hover:bg-cosmic-700 text-white px-6 py-3 rounded-lg font-medium transition flex items-center">
                                <i class="fas fa-search mr-2"></i> Fetch
                            </button>
                        </div>
                    </div>

                    <div id="video-info" class="hidden download-card rounded-xl p-4 mb-6 transition-all duration-300">
                        <div class="flex flex-col md:flex-row gap-6">
                            <div class="flex-shrink-0">
                                <img id="thumbnail" src="" alt="Video thumbnail" class="w-full md:w-64 rounded-lg shadow-lg">
                            </div>
                            <div class="flex-1">
                                <h2 id="video-title" class="text-xl font-bold mb-2 text-white"></h2>
                                <p id="video-author" class="text-nebula-300 mb-4"></p>
                                <div class="flex flex-wrap gap-2 mb-4">
                                    <span id="video-duration" class="bg-gray-800 text-nebula-300 px-3 py-1 rounded-full text-sm"></span>
                                    <span id="video-views" class="bg-gray-800 text-nebula-300 px-3 py-1 rounded-full text-sm"></span>
                                    <span id="video-date" class="bg-gray-800 text-nebula-300 px-3 py-1 rounded-full text-sm"></span>
                                </div>
                                <div class="progress-container hidden mb-4">
                                    <div class="flex justify-between text-sm text-nebula-300 mb-1">
                                        <span>Fetching formats...</span>
                                        <span id="progress-text">0%</span>
                                    </div>
                                    <div class="w-full bg-gray-800 rounded-full h-2">
                                        <div id="progress-bar" class="progress-bar h-2 rounded-full" style="width: 0%"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="format-options" class="hidden">
                        <h3 class="text-lg font-medium text-white mb-4">Available Formats</h3>
                        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6" id="format-container">
                            <!-- Format options will be inserted here -->
                        </div>

                        <div class="flex flex-wrap gap-4 mb-6">
                            <div class="flex-1 min-w-[200px]">
                                <label for="output-path" class="block text-nebula-300 mb-2 font-medium">Output Path</label>
                                <div class="flex">
                                    <input type="text" id="output-path" value="~/Downloads" 
                                           class="flex-1 bg-gray-800 border border-gray-700 rounded-l-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                                    <button id="browse-btn" class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-r-lg transition">
                                        <i class="fas fa-folder-open"></i>
                                    </button>
                                </div>
                            </div>

                            <div class="flex-1 min-w-[200px]">
                                <label for="filename" class="block text-nebula-300 mb-2 font-medium">Filename Template</label>
                                <input type="text" id="filename" value="%(title)s.%(ext)s" 
                                       class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                            </div>
                        </div>

                        <div class="flex justify-end space-x-3">
                            <button id="download-btn" class="bg-cosmic-600 hover:bg-cosmic-700 text-white px-6 py-3 rounded-lg font-medium transition flex items-center">
                                <i class="fas fa-rocket mr-2"></i> Launch Download
                            </button>
                        </div>
                    </div>
                </div>

                <!-- Settings Tab -->
                <div id="settings-tab" class="tab-content hidden">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div class="download-card p-4 rounded-lg">
                            <h3 class="text-lg font-medium text-white mb-4 flex items-center">
                                <i class="fas fa-download mr-2 text-nebula-400"></i> Download Settings
                            </h3>
                            <div class="space-y-4">
                                <div>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" class="rounded text-cosmic-600" checked>
                                        <span class="text-nebula-300">Embed metadata</span>
                                    </label>
                                </div>
                                <div>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" class="rounded text-cosmic-600" checked>
                                        <span class="text-nebula-300">Embed thumbnails</span>
                                    </label>
                                </div>
                                <div>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" class="rounded text-cosmic-600">
                                        <span class="text-nebula-300">Download subtitles</span>
                                    </label>
                                </div>
                                <div>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" class="rounded text-cosmic-600">
                                        <span class="text-nebula-300">Convert to MP3</span>
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="download-card p-4 rounded-lg">
                            <h3 class="text-lg font-medium text-white mb-4 flex items-center">
                                <i class="fas fa-network-wired mr-2 text-nebula-400"></i> Network Settings
                            </h3>
                            <div class="space-y-4">
                                <div>
                                    <label class="block text-nebula-300 mb-1">Retries</label>
                                    <input type="number" value="3" min="0" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                                </div>
                                <div>
                                    <label class="block text-nebula-300 mb-1">Timeout (seconds)</label>
                                    <input type="number" value="30" min="1" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                                </div>
                                <div>
                                    <label class="block text-nebula-300 mb-1">Rate Limit (KB/s)</label>
                                    <input type="number" placeholder="Unlimited" min="1" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                                </div>
                            </div>
                        </div>

                        <div class="download-card p-4 rounded-lg">
                            <h3 class="text-lg font-medium text-white mb-4 flex items-center">
                                <i class="fas fa-paint-brush mr-2 text-nebula-400"></i> Appearance
                            </h3>
                            <div class="space-y-4">
                                <div>
                                    <label class="block text-nebula-300 mb-1">Theme</label>
                                    <select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                                        <option>Cosmic (Default)</option>
                                        <option>Nebula</option>
                                        <option>Galaxy</option>
                                        <option>Dark Matter</option>
                                    </select>
                                </div>
                                <div>
                                    <label class="flex items-center space-x-2">
                                        <input type="checkbox" class="rounded text-cosmic-600" checked>
                                        <span class="text-nebula-300">Enable animations</span>
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="download-card p-4 rounded-lg">
                            <h3 class="text-lg font-medium text-white mb-4 flex items-center">
                                <i class="fas fa-terminal mr-2 text-nebula-400"></i> Advanced
                            </h3>
                            <div class="space-y-4">
                                <div>
                                    <label class="block text-nebula-300 mb-1">Custom Arguments</label>
                                    <textarea class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition h-24" placeholder="--add-metadata --embed-thumbnail"></textarea>
                                </div>
                                <div>
                                    <label class="block text-nebula-300 mb-1">Executable Path</label>
                                    <div class="flex">
                                        <input type="text" value="yt-dlp" 
                                               class="flex-1 bg-gray-800 border border-gray-700 rounded-l-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-cosmic-500 transition">
                                        <button class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-r-lg transition">
                                            <i class="fas fa-search"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="flex justify-end mt-6">
                        <button class="bg-gray-700 hover:bg-gray-600 text-white px-6 py-2 rounded-lg font-medium transition mr-3">
                            Reset Defaults
                        </button>
                        <button class="bg-cosmic-600 hover:bg-cosmic-700 text-white px-6 py-2 rounded-lg font-medium transition">
                            Save Settings
                        </button>
                    </div>
                </div>

                <!-- Queue Tab -->
                <div id="queue-tab" class="tab-content hidden">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-medium text-white flex items-center">
                            <i class="fas fa-list-ol mr-2 text-nebula-400"></i> Download Queue
                        </h3>
                        <div class="flex space-x-2">
                            <button class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-lg text-sm transition">
                                <i class="fas fa-play mr-1"></i> Start All
                            </button>
                            <button class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-lg text-sm transition">
                                <i class="fas fa-trash-alt mr-1"></i> Clear
                            </button>
                        </div>
                    </div>

                    <div class="space-y-3">
                        <div class="download-card p-4 rounded-lg flex items-center">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3">
                                    <div class="w-10 h-10 rounded bg-gray-800 flex items-center justify-center">
                                        <i class="fas fa-music text-nebula-400"></i>
                                    </div>
                                    <div>
                                        <h4 class="font-medium text-white">Interstellar Soundtrack - No Time for Caution</h4>
                                        <p class="text-sm text-nebula-300">YouTube • MP3 • 320kbps</p>
                                    </div>
                                </div>
                            </div>
                            <div class="flex items-center space-x-2">
                                <div class="w-24 bg-gray-800 rounded-full h-2">
                                    <div class="bg-cosmic-600 h-2 rounded-full" style="width: 65%"></div>
                                </div>
                                <span class="text-sm text-nebula-300">65%</span>
                                <button class="text-nebula-300 hover:text-white transition">
                                    <i class="fas fa-pause"></i>
                                </button>
                            </div>
                        </div>

                        <div class="download-card p-4 rounded-lg flex items-center">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3">
                                    <div class="w-10 h-10 rounded bg-gray-800 flex items-center justify-center">
                                        <i class="fas fa-film text-nebula-400"></i>
                                    </div>
                                    <div>
                                        <h4 class="font-medium text-white">The Beauty of Space in 4K</h4>
                                        <p class="text-sm text-nebula-300">YouTube • MP4 • 2160p</p>
                                    </div>
                                </div>
                            </div>
                            <div class="flex items-center space-x-2">
                                <div class="w-24 bg-gray-800 rounded-full h-2">
                                    <div class="bg-cosmic-600 h-2 rounded-full" style="width: 12%"></div>
                                </div>
                                <span class="text-sm text-nebula-300">12%</span>
                                <button class="text-nebula-300 hover:text-white transition">
                                    <i class="fas fa-pause"></i>
                                </button>
                            </div>
                        </div>

                        <div class="download-card p-4 rounded-lg flex items-center opacity-70">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3">
                                    <div class="w-10 h-10 rounded bg-gray-800 flex items-center justify-center">
                                        <i class="fas fa-film text-nebula-400"></i>
                                    </div>
                                    <div>
                                        <h4 class="font-medium text-white">NASA Live: Earth From Space</h4>
                                        <p class="text-sm text-nebula-300">YouTube • MP4 • 1080p</p>
                                    </div>
                                </div>
                            </div>
                            <div class="flex items-center space-x-2">
                                <span class="text-sm text-nebula-300">Queued</span>
                                <button class="text-nebula-300 hover:text-white transition">
                                    <i class="fas fa-play"></i>
                                </button>
                            </div>
                        </div>

                        <div class="download-card p-4 rounded-lg flex items-center opacity-70">
                            <div class="flex-1">
                                <div class="flex items-center space-x-3">
                                    <div class="w-10 h-10 rounded bg-gray-800 flex items-center justify-center">
                                        <i class="fas fa-headphones text-nebula-400"></i>
                                    </div>
                                    <div>
                                        <h4 class="font-medium text-white">Space Ambient Music</h4>
                                        <p class="text-sm text-nebula-300">SoundCloud • MP3 • 256kbps</p>
                                    </div>
                                </div>
                            </div>
                            <div class="flex items-center space-x-2">
                                <span class="text-sm text-nebula-300">Queued</span>
                                <button class="text-nebula-300 hover:text-white transition">
                                    <i class="fas fa-play"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

        <footer class="text-center text-nebula-400 text-sm">
            <p>Cosmo DL v1.0.0 - Powered by yt-dlp</p>
            <p class="mt-1">Made with <i class="fas fa-heart text-red-400"></i> somewhere in the universe</p>
        </footer>
    </div>

    <script>
        // Create stars
        function createStars() {
            const starsContainer = document.getElementById('stars');
            const starCount = 200;
            
            for (let i = 0; i < starCount; i++) {
                const star = document.createElement('div');
                star.className = 'star';
                
                // Random properties
                const size = Math.random() * 3;
                const posX = Math.random() * 100;
                const posY = Math.random() * 100;
                const opacity = Math.random() * 0.8 + 0.2;
                const duration = Math.random() * 5 + 3;
                
                star.style.width = `${size}px`;
                star.style.height = `${size}px`;
                star.style.left = `${posX}%`;
                star.style.top = `${posY}%`;
                star.style.opacity = opacity;
                star.style.setProperty('--duration', `${duration}s`);
                
                starsContainer.appendChild(star);
            }
        }

        // Animate comet
        function animateComet() {
            const comet = document.getElementById('comet');
            const delay = Math.random() * 30;
            
            setTimeout(() => {
                comet.style.animation = 'cometFly 15s linear infinite';
                setInterval(animateComet, 45000); // Repeat every 45 seconds
            }, delay * 1000);
        }

        // Tab switching
        document.querySelectorAll('.tab-button').forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons
                document.querySelectorAll('.tab-button').forEach(btn => {
                    btn.classList.remove('active');
                });
                
                // Add active class to clicked button
                button.classList.add('active');
                
                // Hide all tab contents
                document.querySelectorAll('.tab-content').forEach(content => {
                    content.classList.add('hidden');
                });
                
                // Show selected tab content
                const tabId = button.getAttribute('data-tab') + '-tab';
                document.getElementById(tabId).classList.remove('hidden');
            });
        });

        // Mock video info fetch
        document.getElementById('fetch-btn').addEventListener('click', () => {
            const urlInput = document.getElementById('url');
            if (!urlInput.value) {
                alert('Please enter a video URL');
                return;
            }
            
            // Show loading state
            const videoInfo = document.getElementById('video-info');
            const progressContainer = document.querySelector('.progress-container');
            const progressBar = document.getElementById('progress-bar');
            const progressText = document.getElementById('progress-text');
            
            videoInfo.classList.remove('hidden');
            progressContainer.classList.remove('hidden');
            
            // Simulate progress
            let progress = 0;
            const interval = setInterval(() => {
                progress += Math.random() * 10;
                if (progress > 100) progress = 100;
                
                progressBar.style.width = `${progress}%`;
                progressText.textContent = `${Math.round(progress)}%`;
                
                if (progress === 100) {
                    clearInterval(interval);
                    setTimeout(() => {
                        progressContainer.classList.add('hidden');
                        showVideoInfo();
                        showFormatOptions();
                    }, 500);
                }
            }, 200);
        });

        // Mock video info display
        function showVideoInfo() {
            document.getElementById('thumbnail').src = 'https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg';
            document.getElementById('video-title').textContent = 'Interstellar - Official Trailer';
            document.getElementById('video-author').textContent = 'by Warner Bros. Pictures';
            document.getElementById('video-duration').textContent = '2:49';
            document.getElementById('video-views').textContent = '45M views';
            document.getElementById('video-date').textContent = 'Jul 30, 2014';
        }

        // Mock format options
        function showFormatOptions() {
            const formatContainer = document.getElementById('format-container');
            formatContainer.innerHTML = '';
            
            const formats = [
                { id: '1', quality: '2160p', type: 'MP4', size: '1.2GB', codec: 'avc1.640033' },
                { id: '2', quality: '1440p', type: 'MP4', size: '850MB', codec: 'avc1.640033' },
                { id: '3', quality: '1080p', type: 'MP4', size: '520MB', codec: 'avc1.640028' },
                { id: '4', quality: '720p', type: 'MP4', size: '280MB', codec: 'avc1.64001F' },
                { id: '5', quality: '480p', type: 'MP4', size: '150MB', codec: 'avc1.64001E' },
                { id: '6', quality: '360p', type: 'MP4', size: '80MB', codec: 'avc1.64001E' },
                { id: '7', quality: 'Audio Only', type: 'MP3', size: '12MB', bitrate: '320kbps' },
                { id: '8', quality: 'Audio Only', type: 'MP3', size: '8MB', bitrate: '256kbps' },
                { id: '9', quality: 'Audio Only', type: 'MP3', size: '5MB', bitrate: '128kbps' },
            ];
            
            formats.forEach(format => {
                const formatElement = document.createElement('div');
                formatElement.className = 'format-option download-card p-4 rounded-lg cursor-pointer transition hover:shadow-lg';
                formatElement.innerHTML = `
                    <div class="flex justify-between items-start mb-2">
                        <h4 class="font-medium text-white">${format.quality}</h4>
                        <span class="text-sm text-nebula-400">${format.size}</span>
                    </div>
                    <div class="text-sm text-nebula-300">
                        <p>${format.type}</p>
                        <p>${format.codec || format.bitrate || ''}</p>
                    </div>
                `;
                
                formatElement.addEventListener('click', () => {
                    document.querySelectorAll('.format-option').forEach(el => {
                        el.classList.remove('selected');
                    });
                    formatElement.classList.add('selected');
                });
                
                formatContainer.appendChild(formatElement);
            });
            
            document.getElementById('format-options').classList.remove('hidden');
        }

        // Mock download
        document.getElementById('download-btn').addEventListener('click', () => {
            const selectedFormat = document.querySelector('.format-option.selected');
            if (!selectedFormat) {
                alert('Please select a format');
                return;
            }
            
            alert('Download started! (This is a demo)');
        });

        // Initialize
        document.addEventListener('DOMContentLoaded', () => {
            createStars();
            animateComet();
        });
    </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=rvce/cosmo-dl" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>