File size: 52,701 Bytes
f142ce8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Rick & Morty Multiverse Madness</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>
        @keyframes portalSpin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
            100% { transform: translateY(0px); }
        }
        @keyframes shake {
            0% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            50% { transform: translateX(5px); }
            75% { transform: translateX(-5px); }
            100% { transform: translateX(0); }
        }
        .portal {
            animation: portalSpin 4s linear infinite;
        }
        .floating {
            animation: float 3s ease-in-out infinite;
        }
        .shake {
            animation: shake 0.5s linear infinite;
        }
        .hidden {
            display: none !important;
        }
        .pixelated {
            image-rendering: pixelated;
        }
        .secret-btn {
            opacity: 0.05;
            transition: opacity 0.3s;
        }
        .secret-btn:hover {
            opacity: 1;
        }
        #gameContainer {
            background-image: url('https://i.imgur.com/8QZQZ9Q.png');
            background-size: cover;
            background-position: center;
        }
        .dialog-box {
            background-color: rgba(0, 0, 0, 0.7);
            border: 3px solid #00ff00;
            border-radius: 10px;
            font-family: 'Courier New', monospace;
        }
        .plumbus {
            filter: drop-shadow(0 0 10px #ff00ff);
        }
        .meeseeks {
            filter: drop-shadow(0 0 5px #00ffff);
        }
        .rick-dance {
            animation: rickDance 0.5s steps(4) infinite;
        }
        @keyframes rickDance {
            0% { background-position: 0 0; }
            100% { background-position: -256px 0; }
        }
    </style>
</head>
<body class="bg-black text-green-400 font-mono overflow-x-hidden">
    <div id="gameContainer" class="min-h-screen w-full flex flex-col items-center justify-center p-4 relative">
        <!-- Main Menu -->
        <div id="mainMenu" class="text-center">
            <h1 class="text-6xl font-bold mb-8 text-purple-500 floating">
                RICK & MORTY<br>MULTIVERSE MADNESS
            </h1>
            <div class="portal w-64 h-64 rounded-full border-8 border-teal-500 mx-auto mb-8 flex items-center justify-center">
                <div class="w-56 h-56 rounded-full border-8 border-purple-500 flex items-center justify-center">
                    <div class="w-48 h-48 rounded-full border-8 border-blue-500 flex items-center justify-center">
                        <div class="w-40 h-40 rounded-full border-8 border-green-500"></div>
                    </div>
                </div>
            </div>
            <div class="space-y-4">
                <button onclick="startGame()" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-8 rounded-full text-xl transition-all transform hover:scale-110">
                    START ADVENTURE
                </button>
                <button onclick="showMiniGames()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded-full text-xl transition-all transform hover:scale-110">
                    MINI-GAMES
                </button>
                <button onclick="showEasterEggs()" class="bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded-full text-xl transition-all transform hover:scale-110">
                    EASTER EGGS
                </button>
                <button onclick="rickRoll()" class="secret-btn bg-transparent text-transparent font-bold py-3 px-8 rounded-full text-xl">
                    SECRET BUTTON
                </button>
            </div>
        </div>

        <!-- Main Game -->
        <div id="mainGame" class="hidden w-full max-w-4xl">
            <div class="flex justify-between items-center mb-6">
                <div class="bg-black bg-opacity-70 p-3 rounded-lg">
                    <span class="text-xl">Dimension: <span id="dimensionDisplay" class="text-yellow-400">C-137</span></span>
                </div>
                <div class="bg-black bg-opacity-70 p-3 rounded-lg">
                    <span class="text-xl">Schmeckles: <span id="schmecklesDisplay" class="text-yellow-400">0</span></span>
                </div>
            </div>
            
            <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
                <div class="bg-black bg-opacity-70 p-4 rounded-lg">
                    <h2 class="text-2xl font-bold mb-4 text-center">Characters</h2>
                    <div class="space-y-3">
                        <button onclick="interactWithCharacter('rick')" class="w-full bg-gray-800 hover:bg-gray-700 p-2 rounded flex items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-10 h-10 mr-2 rounded-full" alt="Rick">
                            <span>Rick Sanchez</span>
                        </button>
                        <button onclick="interactWithCharacter('morty')" class="w-full bg-gray-800 hover:bg-gray-700 p-2 rounded flex items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-10 h-10 mr-2 rounded-full" alt="Morty">
                            <span>Morty Smith</span>
                        </button>
                        <button onclick="interactWithCharacter('summer')" class="w-full bg-gray-800 hover:bg-gray-700 p-2 rounded flex items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-10 h-10 mr-2 rounded-full" alt="Summer">
                            <span>Summer Smith</span>
                        </button>
                        <button onclick="interactWithCharacter('beth')" class="w-full bg-gray-800 hover:bg-gray-700 p-2 rounded flex items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-10 h-10 mr-2 rounded-full" alt="Beth">
                            <span>Beth Smith</span>
                        </button>
                        <button onclick="interactWithCharacter('jerry')" class="w-full bg-gray-800 hover:bg-gray-700 p-2 rounded flex items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-10 h-10 mr-2 rounded-full" alt="Jerry">
                            <span>Jerry Smith</span>
                        </button>
                    </div>
                </div>
                
                <div class="bg-black bg-opacity-70 p-4 rounded-lg">
                    <h2 class="text-2xl font-bold mb-4 text-center">Inventory</h2>
                    <div class="grid grid-cols-2 gap-2">
                        <button onclick="useItem('plumbus')" class="bg-gray-800 hover:bg-gray-700 p-2 rounded flex flex-col items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mb-1 plumbus" alt="Plumbus">
                            <span>Plumbus</span>
                        </button>
                        <button onclick="useItem('portalGun')" class="bg-gray-800 hover:bg-gray-700 p-2 rounded flex flex-col items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mb-1" alt="Portal Gun">
                            <span>Portal Gun</span>
                        </button>
                        <button onclick="useItem('meeseeksBox')" class="bg-gray-800 hover:bg-gray-700 p-2 rounded flex flex-col items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mb-1 meeseeks" alt="Meeseeks Box">
                            <span>Meeseeks Box</span>
                        </button>
                        <button onclick="useItem('microverseBattery')" class="bg-gray-800 hover:bg-gray-700 p-2 rounded flex flex-col items-center">
                            <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mb-1" alt="Microverse Battery">
                            <span>Microverse</span>
                        </button>
                    </div>
                </div>
                
                <div class="bg-black bg-opacity-70 p-4 rounded-lg">
                    <h2 class="text-2xl font-bold mb-4 text-center">Game Log</h2>
                    <div id="gameLog" class="h-64 overflow-y-auto bg-gray-900 p-3 rounded text-sm">
                        <p>> Welcome to the Multiverse, Morty! *burp*</p>
                        <p>> Let's get schwifty!</p>
                    </div>
                    <div class="mt-3 flex">
                        <input type="text" id="gameCommand" class="flex-grow bg-gray-800 text-white p-2 rounded-l focus:outline-none" placeholder="Enter command...">
                        <button onclick="processCommand()" class="bg-purple-600 hover:bg-purple-700 px-4 rounded-r">GO</button>
                    </div>
                </div>
            </div>
            
            <div class="flex justify-center space-x-4">
                <button onclick="travelToRandomDimension()" class="bg-red-600 hover:bg-red-700 text-white font-bold py-2 px-6 rounded">
                    Random Dimension
                </button>
                <button onclick="showMainMenu()" class="bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                    Main Menu
                </button>
            </div>
        </div>

        <!-- Mini-Games Menu -->
        <div id="miniGamesMenu" class="hidden text-center">
            <h1 class="text-4xl font-bold mb-8 text-blue-400">
                MINI-GAMES
            </h1>
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6 max-w-2xl mx-auto">
                <button onclick="startPlumbusGame()" class="bg-purple-600 hover:bg-purple-700 p-4 rounded-lg flex flex-col items-center">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mb-2 plumbus" alt="Plumbus">
                    <span class="text-xl">Plumbus Factory</span>
                </button>
                <button onclick="startMeeseeksGame()" class="bg-blue-600 hover:bg-blue-700 p-4 rounded-lg flex flex-col items-center">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mb-2 meeseeks" alt="Meeseeks">
                    <span class="text-xl">Meeseeks Box</span>
                </button>
                <button onclick="startPortalGame()" class="bg-green-600 hover:bg-green-700 p-4 rounded-lg flex flex-col items-center">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mb-2" alt="Portal Gun">
                    <span class="text-xl">Portal Challenge</span>
                </button>
                <button onclick="startJerryGame()" class="bg-yellow-600 hover:bg-yellow-700 p-4 rounded-lg flex flex-col items-center">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mb-2" alt="Jerry">
                    <span class="text-xl">Jerry's Adventure</span>
                </button>
            </div>
            <button onclick="showMainMenu()" class="mt-8 bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                Back to Main Menu
            </button>
        </div>

        <!-- Easter Eggs Menu -->
        <div id="easterEggsMenu" class="hidden text-center">
            <h1 class="text-4xl font-bold mb-8 text-yellow-400">
                EASTER EGGS
            </h1>
            <p class="mb-8 max-w-2xl mx-auto">Explore hidden secrets from the multiverse! Try clicking random objects or typing secret commands in the game console.</p>
            
            <div class="grid grid-cols-2 md:grid-cols-4 gap-4 max-w-3xl mx-auto mb-8">
                <div onclick="revealEasterEgg('pickleRick')" class="bg-gray-800 hover:bg-gray-700 p-4 rounded-lg cursor-pointer">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-24 h-24 mx-auto mb-2" alt="Pickle Rick">
                    <span>Pickle Rick</span>
                </div>
                <div onclick="revealEasterEgg('interdimensionalCable')" class="bg-gray-800 hover:bg-gray-700 p-4 rounded-lg cursor-pointer">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-24 h-24 mx-auto mb-2" alt="TV">
                    <span>Interdimensional Cable</span>
                </div>
                <div onclick="revealEasterEgg('tinyRick')" class="bg-gray-800 hover:bg-gray-700 p-4 rounded-lg cursor-pointer">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-24 h-24 mx-auto mb-2" alt="Tiny Rick">
                    <span>Tiny Rick</span>
                </div>
                <div onclick="revealEasterEgg('evilMorty')" class="bg-gray-800 hover:bg-gray-700 p-4 rounded-lg cursor-pointer">
                    <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-24 h-24 mx-auto mb-2" alt="Evil Morty">
                    <span>Evil Morty</span>
                </div>
            </div>
            
            <div id="easterEggContent" class="hidden bg-black bg-opacity-80 p-6 rounded-lg max-w-2xl mx-auto mb-6 dialog-box">
                <p id="easterEggText"></p>
            </div>
            
            <button onclick="showMainMenu()" class="bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                Back to Main Menu
            </button>
        </div>

        <!-- Plumbus Game -->
        <div id="plumbusGame" class="hidden text-center">
            <h1 class="text-4xl font-bold mb-4 text-purple-400">
                PLUMBUS FACTORY
            </h1>
            <p class="mb-6">Help assemble Plumbuses for the intergalactic market!</p>
            
            <div class="bg-black bg-opacity-70 p-6 rounded-lg max-w-md mx-auto">
                <div class="flex justify-between items-center mb-4">
                    <span>Schmeckles: <span id="plumbusSchmeckles" class="text-yellow-400">0</span></span>
                    <span>Plumbuses: <span id="plumbusCount" class="text-purple-400">0</span></span>
                </div>
                
                <div class="grid grid-cols-3 gap-4 mb-6">
                    <div onclick="addComponent('fleeb')" class="bg-gray-800 hover:bg-gray-700 p-3 rounded cursor-pointer">
                        <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mx-auto mb-2" alt="Fleeb">
                        <span>Fleeb</span>
                    </div>
                    <div onclick="addComponent('dinglebop')" class="bg-gray-800 hover:bg-gray-700 p-3 rounded cursor-pointer">
                        <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mx-auto mb-2" alt="Dinglebop">
                        <span>Dinglebop</span>
                    </div>
                    <div onclick="addComponent('schleem')" class="bg-gray-800 hover:bg-gray-700 p-3 rounded cursor-pointer">
                        <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-16 h-16 mx-auto mb-2" alt="Schleem">
                        <span>Schleem</span>
                    </div>
                </div>
                
                <div class="mb-6 relative h-32 bg-gray-900 rounded flex items-center justify-center">
                    <div id="plumbusAssembly" class="flex space-x-2">
                        <!-- Components will appear here -->
                    </div>
                </div>
                
                <button onclick="assemblePlumbus()" id="assembleBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-2 px-6 rounded disabled:opacity-50" disabled>
                    Assemble Plumbus
                </button>
            </div>
            
            <button onclick="showMiniGames()" class="mt-6 bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                Back to Mini-Games
            </button>
        </div>

        <!-- Meeseeks Game -->
        <div id="meeseeksGame" class="hidden text-center">
            <h1 class="text-4xl font-bold mb-4 text-blue-400">
                MEESEEKS BOX
            </h1>
            <p class="mb-6">I'm Mr. Meeseeks! Look at me! What's your task?</p>
            
            <div class="bg-black bg-opacity-70 p-6 rounded-lg max-w-md mx-auto">
                <div class="mb-4">
                    <span>Active Meeseeks: <span id="meeseeksCount" class="text-blue-400">0</span></span>
                </div>
                
                <div id="meeseeksContainer" class="min-h-32 mb-6 relative">
                    <!-- Meeseeks will appear here -->
                </div>
                
                <div class="flex flex-col space-y-3">
                    <input type="text" id="meeseeksTask" class="w-full bg-gray-800 text-white p-2 rounded focus:outline-none" placeholder="Enter task for Mr. Meeseeks">
                    <button onclick="summonMeeseeks()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-6 rounded">
                        Summon Mr. Meeseeks
                    </button>
                </div>
            </div>
            
            <button onclick="showMiniGames()" class="mt-6 bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                Back to Mini-Games
            </button>
        </div>

        <!-- Portal Game -->
        <div id="portalGame" class="hidden text-center">
            <h1 class="text-4xl font-bold mb-4 text-green-400">
                PORTAL CHALLENGE
            </h1>
            <p class="mb-6">Navigate through portals to collect antimatter!</p>
            
            <div class="relative w-full max-w-md h-96 mx-auto bg-gray-900 rounded-lg overflow-hidden mb-6">
                <div id="portalGameArea" class="w-full h-full relative">
                    <div id="player" class="absolute w-8 h-8 bg-purple-500 rounded-full"></div>
                    <!-- Portals and items will be added dynamically -->
                </div>
            </div>
            
            <div class="flex justify-between max-w-md mx-auto mb-6">
                <div class="bg-gray-800 p-3 rounded">
                    <span>Antimatter: <span id="antimatterCount" class="text-green-400">0</span></span>
                </div>
                <div class="bg-gray-800 p-3 rounded">
                    <span>Time: <span id="portalTime" class="text-red-400">30</span>s</span>
                </div>
            </div>
            
            <button onclick="startPortalChallenge()" class="bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-6 rounded">
                Start Challenge
            </button>
            
            <button onclick="showMiniGames()" class="mt-6 bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                Back to Mini-Games
            </button>
        </div>

        <!-- Jerry's Adventure Game -->
        <div id="jerryGame" class="hidden text-center">
            <h1 class="text-4xl font-bold mb-4 text-yellow-400">
                JERRY'S ADVENTURE
            </h1>
            <p class="mb-6">Help Jerry navigate through life without getting fired!</p>
            
            <div class="bg-black bg-opacity-70 p-6 rounded-lg max-w-md mx-auto">
                <div class="mb-6">
                    <div class="w-full bg-gray-800 rounded-full h-4 mb-2">
                        <div id="jerryHappiness" class="bg-yellow-500 h-4 rounded-full" style="width: 100%"></div>
                    </div>
                    <span>Happiness: <span id="jerryHappinessText">100%</span></span>
                </div>
                
                <div class="grid grid-cols-2 gap-4 mb-6">
                    <button onclick="jerryAction('work')" class="bg-blue-600 hover:bg-blue-700 p-3 rounded">
                        <i class="fas fa-briefcase text-2xl mb-2"></i><br>
                        Go to Work
                    </button>
                    <button onclick="jerryAction('tv')" class="bg-purple-600 hover:bg-purple-700 p-3 rounded">
                        <i class="fas fa-tv text-2xl mb-2"></i><br>
                        Watch TV
                    </button>
                    <button onclick="jerryAction('beth')" class="bg-pink-600 hover:bg-pink-700 p-3 rounded">
                        <i class="fas fa-heart text-2xl mb-2"></i><br>
                        Spend Time with Beth
                    </button>
                    <button onclick="jerryAction('cry')" class="bg-gray-600 hover:bg-gray-700 p-3 rounded">
                        <i class="fas fa-sad-tear text-2xl mb-2"></i><br>
                        Cry in Shower
                    </button>
                </div>
                
                <div id="jerryStatus" class="bg-gray-900 p-3 rounded text-sm">
                    <p>Jerry is ready for another day of mediocrity!</p>
                </div>
            </div>
            
            <button onclick="showMiniGames()" class="mt-6 bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                Back to Mini-Games
            </button>
        </div>

        <!-- Hidden Easter Egg Elements -->
        <div id="pickleRickEgg" class="hidden fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50">
            <div class="bg-gray-900 p-6 rounded-lg max-w-md text-center dialog-box">
                <h2 class="text-3xl font-bold mb-4 text-green-400">PICKLE RICK!</h2>
                <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mx-auto mb-4 shake" alt="Pickle Rick">
                <p class="mb-4">"I turned myself into a pickle, Morty! I'm PICKLE RIIIIICK!"</p>
                <button onclick="hideEasterEgg()" class="bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-6 rounded">
                    Close
                </button>
            </div>
        </div>

        <div id="interdimensionalCableEgg" class="hidden fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50">
            <div class="bg-gray-900 p-6 rounded-lg max-w-md text-center dialog-box">
                <h2 class="text-3xl font-bold mb-4 text-blue-400">INTERDIMENSIONAL CABLE</h2>
                <div class="bg-black p-4 mb-4 rounded">
                    <p class="text-yellow-400">"Two Brothers... in a van... and then a meteor hits..."</p>
                </div>
                <button onclick="changeChannel()" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-6 rounded mr-2">
                    Change Channel
                </button>
                <button onclick="hideEasterEgg()" class="bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                    Close
                </button>
            </div>
        </div>

        <div id="tinyRickEgg" class="hidden fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50">
            <div class="bg-gray-900 p-6 rounded-lg max-w-md text-center dialog-box">
                <h2 class="text-3xl font-bold mb-4 text-red-400">TINY RICK!</h2>
                <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mx-auto mb-4" alt="Tiny Rick">
                <p class="mb-4">"I'm Tiny Riiick! Let's rock and roll, let's get schwifty!"</p>
                <audio id="tinyRickAudio" src="https://www.myinstants.com/media/sounds/tiny-rick.mp3"></audio>
                <button onclick="document.getElementById('tinyRickAudio').play()" class="bg-red-600 hover:bg-red-700 text-white font-bold py-2 px-6 rounded mr-2">
                    Play Song
                </button>
                <button onclick="hideEasterEgg()" class="bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-6 rounded">
                    Close
                </button>
            </div>
        </div>

        <div id="evilMortyEgg" class="hidden fixed inset-0 bg-black bg-opacity-90 flex items-center justify-center z-50">
            <div class="bg-gray-900 p-6 rounded-lg max-w-md text-center dialog-box">
                <h2 class="text-3xl font-bold mb-4 text-yellow-400">EVIL MORTY</h2>
                <img src="https://i.imgur.com/8QZQZ9Q.png" class="w-32 h-32 mx-auto mb-4" alt="Evil Morty">
                <p class="mb-4">"You're not the Rickest Rick. I'm the Mortiest Morty."</p>
                <button onclick="evilMortyReveal()" class="bg-yellow-600 hover:bg-yellow-700 text-black font-bold py-2 px-6 rounded">
                    Reveal Plan
                </button>
            </div>
        </div>

        <!-- Rick Dance Easter Egg (hidden until triggered) -->
        <div id="rickDanceContainer" class="hidden fixed bottom-4 right-4 z-40">
            <div class="rick-dance w-16 h-16 bg-blue-500"></div>
        </div>

        <!-- Floating elements that can be clicked for Easter eggs -->
        <div onclick="collectSchmeckles(5)" class="absolute top-20 left-10 text-yellow-400 text-4xl cursor-pointer floating" title="Click me!">
            <i class="fas fa-coins"></i>
        </div>
        <div onclick="addRandomDialog()" class="absolute bottom-32 right-16 text-purple-400 text-4xl cursor-pointer floating" title="Click me!">
            <i class="fas fa-comment-dots"></i>
        </div>
    </div>

    <script>
        // Game state
        const gameState = {
            schmeckles: 0,
            currentDimension: 'C-137',
            dimensions: ['C-137', 'J19ζ7', '35C', 'Fascist', 'Cronenberg', 'Wasp', 'Froopyland', 'Tusk', 'Gazorpazorp'],
            inventory: {
                plumbus: 1,
                portalGun: 1,
                meeseeksBox: 1,
                microverseBattery: 1
            },
            plumbusComponents: [],
            activeMeeseeks: [],
            jerryHappiness: 100,
            easterEggsFound: []
        };

        // Easter egg quotes
        const rickQuotes = [
            "Wubba lubba dub dub!",
            "Morty, I'm a pickle! I'm pickle Riiick!",
            "Nobody exists on purpose, nobody belongs anywhere, everybody's gonna die. Come watch TV.",
            "To live is to risk it all. Otherwise you're just an inert chunk of randomly assembled molecules drifting wherever the universe blows you.",
            "Get your shit together. Get it all together and put it in a backpack, all your shit, so it's together.",
            "You pass butter.",
            "Sometimes science is more art than science, Morty.",
            "I turned myself into a pickle, Morty! I'm Pickle Riiick!",
            "You're missing the point Morty. Why would he drive a smaller toaster with wheels? I mean, does your car look like a smaller version of your house?"
        ];

        const cableShows = [
            "Two Brothers - it's just called Two Brothers",
            "Gazorpazorpfield - 'I don't care if you're a robot, I hate you'",
            "Ball Fondlers - the most violent show in the universe",
            "Jan Quadrant Vincent 16 - a show about nothing",
            "How Did I Get Here? - a reality show where people wake up in strange places",
            "The Adventures of Stealy - a show about a sentient robot who steals things",
            "Interdimensional Cable - literally just static"
        ];

        // DOM elements
        const mainMenu = document.getElementById('mainMenu');
        const mainGame = document.getElementById('mainGame');
        const miniGamesMenu = document.getElementById('miniGamesMenu');
        const easterEggsMenu = document.getElementById('easterEggsMenu');
        const plumbusGame = document.getElementById('plumbusGame');
        const meeseeksGame = document.getElementById('meeseeksGame');
        const portalGame = document.getElementById('portalGame');
        const jerryGame = document.getElementById('jerryGame');
        const gameLog = document.getElementById('gameLog');
        const gameCommand = document.getElementById('gameCommand');
        const schmecklesDisplay = document.getElementById('schmecklesDisplay');
        const dimensionDisplay = document.getElementById('dimensionDisplay');

        // Game functions
        function startGame() {
            mainMenu.classList.add('hidden');
            mainGame.classList.remove('hidden');
            addToGameLog("Welcome to the Rick and Morty Multiverse Game!");
            addToGameLog("Type 'help' for a list of commands.");
            updateUI();
        }

        function showMainMenu() {
            mainMenu.classList.remove('hidden');
            mainGame.classList.add('hidden');
            miniGamesMenu.classList.add('hidden');
            easterEggsMenu.classList.add('hidden');
            plumbusGame.classList.add('hidden');
            meeseeksGame.classList.add('hidden');
            portalGame.classList.add('hidden');
            jerryGame.classList.add('hidden');
        }

        function showMiniGames() {
            mainMenu.classList.add('hidden');
            miniGamesMenu.classList.remove('hidden');
        }

        function showEasterEggs() {
            mainMenu.classList.add('hidden');
            easterEggsMenu.classList.remove('hidden');
        }

        function travelToRandomDimension() {
            const newDimension = gameState.dimensions[Math.floor(Math.random() * gameState.dimensions.length)];
            gameState.currentDimension = newDimension;
            dimensionDisplay.textContent = newDimension;
            addToGameLog(`*BURP* Welcome to dimension ${newDimension}, Morty!`);
            updateUI();
            
            // Small chance for a special dimension
            if (Math.random() < 0.1) {
                setTimeout(() => {
                    addToGameLog("Whoa! This dimension has some weird stuff going on!");
                    collectSchmeckles(50);
                }, 1500);
            }
        }

        function interactWithCharacter(character) {
            switch(character) {
                case 'rick':
                    addToGameLog("Rick: " + rickQuotes[Math.floor(Math.random() * rickQuotes.length)]);
                    break;
                case 'morty':
                    addToGameLog("Morty: Oh geez, Rick, I don't know about this...");
                    break;
                case 'summer':
                    addToGameLog("Summer: Ugh, you guys are the worst!");
                    break;
                case 'beth':
                    addToGameLog("Beth: I'm a horse surgeon, not a people surgeon!");
                    break;
                case 'jerry':
                    addToGameLog("Jerry: I just want to be loved... and maybe get a job.");
                    break;
            }
        }

        function useItem(item) {
            switch(item) {
                case 'plumbus':
                    addToGameLog("You used the Plumbus. Everyone has a Plumbus in their home!");
                    collectSchmeckles(10);
                    break;
                case 'portalGun':
                    addToGameLog("You fired the portal gun! *BURP* Let's go to a new dimension, Morty!");
                    travelToRandomDimension();
                    break;
                case 'meeseeksBox':
                    addToGameLog("You pressed the Meeseeks box! 'I'm Mr. Meeseeks! Look at me!'");
                    setTimeout(() => {
                        addToGameLog("Mr. Meeseeks: What do you want me to do?");
                    }, 1000);
                    break;
                case 'microverseBattery':
                    addToGameLog("You used the Microverse Battery. Powering up...");
                    collectSchmeckles(25);
                    break;
            }
        }

        function processCommand() {
            const command = gameCommand.value.toLowerCase();
            gameCommand.value = '';
            
            if (!command) return;
            
            addToGameLog(`> ${command}`);
            
            switch(command) {
                case 'help':
                    addToGameLog("Available commands:");
                    addToGameLog("help - Show this help message");
                    addToGameLog("rick - Talk to Rick");
                    addToGameLog("morty - Talk to Morty");
                    addToGameLog("portal - Travel to a random dimension");
                    addToGameLog("schmeckles - Check your schmeckles");
                    addToGameLog("wubba lubba dub dub - Secret command");
                    addToGameLog("get schwifty - Another secret command");
                    break;
                case 'portal':
                    travelToRandomDimension();
                    break;
                case 'schmeckles':
                    addToGameLog(`You have ${gameState.schmeckles} schmeckles.`);
                    break;
                case 'wubba lubba dub dub':
                    addToGameLog("Rick: That's my catchphrase, Morty! It means 'I am in great pain, please help me!'");
                    collectSchmeckles(100);
                    break;
                case 'get schwifty':
                    addToGameLog("Time to get schwifty in here!");
                    document.getElementById('rickDanceContainer').classList.remove('hidden');
                    setTimeout(() => {
                        document.getElementById('rickDanceContainer').classList.add('hidden');
                    }, 5000);
                    break;
                case 'plumbus':
                    addToGameLog("Ah yes, the Plumbus. Everyone knows how Plumbuses are made.");
                    break;
                case 'meeseeks':
                    addToGameLog("I'm Mr. Meeseeks! Look at me!");
                    break;
                default:
                    addToGameLog("Command not recognized. Type 'help' for a list of commands.");
            }
        }

        function addToGameLog(message) {
            const p = document.createElement('p');
            p.textContent = message;
            gameLog.appendChild(p);
            gameLog.scrollTop = gameLog.scrollHeight;
        }

        function updateUI() {
            schmecklesDisplay.textContent = gameState.schmeckles;
            dimensionDisplay.textContent = gameState.currentDimension;
        }

        function collectSchmeckles(amount) {
            gameState.schmeckles += amount;
            updateUI();
            
            // Show floating schmeckles text
            const schmecklesPopup = document.createElement('div');
            schmecklesPopup.textContent = `+${amount} Schmeckles`;
            schmecklesPopup.className = 'absolute text-yellow-400 font-bold text-xl animate-float opacity-0';
            document.getElementById('gameContainer').appendChild(schmecklesPopup);
            
            // Position near the click
            const rect = event.target.getBoundingClientRect();
            schmecklesPopup.style.left = `${rect.left + rect.width/2}px`;
            schmecklesPopup.style.top = `${rect.top}px`;
            
            // Animate
            setTimeout(() => {
                schmecklesPopup.style.opacity = '1';
                schmecklesPopup.style.transform = 'translateY(-50px)';
            }, 10);
            
            setTimeout(() => {
                schmecklesPopup.style.opacity = '0';
                setTimeout(() => {
                    schmecklesPopup.remove();
                }, 300);
            }, 1000);
        }

        function addRandomDialog() {
            const characters = ['Rick', 'Morty', 'Summer', 'Beth', 'Jerry', 'Mr. Meeseeks', 'Birdperson'];
            const character = characters[Math.floor(Math.random() * characters.length)];
            const actions = [
                `says: "${rickQuotes[Math.floor(Math.random() * rickQuotes.length)]}"`,
                'burps loudly',
                'trips over nothing',
                'complains about Jerry',
                'demands scheckles',
                'creates a mini black hole',
                'asks for McDonald\'s Szechuan sauce'
            ];
            const action = actions[Math.floor(Math.random() * actions.length)];
            
            addToGameLog(`${character} ${action}`);
            
            // Small chance for bonus
            if (Math.random() < 0.2) {
                collectSchmeckles(10);
            }
        }

        // Mini-games functions
        function startPlumbusGame() {
            miniGamesMenu.classList.add('hidden');
            plumbusGame.classList.remove('hidden');
            gameState.plumbusComponents = [];
            updatePlumbusUI();
        }

        function addComponent(component) {
            if (gameState.plumbusComponents.length < 3) {
                gameState.plumbusComponents.push(component);
                updatePlumbusUI();
                
                // Add visual component
                const componentImg = document.createElement('img');
                componentImg.src = `https://i.imgur.com/8QZQZ9Q.png`;
                componentImg.className = 'w-16 h-16';
                componentImg.alt = component;
                document.getElementById('plumbusAssembly').appendChild(componentImg);
                
                // Enable assemble button if we have all components
                if (gameState.plumbusComponents.length === 3) {
                    document.getElementById('assembleBtn').disabled = false;
                }
            }
        }

        function assemblePlumbus() {
            if (gameState.plumbusComponents.length === 3) {
                // Check if components are in correct order (fleeb, dinglebop, schleem)
                if (gameState.plumbusComponents[0] === 'fleeb' && 
                    gameState.plumbusComponents[1] === 'dinglebop' && 
                    gameState.plumbusComponents[2] === 'schleem') {
                    
                    // Success!
                    const plumbusesMade = Math.floor(Math.random() * 3) + 1;
                    gameState.schmeckles += plumbusesMade * 50;
                    const plumbusCount = parseInt(document.getElementById('plumbusCount').textContent) + plumbusesMade;
                    document.getElementById('plumbusCount').textContent = plumbusCount;
                    
                    // Show success message
                    addToGameLog(`Success! You made ${plumbusesMade} Plumbus(es) and earned ${plumbusesMade * 50} schmeckles!`);
                    
                    // Reset for next plumbus
                    gameState.plumbusComponents = [];
                    document.getElementById('plumbusAssembly').innerHTML = '';
                    document.getElementById('assembleBtn').disabled = true;
                    updatePlumbusUI();
                } else {
                    // Wrong order
                    addToGameLog("Oops! That's not how you make a Plumbus! The correct order is Fleeb, Dinglebop, Schleem.");
                    
                    // Reset
                    gameState.plumbusComponents = [];
                    document.getElementById('plumbusAssembly').innerHTML = '';
                    document.getElementById('assembleBtn').disabled = true;
                    updatePlumbusUI();
                }
            }
        }

        function updatePlumbusUI() {
            document.getElementById('plumbusSchmeckles').textContent = gameState.schmeckles;
        }

        function startMeeseeksGame() {
            miniGamesMenu.classList.add('hidden');
            meeseeksGame.classList.remove('hidden');
            gameState.activeMeeseeks = [];
            updateMeeseeksUI();
        }

        function summonMeeseeks() {
            const task = document.getElementById('meeseeksTask').value;
            if (!task) {
                addToGameLog("Mr. Meeseeks: You need to give me a task!");
                return;
            }
            
            const meeseeks = {
                id: Date.now(),
                task: task,
                frustration: 0
            };
            
            gameState.activeMeeseeks.push(meeseeks);
            updateMeeseeksUI();
            
            // Create visual Meeseeks
            const meeseeksDiv = document.createElement('div');
            meeseeksDiv.id = `meeseeks-${meeseeks.id}`;
            meeseeksDiv.className = 'absolute bg-blue-500 text-white p-2 rounded-full text-sm';
            meeseeksDiv.textContent = 'Mr. Meeseeks';
            meeseeksDiv.style.left = `${Math.random() * 80 + 10}%`;
            meeseeksDiv.style.top = `${Math.random() * 60 + 20}%`;
            document.getElementById('meeseeksContainer').appendChild(meeseeksDiv);
            
            // Animate
            setTimeout(() => {
                meeseeksDiv.classList.add('animate-bounce');
            }, 100);
            
            // Start frustration timer
            const frustrationInterval = setInterval(() => {
                meeseeks.frustration++;
                
                if (meeseeks.frustration >= 5) {
                    clearInterval(frustrationInterval);
                    meeseeksDiv.textContent = "EXISTENCE IS PAIN!";
                    meeseeksDiv.classList.add('bg-red-500');
                    meeseeksDiv.classList.remove('bg-blue-500');
                    
                    setTimeout(() => {
                        // Meeseeks disappears
                        const index = gameState.activeMeeseeks.findIndex(m => m.id === meeseeks.id);
                        if (index !== -1) {
                            gameState.activeMeeseeks.splice(index, 1);
                            updateMeeseeksUI();
                        }
                        meeseeksDiv.remove();
                    }, 2000);
                } else if (meeseeks.frustration >= 3) {
                    meeseeksDiv.textContent = `"${task}" is hard!`;
                }
            }, 2000);
            
            // Clear input
            document.getElementById('meeseeksTask').value = '';
        }

        function updateMeeseeksUI() {
            document.getElementById('meeseeksCount').textContent = gameState.activeMeeseeks.length;
        }

        function startPortalGame() {
            miniGamesMenu.classList.add('hidden');
            portalGame.classList.remove('hidden');
            document.getElementById('antimatterCount').textContent = '0';
            document.getElementById('portalTime').textContent = '30';
        }

        function startPortalChallenge() {
            const gameArea = document.getElementById('portalGameArea');
            gameArea.innerHTML = ''; // Clear previous game
            
            // Create player
            const player = document.createElement('div');
            player.id = 'player';
            player.className = 'absolute w-8 h-8 bg-purple-500 rounded-full';
            player.style.left = '50%';
            player.style.top = '50%';
            gameArea.appendChild(player);
            
            // Create portals (2-4)
            const portalCount = Math.floor(Math.random() * 3) + 2;
            for (let i = 0; i < portalCount; i++) {
                const portal = document.createElement('div');
                portal.className = 'absolute w-12 h-12 rounded-full border-4 border-teal-500 cursor-pointer';
                portal.style.left = `${Math.random() * 80 + 10}%`;
                portal.style.top = `${Math.random() * 60 + 20}%`;
                portal.onclick = function() {
                    collectAntimatter(this);
                };
                gameArea.appendChild(portal);
            }
            
            // Create antimatter (5-10)
            const antimatterCount = Math.floor(Math.random() * 6) + 5;
            for (let i = 0; i < antimatterCount; i++) {
                const antimatter = document.createElement('div');
                antimatter.className = 'absolute w-6 h-6 bg-yellow-400 rounded-full cursor-pointer';
                antimatter.style.left = `${Math.random() * 90 + 5}%`;
                antimatter.style.top = `${Math.random() * 80 + 10}%`;
                antimatter.onclick = function() {
                    collectAntimatter(this);
                };
                gameArea.appendChild(antimatter);
            }
            
            // Start timer
            let timeLeft = 30;
            const timer = setInterval(() => {
                timeLeft--;
                document.getElementById('portalTime').textContent = timeLeft;
                
                if (timeLeft <= 0) {
                    clearInterval(timer);
                    addToGameLog(`Portal challenge complete! You collected ${document.getElementById('antimatterCount').textContent} antimatter!`);
                    gameState.schmeckles += parseInt(document.getElementById('antimatterCount').textContent) * 10;
                    updateUI();
                }
            }, 1000);
        }

        function collectAntimatter(element) {
            if (element.classList.contains('bg-yellow-400')) {
                // It's antimatter
                const current = parseInt(document.getElementById('antimatterCount').textContent);
                document.getElementById('antimatterCount').textContent = current + 1;
                
                // Show effect
                element.classList.remove('bg-yellow-400');
                element.classList.add('bg-red-500', 'animate-ping');
                setTimeout(() => {
                    element.remove();
                }, 500);
            } else {
                // It's a portal - teleport player
                const player = document.getElementById('player');
                player.style.left = element.style.left;
                player.style.top = element.style.top;
                
                // Portal effect
                element.classList.add('animate-pulse');
                setTimeout(() => {
                    element.classList.remove('animate-pulse');
                }, 500);
            }
        }

        function startJerryGame() {
            miniGamesMenu.classList.add('hidden');
            jerryGame.classList.remove('hidden');
            gameState.jerryHappiness = 100;
            updateJerryUI();
        }

        function jerryAction(action) {
            switch(action) {
                case 'work':
                    gameState.jerryHappiness -= 15;
                    addToGameLog("Jerry went to work and got yelled at by his boss.");
                    break;
                case 'tv':
                    gameState.jerryHappiness += 10;
                    addToGameLog("Jerry watched some TV and felt slightly better.");
                    break;
                case 'beth':
                    gameState.jerryHappiness += 25;
                    addToGameLog("Jerry spent quality time with Beth and felt loved.");
                    break;
                case 'cry':
                    gameState.jerryHappiness -= 5;
                    addToGameLog("Jerry cried in the shower. It was therapeutic but also sad.");
                    break;
            }
            
            // Keep happiness between 0-100
            gameState.jerryHappiness = Math.max(0, Math.min(100, gameState.jerryHappiness));
            
            // Check for game over
            if (gameState.jerryHappiness <= 0) {
                addToGameLog("Jerry had a complete breakdown and got fired. Game over!");
                setTimeout(() => {
                    startJerryGame(); // Restart game
                }, 2000);
            } else if (gameState.jerryHappiness >= 100) {
                addToGameLog("Jerry is completely happy! You win!");
                gameState.schmeckles += 100;
                updateUI();
                setTimeout(() => {
                    startJerryGame(); // Restart game
                }, 2000);
            }
            
            updateJerryUI();
        }

        function updateJerryUI() {
            document.getElementById('jerryHappiness').style.width = `${gameState.jerryHappiness}%`;
            document.getElementById('jerryHappinessText').textContent = `${gameState.jerryHappiness}%`;
            
            // Update status message
            let status = "";
            if (gameState.jerryHappiness >= 80) {
                status = "Jerry is ecstatic! Maybe too ecstatic...";
            } else if (gameState.jerryHappiness >= 60) {
                status = "Jerry is feeling pretty good about himself.";
            } else if (gameState.jerryHappiness >= 40) {
                status = "Jerry is feeling mediocre, as usual.";
            } else if (gameState.jerryHappiness >= 20) {
                status = "Jerry is depressed. Maybe watch some TV?";
            } else {
                status = "Jerry is on the verge of a breakdown!";
            }
            
            document.getElementById('jerryStatus').innerHTML = `<p>${status}</p>`;
        }

        // Easter eggs functions
        function revealEasterEgg(egg) {
            if (!gameState.easterEggsFound.includes(egg)) {
                gameState.easterEggsFound.push(egg);
                collectSchmeckles(100);
            }
            
            document.getElementById(`${egg}Egg`).classList.remove('hidden');
        }

        function hideEasterEgg() {
            document.querySelectorAll('[id$="Egg"]').forEach(el => {
                el.classList.add('hidden');
            });
        }

        function changeChannel() {
            document.getElementById('easterEggText').textContent = 
                cableShows[Math.floor(Math.random() * cableShows.length)];
        }

        function evilMortyReveal() {
            document.getElementById('easterEggText').textContent = 
                "Evil Morty: 'I'm going to dismantle the Citadel and free all Mortys from Ricks!'";
            setTimeout(() => {
                hideEasterEgg();
            }, 3000);
        }

        function rickRoll() {
            // Classic Rick Roll
            window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ', '_blank');
        }

        // Keyboard shortcuts
        document.addEventListener('keydown', function(event) {
            if (event.key === 'Enter' && !gameCommand.disabled) {
                processCommand();
            }
            
            // Secret konami code
            if (event.key === 'ArrowUp' || event.key === 'ArrowDown' || 
                event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
                // Check for konami code
                // In a real implementation, you'd track the sequence
                if (Math.random() < 0.1) { // 10% chance for fun
                    addToGameLog("Secret code activated! Here's 50 schmeckles!");
                    collectSchmeckles(50);
                }
            }
        });

        // Easter egg: Click the title
        document.querySelector('h1').addEventListener('click', function() {
            if (Math.random() < 0.3) { // 30% chance
                addToGameLog("Rick: Stop clicking me, Morty! *burp*");
            }
        });

        // Easter egg: Click the portal
        document.querySelector('.portal').addEventListener('click', function() {
            addToGameLog("Portal gun activated! *whoosh*");
            travelToRandomDimension();
        });
    </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=Slayerfryed44/rick-and-morty-game" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>