File size: 77,220 Bytes
0b0352e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9d3aaa2
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Gamified Quiz Challenge</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
    <style>
        body {
            font-family: "Inter", sans-serif;
            margin: 0;
            padding: 0;
            overflow: hidden; /* Prevent scrolling due to Three.js background */
            position: relative;
            display: flex; /* Use flexbox for layout */
            height: 100vh; /* Full viewport height */
            /* Gradient background for body */
            background: linear-gradient(to bottom right, #e0f2f7, #bae6fd);
        }
        #threejs-background {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1; /* Place behind other content */
        }
        .sidebar {
            width: 250px; /* Fixed sidebar width */
            background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
            padding: 20px;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
            z-index: 1; /* Place above Three.js background */
            overflow-y: auto; /* Enable scrolling for many quests */
            /* Optional: Add a subtle gradient to the sidebar */
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.9));
        }
        .main-content {
            flex-grow: 1; /* Take remaining space */
            padding: 20px;
            overflow-y: auto; /* Enable scrolling for quiz content */
            position: relative;
            z-index: 1; /* Place above Three.js background */
        }
        .quiz-container {
            max-width: 800px;
            margin: 0 auto; /* Center quiz content in main area */
            background-color: rgba(255, 255, 255, 0.95); /* Slightly less transparent */
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            padding: 20px;
            /* Optional: Subtle gradient for the container */
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(250, 250, 250, 0.95));
        }
        .question-card {
            background-color: #ffffff;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            text-align: left; /* Align question text left */
        }
        .option-button {
            display: block;
            width: 100%;
            text-align: left;
            padding: 10px 15px;
            margin-bottom: 10px;
            border: 1px solid #e5e7eb;
            border-radius: 5px;
            background-color: #f9fafb;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.1s ease;
        }
        .option-button:hover {
            background-color: #e5e7eb;
            transform: translateX(5px); /* Slight hover effect */
        }
        .option-button:active {
            transform: translateX(0);
        }
        .option-button.selected {
             background: linear-gradient(to right, #bfdbfe, #93c5fd); /* Light blue gradient for selected */
             border-color: #93c5fd;
             color: #1e3a8a; /* Darker blue text */
        }
        .option-button.correct {
            background: linear-gradient(to right, #d4edda, #c3e6cb); /* Green gradient for correct */
            border-color: #c3e6cb;
             color: #065f46; /* Darker green text */
        }
        .option-button.incorrect {
            background: linear-gradient(to right, #f8d7da, #f5c6cb); /* Red gradient for incorrect */
            border-color: #f5c6cb;
            color: #7f1d1d; /* Darker red text */
        }
        .score-container {
            text-align: center;
            font-size: 2rem; /* Larger score */
            font-weight: bold;
            margin-top: 30px; /* More space */
            color: #1f2937; /* Darker text */
        }
        /* Removed timer-bar styles */
        .progress-bar-container {
            width: 100%;
            background-color: #e5e7eb;
            border-radius: 5px;
            margin-bottom: 20px;
            height: 10px;
            overflow: hidden;
        }
        .progress-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(to right, #2563eb, #1d4ed8); /* Blue gradient for progress */
            border-radius: 5px;
            transition: width 0.4s ease-in-out;
        }
        .navigation-buttons {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }
        .nav-button {
            padding: 10px 20px;
            background: linear-gradient(to right, #3b82f6, #2563eb); /* Blue gradient */
            color: white;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            border: none; /* Remove default button border */
        }
        .nav-button:hover:not(:disabled) {
            background: linear-gradient(to right, #2563eb, #1d4ed8); /* Darker blue gradient on hover */
        }
         .nav-button:disabled {
            background-color: #93c5fd;
            cursor: not-allowed;
        }
        .submit-quest-button {
            padding: 10px 20px;
            background: linear-gradient(to right, #10b981, #059669); /* Green gradient */
            color: white;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
             border: none; /* Remove default button border */
        }
         .submit-quest-button:hover:not(:disabled) {
            background: linear-gradient(to right, #059669, #047857); /* Darker green gradient on hover */
        }
         .submit-quest-button:disabled {
            background-color: #a7f3d0;
            cursor: not-allowed;
        }
        .sidebar-quest-item {
            padding: 10px;
            margin-bottom: 10px;
            background-color: #e0f2f7;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .sidebar-quest-item:hover {
            background-color: #bae6fd;
        }
        .sidebar-quest-item.active {
            background: linear-gradient(to right, #0ea5e9, #0284c7); /* Cyan gradient */
            color: white;
            font-weight: bold;
        }
         .sidebar-quest-item.completed {
            background-color: #d1fae5; /* Light green */
            color: #065f46;
        }
        .results-area {
            margin-top: 20px;
            text-align: left;
        }
        .result-item {
            margin-bottom: 15px;
            padding: 10px;
            border-bottom: 1px solid #eee;
        }
        .result-item .question {
            font-weight: bold;
            margin-bottom: 5px;
        }
        .result-item .your-answer {
            color: #ef4444; /* Red for incorrect */
            font-weight: bold;
        }
         .result-item .your-answer.correct {
            color: #10b981; /* Green for correct */
        }
        .result-item .correct-answer {
            color: #10b981; /* Green */
            font-style: italic;
        }

    </style>
</head>
<body class="bg-gray-100">
    <div id="threejs-background"></div>

    <div class="sidebar">
        <h2 class="text-xl font-bold mb-4">Quests</h2>
        <div id="quest-list">
            </div>
        <div class="mt-8">
             <h2 class="text-xl font-bold mb-4">Scoreboard</h2>
             <div id="scoreboard">
                 </div>
        </div>
    </div>

    <div class="main-content">
        <div class="quiz-container">
            <h1 class="text-3xl font-bold text-center mb-4 text-gray-800" id="quest-title">Select a Quest</h1>
            <div class="progress-bar-container hidden" id="progress-container">
                <div class="progress-bar" id="progress-bar"></div>
            </div>
            <div id="quiz-area">
                <p class="text-center text-gray-600">Select a quest from the sidebar to begin.</p>
            </div>
            <div id="navigation" class="navigation-buttons hidden">
                <button id="prev-button" class="nav-button">Previous</button>
                <button id="next-button" class="nav-button">Next</button>
                 <button id="submit-quest-button" class="submit-quest-button hidden">Submit Quest</button>
            </div>
            <div id="results-area" class="results-area hidden">
                <h2 class="text-2xl font-bold mb-4">Quest Results</h2>
                <p class="text-lg mb-4">Your Score: <span id="final-score"></span> / <span id="total-quest-questions"></span></p>
                <div id="answer-review">
                    </div>
            </div>
        </div>
    </div>


    <script>
        // Three.js Background Setup
        let scene, camera, renderer, backgroundObjects = [];

        function initThreeJS() {
            const container = document.getElementById('threejs-background');

            // Scene
            scene = new THREE.Scene();
            // Scene background color is now handled by CSS gradient on body
            // scene.background = new THREE.Color(0xe0f2f7);

            // Camera
            camera = new THREE.PerspectiveCamera(75, container.clientWidth / container.clientHeight, 0.1, 1000);
            camera.position.z = 10; // Move camera back

            // Renderer
            renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); // Enable alpha for transparency
            renderer.setSize(container.clientWidth, container.clientHeight);
            container.appendChild(renderer.domElement);

            // Add some background shapes (spheres and boxes)
            const geometrySphere = new THREE.SphereGeometry(0.5, 16, 16);
            const geometryBox = new THREE.BoxGeometry(1, 1, 1);
            // Use materials that work well with a gradient background
            const materialBlue = new THREE.MeshBasicMaterial({ color: 0x3b82f6, wireframe: true, transparent: true, opacity: 0.8 }); // Blue
            const materialPurple = new THREE.MeshBasicMaterial({ color: 0x8b5cf6, wireframe: true, transparent: true, opacity: 0.8 }); // Purple

            for (let i = 0; i < 20; i++) {
                const geometry = Math.random() > 0.5 ? geometrySphere : geometryBox;
                const material = Math.random() > 0.5 ? materialBlue : materialPurple;
                const mesh = new THREE.Mesh(geometry, material);

                // Random positions and rotations
                mesh.position.x = (Math.random() - 0.5) * 20;
                mesh.position.y = (Math.random() - 0.5) * 20;
                mesh.position.z = (Math.random() - 0.5) * 20;
                mesh.rotation.x = Math.random() * Math.PI;
                mesh.rotation.y = Math.random() * Math.PI;

                scene.add(mesh);
                backgroundObjects.push(mesh);
            }

            // Add ambient light (still useful for wireframe visibility)
            const ambientLight = new THREE.AmbientLight(0x404040); // Soft white light
            scene.add(ambientLight);

            // Add directional light (still useful)
            const directionalLight = new THREE.DirectionalLight(0xffffff, 0.5);
            directionalLight.position.set(1, 1, 1).normalize();
            scene.add(directionalLight);


            // Handle Window Resize
            window.addEventListener('resize', onWindowResize, false);

            // Animation Loop
            animateThreeJS();
        }

        function onWindowResize() {
            const container = document.getElementById('threejs-background');
            camera.aspect = container.clientWidth / container.clientHeight;
            camera.updateProjectionMatrix();
            renderer.setSize(container.clientWidth, container.clientHeight);
        }

        function animateThreeJS() {
            requestAnimationFrame(animateThreeJS);

            // Rotate background objects
            backgroundObjects.forEach(obj => {
                obj.rotation.x += 0.001;
                obj.rotation.y += 0.001;
            });

            renderer.render(scene, camera);
        }

        // Initialize Three.js when the window loads
        window.onload = initThreeJS;


        // Quiz Data structured into Quests
        const quizQuests = [
            {
                name: "Quest 1: Fundamentals",
                questions: [
                    { question: "What is the HCF of 24 and 36?", options: ["6", "8", "12", "18"], answer: "12" },
                    { question: "What is the LCM of 8 and 12?", options: ["12", "24", "36", "48"], answer: "24" },
                    { question: "The product of two numbers is 180, and their HCF is 6. What is their LCM?", options: ["30", "36", "60", "90"], answer: "60" },
                    { question: "HCF of (45, 60, 75) is:", options: ["5", "10", "15", "20"], answer: "15" },
                    { question: "The LCM of 18, 24, and 30 is:", options: ["180", "120", "90", "240"], answer: "180" },
                    { question: "The largest 2-digit number divisible by 4, 6, and 8 is:", options: ["92", "96", "88", "84"], answer: "96" },
                    { question: "The HCF of two consecutive numbers is always:", options: ["1", "2", "The smallest number", "Their sum"], answer: "1" },
                    { question: "The LCM of 14 and 21 is:", options: ["7", "21", "42", "28"], answer: "42" },
                    { question: "What is the smallest prime number?", options: ["1", "2", "3", "5"], answer: "2" },
                    { question: "What is the largest 3-digit number divisible by 5 and 7?", options: ["990", "945", "910", "980"], answer: "980" },
                    { question: "The HCF of 85 and 136 is:", options: ["1", "17", "85", "136"], answer: "17" },
                    { question: "Which number is co-prime with 35?", options: ["21", "36", "19", "70"], answer: "19" },
                    { question: "LCM of 9, 15, and 25 is:", options: ["225", "375", "75", "125"], answer: "225" },
                    { question: "The sum of two co-prime numbers is 20. What is their HCF?", options: ["1", "2", "5", "10"], answer: "1" },
                    { question: "If HCF(28, 36) = 4, what is LCM(28, 36)?", options: ["252", "168", "72", "96"], answer: "252" }
                ]
            },
            {
                name: "Quest 2: More Fundamentals",
                questions: [
                    { question: "The LCM of two numbers is 84, and their HCF is 2. Find one possible pair.", options: ["28, 42", "14, 28", "21, 42", "12, 28"], answer: "28, 42" },
                    { question: "A fraction is in the simplest form when its numerator and denominator are:", options: ["Even", "Co-primes", "Multiples", "Factors"], answer: "Co-primes" },
                    { question: "The HCF of 36 and 48 is:", options: ["6", "12", "18", "24"], answer: "12" },
                    { question: "If LCM of two numbers is 72 and their HCF is 6, find one possible pair.", options: ["12, 36", "18, 24", "24, 36", "6, 72"], answer: "24, 36" },
                    { question: "What is the smallest prime number greater than 50?", options: ["51", "53", "55", "59"], answer: "53" },
                    { question: "The HCF of 60 and 72 is:", options: ["12", "24", "6", "18"], answer: "12" },
                    { question: "The LCM of 18 and 20 is:", options: ["360", "180", "90", "100"], answer: "180" },
                    { question: "If HCF of two numbers is 1, they are called:", options: ["Co-primes", "Twin primes", "Prime numbers", "Composite numbers"], answer: "Co-primes" },
                    { question: "What is the LCM of 9, 12, and 15?", options: ["90", "180", "60", "45"], answer: "180" },
                    { question: "Find the missing number: HCF(56, 98) = ?", options: ["14", "28", "7", "21"], answer: "14" },
                    { question: "The product of two numbers is equal to the product of their HCF and LCM.", options: ["True", "False"], answer: "True" },
                    { question: "HCF of 7 and 9 is:", options: ["7", "9", "1", "0"], answer: "1" },
                    { question: "What is the LCM of 10 and 15?", options: ["10", "15", "30", "20"], answer: "30" },
                    { question: "Which of the following is NOT a prime number?", options: ["11", "13", "21", "17"], answer: "21" },
                    { question: "Which fraction is the largest?", options: ["3/5", "2/3", "4/7", "5/9"], answer: "2/3" }
                ]
            },
             {
                name: "Quest 3: Fractions & Relations",
                questions: [
                    { question: "Which fraction is the smallest?", options: ["7/12", "5/8", "3/7", "2/5"], answer: "2/5" },
                    { question: "Which is greater: 7/9 or 5/6?", options: ["7/9", "5/6", "Both are equal", "Cannot be determined"], answer: "7/9" },
                    { question: "Arrange in ascending order: 1/2, 3/4, 5/6, 2/3", options: ["1/2<2/3<3/4<5/6", "3/4<1/2<2/3<5/6", "2/3<1/2<3/4<5/6", "1/2<3/4<5/6<2/3"], answer: "1/2<2/3<3/4<5/6" },
                    { question: "Which fraction is closest to 1?", options: ["7/8", "5/6", "3/4", "9/10"], answer: "9/10" },
                    { question: "If two fractions have the same numerator, the larger fraction is the one with:", options: ["Smaller denominator", "Larger denominator", "No relation", "Equal value"], answer: "Smaller denominator" },
                    { question: "Which is smaller: 4/9 or 3/7?", options: ["4/9", "3/7", "Both are equal", "Cannot be determined"], answer: "3/7" },
                    { question: "Compare: 11/15 and 7/10. Which is greater?", options: ["11/15", "7/10", "Both are equal", "Cannot be determined"], answer: "11/15" },
                    { question: "If 2/5 < x < 4/5, which of the following could be x?", options: ["1/2", "3/4", "5/6", "1/5"], answer: "1/2" },
                    { question: "Which of the following is the correct comparison?", options: ["5/12 > 3/8", "7/10 < 2/3", "9/16 = 6/11", "4/9 > 2/5"], answer: "4/9 > 2/5" },
                    { question: "The LCM of 16 and 24 is:", options: ["32", "48", "64", "72"], answer: "48" },
                    { question: "Pointing to a woman, Raj said, \"She is the daughter of my grandfather's only son.\" How is the woman related to Raj?", options: ["Sister", "Cousin", "Aunt", "Mother"], answer: "Sister" },
                    { question: "If A is the father of B, but B is not the son of A, then what is B to A?", options: ["Daughter", "Cousin", "Mother", "Wife"], answer: "Daughter" },
                    { question: "Introducing a man, a woman said, \"He is the only son of my mother's father.\" How is the man related to the woman?", options: ["Brother", "Uncle", "Father", "Cousin"], answer: "Brother" },
                    { question: "If A+B means A is the father of B, AB means A is the wife of B, A*B means A is the sister of B, then what does X+Y*Z mean?", options: ["X is the uncle of Z", "X is the father of Z", "X is the brother of Z", "X is the father of Y"], answer: "X is the father of Z" },
                    { question: "Pointing to a girl, Ravi said, \"She is the mother of my mother's only granddaughter.\" How is the girl related to Ravi?", options: ["Daughter", "Sister", "Niece", "Wife"], answer: "Wife" }
                ]
            },
             {
                name: "Quest 4: More Relations & Time/Speed",
                questions: [
                    { question: "If P×Q means P is the sister of Q. P+Q means P is the father of Q. P-Q means P is the mother of Q, then what does (X-Y)+Z mean?", options: ["X is the grandmother of Z", "X is the mother of Z", "X is the father of Z", "X is the sister of Z"], answer: "X is the grandmother of Z" },
                    { question: "If A is the brother of B, and B is the sister of C, how is C related to A?", options: ["Brother", "Sister", "Cannot be determined", "Cousin"], answer: "Cannot be determined" },
                    { question: "A man said, \"This girl is the wife of the grandson of my mother.\" How is the girl related to the man?", options: ["Daughter", "Daughter-in-law", "Granddaughter", "Wife"], answer: "Daughter-in-law" },
                    { question: "If A is the brother of B, and B is the mother of C, how is A related to C?", options: ["Father", "Brother", "Uncle", "Grandfather"], answer: "Uncle" },
                    { question: "Pointing to a man, Shyam said, \"He is the only son of my mother's father.\" How is the man related to Shyam?", options: ["Uncle", "Brother", "Father", "Grandfather"], answer: "Father" },
                    { question: "A train travels 120 km in 2 hours. What is its speed?", options: ["40 km/h", "50 km/h", "60 km/h", "80 km/h"], answer: "60 km/h" },
                    { question: "A man walks at 6 km/hr. How much time will he take to cover 18 km?", options: ["2 hrs", "3 hrs", "4 hrs", "5 hrs"], answer: "3 hrs" },
                    { question: "Convert 72 km/h to m/s.", options: ["10 m/s", "15 m/s", "20 m/s", "25 m/s"], answer: "20 m/s" },
                    { question: "A car covers a distance of 240 km in 4 hours. Find its speed.", options: ["40 km/h", "50 km/h", "60 km/h", "80 km/h"], answer: "60 km/h" },
                    { question: "The speed of a train is 90 km/h. How much time will it take to travel 180 km?", options: ["1 hr", "2 hrs", "3 hrs", "4 hrs"], answer: "2 hrs" },
                    { question: "A person cycles at 12 km/h. How far will he travel in 45 minutes?", options: ["9 km", "10 km", "11 km", "12 km"], answer: "9 km" },
                    { question: "Convert 20 m/s to km/h.", options: ["36 km/h", "54 km/h", "72 km/h", "90 km/h"], answer: "72 km/h" },
                    { question: "If a pipe fills a tank in 6 hours, what part of the tank is filled in 2 hours?", options: ["1/3", "1/2", "2/3", "3/4"], answer: "1/3" },
                    { question: "A train 120m long is moving at 54 km/h. How long will it take to cross a pole?", options: ["6 sec", "8 sec", "10 sec", "12 sec"], answer: "8 sec" },
                    { question: "Two taps can fill a tank in 12 hours and 8 hours. How long will they take together?", options: ["4.8 hrs", "5 hrs", "6 hrs", "7 hrs"], answer: "4.8 hrs" }
                ]
            },
             {
                name: "Quest 5: Time/Speed & Series",
                questions: [
                    { question: "Two trains of lengths 120m and 150m are moving in opposite directions at speeds of 54 km/h and 72 km/h. How long will they take to cross each other?", options: ["5 sec", "7.7 sec", "10 sec", "12 sec"], answer: "7.7 sec" },
                    { question: "Relative speed of two cars moving opposite direction in the speed of S1 km/hr and S2 km/hr, respectively is", options: ["S1 x S2 km/hr", "S1+S2 km/hr", "S1-S2 km/hr", "None"], answer: "S1+S2 km/hr" },
                    { question: "Relative speed of two cars moving same direction in the speed of S1 km/hr and S2 km/hr respectively is", options: ["S1 x S2 km/hr", "S1+S2 km/hr", "S1-S2 km/hr", "None"], answer: "S1-S2 km/hr" },
                    { question: "1km/hr=", options: ["1", "1000", "18/5", "5/18"], answer: "5/18" },
                    { question: "A train moving at 72 km/h crosses a platform of length 200m in 20 sec. Find the train's length.", options: ["100m", "200m", "300m", "400m"], answer: "200m" },
                    { question: "1 m/s=", options: ["1", "1000", "18/5", "5/18"], answer: "18/5" },
                    { question: "Two taps A and B can fill a tank in 8 hours and 12 hours respectively. How long will they take together?", options: ["4.8 hrs", "5.6 hrs", "6 hrs", "7.2 hrs"], answer: "4.8 hrs" },
                    { question: "A 200m long train crosses a bridge of 300m in 50 seconds. Find its speed.", options: ["10 m/s", "12 m/s", "14 m/s", "16 m/s"], answer: "10 m/s" },
                    { question: "A car travels 30 km at 60 km/h and 30 km at 90 km/h. What is its average speed?", options: ["70 km/h", "72 km/h", "75 km/h", "78 km/h"], answer: "72 km/h" },
                    { question: "A cyclist covers 100 meters in 10 sec. What is his speed in km/h?", options: ["18 km/h", "24 km/h", "30 km/h", "36 km/h"], answer: "36 km/h" },
                    { question: "A bus covers a distance of 150 km in 3 hours. What is its speed?", options: ["40 km/h", "45 km/h", "50 km/h", "55 km/h"], answer: "50 km/h" },
                    { question: "A train moving at 90 km/h crosses a pole in 10 sec. What is its length?", options: ["150 m", "200 m", "250 m", "300 m"], answer: "250 m" },
                    { question: "A car travels two equal distances at speeds of s1 km/h and s2 km/h. What is its average speed for the entire journey?", options: ["2(s1+s2)/(s1s2)", "2(s1 s2)/(s1+s2)", "2(s1 s2)/(s1s2)", "none"], answer: "2(s1 s2)/(s1+s2)" },
                    { question: "A train 100 m long crosses a bridge 200 m in 20 sec. What is its speed?", options: ["40 km/h", "50 km/h", "54 km/h", "60 km/h"], answer: "54 km/h" },
                    { question: "A cyclist moves at 15 m/s. How much distance does he cover in 2 minutes?", options: ["800m", "900m", "1000m", "1800m"], answer: "1800m" }
                ]
            },
             {
                name: "Quest 6: Time/Speed & Coding",
                questions: [
                    { question: "A train moving at 72 km/h crosses a platform in 30 seconds. If the train's length is 300m, what is the platform's length?", options: ["100m", "120m", "150m", "200m"], answer: "300m" },
                    { question: "Two pipes can fill a tank in 10 min and 15 min, respectively. A third pipe can empty the tank in 30 min. If all are opened together, how long will the tank take to fill?", options: ["8 min", "10 min", "12 min", "15 min"], answer: "12 min" },
                    { question: "A car travels two equal distances at speeds of 40 km/h and 60 km/h. What is its average speed for the entire journey?", options: ["45 km/h", "48 km/h", "50 km/h", "52 km/h"], answer: "48 km/h" },
                    { question: "A cyclist covers a distance of 200 km in 5 hours. What is his speed?", options: ["30 km/h", "35 km/h", "40 km/h", "45 km/h"], answer: "40 km/h" },
                    { question: "Two taps can fill a tank in 8 min and 12 min, respectively. If both are opened together, how long will it take to fill the tank?", options: ["4.8 min", "5 min", "5.2 min", "6 min"], answer: "4.8 min" },
                    { question: "If PEN is coded as QFO, then BOOK is coded as?", options: ["CPLL", "COQK", "CPPL", "COOL"], answer: "CPLL" },
                    { question: "Find the missing number in the series: 3, 6, 12, 24, ?, 96", options: ["36", "38", "48", "50"], answer: "48" },
                    { question: "What number should replace the question mark? 2, 5, 10, 17, ?, 37", options: ["24", "25", "26", "27"], answer: "26" },
                    { question: "Find the missing number in the pattern: 7, 14, 28, 56,?, 224", options: ["84", "92", "98", "112"], answer: "112" },
                    { question: "What is the missing number? 81, 27, 9, _, 1", options: ["5", "3", "4", "2"], answer: "3" },
                    { question: "Complete the sequence: 4, 9, 16, 25, ?, 49", options: ["30", "35", "36", "42"], answer: "36" },
                    { question: "In a certain code, NEED is written as OFEF, then SEED is written as?", options: ["TFEE", "TFFF", "TFGF", "TFEF"], answer: "TFEF" },
                    { question: "If FISH is coded as GJUI, then BIRD is?", options: ["CJSE", "CKTF", "CLUG", "CMVH"], answer: "CKTF" },
                    { question: "IF COMPUTER is coded as DPNQVUFS, then LAPTOP is?", options: ["MBQQPQ", "MBQQQP", "MBQQTQ", "MBQUPK"], answer: "MBQUPK" },
                    { question: "If BALL is coded as CBMM, then GAME is?", options: ["HBNF", "HCNG", "HCOH", "HDPI"], answer: "HBNF" }
                ]
            },
             {
                name: "Quest 7: More Coding & Ages",
                questions: [
                    { question: "If KITE is coded as MGVG, then WIND is?", options: ["YKPF", "YLQG", "YGPF", "ZMSI"], answer: "YGPF" },
                    { question: "If STAR is coded as VWDX, then MOON is?", options: ["PRRT", "QSSQ", "QTTQ", "QUUQ"], answer: "PRRT" },
                    { question: "If RED is coded as UHG, then SUN is?", options: ["YTX", "ZTY", "ZUZ", "VXQ"], answer: "VXQ" },
                    { question: "If PHONE is coded as QIQOF, then TABLE is?", options: ["UBDMF", "UDCMF", "UEBMF", "UFCMF"], answer: "UBDMF" },
                    { question: "If RAIN is coded as UJQP, then CLOUD is?", options: ["FMOTG", "FNQUG", "FNRVG", "FORWG"], answer: "FNRVG" },
                    { question: "IF DOCTOR is coded as FQEVQT, then NURSE is?", options: ["PVWUG", "PWTUG", "QVWTG", "QXWTG"], answer: "PWTUG" },
                    { question: "If TABLE is coded as UBCMF, then CHAIR is?", options: ["DIBJS", "DJCJT", "DKBJT", "DKCJT"], answer: "DIBJS" },
                    { question: "If CAT is coded as DBU, then DOG is?", options: ["ΕΡΗ", "EQI", "EQH", "ERI"], answer: "ΕΡΗ" },
                    { question: "IF MONDAY is coded as NQOEBZ, then FRIDAY is?", options: ["GQJEBZ", "GSHFCA", "GSJEBZ", "GTJEBZ"], answer: "GTJEBZ" },
                    { question: "IF WATCH is coded as YCVFK, then CLOCK is?", options: ["DMPDL", "DNRDL", "DNRDM", "DNRFN"], answer: "DNRDL" },
                    { question: "The present age of a father is three times that of his son. After 5 years, the father's age will be twice that of his son. What is the son's present age?", options: ["5 years", "10 years", "15 years", "20 years"], answer: "5 years" },
                    { question: "The average age of a group of 5 people is 30 years. If a new person joins the group, the average age increases by 2 years. What is the age of the new person?", options: ["32", "36", "40", "42"], answer: "42" },
                    { question: "A man's age is 4 times his son's age. After 20 years, his age will be twice that of his son. What is his present age?", options: ["30", "40", "50", "60"], answer: "40" },
                    { question: "The sum of the present ages of a father and his son is 60 years. After 10 years, the father's age will be twice that of his son. What is the son's present age?", options: ["15", "20", "25", "30"], answer: "20" },
                    { question: "If the ratio of ages of two persons is 5:7 and the difference in their ages is 6 years, what is the age of the younger person?", options: ["20", "21", "22", "23"], answer: "21" }
                ]
            },
             {
                name: "Quest 8: Ages & Progressions",
                questions: [
                     { question: "The sum of the ages of A and B is 48 years. If A is 4 years older than B, what is B's age?", options: ["22", "24", "26", "28"], answer: "22" },
                    { question: "A is 3 years older than B, who is 2 years younger than C. If the sum of their ages is 45, what is B's age?", options: ["12", "14", "13.33", "14.33"], answer: "13.33" },
                    { question: "A father was 28 years old when his son was born. Now, the father is 3 times as old as his son. What is the son's present age?", options: ["6", "8", "14", "12"], answer: "14" },
                    { question: "The difference between the ages of two persons is 15 years. If after 5 years, the elder one is twice the younger one, find the present age of the younger person.", options: ["5", "10", "15", "20"], answer: "10" },
                    { question: "A person is 20 years older than his son. In 10 years, the father's age will be twice that of his son. What is the present age of the father?", options: ["30", "35", "40", "45"], answer: "30" },
                    { question: "What is the 10th term of the arithmetic progression 3, 7, 11, ...?", options: ["39", "41", "43", "45"], answer: "39" },
                    { question: "The sum of the first 10 natural numbers is:", options: ["55", "65", "75", "85"], answer: "55" },
                    { question: "The common difference of the arithmetic sequence 2, 5, 8, 11, ... is:", options: ["2", "3", "4", "5"], answer: "3" },
                    { question: "The sum of the first 5 terms of an arithmetic series with first term 2 and common difference 3 is:", options: ["30", "35", "40", "45"], answer: "40" },
                    { question: "Find the number of terms in the arithmetic sequence 2, 5, 8, .... 50.", options: ["15", "16", "17", "18"], answer: "17" },
                    { question: "A person gets a salary increment of 5000 per year. Find his salary in the 6th year if his initial salary was 40,000.", options: ["65, 000", "70,000", "60,000", "75,000"], answer: "65, 000" },
                    { question: "What is the sum of the first 20 natural numbers?", options: ["190", "200", "210", "220"], answer: "210" },
                    { question: "The 5th term of a geometric progression where the first term is 2 and the common ratio is 3 is:", options: ["162", "164", "54", "62"], answer: "162" },
                    { question: "In a geometric progression, the 3rd term is 12 and the 6th term is 96. What is the common ratio?", options: ["2", "3", "4", "5"], answer: "2" },
                    { question: "If the 4th term of a geometric sequence is 32 and the common ratio is 2, what is the first term?", options: ["2", "4", "8", "16"], answer: "4" }
                ]
            },
             {
                name: "Quest 9: Logarithms & Verbal",
                questions: [
                    { question: "What is the value of log (2) 8= ?", options: ["2", "3", "4", "5"], answer: "3" },
                    { question: "The logarithm of 1000 to base 10 is:", options: ["1", "2", "3", "4"], answer: "3" },
                    { question: "log (10) 0.01 is ?", options: ["-2", "-3", "2", "-1"], answer: "-2" },
                    { question: "The value of log 0 to any base is always:", options: ["0", "1", "Undefined", "10"], answer: "Undefined" },
                    { question: "log_ 1000 1000 =", options: ["1", "2", "3", "4"], answer: "1" },
                    { question: "remarks made everyone laugh; she's known for her witty comments. Her", options: ["dull", "humorous", "lengthy", "serious"], answer: "humorous" },
                    { question: ": it mirrored the chaos of modern life. The artist's work was", options: ["serene", "turbulent", "plain", "orderly"], answer: "turbulent" },
                    { question: "The CEO's leadership saved the company from bankruptcy.", options: ["reckless", "vague", "passive", "astute"], answer: "astute" },
                    { question: "Despite the harsh criticism, she remained in her beliefs.", options: ["doubtful", "steadfast", "flexible", "indifferent"], answer: "steadfast" },
                    { question: "The movie's ending was. rather than predictable.", options: ["ordinary", "clichéd", "unexpected", "boring"], answer: "unexpected" },
                    { question: "His response contrasted with the team's panic.", options: ["hurried", "frantic", "composed", "anxious"], answer: "composed" },
                    { question: "Pen:Write:: Knife:", options: ["cut", "cook", "draw", "sharpen"], answer: "cut" },
                    { question: "Forest: Trees:: Desert:", options: ["Ocean", "Sand", "Cacti", "Grass"], answer: "Cacti" },
                    { question: "Chef: Recipe:: Scientist:", options: ["Hypothesis", "Laboratory", "Textbook", "Experiment"], answer: "Hypothesis" },
                    { question: "The detective's observation solved the mystery.", options: ["casual", "keen", "vague", "hasty"], answer: "keen" }
                ]
            },
             {
                name: "Quest 10: Verbal Reasoning",
                questions: [
                    { question: "The treaty aimed to peace between the nations.", options: ["disrupt", "foster", "ignore", "prolong"], answer: "foster" },
                    { question: "Her tone suggested she was hiding something.", options: ["evasive", "direct", "cheerful", "loud"], answer: "evasive" },
                    { question: "storm caused widespread damage. The", options: ["mild", "ferocious", "gentle", "brief"], answer: "ferocious" },
                    { question: "His excuses annoyed everyone.", options: ["valid", "lame", "logical", "sincere"], answer: "lame" },
                    { question: "instructions confused the students. The", options: ["ambiguous", "clear", "detailed", "simple"], answer: "ambiguous" },
                    { question: "The medication had no noticeable on the patient.", options: ["affect", "impact", "effect", "influence"], answer: "effect" },
                    { question: "her approval for the project. She", options: ["withheld", "withhelded", "withhelt", "withhold"], answer: "withheld" },
                    { question: "They moved the furniture the hallway.", options: ["in", "into", "through", "onto"], answer: "through" },
                    { question: "After months of training, her performance was", options: ["mediocre", "flawless", "ordinary", "erratic"], answer: "flawless" },
                    { question: "puppy hid under the bed during the storm. The", options: ["brave", "playful", "aggressive", "timid"], answer: "timid" },
                    { question: "crowd cheered when the team scored. The", options: ["apathetic", "raucous", "silent", "sparse"], answer: "raucous" },
                    { question: "Neither the manager nor the employees responsible.", options: ["is", "are", "was", "has been"], answer: "are" },
                    { question: "been finalized. The list of requirements", options: ["has", "have", "were", "are"], answer: "has" },
                    { question: "She is one of those people who always punctual.", options: ["is", "being", "was", "are"], answer: "are" },
                    { question: "of the waterfall echoed through the valley. The", options: ["silence", "murmur", "roar", "shadow"], answer: "roar" }
                ]
            },
             {
                name: "Quest 11: More Verbal Reasoning",
                questions: [
                    { question: "remarks offended the audience. His", options: ["polite", "insensitive", "diplomatic", "kind"], answer: "insensitive" },
                    { question: "The scientist's theory was by new evidence.", options: ["supported", "refuted", "ignored", "praised"], answer: "refuted" },
                    { question: "child refused to share his toys. The", options: ["generous", "calm", "mature", "petulant"], answer: "petulant" },
                    { question: "The of the ancient ruins fascinated archaeologists.", options: ["modernity", "mystique", "simplicity", "ugliness"], answer: "mystique" },
                    { question: "smell of coffee filled the kitchen. The", options: ["foul", "odorless", "aromatic", "pungent"], answer: "aromatic" },
                    { question: "Which of the following sentences is in the active voice?", options: ["The ball was thrown by John", "John threw the ball", "The ball is being thrown by John", "John is throwing the ball"], answer: "John threw the ball" },
                    { question: "Which of the following sentences is in the passive voice?", options: ["The new policy was announced by the CEO", "The CEO announced the new policy", "The new policy is being announced", "The CEO is announcing the new policy"], answer: "The new policy was announced by the CEO" },
                    { question: "Which of the following words is correct in the sentence \"I my keys somewhere\"?", options: ["loose", "lose", "loss", "lost"], answer: "lose" },
                    { question: "Which of the following words is correct in the sentence \"The new policy a lot of controversy\"?", options: ["raise", "rises", "rose", "raze"], answer: "raise" },
                    { question: "What does the word \"enervate\" mean?", options: ["To give energy and strength", "To take away energy and strength", "To make something more interesting", "To make something less interesting"], answer: "To take away energy and strength" },
                    { question: "Which of the following words is an antonym for \"hot\"?", options: ["Rainy", "Warm", "Sunny", "Cold"], answer: "Cold" },
                    { question: "Which of the following is analogous to \"doctor: patient\"?", options: ["Teacher: student", "Engineer: machine", "Lawyer: client", "Chef: customer"], answer: "Lawyer: client" },
                    { question: "Which of the following is analogous to \"river: ocean\"?", options: ["Stream: lake", "Road: highway", "Tree: forest", "Cloud: sky"], answer: "Stream: lake" },
                    { question: "Which of the following is analogous to \"poem: poet\"?", options: ["Song: singer", "Story: writer", "Painting: artist", "Sculpture: sculptor"], answer: "Story: writer" },
                    { question: "Which of the following is analogous to \"city: mayor\"?", options: ["Country: president", "State governor", "Company: CEO", "School: principal"], answer: "Country: president" }
                ]
            },
             {
                name: "Quest 12: Verbal & Conversions",
                questions: [
                     { question: "Which of the following is analogous to map: navigator; Blueprint: ?", options: ["builder", "engineer", "Script", "Score"], answer: "builder" },
                    { question: "Which of the following words means \"a person who speaks in favor of something\"?", options: ["Advocate", "Adversary", "Advisor", "Adverser"], answer: "Advocate" },
                    { question: "Which of the following words means \"a person who is new to a particular activity or field\"?", options: ["Nomadic", "Nostalgie", "Nocturnal", "Novice"], answer: "Novice" },
                    { question: "Which of the following words means \"a person who is an expert in a particular field\"?", options: ["Commissar", "Cognoscente", "Connoisseur", "Comrade"], answer: "Connoisseur" },
                    { question: "Which of the following words means \"a person who is strongly opposed to something\"?", options: ["Antagonist", "Protagonist", "Agonist", "Adversary"], answer: "Antagonist" },
                    { question: "Which of the following sentences is an example of a compound sentence?", options: ["I went to the store, and I bought some milk.", "I went to the store because I needed some milk.", "I went to the store.", "I bought some milk."], answer: "I went to the store, and I bought some milk." },
                    { question: "Which of the following words means \"to give up or surrender\"?", options: ["Sede", "Seed", "Cede", "Seize"], answer: "Cede" },
                    { question: "Which of the following sentences is in the past perfect tense?", options: ["I went to the store.", "I had gone to the store.", "I go to the store.", "I will go to the store."], answer: "I had gone to the store." },
                    { question: "Identify the type of sentence: \"Although it was raining, we still went to the park.\"", options: ["Simple sentence", "Compound sentence", "Complex sentence", "Compound-complex sentence"], answer: "Complex sentence" },
                    { question: "Which of the following sentences is in the passive voice?", options: ["The manager wrote the report.", "The report was written by the manager.", "The report is being written by the manager.", "The manager is writing the report."], answer: "The report was written by the manager." },
                    { question: "After driving professor Kumar to the museum, she dropped him at his hotel. (Convert active to passive)", options: ["After being driven to the museum, Professor Kumar was dropped at his hotel.", "Professor Kumar was being driven dropped at his hotel.", "After she had driven Professor Kumar to the museum she had dropped him at his hotel.", "After she was driven Professor Kumar to the museum she had dropped him at his hotel."], answer: "After being driven to the museum, Professor Kumar was dropped at his hotel." },
                    { question: "I remember my sister taking me to the museum. (Convert active to passive)", options: ["I remember I was taken to the museum by my sister.", "I remember being taken to the museum by my sister.", "I remember myself being taken to the museum by my sister.", "I remember taken to the museum by my sister."], answer: "I remember being taken to the museum by my sister." },
                    { question: "Who is creating this mess? (Convert active to passive)", options: ["Who has been created this mess?", "By whom has this mess been created?", "By whom this mess is being created?", "By whom is this mess being created?"], answer: "By whom is this mess being created?" },
                    { question: "They greet me cheerfully every morning. (Convert active to passive)", options: ["Every morning, I was greeted cheerfully.", "I am greeted cheerfully by them every morning.", "I am being greeted cheerfully by them every morning.", "Cheerful greeting is done by them every morning to me."], answer: "I am greeted cheerfully by them every morning." },
                    { question: "Darjeeling grows tea. (Convert active to passive)", options: ["Tea is being grown in Darjeeling.", "Let the tea be grown in Darjeeling.", "Tea is grown in Darjeeling.", "Tea grows in Darjeeling."], answer: "Tea is grown in Darjeeling." }
                ]
            },
             {
                name: "Quest 13: More Conversions",
                questions: [
                    { question: "They have built a perfect dam across the river. (Convert active to passive)", options: ["Across the river a perfect dam was built.", "A perfect dam has been built by them across the river.", "A perfect dam should have been built by them.", "Across the river was a perfect dam."], answer: "A perfect dam has been built by them across the river." },
                    { question: "Do you imitate others? (Convert active to passive)", options: ["Are others being imitated by you?", "Are others imitated by you?", "Have others being imitated by you?", "Were others being imitated by you?"], answer: "Are others imitated by you?" },
                    { question: "You need to clean your shoes properly. (Convert active to passive)", options: ["Your shoes are needed to clean properly.", "You are needed to clean your shoes properly.", "Your shoes need to be cleaned properly.", "Your shoes are needed by you to clean properly."], answer: "Your shoes need to be cleaned properly." },
                    { question: "He is said to be very rich. (Convert passive to active)", options: ["He said he is very rich.", "People say he is very rich.", "He said it is very rich.", "People say it is very rich."], answer: "People say he is very rich." },
                    { question: "The invigilator was reading out the instructions. (Convert active to passive)", options: ["The instructions were read by the invigilator.", "The instructions were being read out by the invigilator.", "The instructions had been read out by the invigilator.", "The instructions had been read by the invigilator."], answer: "The instructions were being read out by the invigilator." },
                    { question: "You can play with these kittens quite safely. (Convert active to passive)", options: ["These kittens can played with quite safely.", "These kittens can play with you quite safely.", "These kittens can be played with you quite safely.", "These kittens can be played with quite safely."], answer: "These kittens can be played with quite safely." },
                    { question: "A child could not have done this mischief. (Convert active to passive)", options: ["This mischief could not be done by a child.", "This mischief could not been done by a child,", "This mischief could not have been done by a child.", "This mischief a child could not have been done."], answer: "This mischief could not have been done by a child." },
                    { question: "James Watt discovered the energy of steam. (Convert active to passive)", options: ["The energy of steam discovered James Watt.", "The energy of steam was discovered by James Watt.", "James Watt was discovered by the energy of steam..", "James Watt had discovered energy by the steam."], answer: "The energy of steam was discovered by James Watt." },
                    { question: "She makes cakes every Sunday. (Convert active to passive)", options: ["Every Sunday cakes made by her.", "Cakes are made by her every Sunday.", "Cakes make her every Sunday.", "Cakes were made by her every Sunday."], answer: "Cakes are made by her every Sunday." },
                    { question: "She spoke to the official on duty. (Convert active to passive)", options: ["The official on duty was spoken to by her.", "The official was spoken to by her on duty.", "She was spoken to by the official on duty.", "She was the official to be spoken to on duty."], answer: "The official on duty was spoken to by her." },
                    { question: "Fire at once. (Convert active to passive)", options: ["Let it be fired at once.", "He asked you to fire.", "He requested you to fire", "At once your fired"], answer: "Let it be fired at once." },
                    { question: "I cannot accept your offer. (Convert active to passive)", options: ["Your offer cannot be accepted by me.", "I cannot be accepted by your offer.", "The offer cannot be accepted by me.", "Your offer cannot be accepted."], answer: "Your offer cannot be accepted by me." },
                    { question: "You should open the wine about three hours before you use it. (Convert active to passive)", options: ["Wine should be opened about three hours before use.", "Wine should be opened by you three hours before use.", "Wine should be opened about three hours before you use it.", "Wine should be opened about three hours before it is used."], answer: "Wine should be opened about three hours before it is used." },
                    { question: "They will inform the police. (Convert active to passive)", options: ["The police will be informed by them.", "The police will inform them.", "The police are informed by them.", "Informed will be the police by them."], answer: "The police will be informed by them." },
                    { question: "Why did your brother write such a letter? (Convert active to passive)", options: ["Why was such a letter written by your brother?", "Why your brother wrote such a letter?", "Why is such a letter written by your brother?", "Did your brother write such a letter?"], answer: "Why was such a letter written by your brother?" }
                ]
            },
             {
                name: "Quest 14: Direct/Indirect Speech",
                questions: [
                    { question: "\"If you don't keep quiet, I shall shoot you\", he said to her in a calm voice. (Convert Direct to Indirect Speech)", options: ["He warned her to shoot if she didn't keep quiet calmly.", "He said calmly that I shall shoot you if you don't be quiet.", "He warned her calmly that he would shoot her if she didn't keep quiet.", "Calmly he warned her that be quiet or else he will have to shoot her."], answer: "He warned her calmly that he would shoot her if she didn't keep quiet." },
                    { question: "I told him that he was not working hard. (Convert Indirect to Direct Speech)", options: ["I said to him, \"You are not working hard.\"", "I told to him, \"You are not working hard.\"", "I said, \"You are not working hard.\"", "I said to him, \"He is not working hard.\""], answer: "I said to him, \"You are not working hard.\"" },
                    { question: "His father ordered him to go to his room and study. (Convert Indirect to Direct Speech)", options: ["His father said, \"Go to your room and study.\"", "His father said to him, \"Go and study in your room.\"", "His father said firmly, \"Go and study in your room.\""], answer: "His father said, \"Go to your room and study.\"" },
                    { question: "He said to his father, \"Please increase my pocket-money.\" (Convert Direct to Indirect Speech)", options: ["He told his father, \"Please increase the pocket-money\"", "He pleaded with his father to please increase my pocket money.", "He requested his father to increase his pocket-money.", "He asked his father to increase his pocket-money."], answer: "He requested his father to increase his pocket-money." },
                    { question: "She said that her brother was getting married. (Convert Indirect to Direct Speech)", options: ["She said, \"Her brother is getting married.\"", "She told, \"Her brother is getting married.\"", "She said, \"My brother is getting married.\"", "She said, \"My brother was getting married.\""], answer: "She said, \"My brother is getting married.\"" },
                    { question: "The boy said, \"Who dare call you a thief?\"", options: ["The boy enquired who dared call him a thief.", "The boy asked who called him a thief.", "The boy told that who dared call him a thief.", "The boy wondered who dared call a thief."], answer: "The boy enquired who dared call him a thief." },
                    { question: "She exclaimed with sorrow that was a very miserable plight.", options: ["She said with sorrow, \"What a pity it is.\"", "She said, \"What a mystery it is.\"", "She said, \"What a miserable sight it is.\"", "She said, \"What a miserable plight it is."], answer: "She said, \"What a miserable plight it is." },
                    { question: "Dhruv said that he was sick and tired of working for that company.", options: ["Dhruv said, \"I am sick and tired of working for this company.\"", "Dhruv said, \"He was tired of that company.\"", "Dhruv said to me, \"I am sick and tired of working for this company.\"", "Dhruv said, \"I will be tired of working for that company.\""], answer: "Dhruv said, \"I am sick and tired of working for this company.\"" },
                    { question: "\"Are you alone, my son?\" asked a soft voice close behind me.", options: ["A soft voice asked that what I was doing there alone.", "A soft voice said to me are you alone son.", "A soft voice from my back asked if I was alone.", "A soft voice behind me asked if I was alone."], answer: "A soft voice behind me asked if I was alone." },
                    { question: "She said to him, \"Why don't you go today?\"", options: ["She asked him why he did not go that day.", "She said to him why he doesn't go that day.", "She asked him not to go that day.", "She asked him why he did not go today."], answer: "She asked him why he did not go that day." },
                    { question: "He exclaimed with joy that India had won the Sahara Cup.", options: ["He said, \"India has won the Sahara Cup\"", "He said, \"India won the Sahara Cup\"", "He said, \"How! India will win the Sahara Cup\"", "He said, \"Hurrah! India has won the Sahara Cup\""], answer: "He exclaimed that it was a very beautiful scene." },
                    { question: "The little girl said to her mother, \"Did the sun rise in the East?\"", options: ["The little girl said to her mother that the sun rose in the East.", "The little girl asked her mother if the sun rose in the East.", "The little girl said to her mother if the sun rises in the East.", "The little girl asked her mother if the sun is in the East."], answer: "The little girl asked her mother if the sun rose in the East." },
                    { question: "The man said, \"No, I refused to confer guilt.\"", options: ["The man emphatically refused to confer guilt.", "The man refused to confer his guilt.", "The man told that he did not confer guilt.", "The man was stubborn enough to confer guilt."], answer: "The man emphatically refused to confer guilt." },
                    { question: "Nita ordered her servant to bring her cup of tea.", options: ["Nita told her servant, \"Bring a cup of tea.\"", "Nita said, \"Bring me a cup of tea.\"", "Nita said to her servant, \"Bring me a cup of tea.\"", "Nita told her servant, \"Bring her that cup of tea.\""], answer: "Nita said to her servant, \"Bring me a cup of tea.\"" },
                    { question: "My cousin said, \"My room-mate had snored throughout the night.\"", options: ["My cousin said that her room-mate snored throughout the night.", "My cousin told me that her room-mate snored throughout the night.", "My cousin complained to me that her room-mate is snoring throughout the night.", "My cousin felt that her room-mate may be snoring throughout the night."], answer: "My cousin said that her room-mate snored throughout the night." }
                ]
            },
            {
                name: "Quest 15: More Direct/Indirect & Redundancy",
                questions: [
                    { question: "Please don't go away\", she said.", options: ["She said to please her and not go away.", "She told me to go away.", "She begged me not to go away.", "She begged that I not go away."], answer: "She begged me not to go away." },
                    { question: "She said to her friend, \"I know where is everyone\"", options: ["She told that she knew where was everyone.", "She told her friend that she knew where was everyone.", "She told her friend that she knew where is everyone.", "She told her friend that she knows where was everyone."], answer: "She told her friend that she knew where was everyone." },
                    { question: "The teacher said, ‘The Earth goes round the Sun.’", options: ["The teacher said that the Earth went round the Sun.", "The teacher told that the Earth went round the Sun.", "The teacher said the Earth goes round the Sun.", "The teacher exclaimed that the Earth goes round the Sun."], answer: "The teacher said the Earth goes round the Sun." },
                    { question: "He said, “Will you listen to such a man?”", options: ["He asked them whether they would listen to such a man.", "He enquired would we listen to such a man.", "He asked us will we listen to such a man.", "He asked them if they will listen to such a man."], answer: "He asked them whether they would listen to such a man." },
                    { question: "He said,” What a beautiful scene!”", options: ["He said that what a beautiful scene it was.", "He wondered that it was a beautiful scene.", "He exclaimed what a beautiful scene it was.", "He exclaimed that it was a very beautiful scene."], answer: "He exclaimed that it was a very beautiful scene." },
                    { question: "Which phrase in the following sentence is redundant? “I personally think that it’s a good idea.”", options: ["personally", "think", "good", "idea"], answer: "personally" },
                    { question: "What is redundancy in language?", options: ["The use of unnecessary repetition in communication.", "The act of speaking multiple languages fluently.", "The inclusion of additional information to enhance clarity.", "The use of slang and informal expressions."], answer: "The use of unnecessary repetition in communication." },
                    { question: "Which word in the following sentence is redundant? “She added an extra bonus.”", options: ["Added", "extra", "bonus", "She"], answer: "extra" },
                    { question: "In the sentence, “He ate a hamburger with cheese on top,” which phrase is redundant?", options: ["ate a hamburger", "with cheese", "on top", "He"], answer: "on top" },
                    { question: "Which of the following sentences is an example of redundancy?", options: ["“I saw it with my own eyes.”", "“She wore a red-coloured dress.”", "“The cat meowed loudly.”", "“He ran quickly.”"], answer: "“I saw it with my own eyes.”" },
                    { question: "Which of the following phrases is not redundant?", options: ["sudden surprise", "brief moment", "final outcome", "mutual cooperation"], answer: "brief moment" },
                    { question: "Argument: \"Eating organic food is healthier.\" Assumption:", options: ["Organic food is affordable.", "Non-organic food is harmful.", "Healthier options are always organic.", "Organic food has no pesticides"], answer: "Non-organic food is harmful." },
                    { question: "Argument: \"Schools should teach coding because it prepares students for jobs.\" Assumption:", options: ["Coding is easy to learn.", "Future jobs will require coding skills.", "Students enjoy coding.", "Teachers can teach coding effectively."], answer: "Future jobs will require coding skills." },
                    { question: "Argument: \"We must build more parks to reduce air pollution.\" Assumption:", options: ["Parks directly reduce air pollution.", "People will use the parks.", "There’s no space for parks.", "Air pollution is caused by lack of parks."], answer: "Parks directly reduce air pollution." },
                    { question: "Argument: \"Tax cuts for the wealthy will boost the economy.\" Assumption:", options: ["The wealthy will invest their tax savings.", "The poor don’t pay taxes.", "Tax cuts always work.", "The economy is currently weak."], answer: "The wealthy will invest their tax savings." }
                ]
            },
             {
                name: "Quest 16: Analogies",
                questions: [
                    { question: "Cause and effect relationship.", options: ["Man: speech", "Game: Play", "Nutrition: health", "Child: growth"], answer: "Nutrition: health" },
                    { question: "Purpose relationship.", options: ["Summer: winter", "Game: Study", "Stadium: seats", "Hook: fish"], answer: "Hook: fish" },
                    { question: "Work and tool relationship.", options: ["Pathology: disease", "Tailor: needle", "Engineer: site", "Time: Second"], answer: "Tailor: needle" },
                    { question: "Study and topic relationship.", options: ["Gardener: harrow", "Hen: chicken", "Scale: length", "Anthropology: man"], answer: "Anthropology: man" },
                    { question: "Worker and working place relationship.", options: ["Professor: university", "Author: book", "Wine: grapes", "Volume: litre"], answer: "Professor: university" },
                    { question: "Work and product relationship.", options: ["Fabric: yarn", "Cat: kitten", "Editor and newspaper", "Wish: desire"], answer: "Editor and newspaper" },
                    { question: "Word and synonym relationship", options: ["Sweet: bitter", "Ice: solid", "Dog: bitch", "Secret: clandestine"], answer: "Secret: clandestine" },
                    { question: "Word and antonym relationship.", options: ["Dastard: coward", "Field: farm", "House: garbage", "Baffle: clarify"], answer: "Baffle: clarify" },
                    { question: "Degree relationship.", options: ["Fight: war", "Sun: planet", "Horrible: heinous", "Tailor: textile"], answer: "Fight: war" },
                    { question: "Sequence relationship.", options: ["Spring: winter", "Monday: Sunday", "Wednesday: Thursday", "Angle: sky"], answer: "Wednesday: Thursday" },
                    { question: "Grammatical relationship.", options: ["I:me", "He:him", "She: her", "They: these"], answer: "She: her" },
                    { question: "Creature and living place relationship.", options: ["Duck:drake", "Monk:monastery", "Carcass: corpse", "Warm: tepid"], answer: "Monk:monastery" },
                    { question: "Sonnet:poem", options: ["Ballad:stanza", "Murder:crime", "Chapter:book", "Lie:falsehood"], answer: "Murder:crime" },
                    { question: "Heart:Cardiology", options: ["Brain : psychology", "Civics : polity", "History : histology", "Fossils: palaeontology"], answer: "Civics : polity" },
                    { question: "Donkey:trot", options: ["Monkey:waddle", "Cat : Leap", "Eagle: stride", "Mouse: scamper"], answer: "Eagle: stride" }
                ]
            },
             {
                name: "Quest 17: More Analogies",
                questions: [
                    { question: "Bow: Rifle :: Hourglass: ?", options: ["Clocktower", "Bullet", "Diameter", "Chronometer"], answer: "Chronometer" },
                    { question: "Halcyon: :: Placid: Serene", options: ["Calm", "Irritated", "Harmful", "Peaceful"], answer: "Peaceful" },
                    { question: "Oxygen: Burn:: Carbondioxide:?", options: ["Isolate", "Foam", "Extinguish", "Explode"], answer: "Extinguish" },
                    { question: "Genuine: Authentic::Mirage: ?", options: ["Image", "Transpiration", "Reflection", "Illusion"], answer: "Illusion" },
                    { question: "Tree: forest:: Grass: ?", options: ["Lawn", "Field", "Garden", "Farm"], answer: "Lawn" },
                    { question: "Porcupine: Rodent::Mildew: ?", options: ["Fungus", "Germ", "Insect", "Pathogen"], answer: "Fungus" },
                    { question: "Cobra is related to Snake in the same way as Leopard is related to ?", options: ["Tiger", "Lion", "Cat", "Zebra"], answer: "Cat" },
                    { question: "Inches related to centimeters in the same way as Pin is related to ?", options: ["Litre", "Volume", "Gallon", "Viscosity"], answer: "Gallon" },
                    { question: "Crumb is related to Bread in the same way as Morsel is related to ?", options: ["Fruit", "Biscuit", "Food", "Cake"], answer: "Food" },
                    { question: "Earth is related to Axis in the same way as Wheel is related to ? .", options: ["Tyre", "Car", "Road", "Hub"], answer: "Hub" }
                ]
            }
        ];

        let currentQuestIndex = -1; // -1 means no quest selected
        let currentQuestionIndexInQuest = 0;
        let userAnswers = []; // To store user's selected options for the current quest
        const questScores = {}; // To store scores for completed quests

        const questListDiv = document.getElementById('quest-list');
        const scoreboardDiv = document.getElementById('scoreboard');
        const questTitleH1 = document.getElementById('quest-title');
        const quizAreaDiv = document.getElementById('quiz-area');
        // Timer elements removed
        const progressContainerDiv = document.getElementById('progress-container');
        const progressBarDiv = document.getElementById('progress-bar');
        const navigationDiv = document.getElementById('navigation');
        const prevButton = document.getElementById('prev-button');
        const nextButton = document.getElementById('next-button');
        const submitQuestButton = document.getElementById('submit-quest-button');
        const resultsAreaDiv = document.getElementById('results-area');
        const finalScoreSpan = document.getElementById('final-score');
        const totalQuestQuestionsSpan = document.getElementById('total-quest-questions');
        const answerReviewDiv = document.getElementById('answer-review');


        // Function to render the quest list in the sidebar
        function renderQuestList() {
            questListDiv.innerHTML = ''; // Clear existing list
            quizQuests.forEach((quest, index) => {
                const questItem = document.createElement('div');
                questItem.classList.add('sidebar-quest-item', 'cursor-pointer', 'hover:bg-blue-200', 'rounded', 'p-2', 'mb-2');
                questItem.textContent = quest.name;
                questItem.dataset.questIndex = index;

                if (index === currentQuestIndex) {
                    questItem.classList.add('active');
                }
                 if (questScores[index] !== undefined) {
                    questItem.classList.add('completed');
                 }

                questItem.addEventListener('click', () => {
                    if (currentQuestIndex !== index) {
                        loadQuest(index);
                    }
                });
                questListDiv.appendChild(questItem);
            });
        }

        // Function to render the scoreboard in the sidebar
        function renderScoreboard() {
            scoreboardDiv.innerHTML = ''; // Clear existing scoreboard
            if (Object.keys(questScores).length === 0) {
                 scoreboardDiv.innerHTML = '<p class="text-gray-600">Complete quests to see your scores!</p>';
                 return;
            }
            for (const index in questScores) {
                const scoreItem = document.createElement('p');
                scoreItem.classList.add('text-gray-700', 'mb-2');
                scoreItem.textContent = `${quizQuests[index].name}: ${questScores[index].score} / ${questScores[index].total}`;
                scoreboardDiv.appendChild(scoreItem);
            }
        }

        // Function to load a specific quest
        function loadQuest(questIndex) {
            if (questIndex < 0 || questIndex >= quizQuests.length) return;

            currentQuestIndex = questIndex;
            currentQuestionIndexInQuest = 0;
            userAnswers = new Array(quizQuests[currentQuestIndex].questions.length).fill(null); // Initialize user answers array

            // Update UI
            questTitleH1.textContent = quizQuests[currentQuestIndex].name;
            resultsAreaDiv.classList.add('hidden'); // Hide results area
            quizAreaDiv.classList.remove('hidden'); // Show quiz area
            navigationDiv.classList.remove('hidden'); // Show navigation buttons
            // Timer removed
            progressContainerDiv.classList.remove('hidden'); // Show progress bar

            renderQuestList(); // Update active quest in sidebar
            loadQuestionInQuest(currentQuestionIndexInQuest);
        }

        // Function to load a question within the current quest
        function loadQuestionInQuest(questionIndex) {
            const quest = quizQuests[currentQuestIndex];
            if (questionIndex < 0 || questionIndex >= quest.questions.length) return;

            currentQuestionIndexInQuest = questionIndex;
            const qData = quest.questions[currentQuestionIndexInQuest];

            quizAreaDiv.innerHTML = `
                <div class="question-card">
                    <p class="text-xl font-semibold mb-4 text-gray-700">${currentQuestionIndexInQuest + 1}. ${qData.question}</p>
                    <div>
                        ${qData.options.map((option, index) => `
                            <button class="option-button" data-option="${option}">${option}</button>
                        `).join('')}
                    </div>
                </div>
            `;

            // Add event listeners to the new buttons
            quizAreaDiv.querySelectorAll('.option-button').forEach(button => {
                button.addEventListener('click', handleOptionClick);
            });

            // Highlight selected answer if exists
            if (userAnswers[currentQuestionIndexInQuest] !== null) {
                const selectedOptionButton = quizAreaDiv.querySelector(`.option-button[data-option="${userAnswers[currentQuestionIndexInQuest]}"]`);
                if (selectedOptionButton) {
                    selectedOptionButton.classList.add('selected');
                }
            }

            updateNavigationButtons();
            updateProgressBar();
        }

        // Function to handle option click
        function handleOptionClick(event) {
            const selectedOption = event.target;
            const selectedAnswer = selectedOption.dataset.option;

            // Remove 'selected' class from all options for this question
            quizAreaDiv.querySelectorAll('.option-button').forEach(button => {
                button.classList.remove('selected');
            });

            // Add 'selected' class to the clicked option
            selectedOption.classList.add('selected');

            // Store the user's answer
            userAnswers[currentQuestionIndexInQuest] = selectedAnswer;
        }

        // Function to update navigation button states
        function updateNavigationButtons() {
            prevButton.disabled = currentQuestionIndexInQuest === 0;
            nextButton.disabled = currentQuestionIndexInQuest === quizQuests[currentQuestIndex].questions.length - 1;

            // Show submit button only on the last question
            if (currentQuestionIndexInQuest === quizQuests[currentQuestIndex].questions.length - 1) {
                submitQuestButton.classList.remove('hidden');
                nextButton.classList.add('hidden'); // Hide next button on last question
            } else {
                submitQuestButton.classList.add('hidden');
                 nextButton.classList.remove('hidden');
            }
        }

        // Function to navigate to the previous question
        function prevQuestion() {
            if (currentQuestionIndexInQuest > 0) {
                loadQuestionInQuest(currentQuestionIndexInQuest - 1);
            }
        }

        // Function to navigate to the next question
        function nextQuestion() {
            if (currentQuestionIndexInQuest < quizQuests[currentQuestIndex].questions.length - 1) {
                loadQuestionInQuest(currentQuestionIndexInQuest + 1);
            }
        }

        // Function to update the progress bar
        function updateProgressBar() {
            const progress = ((currentQuestionIndexInQuest + 1) / quizQuests[currentQuestIndex].questions.length) * 100;
            progressBarDiv.style.width = `${progress}%`;
        }

        // Function to submit the current quest and show results
        function submitQuest() {
            let correctAnswersCount = 0;
            const quest = quizQuests[currentQuestIndex];
            answerReviewDiv.innerHTML = ''; // Clear previous review

            quest.questions.forEach((qData, index) => {
                const userAnswer = userAnswers[index];
                const correctAnswer = qData.answer;
                const isCorrect = userAnswer === correctAnswer;

                if (isCorrect) {
                    correctAnswersCount++;
                }

                // Display question and answers for review
                const resultItem = document.createElement('div');
                resultItem.classList.add('result-item');
                resultItem.innerHTML = `
                    <p class="question">${index + 1}. ${qData.question}</p>
                    <p>Your Answer: <span class="your-answer ${isCorrect ? 'correct' : ''}">${userAnswer !== null ? userAnswer : 'Not Answered'}</span></p>
                    <p class="correct-answer">Correct Answer: ${correctAnswer}</p>
                `;
                answerReviewDiv.appendChild(resultItem);
            });

            // Store the score
            questScores[currentQuestIndex] = {
                score: correctAnswersCount,
                total: quest.questions.length
            };

            // Update UI to show results
            quizAreaDiv.classList.add('hidden');
            navigationDiv.classList.add('hidden');
            // Timer removed
            progressContainerDiv.classList.add('hidden');
            resultsAreaDiv.classList.remove('hidden');
            finalScoreSpan.textContent = correctAnswersCount;
            totalQuestQuestionsSpan.textContent = quest.questions.length;

            renderScoreboard(); // Update scoreboard in sidebar
            renderQuestList(); // Update quest list (mark as completed)
        }

        // Add event listeners for navigation buttons
        prevButton.addEventListener('click', prevQuestion);
        nextButton.addEventListener('click', nextQuestion);
        submitQuestButton.addEventListener('click', submitQuest);

        // Initial rendering of the quest list and scoreboard
        renderQuestList();
        renderScoreboard();

    </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=vishnuthe8055/quiz1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>