Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
2600 lines (2314 loc) · 83.3 KB
/
Copy pathscript.js
File metadata and controls
2600 lines (2314 loc) · 83.3 KB
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
/* ================================================
BLOCKBUSTER 3D VR STORE — Application Logic
================================================ */
// ===== MOVIE DATA (60 movies, 5 genres with poster images) =====
const movieData = {
comedy: [
{
title: "The Hangover",
year: 2009,
rating: 7.7,
imdb: "https://www.imdb.com/title/tt1119646/",
colors: [
"#667eea",
"#764ba2"
],
poster: "https://images.justwatch.com/poster/285598209/s332/the-hangover.jpg"
},
{
title: "Superbad",
year: 2007,
rating: 7.6,
imdb: "https://www.imdb.com/title/tt0829482/",
colors: [
"#f093fb",
"#f5576c"
],
poster: "https://images.justwatch.com/poster/195865316/s332/superbad.jpg"
},
{
title: "Bridesmaids",
year: 2011,
rating: 6.8,
imdb: "https://www.imdb.com/title/tt1478338/",
colors: [
"#fa709a",
"#fee140"
],
poster: "https://images.justwatch.com/poster/301539331/s332/bridesmaids.jpg"
},
{
title: "Step Brothers",
year: 2008,
rating: 6.9,
imdb: "https://www.imdb.com/title/tt0838283/",
colors: [
"#a18cd1",
"#fbc2eb"
],
poster: "https://images.justwatch.com/poster/297627242/s332/step-brothers.jpg"
},
{
title: "Mean Girls",
year: 2004,
rating: 7.1,
imdb: "https://www.imdb.com/title/tt0377092/",
colors: [
"#ff758c",
"#ff7eb3"
],
poster: "https://images.justwatch.com/poster/252834940/s332/mean-girls.jpg"
},
{
title: "Dumb & Dumber",
year: 1994,
rating: 7.3,
imdb: "https://www.imdb.com/title/tt0109686/",
colors: [
"#f6d365",
"#fda085"
],
poster: "https://images.justwatch.com/poster/20464003/s332/dumb-and-dumber.jpg"
},
{
title: "Anchorman",
year: 2004,
rating: 7.2,
imdb: "https://www.imdb.com/title/tt0357413/",
colors: [
"#ffecd2",
"#fcb69f"
],
poster: "https://images.justwatch.com/poster/180599159/s332/anchorman-the-legend-of-ron-burgundy.jpg"
},
{
title: "Napoleon Dynamite",
year: 2004,
rating: 6.9,
imdb: "https://www.imdb.com/title/tt0374900/",
colors: [
"#a1c4fd",
"#c2e9fb"
],
poster: "https://images.justwatch.com/poster/11012718/s332/napoleon-dynamite.jpg"
},
{
title: "Grand Budapest Hotel",
year: 2014,
rating: 8.1,
imdb: "https://www.imdb.com/title/tt2278388/",
colors: [
"#d4fc79",
"#96e6a1"
],
poster: "https://images.justwatch.com/poster/131734409/s332/the-grand-budapest-hotel.jpg"
},
{
title: "Borat",
year: 2006,
rating: 7.4,
imdb: "https://www.imdb.com/title/tt0443453/",
colors: [
"#84fab0",
"#8fd3f4"
],
poster: "https://images.justwatch.com/poster/294848441/s332/borat-cultural-learnings-of-america-for-make-benefit-glorious-nation-of-kazakhstan.jpg"
},
{
title: "Shaun of the Dead",
year: 2004,
rating: 7.9,
imdb: "https://www.imdb.com/title/tt0365748/",
colors: [
"#c471f5",
"#fa71cd"
],
poster: "https://images.justwatch.com/poster/90411252/s332/shaun-of-the-dead.jpg"
},
{
title: "Tropic Thunder",
year: 2008,
rating: 7.1,
imdb: "https://www.imdb.com/title/tt0942385/",
colors: [
"#f5576c",
"#ff9966"
],
poster: "https://images.justwatch.com/poster/181550759/s332/tropic-thunder.jpg"
}
],
action: [
{
title: "Mad Max: Fury Road",
year: 2015,
rating: 8.1,
imdb: "https://www.imdb.com/title/tt1392190/",
colors: [
"#f12711",
"#f5af19"
],
poster: "https://images.justwatch.com/poster/8716732/s332/mad-max-fury-road.jpg"
},
{
title: "John Wick",
year: 2014,
rating: 7.4,
imdb: "https://www.imdb.com/title/tt2911666/",
colors: [
"#232526",
"#414345"
],
poster: "https://images.justwatch.com/poster/61511363/s332/john-wick.jpg"
},
{
title: "The Dark Knight",
year: 2008,
rating: 9,
imdb: "https://www.imdb.com/title/tt0468569/",
colors: [
"#141E30",
"#243B55"
],
poster: "https://images.justwatch.com/poster/116082563/s332/the-dark-knight.jpg"
},
{
title: "Die Hard",
year: 1988,
rating: 8.2,
imdb: "https://www.imdb.com/title/tt0095016/",
colors: [
"#c31432",
"#240b36"
],
poster: "https://images.justwatch.com/poster/311306044/s332/die-hard.jpg"
},
{
title: "Gladiator",
year: 2000,
rating: 8.5,
imdb: "https://www.imdb.com/title/tt0172495/",
colors: [
"#3a1c71",
"#d76d77"
],
poster: "https://images.justwatch.com/poster/344681902/s332/gladiator.jpg"
},
{
title: "Top Gun: Maverick",
year: 2022,
rating: 8.2,
imdb: "https://www.imdb.com/title/tt1745960/",
colors: [
"#1a2a6c",
"#fdbb2d"
],
poster: "https://images.justwatch.com/poster/331624779/s332/top-gun-maverick.jpg"
},
{
title: "Mission Impossible",
year: 2018,
rating: 7.7,
imdb: "https://www.imdb.com/title/tt4912910/",
colors: [
"#0f0c29",
"#302b63"
],
poster: "https://images.justwatch.com/poster/65973274/s332/mission-impossible.jpg"
},
{
title: "Kill Bill Vol.1",
year: 2003,
rating: 8.2,
imdb: "https://www.imdb.com/title/tt0266697/",
colors: [
"#eb3349",
"#f45c43"
],
poster: "https://images.justwatch.com/poster/56448079/s332/kill-bill-vol-1.jpg"
},
{
title: "The Raid",
year: 2011,
rating: 7.6,
imdb: "https://www.imdb.com/title/tt1899353/",
colors: [
"#1d4350",
"#a43931"
],
poster: "https://images.justwatch.com/poster/179878732/s332/the-raid.jpg"
},
{
title: "300",
year: 2006,
rating: 7.6,
imdb: "https://www.imdb.com/title/tt0416449/",
colors: [
"#870000",
"#190a05"
],
poster: "https://images.justwatch.com/poster/182872015/s332/300.jpg"
},
{
title: "Logan",
year: 2017,
rating: 8.1,
imdb: "https://www.imdb.com/title/tt3315342/",
colors: [
"#283048",
"#859398"
],
poster: "https://images.justwatch.com/poster/76832017/s332/logan.jpg"
},
{
title: "Fury",
year: 2014,
rating: 7.6,
imdb: "https://www.imdb.com/title/tt2713180/",
colors: [
"#414d0b",
"#727a17"
],
poster: "https://images.justwatch.com/poster/8704796/s332/fury.jpg"
}
],
scifi: [
{
title: "Interstellar",
year: 2014,
rating: 8.7,
imdb: "https://www.imdb.com/title/tt0816692/",
colors: [
"#0f2027",
"#2c5364"
],
poster: "https://images.justwatch.com/poster/449990/s332/interstellar.jpg"
},
{
title: "Blade Runner 2049",
year: 2017,
rating: 8,
imdb: "https://www.imdb.com/title/tt1856101/",
colors: [
"#fc4a1a",
"#f7b733"
],
poster: "https://images.justwatch.com/poster/24702418/s332/blade-runner-2049.jpg"
},
{
title: "The Matrix",
year: 1999,
rating: 8.7,
imdb: "https://www.imdb.com/title/tt0133093/",
colors: [
"#000000",
"#0f9b0f"
],
poster: "https://images.justwatch.com/poster/126401284/s332/the-matrix.jpg"
},
{
title: "Inception",
year: 2010,
rating: 8.8,
imdb: "https://www.imdb.com/title/tt1375666/",
colors: [
"#0f0c29",
"#24243e"
],
poster: "https://images.justwatch.com/poster/302449148/s332/inception.jpg"
},
{
title: "Dune",
year: 2021,
rating: 8,
imdb: "https://www.imdb.com/title/tt1160419/",
colors: [
"#c2935e",
"#8b6f47"
],
poster: "https://images.justwatch.com/poster/249473713/s332/dune-2021.jpg"
},
{
title: "Alien",
year: 1979,
rating: 8.5,
imdb: "https://www.imdb.com/title/tt0078748/",
colors: [
"#0c0c1d",
"#0f4c75"
],
poster: "https://images.justwatch.com/poster/8543836/s332/alien.jpg"
},
{
title: "Terminator 2",
year: 1991,
rating: 8.6,
imdb: "https://www.imdb.com/title/tt0103064/",
colors: [
"#4b6cb7",
"#182848"
],
poster: "https://images.justwatch.com/poster/301019966/s332/terminator-2-judgment-day.jpg"
},
{
title: "Arrival",
year: 2016,
rating: 7.9,
imdb: "https://www.imdb.com/title/tt2543164/",
colors: [
"#1f1c2c",
"#928DAB"
],
poster: "https://images.justwatch.com/poster/8709099/s332/arrival.jpg"
},
{
title: "Ex Machina",
year: 2014,
rating: 7.7,
imdb: "https://www.imdb.com/title/tt0470752/",
colors: [
"#0a0e14",
"#3a7bd5"
],
poster: "https://images.justwatch.com/poster/183412567/s332/ex-machina.jpg"
},
{
title: "The Martian",
year: 2015,
rating: 8,
imdb: "https://www.imdb.com/title/tt3659388/",
colors: [
"#c0392b",
"#8e44ad"
],
poster: "https://images.justwatch.com/poster/344669530/s332/the-martian.jpg"
},
{
title: "Edge of Tomorrow",
year: 2014,
rating: 7.9,
imdb: "https://www.imdb.com/title/tt1631867/",
colors: [
"#2c3e50",
"#3498db"
],
poster: "https://images.justwatch.com/poster/302993962/s332/edge-of-tomorrow.jpg"
},
{
title: "Gravity",
year: 2013,
rating: 7.7,
imdb: "https://www.imdb.com/title/tt1454468/",
colors: [
"#0c0c1d",
"#344955"
],
poster: "https://images.justwatch.com/poster/241479855/s332/gravity.jpg"
}
],
drama: [
{
title: "Shawshank Redemption",
year: 1994,
rating: 9.3,
imdb: "https://www.imdb.com/title/tt0111161/",
colors: [
"#2c3e50",
"#4a6274"
],
poster: "https://images.justwatch.com/poster/309786652/s332/the-shawshank-redemption.jpg"
},
{
title: "Forrest Gump",
year: 1994,
rating: 8.8,
imdb: "https://www.imdb.com/title/tt0109830/",
colors: [
"#3E5151",
"#DECBA4"
],
poster: "https://images.justwatch.com/poster/109577912/s332/forrest-gump.jpg"
},
{
title: "Fight Club",
year: 1999,
rating: 8.8,
imdb: "https://www.imdb.com/title/tt0137523/",
colors: [
"#200122",
"#6f0000"
],
poster: "https://images.justwatch.com/poster/210852313/s332/fight-club.jpg"
},
{
title: "The Godfather",
year: 1972,
rating: 9.2,
imdb: "https://www.imdb.com/title/tt0068646/",
colors: [
"#0f0c0c",
"#302b2b"
],
poster: "https://images.justwatch.com/poster/202440770/s332/the-godfather.jpg"
},
{
title: "Pulp Fiction",
year: 1994,
rating: 8.9,
imdb: "https://www.imdb.com/title/tt0110912/",
colors: [
"#eecda3",
"#ef629f"
],
poster: "https://images.justwatch.com/poster/301999989/s332/pulp-fiction.jpg"
},
{
title: "Schindler's List",
year: 1993,
rating: 9,
imdb: "https://www.imdb.com/title/tt0108052/",
colors: [
"#141517",
"#2c3e50"
],
poster: "https://images.justwatch.com/poster/169344232/s332/schindlers-list.jpg"
},
{
title: "Whiplash",
year: 2014,
rating: 8.5,
imdb: "https://www.imdb.com/title/tt2582802/",
colors: [
"#eb5757",
"#000000"
],
poster: "https://images.justwatch.com/poster/268498981/s332/whiplash.jpg"
},
{
title: "Parasite",
year: 2019,
rating: 8.5,
imdb: "https://www.imdb.com/title/tt6751668/",
colors: [
"#0a504a",
"#38ef7d"
],
poster: "https://images.justwatch.com/poster/130011621/s332/parasite.jpg"
},
{
title: "The Prestige",
year: 2006,
rating: 8.5,
imdb: "https://www.imdb.com/title/tt0482571/",
colors: [
"#355c7d",
"#6c5b7b"
],
poster: "https://images.justwatch.com/poster/55085098/s332/the-prestige.jpg"
},
{
title: "Good Will Hunting",
year: 1997,
rating: 8.3,
imdb: "https://www.imdb.com/title/tt0119217/",
colors: [
"#4568dc",
"#b06ab3"
],
poster: "https://images.justwatch.com/poster/214706751/s332/good-will-hunting.jpg"
},
{
title: "A Beautiful Mind",
year: 2001,
rating: 8.2,
imdb: "https://www.imdb.com/title/tt0268978/",
colors: [
"#0f2027",
"#203a43"
],
poster: "https://images.justwatch.com/poster/208348730/s332/a-beautiful-mind.jpg"
},
{
title: "The Green Mile",
year: 1999,
rating: 8.6,
imdb: "https://www.imdb.com/title/tt0120689/",
colors: [
"#2c3e50",
"#4ca1af"
],
poster: "https://images.justwatch.com/poster/102622497/s332/the-green-mile.jpg"
}
],
family: [
{
title: "Toy Story",
year: 1995,
rating: 8.3,
imdb: "https://www.imdb.com/title/tt0114709/",
colors: [
"#00b4db",
"#0083b0"
],
poster: "https://images.justwatch.com/poster/76796933/s332/toy-story.jpg"
},
{
title: "Finding Nemo",
year: 2003,
rating: 8.2,
imdb: "https://www.imdb.com/title/tt0266543/",
colors: [
"#56ab2f",
"#a8e063"
],
poster: "https://images.justwatch.com/poster/29014421/s332/finding-nemo.jpg"
},
{
title: "The Incredibles",
year: 2004,
rating: 8,
imdb: "https://www.imdb.com/title/tt0317705/",
colors: [
"#ff416c",
"#ff4b2b"
],
poster: "https://images.justwatch.com/poster/67664646/s332/the-incredibles.jpg"
},
{
title: "Up",
year: 2009,
rating: 8.3,
imdb: "https://www.imdb.com/title/tt1049413/",
colors: [
"#11998e",
"#38ef7d"
],
poster: "https://images.justwatch.com/poster/302310503/s332/up.jpg"
},
{
title: "Shrek",
year: 2001,
rating: 7.9,
imdb: "https://www.imdb.com/title/tt0126029/",
colors: [
"#a8ff78",
"#78ffd6"
],
poster: "https://images.justwatch.com/poster/65667949/s332/shrek.jpg"
},
{
title: "Frozen",
year: 2013,
rating: 7.4,
imdb: "https://www.imdb.com/title/tt2294629/",
colors: [
"#2193b0",
"#6dd5ed"
],
poster: "https://images.justwatch.com/poster/285416360/s332/frozen.jpg"
},
{
title: "The Lion King",
year: 1994,
rating: 8.5,
imdb: "https://www.imdb.com/title/tt0110357/",
colors: [
"#f7971e",
"#ffd200"
],
poster: "https://images.justwatch.com/poster/344629567/s332/the-lion-king.jpg"
},
{
title: "Coco",
year: 2017,
rating: 8.4,
imdb: "https://www.imdb.com/title/tt2380307/",
colors: [
"#e44d26",
"#f16529"
],
poster: "https://images.justwatch.com/poster/35315559/s332/coco.jpg"
},
{
title: "Moana",
year: 2016,
rating: 7.6,
imdb: "https://www.imdb.com/title/tt3521164/",
colors: [
"#667db6",
"#0082c8"
],
poster: "https://images.justwatch.com/poster/343683458/s332/moana-2025.jpg"
},
{
title: "Ratatouille",
year: 2007,
rating: 8.1,
imdb: "https://www.imdb.com/title/tt0382932/",
colors: [
"#f953c6",
"#b91d73"
],
poster: "https://images.justwatch.com/poster/151544381/s332/ratatouille.jpg"
},
{
title: "WALL-E",
year: 2008,
rating: 8.4,
imdb: "https://www.imdb.com/title/tt0910970/",
colors: [
"#1488cc",
"#2b32b2"
],
poster: "https://images.justwatch.com/poster/222296424/s332/wall-e.jpg"
},
{
title: "Monsters Inc",
year: 2001,
rating: 8.1,
imdb: "https://www.imdb.com/title/tt0198781/",
colors: [
"#43cea2",
"#185a9d"
],
poster: "https://images.justwatch.com/poster/200836345/s332/monsters-inc.jpg"
}
]
};
// ===== MOVIE SYNOPSES FOR RETRO BACK COVERS =====
const movieSynopses = {
// Comedy
"The Hangover": "Three buddies wake up from a wild bachelor party in Las Vegas with no memory of the previous night and the groom missing. They must retrace their steps through the city to find him before the wedding.",
"Superbad": "Two co-dependent high school seniors are forced to deal with separation anxiety after their elaborate plan to secure alcohol for a major house party goes hilariously awry.",
"Bridesmaids": "Competition between the maid of honor and a wealthy bridesmaid over who is the bride's true best friend threatens to completely upend the chaotic life of a struggling pastry chef.",
"Step Brothers": "Two middle-aged, spoiled, unemployed men still living with their respective parents are forced to become roommates when their parents marry, triggering an escalating war of childish pranks.",
"Mean Girls": "Cady Heron is a hit with The Plastics, the A-list girl clique at her new school, until she makes the mistake of falling for Aaron Samuels, the ex-boyfriend of alpha Plastique Regina George.",
"Dumb & Dumber": "After a woman leaves a briefcase at the airport terminal, two extremely dim-witted friends embark on an cross-country road trip to Aspen to return it, unaware it contains ransom money.",
"Anchorman": "Ron Burgundy is San Diego's top-rated news anchorman in the male-dominated 1970s broadcast world, but his position is threatened when an ambitious newswoman is hired as co-anchor.",
"Napoleon Dynamite": "A listless and alienated teenager in Idaho decides to help his eccentric new friend Pedro win the class presidency, while navigating his bizarre family life at home.",
"Grand Budapest Hotel": "A writer relates his adventures at a renowned European resort hotel between the wars, featuring a legendary concierge falsely accused of murder and his loyal lobby boy.",
"Borat": "Kazakh TV talking head Borat Sagdiyev travels to the United States to report on the 'Greatest Country in the World' in this satirical mockumentary of cultural clashes.",
"Shaun of the Dead": "A man's uneventful life is disrupted when he has to single-handedly deal with his girlfriend, his mother, and an entire community of local residents who have turned into flesh-eating zombies.",
"Tropic Thunder": "While shooting a big-budget war movie, a crew of self-absorbed actors are dropped into the middle of a real jungle combat zone and forced to become the soldiers they are playing.",
// Action
"Mad Max: Fury Road": "In a post-apocalyptic wasteland, a woman rebels against a tyrannical ruler in search for her homeland with the aid of a group of female prisoners, a psychotic worshiper, and a drifter named Max.",
"John Wick": "An ex-hitman comes out of retirement to track down the gangsters that killed his dog, a final gift from his recently deceased wife, embarking on a ruthless, action-packed revenge mission.",
"The Dark Knight": "When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, Batman must accept one of the greatest psychological and physical tests of his ability to fight injustice.",
"Die Hard": "An NYPD officer tries to save his estranged wife and several others taken hostage by a band of highly trained German terrorists during a Christmas Eve party at Nakatomi Plaza.",
"Gladiator": "A former Roman General sets out to exact vengeance against the corrupt emperor who murdered his family and sent him into slavery, rising through the ranks of the gladiator arena.",
"Top Gun: Maverick": "After thirty years of service as one of the Navy's top aviators, Pete 'Maverick' Mitchell is tasked with training a detachment of graduates for a dangerous and specialized mission.",
"Mission Impossible": "Ethan Hunt and his IMF team embark on their most dangerous mission yet: to track down a rogue organization planning to trigger a global catastrophe using stolen nuclear cores.",
"Kill Bill Vol.1": "After awakening from a four-year coma, a former assassin seeks vengeance against the team of killers who betrayed her, led by her former master, Bill.",
"The Raid": "A SWAT team becomes trapped in a high-rise tenement block run by a ruthless drug lord and his army of killers, forcing them to fight their way up floor-by-floor using hand-to-hand combat.",
"300": "King Leonidas of Sparta and a force of 300 men fight to the death against the Persian King Xerxes and his massive invading army of over 300,000 soldiers at the Battle of Thermopylae.",
"Logan": "In a future where mutants are nearly extinct, a weary Logan cares for an ailing Professor X in a hideout on the Mexican border, until a young mutant chased by dark forces arrives.",
"Fury": "A battle-hardened army sergeant commands a Sherman tank and its five-man crew on a deadly mission behind enemy lines in Nazi Germany during the final weeks of World War II.",
// Sci-Fi
"Interstellar": "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival on a dying Earth, navigating extreme time dilation and cosmic mysteries.",
"Blade Runner 2049": "A new blade runner, LAPD Officer K, unearths a long-buried secret that has the potential to plunge what is left of society into chaos, leading him to track down Rick Deckard.",
"The Matrix": "A computer hacker learns from mysterious rebels about the true nature of his reality and his role in the war against its war-like controllers in this cyberpunk masterpiece.",
"Inception": "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O., navigating layers of subconscious.",
"Dune": "Paul Atreides, a brilliant and gifted young man born into a great destiny, must travel to the most dangerous planet in the universe to ensure the future of his family and his people.",
"Alien": "The crew of a commercial spacecraft encounter a deadly lifeform after investigating a mysterious transmission from an undeveloped planet, fighting to survive a claustrophobic nightmare.",
"Terminator 2": "A cyborg, identical to the one who failed to kill Sarah Connor, must now protect her young son John from a more advanced and devastating shape-shifting terminator.",
"Arrival": "A linguist is recruited by the military to assist in translating communications with sentient extraterrestrial lifeforms after twelve mysterious spacecraft touch down around the globe.",
"Ex Machina": "A programmer at a huge internet-search giant wins a competition to spend a week at the private mountain estate of the company's brilliant CEO, only to administer a Turing test on an A.I.",
"The Martian": "An astronaut becomes stranded on Mars after his crew mates presume him dead, and must rely on his scientific ingenuity to find a way to signal Earth and survive.",
"Edge of Tomorrow": "A soldier fighting aliens finds himself caught in a time loop, waking up on the same battlefield every time he dies, teaming up with a legendary warrior to find a way to win.",
"Gravity": "Two astronauts work together to survive after an accident leaves them stranded in deep orbit with no connection to Earth and a rapidly depleting oxygen supply.",
// Drama
"Shawshank Redemption": "Over the course of several years, two convicts form a deep friendship, seeking consolation and, eventually, redemption through basic compassion inside a brutal state prison.",
"Forrest Gump": "The presidencies of Kennedy and Johnson, the Vietnam War, the Watergate scandal and other historical events unfold from the perspective of an Alabama man with an IQ of 75.",
"Fight Club": "An insomniac office worker and a devil-may-care soap maker form an underground fight club that evolves into something much more dangerous and revolutionary.",
"The Godfather": "The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant youngest son, Michael, in this legendary crime saga.",
"Pulp Fiction": "The lives of two mob hitmen, a boxer, a gangster and his wife, and a pair of diner bandits intertwine in four tales of violence, redemption, and dark comedy.",
"Schindler's List": "In German-occupied Poland during World War II, industrialist Oskar Schindler gradually becomes concerned for his Jewish workforce after witnessing their persecution by the Nazis.",
"Whiplash": "A promising young drummer enrolls at a cut-throat music conservatory where his dreams of greatness are mentored by an instructor who will stop at nothing to realize a student's potential.",
"Parasite": "Greed and class discrimination threaten the newly formed symbiotic relationship between the wealthy Park family and the destitute Kim clan, culminating in a shocking confrontation.",
"The Prestige": "After a tragic accident, two stage magicians in 19th-century London engage in a battle of one-upmanship to create the ultimate illusion, sacrificing everything they hold dear.",
"Good Will Hunting": "Will Hunting, a janitor at M.I.T., has a gift for mathematics, but needs help from a psychologist in order to find direction in his life and face his childhood trauma.",
"A Beautiful Mind": "After John Nash, a brilliant but asocial mathematician, accepts secret work in cryptography, his life takes a turn for the nightmarish as he battles severe schizophrenia.",
"The Green Mile": "The lives of guards on death row are affected by one of their charges: a black man accused of child murder and rape, who possesses a mysterious, miraculous healing gift.",
// Family
"Toy Story": "A cowboy toy is profoundly threatened and jealous when a new spaceman figure supplants him as top toy in a boy's bedroom, embarking on an adventure to find their way home.",
"Finding Nemo": "After his son is captured in the Great Barrier Reef and taken to Sydney, a timid clownfish embarks on a dangerous journey across the ocean to bring him home.",
"The Incredibles": "A family of undercover superheroes, while trying to live the quiet suburban life, are forced into action to save the world from a vengeful former fan.",
"Up": "Seventy-eight-year-old Carl Fredricksen travels to Paradise Falls in his house equipped with thousands of balloons, accidentally taking a young Wilderness Explorer along for the ride.",
"Shrek": "An ogre finds his swamp invaded by fairytale creatures banished by Lord Farquaad. To get his swamp back, he agrees to rescue a princess who harbors a dark secret.",
"Frozen": "When the newly crowned Queen Elsa accidentally uses her power to turn things into ice to condemn her home to infinite winter, her sister Anna teams up to save their kingdom.",
"The Lion King": "A young lion prince, Simba, flees his kingdom after his father is murdered by his uncle, only to learn the true meaning of responsibility and valor when he returns.",
"Coco": "Aspiring musician Miguel, confronted with his family's ancestral ban on music, enters the Land of the Dead to find his great-great-grandfather, a legendary singer.",
"Moana": "In Ancient Polynesia, when a terrible curse reaches Moana's island, she answers the Ocean's call to seek out the Demigod Maui to set things right and save her people.",
"Ratatouille": "A young rat who dreams of becoming a renowned French chef allies with a clumsy kitchen boy at a famous Parisian restaurant to cook exquisite meals in secret.",
"WALL-E": "In the distant future, a small waste-collecting robot embarked on a space journey that will ultimately decide the fate of mankind after meeting a sleek probe named EVE.",
"Monsters Inc": "In order to power the city, monsters must scream-collect children. But when a small girl accidentally enters their world, two friendly monsters must hide her from authorities."
};
// ===== YOUTUBE TRAILER VIDEO IDS =====
const movieTrailers = {
// Comedy
"The Hangover": "t378129aK4Y",
"Superbad": "4meYUnAwzP0",
"Bridesmaids": "N5eH1G4_T14",
"Step Brothers": "hZ1Wn9K7rXo",
"Mean Girls": "aDU3Ewrljss",
"Dumb & Dumber": "l13yPhimE3o",
"Anchorman": "fH3c437E5aQ",
"Napoleon Dynamite": "pQ69D-R5J0I",
"Grand Budapest Hotel": "11D9b5s3vW4",
"Borat": "y1N7n-R2y_g",
"Shaun of the Dead": "647bH-822n8",
"Tropic Thunder": "t7tJpSRW_7g",
// Action
"Mad Max: Fury Road": "hEJnMQG9ev8",
"John Wick": "OggMPsqX5KQ",
"The Dark Knight": "EXeTwQWrcwY",
"Die Hard": "jaJuwKCmJbY",
"Gladiator": "P5ieIbIn09Y",
"Top Gun: Maverick": "OLjBd78Fm_g",
"Mission Impossible": "CkiVZ89v-VE",
"Kill Bill Vol.1": "7kSuas6weq4",
"The Raid": "QJ7p4Cq8T8k",
"300": "UrIbxD7adww",
"Logan": "Div0iP65aZo",
"Fury": "6Bd5LDEJqH4",
// Sci-Fi
"Interstellar": "0SgS0EVsyE8",
"Blade Runner 2049": "geFtxCSz8xI",
"The Matrix": "vKQi3bBA1y8",
"Inception": "YoqPbNl-l1Y",
"Dune": "8g18jFHCLXk",
"Alien": "LsXPBB_27qU",
"Terminator 2": "e9W8s693-sI",
"Arrival": "tFMo3UJ4B4g",
"Ex Machina": "EoQuVnKhxaM",
"The Martian": "Ue4OE1lltLc",
"Edge of Tomorrow": "pwKKBPm9O0k",
"Gravity": "OiTiF-VbJ50",
// Drama
"Shawshank Redemption": "6hB3S9bIaco",
"Forrest Gump": "bLvqoHBptjg",
"Fight Club": "SUXWAEX2aj0",
"The Godfather": "U09u_U-Gz4U",
"Pulp Fiction": "s7EdQ4BZ-xI",
"Schindler's List": "gG22XNhtnoY",
"Whiplash": "iB12iX-ELuI",
"Parasite": "isXw2H7P10g",
"The Prestige": "o49B_S57hvk",
"Good Will Hunting": "PaZVjZOgYb4",
"A Beautiful Mind": "aS_d0GbwdQk",
"The Green Mile": "Ki4haFrqSrw",
// Family
"Toy Story": "KYz2wyBy3kc",
"Finding Nemo": "wZdpN0a9M3w",
"The Incredibles": "P8ImBJ9vGA8",
"Up": "H1BSs9t731k",
"Shrek": "o3WJ3sX7r-Q",
"Frozen": "TbQm5doF_Uc",
"The Lion King": "4kD-xTptP3s",
"Coco": "GHOtPlDj2wE",
"Moana": "LKFuXETZUsI",
"Ratatouille": "c3sBBRxseKA",
"WALL-E": "alIq_wG9FNk",
"Monsters Inc": "8IBNZ6O2kMk"
};
// ===== TEXTURE GENERATORS =====
/** Generate a canvas texture simulating a dense grid of DVD cases on shelves */
function generateDVDWallTexture(rows, cols) {
const dvdW = 36;
const dvdH = 50;
const gap = 3;
const shelfH = 5;
const canvas = document.createElement('canvas');
canvas.width = cols * (dvdW + gap) + gap;
canvas.height = rows * (dvdH + shelfH) + shelfH;
const ctx = canvas.getContext('2d');
// Dark shelf background
ctx.fillStyle = '#0d0a07';
ctx.fillRect(0, 0, canvas.width, canvas.height);
for (let r = 0; r < rows; r++) {
// Shelf bar between rows
const shelfY = shelfH + r * (dvdH + shelfH) + dvdH;
ctx.fillStyle = '#4a3320';
ctx.fillRect(0, shelfY, canvas.width, shelfH);
ctx.fillStyle = 'rgba(255,255,255,0.04)';
ctx.fillRect(0, shelfY, canvas.width, 1);
for (let c = 0; c < cols; c++) {
const x = gap + c * (dvdW + gap);
const y = shelfH + r * (dvdH + shelfH);
const hue = Math.random() * 360;
const sat = 30 + Math.random() * 55;
const light = 18 + Math.random() * 40;
// DVD cover gradient
const grad = ctx.createLinearGradient(x, y, x + dvdW, y + dvdH);
grad.addColorStop(0, `hsl(${hue}, ${sat}%, ${light + 12}%)`);
grad.addColorStop(0.5, `hsl(${hue + 10}, ${sat}%, ${light}%)`);
grad.addColorStop(1, `hsl(${hue + 20}, ${sat - 5}%, ${light - 5}%)`);
ctx.fillStyle = grad;
ctx.fillRect(x, y, dvdW, dvdH);
// Spine line
ctx.fillStyle = `hsl(${hue}, ${sat}%, ${Math.max(5, light - 10)}%)`;
ctx.fillRect(x, y, 3, dvdH);
// Cover art highlight
if (Math.random() > 0.45) {
const sg = ctx.createRadialGradient(x + dvdW * 0.4, y + dvdH * 0.3, 2, x + dvdW * 0.4, y + dvdH * 0.3, dvdW * 0.5);
sg.addColorStop(0, `hsla(${hue}, ${sat}%, ${light + 25}%, 0.25)`);
sg.addColorStop(1, 'transparent');
ctx.fillStyle = sg;
ctx.fillRect(x, y, dvdW, dvdH);
}
// Fake title text
ctx.fillStyle = `hsla(0, 0%, 100%, ${0.12 + Math.random() * 0.2})`;
ctx.fillRect(x + 4, y + dvdH * 0.72, dvdW - 8, 2.5);
if (Math.random() > 0.35) {
ctx.fillRect(x + 4, y + dvdH * 0.72 + 5, dvdW * 0.55, 1.5);
}
// Border
ctx.strokeStyle = 'rgba(0,0,0,0.45)';
ctx.lineWidth = 0.5;
ctx.strokeRect(x, y, dvdW, dvdH);
}
}
return canvas;
}
/** Generate a single movie poster canvas texture */
function generatePosterTexture(movie) {
const canvas = document.createElement('canvas');
canvas.width = 220;
canvas.height = 320;
const ctx = canvas.getContext('2d');
const W = canvas.width;
const H = canvas.height;
// Gradient background
const grad = ctx.createLinearGradient(0, 0, W, H);
grad.addColorStop(0, movie.colors[0]);
grad.addColorStop(1, movie.colors[1]);
ctx.fillStyle = grad;
ctx.fillRect(0, 0, W, H);
// Decorative circles
for (let i = 0; i < 3; i++) {
ctx.beginPath();
ctx.arc(Math.random() * W, Math.random() * H * 0.5, 25 + Math.random() * 50, 0, Math.PI * 2);
ctx.fillStyle = `rgba(255,255,255,${0.03 + Math.random() * 0.05})`;
ctx.fill();
}
// Dark gradient for text readability
const tg = ctx.createLinearGradient(0, H * 0.3, 0, H);
tg.addColorStop(0, 'rgba(0,0,0,0)');
tg.addColorStop(0.5, 'rgba(0,0,0,0.4)');
tg.addColorStop(1, 'rgba(0,0,0,0.88)');
ctx.fillStyle = tg;
ctx.fillRect(0, 0, W, H);
// Border
ctx.strokeStyle = 'rgba(255,255,255,0.12)';
ctx.lineWidth = 2.5;
ctx.strokeRect(2, 2, W - 4, H - 4);
// Title (word-wrapped)
ctx.fillStyle = '#ffffff';
ctx.font = 'bold 20px Arial, Helvetica, sans-serif';
ctx.textBaseline = 'bottom';
const lines = wrapText(ctx, movie.title, W - 24);
const lh = 24;
const titleY = H - 38 - (lines.length - 1) * lh;
lines.forEach((line, i) => {
ctx.fillText(line, 12, titleY + i * lh);
});
// Year
ctx.font = '14px Arial, Helvetica, sans-serif';
ctx.fillStyle = '#bbbbbb';
ctx.fillText(movie.year.toString(), 12, H - 12);
// Rating badge
const ratingStr = `★ ${movie.rating}`;
ctx.font = 'bold 13px Arial, Helvetica, sans-serif';
const rw = ctx.measureText(ratingStr).width + 14;
roundRect(ctx, W - rw - 10, 10, rw, 22, 4);
ctx.fillStyle = 'rgba(0,0,0,0.75)';
ctx.fill();
ctx.fillStyle = '#ffd700';
ctx.textBaseline = 'middle';
ctx.fillText(ratingStr, W - rw - 3, 21);
return canvas;
}
/** Generate a Blockbuster-style genre sign texture */
function generateSignTexture(text) {
const canvas = document.createElement('canvas');
canvas.width = 512;
canvas.height = 128;
const ctx = canvas.getContext('2d');
// Yellow border
ctx.fillStyle = '#ffd700';
roundRect(ctx, 0, 0, 512, 128, 6);
ctx.fill();
// Blue interior
ctx.fillStyle = '#002d8a';
roundRect(ctx, 6, 6, 500, 116, 4);
ctx.fill();
// Yellow text
ctx.fillStyle = '#ffd700';
ctx.font = 'bold 56px Arial, Helvetica, sans-serif';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.fillText(text, 256, 66);
return canvas;
}
// ===== UTILITY FUNCTIONS =====
function wrapText(ctx, text, maxWidth) {
const words = text.split(' ');
const lines = [];
let line = '';
for (const word of words) {
const test = line ? line + ' ' + word : word;
if (ctx.measureText(test).width > maxWidth && line) {
lines.push(line);
line = word;
} else {