File size: 70,514 Bytes
b44cc63
 
 
 
 
 
 
 
 
4fb926f
 
 
 
 
 
 
 
 
 
b44cc63
 
 
4fb926f
 
 
b44cc63
 
 
4fb926f
b44cc63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fb926f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b44cc63
4fb926f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b44cc63
 
 
4fb926f
b44cc63
 
 
 
4fb926f
b44cc63
 
 
4fb926f
 
 
 
 
b44cc63
 
 
 
 
 
4fb926f
 
b44cc63
 
 
4fb926f
b44cc63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fb926f
 
b44cc63
 
 
 
 
 
 
 
 
 
 
4fb926f
 
b44cc63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fb926f
b44cc63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fb926f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b44cc63
 
 
 
 
 
 
4fb926f
 
 
 
 
b44cc63
4fb926f
b44cc63
 
 
4fb926f
b44cc63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fb926f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b44cc63
 
 
 
 
 
4fb926f
 
b44cc63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4fb926f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b44cc63
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AnimeVerse - Your Ultimate Anime Destination</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>
        /* Notification animation */
        @keyframes fadeInOut {
            0% { opacity: 0; transform: translateY(20px); }
            10% { opacity: 1; transform: translateY(0); }
            90% { opacity: 1; transform: translateY(0); }
            100% { opacity: 0; transform: translateY(20px); }
        }
        .animate-fade-in-out {
            animation: fadeInOut 3s ease forwards;
        }
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Roboto', sans-serif;
            background-color: #0a0a0a;
            color: #ffffff;
        }
        
        .hero-gradient {
            background: linear-gradient(90deg, #0a0a0a 0%, rgba(10, 10, 10, 0.8) 100%);
        }
        
        .anime-card {
            transition: all 0.3s ease;
            transform-style: preserve-3d;
        }
        
        .anime-card:hover {
            transform: translateY(-10px) scale(1.03);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
        }
        
        .watchlist-btn {
            transition: all 0.3s ease;
        }
        
        .watchlist-btn:hover {
            transform: scale(1.1);
        }
        
        .episode-btn {
            transition: all 0.2s ease;
        }
        
        .episode-btn:hover {
            transform: translateY(-2px);
        }
        
        .genre-badge {
            transition: all 0.2s ease;
        }
        
        .genre-badge:hover {
            transform: scale(1.05);
        }
        
        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }
        
        .animate-pulse {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        
        .scrollbar-hide::-webkit-scrollbar {
            display: none;
        }
        
        .scrollbar-hide {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        /* Modal animation */
        .modal-animate {
            animation: modalFadeIn 0.3s ease-out;
        }

        /* Video player aspect ratio */
        .aspect-w-16 {
            position: relative;
            padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
            height: 0;
            overflow: hidden;
        }
        
        .aspect-w-16 video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
    </style>
    <script>
        // Anime Data - 2000 entries (sample structure, in real app this would come from API)
        const animeData = Array.from({length: 2000}, (_, i) => ({
            id: i + 1,
            title: `Anime Title ${i + 1}`,
            image: `https://picsum.photos/300/450?random=${i}`,
            episode: Math.floor(Math.random() * 100) + 1,
            rating: (Math.random() * 1 + 4).toFixed(1),
            genres: ['Action', 'Adventure', 'Comedy', 'Drama', 'Fantasy', 'Horror', 'Mystery', 'Romance', 'Sci-Fi', 'Slice of Life'],
            status: ['NEW', 'TRENDING', 'POPULAR', 'HOT', 'CLASSIC'][Math.floor(Math.random() * 5)],
            description: `This is a description for anime ${i + 1}. It's a great show with amazing characters and story.`,
            releaseDate: new Date(Date.now() - Math.random() * 10000000000).toLocaleDateString()
        }));

        // Generate anime cards
        function generateAnimeCards(containerSelector, count, templateFunction) {
            const container = document.querySelector(containerSelector);
            if (!container) return;
            
            container.innerHTML = '';
            const fragment = document.createDocumentFragment();
            
            for (let i = 0; i < count && i < animeData.length; i++) {
                const anime = animeData[i];
                const card = templateFunction(anime);
                fragment.appendChild(card);
            }
            
            container.appendChild(fragment);
        }

        // Template for featured anime cards
        function featuredAnimeTemplate(anime) {
            const card = document.createElement('div');
            card.className = 'flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative cursor-pointer';
            card.addEventListener('click', () => openVideoModal(anime));
            card.innerHTML = `
                <img src="${anime.image}" alt="${anime.title}" class="w-full h-full object-cover">
                <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                <div class="absolute bottom-0 left-0 p-4 w-full">
                    <span class="bg-[#6246ea] text-white text-xs font-semibold px-2 py-1 rounded">${anime.status}</span>
                    <h4 class="text-lg font-bold text-white mt-2">${anime.title}</h4>
                    <div class="flex justify-between items-center mt-2">
                        <span class="text-sm text-[#b8c1ec]">Ep. ${anime.episode}</span>
                        <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                            <i class="fas fa-plus"></i>
                        </button>
                    </div>
                </div>
            `;
            return card;
        }

        // Template for trending anime cards
        function trendingAnimeTemplate(anime) {
            const card = document.createElement('div');
            card.className = 'bg-[#2e3856] rounded-lg overflow-hidden anime-card relative cursor-pointer';
            card.addEventListener('click', () => openVideoModal(anime));
            card.innerHTML = `
                <img src="${anime.image}" alt="${anime.title}" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#6246ea] text-white text-xs font-bold px-2 py-1 rounded">${anime.status}</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">${anime.title}</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. ${anime.episode}</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">${anime.rating}</span>
                        </div>
                    </div>
                </div>
            `;
            return card;
        }

        // Video Player Functions
        function openVideoModal(anime) {
            const modal = document.getElementById('videoModal');
            const videoPlayer = document.getElementById('animeVideoPlayer');
            const videoTitle = document.getElementById('videoTitle');
            const videoDescription = document.getElementById('videoDescription');
            
            // For demo purposes, we'll use a placeholder video
            // In a real app, you'd use the actual video URL from your anime data
            videoPlayer.src = 'https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4';
            videoTitle.textContent = anime.title;
            videoDescription.textContent = anime.description;
            
            modal.classList.remove('hidden');
            videoPlayer.play();
        }

        function closeVideoModal() {
            const modal = document.getElementById('videoModal');
            const videoPlayer = document.getElementById('animeVideoPlayer');
            
            videoPlayer.pause();
            videoPlayer.currentTime = 0;
            modal.classList.add('hidden');
        }

        // Sign In Modal Functions
        function openSignInModal() {
            document.getElementById('signInModal').classList.remove('hidden');
        }

        function closeSignInModal() {
            document.getElementById('signInModal').classList.add('hidden');
        }

        // Mobile menu toggle
        // Search anime function
        function searchAnime(query) {
            query = query.toLowerCase().trim();
            if (!query) {
                // If search is empty, show all anime
                generateAnimeCards('.trending-grid', itemsPerPage, trendingAnimeTemplate);
                return;
            }

            const results = animeData.filter(anime => 
                anime.title.toLowerCase().includes(query) || 
                anime.genres.some(genre => genre.toLowerCase().includes(query))
            );

            const container = document.querySelector('.trending-grid');
            container.innerHTML = '';
            
            if (results.length === 0) {
                container.innerHTML = `
                    <div class="col-span-5 text-center py-10">
                        <i class="fas fa-search text-4xl text-[#6246ea] mb-4"></i>
                        <h3 class="text-xl text-white font-bold mb-2">No results found</h3>
                        <p class="text-[#b8c1ec]">Try different keywords</p>
                    </div>
                `;
                return;
            }

            const fragment = document.createDocumentFragment();
            results.slice(0, 20).forEach(anime => {
                const card = trendingAnimeTemplate(anime);
                fragment.appendChild(card);
            });
            
            container.appendChild(fragment);
        }

        document.addEventListener('DOMContentLoaded', function() {
            // Search functionality
            const searchInput = document.getElementById('searchInput');
            const searchBtn = document.getElementById('searchBtn');
            const mobileSearchInput = document.getElementById('mobileSearchInput');
            const mobileSearchBtn = document.getElementById('mobileSearchBtn');

            function handleSearch() {
                const query = searchInput.value || mobileSearchInput.value;
                searchAnime(query);
            }

            if (searchBtn) {
                searchBtn.addEventListener('click', handleSearch);
                searchInput.addEventListener('keypress', (e) => {
                    if (e.key === 'Enter') {
                        handleSearch();
                    }
                });
            }

            if (mobileSearchBtn) {
                mobileSearchBtn.addEventListener('click', handleSearch);
                mobileSearchInput.addEventListener('keypress', (e) => {
                    if (e.key === 'Enter') {
                        handleSearch();
                    }
                });
            }
            // Generate anime content
            generateAnimeCards('.featured-slider', 10, featuredAnimeTemplate);
            generateAnimeCards('.trending-grid', 20, trendingAnimeTemplate);
            
            const mobileMenuButton = document.getElementById('mobile-menu-button');
            const mobileMenu = document.getElementById('mobile-menu');
            
            mobileMenuButton.addEventListener('click', function() {
                mobileMenu.classList.toggle('hidden');
            });

            // Featured anime slider
            const slider = document.querySelector('.featured-slider');
            const prevBtn = document.querySelector('.featured-prev');
            const nextBtn = document.querySelector('.featured-next');
            
            if (slider && prevBtn && nextBtn) {
                nextBtn.addEventListener('click', () => {
                    slider.scrollBy({ left: 300, behavior: 'smooth' });
                });
                
                prevBtn.addEventListener('click', () => {
                    slider.scrollBy({ left: -300, behavior: 'smooth' });
                });
            }

            // Pagination
            let currentPage = 1;
            const itemsPerPage = 20;
            const totalPages = Math.ceil(animeData.length / itemsPerPage);
            
            function updatePagination() {
                document.getElementById('current-page').textContent = currentPage;
                const startIdx = (currentPage - 1) * itemsPerPage;
                generateAnimeCards('.trending-grid', itemsPerPage, trendingAnimeTemplate, startIdx);
            }
            
            document.querySelectorAll('.pagination-btn').forEach(btn => {
                btn.addEventListener('click', function() {
                    if (this.dataset.page === 'prev' && currentPage > 1) {
                        currentPage--;
                    } else if (this.dataset.page === 'next' && currentPage < totalPages) {
                        currentPage++;
                    }
                    updatePagination();
                });
            });
            
            // Watchlist functionality
            const watchlistButtons = document.querySelectorAll('.watchlist-btn');
            watchlistButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const icon = this.querySelector('i');
                    
                    if (icon.classList.contains('fa-plus')) {
                        icon.classList.remove('fa-plus');
                        icon.classList.add('fa-check');
                        this.classList.add('bg-green-500');
                        this.classList.remove('bg-[#6246ea]/70');
                    } else {
                        icon.classList.remove('fa-check');
                        icon.classList.add('fa-plus');
                        this.classList.remove('bg-green-500');
                        this.classList.add('bg-[#6246ea]/70');
                    }
                });
            });
        });
    </script>
</head>
<body>
    <!-- Navigation -->
    <nav class="bg-black bg-opacity-90 shadow-lg sticky top-0 z-50 backdrop-blur-sm">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex items-center justify-between h-16">
                <div class="flex items-center">
                    <div class="flex-shrink-0">
                        <span class="text-2xl font-bold text-white"><span class="text-red-600">Amedia</span>TV</span>
                    </div>
                    <div class="hidden md:block">
                        <div class="ml-10 flex items-baseline space-x-4">
                            <a href="#" class="text-white hover:text-red-600 px-3 py-2 text-sm font-medium transition">Home</a>
                            <a href="#" class="text-gray-400 hover:text-red-600 px-3 py-2 text-sm font-medium transition">Movies</a>
                            <a href="#" class="text-gray-400 hover:text-red-600 px-3 py-2 text-sm font-medium transition">TV Shows</a>
                            <a href="#" class="text-gray-400 hover:text-red-600 px-3 py-2 text-sm font-medium transition">Series</a>
                            <a href="#" class="text-gray-400 hover:text-red-600 px-3 py-2 text-sm font-medium transition">Cartoons</a>
                        </div>
                    </div>
                </div>
                <div class="hidden md:block">
                    <div class="ml-4 flex items-center md:ml-6">
                        <div class="relative mx-4">
                            <input type="text" id="searchInput" class="bg-[#232946] border border-[#6246ea] rounded-full py-1 px-4 text-white focus:outline-none focus:ring-2 focus:ring-[#6246ea]" placeholder="Search anime...">
                            <button id="searchBtn" class="absolute right-3 top-1/2 transform -translate-y-1/2 text-[#b8c1ec] hover:text-[#6246ea]">
                                <i class="fas fa-search"></i>
                            </button>
                        </div>
                        <button onclick="openSignInModal()" class="bg-red-600 text-white px-4 py-1 rounded text-sm font-medium hover:bg-red-700 transition">Sign In</button>
                    </div>
                </div>
                <div class="-mr-2 flex md:hidden">
                    <button id="mobile-menu-button" class="inline-flex items-center justify-center p-2 rounded-md text-[#fffffe] hover:text-white hover:bg-[#6246ea] focus:outline-none">
                        <i class="fas fa-bars"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Mobile menu -->
        <div id="mobile-menu" class="hidden md:hidden bg-[#232946]">
            <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
                <a href="#" class="text-[#fffffe] hover:bg-[#6246ea] hover:text-white block px-3 py-2 rounded-md text-base font-medium">Home</a>
                <a href="#" class="text-[#b8c1ec] hover:bg-[#6246ea] hover:text-white block px-3 py-2 rounded-md text-base font-medium">Trending</a>
                <a href="#" class="text-[#b8c1ec] hover:bg-[#6246ea] hover:text-white block px-3 py-2 rounded-md text-base font-medium">Genres</a>
                <a href="#" class="text-[#b8c1ec] hover:bg-[#6246ea] hover:text-white block px-3 py-2 rounded-md text-base font-medium">Seasonal</a>
                <a href="#" class="text-[#b8c1ec] hover:bg-[#6246ea] hover:text-white block px-3 py-2 rounded-md text-base font-medium">My List</a>
                <div class="pt-4 pb-3 border-t border-[#6246ea]">
                    <div class="flex items-center px-5">
                        <input type="text" id="mobileSearchInput" class="bg-[#232946] border border-[#6246ea] rounded-full py-1 px-4 text-white focus:outline-none focus:ring-2 focus:ring-[#6246ea] flex-grow" placeholder="Search anime...">
                        <button id="mobileSearchBtn" class="ml-2 bg-[#6246ea] hover:bg-[#7b61ff] text-white px-3 py-1 rounded-full text-sm font-medium transition">Go</button>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <!-- Hero Section -->
    <section class="relative">
        <div class="hero-gradient h-96 md:h-screen/2 md:max-h-[600px] flex items-center">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 py-16">
                <div class="md:w-2/3 lg:w-1/2">
                    <h1 class="text-4xl md:text-6xl font-bold mb-4 text-white">Unlimited <span class="text-[#E50914]">Movies</span>, TV Shows</h1>
                    <p class="text-lg md:text-xl text-[#b8c1ec] mb-8">Watch hit movies, popular TV series and exclusive Amedia Originals.</p>
                    <div class="flex flex-col sm:flex-row gap-4">
                        <button class="bg-[#6246ea] hover:bg-[#7b61ff] text-white font-bold py-3 px-6 rounded-full transition flex items-center justify-center gap-2">
                            <i class="fas fa-play"></i> Start Watching
                        </button>
                        <button class="bg-transparent hover:bg-[#6246ea]/20 text-white font-bold py-3 px-6 rounded-full border border-[#6246ea] transition flex items-center justify-center gap-2">
                            <i class="fas fa-plus"></i> My Watchlist
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Featured Anime Slider -->
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-20 md:-mt-32 relative z-20">
            <div class="bg-[#232946] rounded-xl shadow-2xl overflow-hidden">
                <div class="flex justify-between items-center p-4 border-b border-[#6246ea]">
                    <h3 class="text-xl font-bold text-white">Popular on Amedia</h3>
                    <div class="flex gap-2">
                        <button class="featured-prev hover:bg-[#6246ea]/20 text-white p-2 rounded-full transition">
                            <i class="fas fa-chevron-left"></i>
                        </button>
                        <button class="featured-next hover:bg-[#6246ea]/20 text-white p-2 rounded-full transition">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>
                <div class="featured-slider p-4 flex overflow-x-auto scrollbar-hide gap-6">
                    <!-- Featured Anime Cards -->
                    <div class="flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                        <img src="https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1925&q=80" alt="Attack on Titan" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 p-4 w-full">
                            <span class="bg-[#6246ea] text-white text-xs font-semibold px-2 py-1 rounded">NEW EPISODE</span>
                            <h4 class="text-lg font-bold text-white mt-2">Attack on Titan Final</h4>
                            <div class="flex justify-between items-center mt-2">
                                <span class="text-sm text-[#b8c1ec]">Ep. 88</span>
                                <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                    <i class="fas fa-plus"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                        <img src="https://images.unsplash.com/photo-1560164097-06a571f22535?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2071&q=80" alt="Demon Slayer" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 p-4 w-full">
                            <span class="bg-[#e53170] text-white text-xs font-semibold px-2 py-1 rounded">POPULAR</span>
                            <h4 class="text-lg font-bold text-white mt-2">Demon Slayer Season 3</h4>
                            <div class="flex justify-between items-center mt-2">
                                <span class="text-sm text-[#b8c1ec]">Ep. 11</span>
                                <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                    <i class="fas fa-plus"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                        <img src="https://images.unsplash.com/photo-1578632767115-24eb07c05a8e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Jujutsu Kaisen" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 p-4 w-full">
                            <span class="bg-[#ff8906] text-white text-xs font-semibold px-2 py-1 rounded">TRENDING</span>
                            <h4 class="text-lg font-bold text-white mt-2">Jujutsu Kaisen S2</h4>
                            <div class="flex justify-between items-center mt-2">
                                <span class="text-sm text-[#b8c1ec]">Ep. 5</span>
                                <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                    <i class="fas fa-plus"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                        <img src="https://images.unsplash.com/photo-1633613286991-611fe299c4be?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Spy x Family" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 p-4 w-full">
                            <span class="bg-[#6246ea] text-white text-xs font-semibold px-2 py-1 rounded">NEW EPISODE</span>
                            <h4 class="text-lg font-bold text-white mt-2">Spy x Family Part 2</h4>
                            <div class="flex justify-between items-center mt-2">
                                <span class="text-sm text-[#b8c1ec]">Ep. 24</span>
                                <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                    <i class="fas fa-plus"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                        <img src="https://images.unsplash.com/photo-1589254065874-1e32917b8e11?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Chainsaw Man" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 p-4 w-full">
                            <span class="bg-[#e53170] text-white text-xs font-semibold px-2 py-1 rounded">POPULAR</span>
                            <h4 class="text-lg font-bold text-white mt-2">Chainsaw Man</h4>
                            <div class="flex justify-between items-center mt-2">
                                <span class="text-sm text-[#b8c1ec]">Ep. 12</span>
                                <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                    <i class="fas fa-plus"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="flex-shrink-0 w-64 h-96 bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                        <img src="https://images.unsplash.com/photo-1633613286848-6f628a6a4747?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Naruto" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-black/40 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 p-4 w-full">
                            <span class="bg-[#e53170] text-white text-xs font-semibold px-2 py-1 rounded">POPULAR</span>
                            <h4 class="text-lg font-bold text-white mt-2">Chainsaw Man</h4>
                            <div class="flex justify-between items-center mt-2">
                                <span class="text-sm text-[#b8c1ec]">Ep. 12</span>
                                <button class="watchlist-btn p-1 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                    <i class="fas fa-plus"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Trending Now Section -->
    <section class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div class="flex justify-center gap-4 mb-6">
            <button class="pagination-btn bg-[#6246ea] text-white px-4 py-2 rounded" data-page="prev">Previous</button>
            <span class="text-white flex items-center">Page <span id="current-page">1</span></span>
            <button class="pagination-btn bg-[#6246ea] text-white px-4 py-2 rounded" data-page="next">Next</button>
        </div>
        <div class="flex justify-between items-center mb-6">
            <h2 class="text-2xl md:text-3xl font-bold text-white">Trending Movies</h2>
            <a href="#" class="text-[#b8c1ec] hover:text-[#6246ea] text-sm md:text-base transition">View All</a>
        </div>
        
        <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4 md:gap-6 trending-grid">
            <!-- Trend Anime Card 1 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1531259736756-6caccf485f18?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="One Piece" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#ff8906] text-white text-xs font-bold px-2 py-1 rounded">TRENDING #1</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">One Piece: Wano Arc</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 1072</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.9</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Trend Anime Card 2 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1540228238269-18b343325284?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="My Hero Academia" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#6246ea] text-white text-xs font-bold px-2 py-1 rounded">NEW</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">My Hero Academia S6</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 25</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.8</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Trend Anime Card 3 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1494607239405-9f6c1a88dc52?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Vinland Saga" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#e53170] text-white text-xs font-bold px-2 py-1 rounded">HOT</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">Vinland Saga S2</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 12</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.9</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Trend Anime Card 4 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1608889825205-eebdb9fc5806?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Blue Lock" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#ff8906] text-white text-xs font-bold px-2 py-1 rounded">TRENDING</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">Blue Lock</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 24</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.7</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Trend Anime Card 5 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1493246507139-91e8fad9978e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Mob Psycho" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#6246ea] text-white text-xs font-bold px-2 py-1 rounded">FINAL</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">Mob Psycho 100 III</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 12</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.9</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Trend Anime Card 6 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1633613286848-6f628a6a4747?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Naruto" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#ff8906] text-white text-xs font-bold px-2 py-1 rounded">CLASSIC</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">Naruto Shippuden</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 500</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.8</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Trend Anime Card 7 -->
            <div class="bg-[#2e3856] rounded-lg overflow-hidden anime-card relative">
                <img src="https://images.unsplash.com/photo-1633613286991-611fe299c4be?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Spy x Family" class="w-full h-48 object-cover">
                <div class="absolute top-2 right-2">
                    <span class="bg-[#6246ea] text-white text-xs font-bold px-2 py-1 rounded">NEW</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">Spy x Family Part 2</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 24</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.7</span>
                        </div>
                    </div>
                </div>
            </div>
                <div class="absolute top-2 right-2">
                    <span class="bg-[#6246ea] text-white text-xs font-bold px-2 py-1 rounded">FINAL</span>
                </div>
                <div class="p-3">
                    <h4 class="font-bold text-white truncate">Mob Psycho 100 III</h4>
                    <div class="flex justify-between items-center mt-2 text-sm">
                        <span class="text-[#b8c1ec]">Ep. 12</span>
                        <div class="flex gap-1 items-center">
                            <i class="fas fa-star text-yellow-400"></i>
                            <span class="text-white">4.9</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Popular Genres Section -->
    <section class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 bg-[#232946] rounded-xl">
        <div class="flex justify-between items-center mb-6">
            <h2 class="text-2xl md:text-3xl font-bold text-white">Browse Categories</h2>
            <a href="#" class="text-[#b8c1ec] hover:text-[#E50914] text-sm md:text-base transition">All Categories</a>
        </div>
        
        <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-3 md:gap-4">
            <!-- Genre Badge 1 -->
            <a href="#" class="genre-badge">
                <div class="bg-[#6246ea] hover:bg-[#7b61ff] rounded-lg p-4 text-center transition">
                    <div class="w-12 h-12 mx-auto bg-white/20 rounded-full flex items-center justify-center mb-2">
                        <i class="fas fa-fist-raised text-white"></i>
                    </div>
                    <h4 class="font-bold text-white">Action</h4>
                    <span class="text-xs text-[#b8c1ec]">1,245 Titles</span>
                </div>
            </a>
            
            <!-- Genre Badge 2 -->
            <a href="#" class="genre-badge">
                <div class="bg-[#e53170] hover:bg-[#ff4d88] rounded-lg p-4 text-center transition">
                    <div class="w-12 h-12 mx-auto bg-white/20 rounded-full flex items-center justify-center mb-2">
                        <i class="fas fa-heart text-white"></i>
                    </div>
                    <h4 class="font-bold text-white">Romance</h4>
                    <span class="text-xs text-[#b8c1ec]">892 Titles</span>
                </div>
            </a>
            
            <!-- Genre Badge 3 -->
            <a href="#" class="genre-badge">
                <div class="bg-[#ff8906] hover:bg-[#ff9e2c] rounded-lg p-4 text-center transition">
                    <div class="w-12 h-12 mx-auto bg-white/20 rounded-full flex items-center justify-center mb-2">
                        <i class="fas fa-laugh-beam text-white"></i>
                    </div>
                    <h4 class="font-bold text-white">Comedy</h4>
                    <span class="text-xs text-[#b8c1ec]">756 Titles</span>
                </div>
            </a>
            
            <!-- Genre Badge 4 -->
            <a href="#" class="genre-badge">
                <div class="bg-[#0f0e17] hover:bg-[#232946] rounded-lg p-4 text-center transition border border-[#6246ea]">
                    <div class="w-12 h-12 mx-auto bg-white/20 rounded-full flex items-center justify-center mb-2">
                        <i class="fas fa-brain text-white"></i>
                    </div>
                    <h4 class="font-bold text-white">Psychological</h4>
                    <span class="text-xs text-[#b8c1ec]">325 Titles</span>
                </div>
            </a>
            
            <!-- Genre Badge 5 -->
            <a href="#" class="genre-badge">
                <div class="bg-[#8bd3dd] hover:bg-[#a8e6f0] rounded-lg p-4 text-center transition">
                    <div class="w-12 h-12 mx-auto bg-[#232946]/20 rounded-full flex items-center justify-center mb-2">
                        <i class="fas fa-ghost text-[#232946]"></i>
                    </div>
                    <h4 class="font-bold text-[#232946]">Horror</h4>
                    <span class="text-xs text-[#232946]">418 Titles</span>
                </div>
            </a>
        </div>
    </section>

    <!-- Currently Airing Section with Episode Grid -->
    <section class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div class="flex justify-between items-center mb-6">
            <h2 class="text-2xl md:text-3xl font-bold text-white">New Episodes</h2>
            <div class="flex items-center gap-2">
                <span class="text-sm text-[#b8c1ec] hidden md:block">Today's releases:</span>
                <div class="relative">
                    <select class="bg-[#232946] border border-[#6246ea] text-white rounded-full pl-3 pr-8 py-1 appearance-none focus:outline-none text-sm">
                        <option>Tuesday, July 25</option>
                        <option>Monday, July 24</option>
                        <option>Sunday, July 23</option>
                    </select>
                    <i class="fas fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-[#b8c1ec] pointer-events-none"></i>
                </div>
            </div>
        </div>
        
        <div class="bg-[#2e3856] rounded-xl overflow-hidden">
            <!-- Episode Header -->
            <div class="grid grid-cols-12 gap-4 p-4 border-b border-[#6246ea] text-sm font-medium text-[#b8c1ec] hidden md:grid">
                <div class="col-span-5">Title</div>
                <div class="col-span-2">Episode</div>
                <div class="col-span-2">Time</div>
                <div class="col-span-3 text-right">Action</div>
            </div>
            
            <!-- Episode Item 1 -->
            <div class="grid grid-cols-2 md:grid-cols-12 gap-4 p-4 border-b border-[#6246ea]/30 items-center hover:bg-[#3a4568] transition">
                <div class="col-span-1 md:col-span-5 flex items-center gap-3">
                    <img src="https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1925&q=80" alt="Attack on Titan" class="w-12 h-16 object-cover rounded">
                    <div>
                        <h4 class="font-bold text-white">Attack on Titan: Final Season</h4>
                        <div class="flex gap-2 flex-wrap mt-1">
                            <span class="text-xs bg-[#6246ea] text-white px-2 py-0.5 rounded">Action</span>
                            <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded">Drama</span>
                            <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded">Dark Fantasy</span>
                        </div>
                    </div>
                </div>
                <div class="col-span-1 md:col-span-2">
                    <span class="text-sm text-[#b8c1ec] md:hidden">Ep:</span>
                    <span class="text-white font-medium">Episode 88</span>
                </div>
                <div class="col-span-1 md:col-span-2">
                    <span class="text-sm text-[#b8c1ec] md:hidden">Released:</span>
                    <span class="text-white">2 hours ago</span>
                </div>
                <div class="col-span-1 md:col-span-3 flex justify-end">
                    <button class="episode-btn bg-[#6246ea] hover:bg-[#7b61ff] text-white px-3 py-1 rounded text-sm font-medium transition flex items-center gap-2">
                        <i class="fas fa-play"></i> <span class="hidden md:inline">Watch Now</span>
                    </button>
                </div>
            </div>
            
            <!-- Episode Item 2 -->
            <div class="grid grid-cols-2 md:grid-cols-12 gap-4 p-4 border-b border-[#6246ea]/30 items-center hover:bg-[#3a4568] transition">
                <div class="col-span-1 md:col-span-5 flex items-center gap-3">
                    <img src="https://images.unsplash.com/photo-1560164097-06a571f22535?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2071&q=80" alt="Demon Slayer" class="w-12 h-16 object-cover rounded">
                    <div>
                        <h4 class="font-bold text-white">Demon Slayer: Swordsmith Village Arc</h4>
                        <div class="flex gap-2 flex-wrap mt-1">
                            <span class="text-xs bg-[#6246ea] text-white px-2 py-0.5 rounded">Action</span>
                            <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded">Adventure</span>
                            <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded">Supernatural</span>
                        </div>
                    </div>
                </div>
                <div class="col-span-1 md:col-span-2">
                    <span class="text-sm text-[#b8c1ec] md:hidden">Ep:</span>
                    <span class="text-white font-medium">Episode 11</span>
                </div>
                <div class="col-span-1 md:col-span-2">
                    <span class="text-sm text-[#b8c1ec] md:hidden">Released:</span>
                    <span class="text-white">5 hours ago</span>
                </div>
                <div class="col-span-1 md:col-span-3 flex justify-end">
                    <button class="episode-btn bg-[#6246ea] hover:bg-[#7b61ff] text-white px-3 py-1 rounded text-sm font-medium transition flex items-center gap-2">
                        <i class="fas fa-play"></i> <span class="hidden md:inline">Watch Now</span>
                    </button>
                </div>
            </div>
            
            <!-- Episode Item 3 -->
            <div class="grid grid-cols-2 md:grid-cols-12 gap-4 p-4 items-center hover:bg-[#3a4568] transition">
                <div class="col-span-1 md:col-span-5 flex items-center gap-3">
                    <img src="https://images.unsplash.com/photo-1633613286991-611fe299c4be?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Spy x Family" class="w-12 h-16 object-cover rounded">
                    <div>
                        <h4 class="font-bold text-white">Spy x Family Season 2</h4>
                        <div class="flex gap-2 flex-wrap mt-1">
                            <span class="text-xs bg-[#6246ea] text-white px-2 py-0.5 rounded">Comedy</span>
                            <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded">Action</span>
                            <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded">Slice of Life</span>
                        </div>
                    </div>
                </div>
                <div class="col-span-1 md:col-span-2">
                    <span class="text-sm text-[#b8c1ec] md:hidden">Ep:</span>
                    <span class="text-white font-medium">Episode 24</span>
                </div>
                <div class="col-span-1 md:col-span-2">
                    <span class="text-sm text-[#b8c1ec] md:hidden">Released:</span>
                    <span class="text-white">Yesterday</span>
                </div>
                <div class="col-span-1 md:col-span-3 flex justify-end">
                    <button class="episode-btn bg-[#6246ea] hover:bg-[#7b61ff] text-white px-3 py-1 rounded text-sm font-medium transition flex items-center gap-2">
                        <i class="fas fa-play"></i> <span class="hidden md:inline">Watch Now</span>
                    </button>
                </div>
            </div>
        </div>
    </section>

    <!-- Coming Soon Section -->
    <section class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div class="flex justify-between items-center mb-6">
            <h2 class="text-2xl md:text-3xl font-bold text-white">Coming Soon</h2>
            <div class="flex items-center gap-2">
                <span class="text-sm text-[#b8c1ec] hidden md:block">Filter by:</span>
                <div class="relative">
                    <select class="bg-[#232946] border border-[#6246ea] text-white rounded-full pl-3 pr-8 py-1 appearance-none focus:outline-none text-sm">
                        <option>Summer 2023</option>
                        <option>Fall 2023</option>
                        <option>Winter 2024</option>
                    </select>
                    <i class="fas fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-[#b8c1ec] pointer-events-none"></i>
                </div>
            </div>
        </div>
        
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
            <!-- Coming Soon Card 1 -->
            <div class="bg-[#2e3856] rounded-xl overflow-hidden anime-card flex flex-col">
                <div class="relative pt-[56.25%]">
                    <img src="https://images.unsplash.com/photo-1633328198397-a4be44f5f204?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2071&q=80" alt="Hell's Paradise" class="absolute inset-0 w-full h-full object-cover">
                    <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-transparent to-transparent"></div>
                    <div class="absolute bottom-0 left-0 p-4 w-full">
                        <div class="flex justify-between items-center">
                            <span class="bg-[#6246ea] text-white text-xs font-semibold px-2 py-1 rounded">JULY 12</span>
                            <button class="watchlist-btn p-1.5 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                <i class="fas fa-bell"></i>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="p-4 flex-grow">
                    <h3 class="font-bold text-xl text-white mb-2">Hell's Paradise: Final Arc</h3>
                    <p class="text-[#b8c1ec] text-sm mb-3">The thrilling conclusion to Gabimaru's journey as he faces his ultimate challenge in the mysterious island's depths.</p>
                    <div class="flex flex-wrap gap-2">
                        <span class="text-xs bg-[#6246ea] text-white px-2 py-0.5 rounded genre-badge">Action</span>
                        <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded genre-badge">Dark Fantasy</span>
                        <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded genre-badge">Historical</span>
                    </div>
                </div>
            </div>
            
            <!-- Coming Soon Card 2 -->
            <div class="bg-[#2e3856] rounded-xl overflow-hidden anime-card flex flex-col">
                <div class="relative pt-[56.25%]">
                    <img src="https://images.unsplash.com/photo-1534972195531-d756b9bfa9f2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Dr. Stone" class="absolute inset-0 w-full h-full object-cover">
                    <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-transparent to-transparent"></div>
                    <div class="absolute bottom-0 left-0 p-4 w-full">
                        <div class="flex justify-between items-center">
                            <span class="bg-[#e53170] text-white text-xs font-semibold px-2 py-1 rounded">AUG 5</span>
                            <button class="watchlist-btn p-1.5 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                <i class="fas fa-bell"></i>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="p-4 flex-grow">
                    <h3 class="font-bold text-xl text-white mb-2">Dr. Stone: New World Part 2</h3>
                    <p class="text-[#b8c1ec] text-sm mb-3">Senku and the Kingdom of Science continue their journey to uncover the secrets of petrification and revive civilization.</p>
                    <div class="flex flex-wrap gap-2">
                        <span class="text-xs bg-[#6246ea] text-white px-2 py-0.5 rounded genre-badge">Adventure</span>
                        <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded genre-badge">Sci-Fi</span>
                        <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded genre-badge">Comedy</span>
                    </div>
                </div>
            </div>
            
            <!-- Coming Soon Card 3 -->
            <div class="bg-[#2e3856] rounded-xl overflow-hidden anime-card flex flex-col">
                <div class="relative pt-[56.25%]">
                    <img src="https://images.unsplash.com/photo-1633613286991-611fe299c4be?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80" alt="Bleach" class="absolute inset-0 w-full h-full object-cover">
                    <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-transparent to-transparent"></div>
                    <div class="absolute bottom-0 left-0 p-4 w-full">
                        <div class="flex justify-between items-center">
                            <span class="bg-[#ff8906] text-white text-xs font-semibold px-2 py-1 rounded">OCT 12</span>
                            <button class="watchlist-btn p-1.5 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                <i class="fas fa-bell"></i>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="p-4 flex-grow">
                    <h3 class="font-bold text-xl text-white mb-2">Bleach: Thousand-Year Blood War Part 2</h3>
                    <p class="text-[#b8c1ec] text-sm mb-3">Ichigo Kurosaki returns in the second cour of the final arc as the war between Soul Reapers and Quincy reaches its climax.</p>
                    <div class="flex flex-wrap gap-2">
                        <span class="text-xs bg-[#6246ea] text-white px-2 py-0.5 rounded genre-badge">Action</span>
                        <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded genre-badge">Supernatural</span>
                        <span class="text-xs bg-[#232946] text-[#b8c1ec] px-2 py-0.5 rounded genre-badge">Shounen</span>
                    </div>
                </div>
            </div>
                    <div class="absolute inset-0 bg-gradient-to-t from-black/90 via-transparent to-transparent"></div>
                    <div class="absolute bottom-0 left-0 p-4 w-full">
                        <div class="flex justify-between items-center">
                            <span class="bg-[#e53170] text-white text-xs font-semibold px-2 py-1 rounded">AUG 5</span>
                            <button class="watchlist-btn p-1.5 text-white rounded-full bg-[#6246ea]/70 hover:bg-[#6246ea]">
                                <i class="fas fa-bell"></i>
                            </button>
    <footer class="bg-[#232946] py-12">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="grid grid-cols-2 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="text-white font-bold mb-4">Navigation</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Home</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Movies</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">TV Shows</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Kids</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-white font-bold mb-4">Legal</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Terms of Use</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Privacy Policy</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Cookie Policy</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-white font-bold mb-4">Help</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">FAQ</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Contact Us</a></li>
                        <li><a href="#" class="text-[#b8c1ec] hover:text-[#E50914]">Feedback</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-white font-bold mb-4">Connect</h3>
                    <div class="flex space-x-4">
                        <a href="#" class="text-[#b8c1ec] hover:text-[#E50914]"><i class="fab fa-facebook-f"></i></a>
                        <a href="#" class="text-[#b8c1ec] hover:text-[#E50914]"><i class="fab fa-twitter"></i></a>
                        <a href="#" class="text-[#b8c1ec] hover:text-[#E50914]"><i class="fab fa-instagram"></i></a>
                        <a href="#" class="text-[#b8c1ec] hover:text-[#E50914]"><i class="fab fa-telegram"></i></a>
                    </div>
                </div>
            </div>
            <div class="mt-12 pt-8 border-t border-[#E50914]/20">
                <p class="text-[#b8c1ec] text-center">© 2023 AmediaTV. All rights reserved.</p>
            </div>
        </div>
    </footer>

    <!-- Video Player Modal -->
    <div id="videoModal" class="fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50 hidden">
        <div class="relative w-full max-w-4xl">
            <button onclick="closeVideoModal()" class="absolute -top-10 right-0 text-white hover:text-[#E50914] text-2xl">
                <i class="fas fa-times"></i>
            </button>
            <div class="aspect-w-16 aspect-h-9">
                <video id="animeVideoPlayer" controls class="w-full">
                    <source src="" type="video/mp4">
                    Your browser does not support the video tag.
                </video>
            </div>
            <div class="mt-4 text-white">
                <h3 id="videoTitle" class="text-xl font-bold"></h3>
                <p id="videoDescription" class="text-[#b8c1ec] mt-2"></p>
            </div>
        </div>
    </div>

    <!-- Auth Modal -->
    <div id="signInModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-[#232946] rounded-lg p-6 w-full max-w-md">
            <div class="flex justify-between items-center mb-4">
                <h3 id="authModalTitle" class="text-xl font-bold text-white">Sign In</h3>
                <button onclick="closeSignInModal()" class="text-[#b8c1ec] hover:text-white">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <!-- Sign In Form -->
            <form id="signInForm" class="space-y-4">
                <div>
                    <label for="email" class="block text-sm font-medium text-[#b8c1ec] mb-1">Email</label>
                    <input type="email" id="email" name="email" required 
                           class="w-full bg-[#2e3856] border border-[#6246ea] rounded-md px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-[#6246ea]">
                </div>
                <div>
                    <label for="password" class="block text-sm font-medium text-[#b8c1ec] mb-1">Password</label>
                    <input type="password" id="password" name="password" required 
                           class="w-full bg-[#2e3856] border border-[#6246ea] rounded-md px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-[#6246ea]">
                </div>
                <button type="submit" class="w-full bg-[#6246ea] hover:bg-[#7b61ff] text-white font-medium py-2 px-4 rounded-md transition">
                    Sign In
                </button>
            </form>
            
            <!-- Sign Up Form (hidden by default) -->
            <form id="signUpForm" class="space-y-4 hidden">
                <div>
                    <label for="signup-username" class="block text-sm font-medium text-[#b8c1ec] mb-1">Username</label>
                    <input type="text" id="signup-username" name="username" required 
                           class="w-full bg-[#2e3856] border border-[#6246ea] rounded-md px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-[#6246ea]">
                </div>
                <div>
                    <label for="signup-email" class="block text-sm font-medium text-[#b8c1ec] mb-1">Email</label>
                    <input type="email" id="signup-email" name="email" required 
                           class="w-full bg-[#2e3856] border border-[#6246ea] rounded-md px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-[#6246ea]">
                </div>
                <div>
                    <label for="signup-password" class="block text-sm font-medium text-[#b8c1ec] mb-1">Password</label>
                    <input type="password" id="signup-password" name="password" required 
                           class="w-full bg-[#2e3856] border border-[#6246ea] rounded-md px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-[#6246ea]">
                </div>
                <div>
                    <label for="signup-confirm-password" class="block text-sm font-medium text-[#b8c1ec] mb-1">Confirm Password</label>
                    <input type="password" id="signup-confirm-password" name="confirm-password" required 
                           class="w-full bg-[#2e3856] border border-[#6246ea] rounded-md px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-[#6246ea]">
                </div>
                <button type="submit" class="w-full bg-[#6246ea] hover:bg-[#7b61ff] text-white font-medium py-2 px-4 rounded-md transition">
                    Sign Up
                </button>
            </form>
            
            <div class="mt-4 text-center text-sm text-[#b8c1ec]">
                <span id="authToggleText">Don't have an account? </span>
                <button id="authToggleBtn" class="text-[#6246ea] hover:underline">Sign up</button>
            </div>
        </div>
    </div>

    <script>
            // Auth Modal Toggle
            const authToggleBtn = document.getElementById('authToggleBtn');
            const authModalTitle = document.getElementById('authModalTitle');
            const authToggleText = document.getElementById('authToggleText');
            const signInForm = document.getElementById('signInForm');
            const signUpForm = document.getElementById('signUpForm');
            
            let isSignUp = false;
            
            if (authToggleBtn) {
                authToggleBtn.addEventListener('click', function(e) {
                    e.preventDefault();
                    isSignUp = !isSignUp;
                    
                    if (isSignUp) {
                        signInForm.classList.add('hidden');
                        signUpForm.classList.remove('hidden');
                        authModalTitle.textContent = 'Sign Up';
                        authToggleText.textContent = 'Already have an account? ';
                        authToggleBtn.textContent = 'Sign in';
                    } else {
                        signUpForm.classList.add('hidden');
                        signInForm.classList.remove('hidden');
                        authModalTitle.textContent = 'Sign In';
                        authToggleText.textContent = 'Don\'t have an account? ';
                        authToggleBtn.textContent = 'Sign up';
                    }
                });
            }
            
            // Handle sign in form submission
            if (signInForm) {
                signInForm.addEventListener('submit', function(e) {
                    e.preventDefault();
                    const email = document.getElementById('email').value;
                    const password = document.getElementById('password').value;
                    
                    // Basic validation
                    if (!email || !password) {
                        showNotification('Please fill in all fields', 'error');
                        return;
                    }
                    
                    // For demo purposes, just show a success message
                    showNotification('Sign in successful!', 'success');
                    closeSignInModal();
                });
            }
            
            // Handle sign up form submission
            if (signUpForm) {
                signUpForm.addEventListener('submit', function(e) {
                    e.preventDefault();
                    const username = document.getElementById('signup-username').value;
                    const email = document.getElementById('signup-email').value;
                    const password = document.getElementById('signup-password').value;
                    const confirmPassword = document.getElementById('signup-confirm-password').value;
                    
                    // Validation
                    if (!username || !email || !password || !confirmPassword) {
                        showNotification('Please fill in all fields', 'error');
                        return;
                    }
                    
                    if (password !== confirmPassword) {
                        showNotification('Passwords do not match', 'error');
                        return;
                    }
                    
                    if (password.length < 6) {
                        showNotification('Password must be at least 6 characters', 'error');
                        return;
                    }
                    
                    // In a real app, you would send this data to your backend
                    // For demo purposes, just show a success message
                    showNotification('Account created successfully!', 'success');
                    
                    // Reset form and switch to sign in
                    signUpForm.reset();
                    isSignUp = false;
                    signUpForm.classList.add('hidden');
                    signInForm.classList.remove('hidden');
                    authModalTitle.textContent = 'Sign In';
                    authToggleText.textContent = 'Don\'t have an account? ';
                    authToggleBtn.textContent = 'Sign up';
                });
            }
            
            // Notification function
            function showNotification(message, type = 'success') {
                const notification = document.createElement('div');
                const bgColor = type === 'error' ? 'bg-red-500' : 'bg-[#6246ea]';
                notification.className = `fixed bottom-4 right-4 ${bgColor} text-white px-4 py-2 rounded-lg shadow-lg animate-fade-in-out`;
                notification.textContent = message;
                document.body.appendChild(notification);
                
                setTimeout(() => {
                    notification.classList.add('opacity-0', 'transition-opacity', 'duration-300');
                    setTimeout(() => {
                        notification.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=nurserf/anibla" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>