* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } body { background: linear-gradient(145deg, #eef2f7 0%, #d9e2ec 100%); padding: 0; min-height: 100vh; font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Noto Sans', system-ui, sans-serif; } .container { max-width: 100%; margin: 0 auto; padding: 0; } .quiz-header { background: linear-gradient(135deg, #0b2b5c, #102b47); color: white; padding: 16px 20px; border-radius: 0 0 28px 28px; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); margin-bottom: 12px; } .quiz-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.3px; background: linear-gradient(120deg, #ffffff, #e0f2fe); background-clip: text; -webkit-background-clip: text; color: transparent; } .quiz-header p { font-size: 0.8rem; opacity: 0.85; margin-top: 5px; } .quiz-content { padding: 8px 8px 12px 8px; } .quiz-card { background: rgba(255, 255, 255, 0.98); border-radius: 24px; padding: 18px 16px; margin-bottom: 16px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; border: 1px solid #ffffff80; width: 100%; } .question { font-size: 1rem; font-weight: 700; line-height: 1.45; margin-bottom: 18px; color: #0f2b3d; border-left: 5px solid #2c7da0; padding-left: 14px; background: #f9fafc; border-radius: 16px; word-break: break-word; } .option-label { display: flex; align-items: flex-start; gap: 12px; background: #f1f5f9; margin-bottom: 12px; padding: 14px 16px; border-radius: 60px; cursor: pointer; transition: all 0.2s; border: 1.5px solid transparent; font-weight: 500; touch-action: manipulation; width: 100%; } .option-label:active { background: #e2eafc; transform: scale(0.98); } input[type="radio"] { width: 22px; height: 22px; min-width: 22px; accent-color: #1e4a76; cursor: pointer; margin-top: 2px; } .option-text { font-size: 0.9rem; line-height: 1.4; flex: 1; word-break: break-word; } .explanation-box { margin-top: 16px; padding: 14px 16px; background: #fef3c7; border-left: 5px solid #f59e0b; border-radius: 16px; display: none; font-size: 0.85rem; line-height: 1.5; color: #78350f; } .explanation-box.show { display: block; animation: fadeIn 0.3s ease; } .explanation-title { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; } .explanation-title i { color: #f59e0b; } .explanation-text { font-size: 0.85rem; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } } .submit-btn { background: linear-gradient(95deg, #1f6392, #0f3b60); border: none; color: white; font-size: 1.2rem; font-weight: bold; padding: 18px 20px; border-radius: 60px; cursor: pointer; width: 100%; transition: 0.2s; margin: 8px 0 20px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2); letter-spacing: 0.5px; touch-action: manipulation; } .submit-btn:active { transform: scale(0.97); } .result { background: #dcfce8; border-left: 10px solid #15803d; padding: 18px 16px; border-radius: 28px; font-size: 1.15rem; font-weight: bold; text-align: center; margin: 12px 0 20px; display: none; box-shadow: 0 6px 14px rgba(0,0,0,0.1); word-break: break-word; line-height: 1.5; } .correct-highlight { background: #bbf7d0 !important; border-color: #15803d !important; } .wrong-highlight { background: #ffe4e2 !important; border-color: #dc2626 !important; } ::-webkit-scrollbar { width: 3px; } button, .option-label { -webkit-tap-highlight-color: rgba(59,130,246,0.2); } @media (max-width: 600px) { .quiz-content { padding: 6px 6px 10px 6px; } .quiz-header { padding: 14px 16px; } .quiz-header h1 { font-size: 1.3rem; } .quiz-card { padding: 16px 14px; margin-bottom: 14px; } .question { font-size: 0.95rem; padding-left: 12px; } .option-label { padding: 12px 14px; gap: 10px; } .option-text { font-size: 0.87rem; } .explanation-box { padding: 12px 14px; font-size: 0.8rem; } .submit-btn { font-size: 1.1rem; padding: 16px; } } @media (max-width: 380px) { .option-text { font-size: 0.82rem; } .question { font-size: 0.9rem; } } 🔬 विज्ञान MCQ क्विज़ | Science Bilingual Quiz 25 प्रश्न | प्रत्येक प्रश्न के बाद व्याख्या | 25 Questions with Explanations ✅ Submit Quiz / जमा करें // 25 CORRECT BILINGUAL QUESTIONS with Explanations const questionsData = [ { qText: "विद्युत आवेश का एसआई (SI) मात्रक क्या है? / What is the SI unit of electric charge?", opts: ["(a) एम्पियर / Ampere", "(b) कूलॉम / Coulomb", "(c) वोल्ट / Volt", "(d) ओम / Ohm"], ans: "B", explanation: "विद्युत आवेश का SI मात्रक कूलॉम (Coulomb) होता है। एम्पियर विद्युत धारा का मात्रक है। / The SI unit of electric charge is Coulomb (C). Ampere is for current." }, { qText: "गति में वेग परिवर्तन की दर को क्या कहा जाता है? / The rate of change of velocity in motion is called ________.", opts: ["(a) जड़त्व / Inertia", "(b) चाल / Speed", "(c) त्वरण / Acceleration", "(d) विस्थापन / Displacement"], ans: "C", explanation: "वेग में परिवर्तन की दर को त्वरण (Acceleration) कहते हैं। इसका मात्रक m/s² होता है। / The rate of change of velocity is called acceleration (m/s²)." }, { qText: "किसी स्विमिंग पूल या पानी के बर्तन का तल प्रकाश की किस घटना के कारण उठा हुआ प्रतीत होता है? / In a swimming pool, the bottom appears raised due to which phenomenon?", opts: ["(a) प्रकाश का प्रकीर्णन / Scattering of light", "(b) प्रकाश का अपवर्तन / Refraction of light", "(c) प्रकाश का परावर्तन / Reflection of light", "(d) प्रकाश का विक्षेपण / Dispersion of light"], ans: "B", explanation: "प्रकाश के अपवर्तन (Refraction) के कारण जब प्रकाश सघन से विरल माध्यम में जाता है, तो वस्तुएँ उठी हुई दिखाई देती हैं। / Due to refraction of light, the bottom of a water body appears raised." }, { qText: "बारिश की बूंदों से सूर्य के प्रकाश के गुजरने पर इंद्रधनुष का बनना क्या दर्शाता है? / The formation of a rainbow when sunlight passes through raindrops shows that _________", opts: ["(a) सूर्य का प्रकाश सात रंगों का मिश्रण है / Sunlight is a mixture of seven colors", "(b) पानी की बूंदों का अपवर्तनांक 1 होता है / Refractive index of water drops is 1", "(c) बूंदें पूरी तरह वर्गाकार होती हैं / Drops are perfectly square", "(d) सूर्य का प्रकाश एकवर्णीय है / Sunlight is monochromatic"], ans: "A", explanation: "इंद्रधनुष पानी की बूंदों द्वारा सूर्य के प्रकाश के विक्षेपण (Dispersion), अपवर्तन और पूर्ण आंतरिक परावर्तन के कारण बनता है, जिससे सफेद प्रकाश अपने रंगों में टूट जाता है। / Rainbow is formed due to dispersion, refraction, and internal reflection of white sunlight through raindrops." }, { qText: "जब दो समान आवेशों (Like Charges) को एक पास रखा जाता है, तो उनके बीच क्या होता है? / When two like charges are placed near each other, what happens?", opts: ["(a) वे एक-दूसरे को आकर्षित करते हैं / They attract each other", "(b) उनके बीच कोई बल नहीं लगता / No force acts between them", "(c) वे एक-दूसरे को प्रतिकर्षित करते हैं / They repel each other", "(d) उनका आवेश नष्ट हो जाता है / Their charge gets destroyed"], ans: "C", explanation: "समान आवेश (जैसे दो धनात्मक) एक-दूसरे को प्रतिकर्षित (Repel) करते हैं और विपरीत आवेश आकर्षित करते हैं। / Like charges repel each other, whereas opposite charges attract each other." }, { qText: "10 Ω, 15 Ω और 30 Ω के तीन प्रतिरोध श्रेणी क्रम (Series) में जुड़े हैं। इनका तुल्य प्रतिरोध क्या होगा? / Three resistors of 10Ω, 15Ω and 30Ω are connected in series. The equivalent resistance will be _____", opts: ["(a) 25 Ω", "*(b) 45 Ω", "(c) 55 Ω", "(d) 5 Ω"], ans: "C", explanation: "श्रेणी क्रम (Series) में तुल्य प्रतिरोध सीधे जुड़ जाता है: R = 10 + 15 + 30 = 55Ω। / In series connection, equivalent resistance is R = R1 + R2 + R3 = 10 + 15 + 30 = 55Ω." }, { qText: "एक ट्रांसफॉर्मर मुख्य रूप से किसे परिवर्तित या स्टेप-अप/डाउन करता है? / What does a transformer mainly step up or step down?", opts: ["(a) आवृत्ति / Frequency", "(b) केवल धारा / Current only", "(c) वोल्टेज / Voltage", "(d) शक्ति / Power"], ans: "C", explanation: "ट्रांसफॉर्मर अन्योन्य प्रेरण (Mutual Induction) के सिद्धांत पर केवल प्रत्यावर्ती वोल्टेज (AC Voltage) को कम या ज्यादा करता है। / A transformer steps up or steps down alternating voltage without changing frequency." }, { qText: "प्रत्यावर्ती धारा (AC - Alternating Current) का आविष्कार किसके द्वारा किया गया था? / Alternating current (AC) was invented by _________", opts: ["(a) आइजैक न्यूटन / Isaac Newton", "(b) थॉमस एडिसन / Thomas Edison", "(c) निकोला टेस्ला / Nikola Tesla", "(d) अल्बर्ट आइंस्टीन / Albert Einstein"], ans: "C", explanation: "व्यावसायिक रूप से उपयोग होने वाली प्रत्यावर्ती धारा (AC) प्रणाली का आविष्कार और विकास मुख्य रूप से निकोला टेस्ला ने किया था। / Nikola Tesla extensively developed and patented the Alternating Current (AC) induction motor and electrical system." }, { qText: "ऑन्कोलॉजी (Oncology) विज्ञान की किस बीमारी के अध्ययन और उपचार से जुड़ी है? / Oncology is the study and treatment of which disease?", opts: ["(a) ऑस्टियोपोरोसिस / Osteoporosis", "(b) मधुमेह / Diabetes", "(c) कैंसर / Cancer", "(d) गुर्दे की विफलता / Renal failure"], ans: "C", explanation: "ऑन्कोलॉजी चिकित्सा विज्ञान की वह शाखा है जो कैंसर और ट्यूमर के अध्ययन, निदान और उपचार से संबंधित है। / Oncology is a branch of medicine that specializes in the diagnosis and treatment of cancer." }, { qText: "निम्नलिखित रोगों में से कौन सा एक संक्रामक रोग (Communicable Disease) है? / Which of the following is a communicable disease?", opts: ["(a) थैलेसीमिया / Thalassemia", "(b) टाइफाइड / Typhoid", "(c) रतौंधी / Night blindness", "(d) कैंसर / Cancer"], ans: "B", explanation: "टाइफाइड साल्मोनेला टाइफी बैक्टीरिया के कारण होने वाला एक संक्रामक रोग है जो दूषित पानी/भोजन से फैलता है। थैलेसीमिया आनुवंशिक है। / Typhoid is a communicable water-borne bacterial disease. Thalassemia is genetic." }, { qText: "मानव आमाशय (Stomach) में प्रोटीन को पेप्टोन्स में बदलने वाला मुख्य एंजाइम कौन सा है? / In the human stomach, which enzyme converts proteins into peptones?", opts: ["(a) ट्रिप्सिन / Trypsin", "(b) पेप्सिन / Pepsin", "(c) लाइपेज / Lipase", "(d) एमाइलेज / Amylase"], ans: "B", explanation: "आमाशय (Stomach) में पेप्सिन एंजाइम प्रोटीन को तोड़ता है। ट्रिप्सिन अग्न्याशय (Pancreas) द्वारा स्रावित होता है जो छोटी आंत में काम करता है। / Pepsin is active in the stomach to convert proteins into peptones, while Trypsin acts in the small intestine." }, { qText: "मानव शरीर में कितनी जोड़ी मेरुरज्जु तंत्रिकाएं (Spinal Nerves) पाई जाती हैं? / How many pairs of spinal nerves are there in the human body?", opts: ["(a) 31 जोड़ी / 31 pairs", "(b) 30 जोड़ी / 30 pairs", "(c) 33 जोड़ी / 33 pairs", "(d) 12 जोड़ी / 12 pairs"], ans: "A", explanation: "मानव शरीर में 31 जोड़ी स्पाइनल नसें (Spinal Nerves) और 12 जोड़ी कपाल नसें (Cranial Nerves) होती हैं। / There are 31 pairs of spinal nerves and 12 pairs of cranial nerves in humans." }, { qText: "नर और मादा युग्मक (Sperm and Egg) के संलयन से किसका निर्माण होता है? / The fusion of male and female gametes forms a _______", opts: ["(a) युग्मनज / Zygote", "(b) भ्रूण / Embryo", "(c) गर्भ / Foetus", "(d) ब्लास्टोसिस्ट / Blastocyst"], ans: "A", explanation: "निषेचन (Fertilization) के दौरान शुक्राणु और अंडाणु के मिलने से पहली एकल कोशिका बनती है जिसे युग्मनज (Zygote) कहते हैं। / The immediate product of fertilization is a single-celled diploid structure called a zygote." }, { qText: "निद्रालु रोग (Sleeping Sickness) निम्नलिखित में से किस मक्खी के काटने से फैलता है? / Sleeping sickness is transmitted by the bite of which of the following?", opts: ["(a) घरेलू मक्खी / Housefly", "(b) सैंडफ्लाई / Sandfly", "(c) सीसी मक्खी / Tsetse fly", "(d) मच्छर / Mosquito"], ans: "C", explanation: "नींद की बीमारी ट्रिपैनोसोमा प्रोटोजोआ के कारण होती है और यह सीसी मक्खी (Tsetse Fly) के काटने से मनुष्यों में फैलती है। / Sleeping sickness is a parasitic disease transmitted by the Tsetse fly." }, { qText: "निम्नलिखित में से किस कोशिकांग को कोशिका की 'आत्मघाती थैली' (Suicide Bag) कहा जाता है? / Which of the following cell organelles is called the suicide bag of the cell?", opts: ["(a) केंद्रक / Nucleus", "(b) माइटोकॉन्ड्रिया / Mitochondria", "(c) लाइसोसोम / Lysosome", "(d) राइबोसोम / Ribosome"], ans: "C", explanation: "लाइसोसोम में पाचक एंजाइम होते हैं। कोशिका के क्षतिग्रस्त होने पर यह फट जाता है और अपनी ही कोशिका को पचा लेता है। / Lysosomes contain digestive enzymes. If a cell is damaged, they burst and digest their own cell." }, { qText: "पौधों में निषेचन (Fertilization) के बाद बीजांड (Ovule) किसमें विकसित होता है? / In plants, after fertilization, the ovule develops into a _______", opts: ["(a) बीज / Seed", "(b) फल / Fruit", "(c) भ्रूण / Embryo", "(d) फूल / Flower"], ans: "A", explanation: "निषेचन के बाद बीजांड (Ovule) से बीज (Seed) बनता है और अंडाशय (Ovary) विकसित होकर फल (Fruit) बनती है। / After fertilization, the ovule turns into a seed, and the ovary turns into a fruit." }, { qText: "जल के विद्युत अपघटन (Electrolysis of water) से कैथोड और एनोड पर क्रमशः कौन सी गैसें प्राप्त होती हैं? / The electrolysis of water produces which gases at cathode and anode respectively?", opts: ["(a) ऑक्सीजन और नाइट्रोजन / Oxygen and Nitrogen", "(b) हाइड्रोजन और ऑक्सीजन / Hydrogen and Oxygen", "(c) ओजोन और हाइड्रोजन / Ozone and Hydrogen", "(d) क्लोरीन और ऑक्सीजन / Chlorine and Oxygen"], ans: "B", explanation: "जल ($H_2O$) के विद्युत अपघटन पर कैथोड पर हाइड्रोजन गैस ($H_2$) और एनोड पर ऑक्सीजन गैस ($O_2$) मुक्त होती है। / Water electrolysis yields Hydrogen gas at the negative cathode and Oxygen gas at the positive anode." }, { qText: "ग्लूकोमीटर (Glucometer) के बारे में निम्नलिखित में से कौन सा कथन सही है? / Which statement about Glucometer is correct?", opts: ["(a) यह रक्त शर्करा मापने का एक चिकित्सा उपकरण है / It is a medical device used to measure blood glucose", "(b) यह रक्तचाप मापने का उपकरण है / It is used to measure blood pressure", "(c) इसका उपयोग फेफड़ों की क्षमता मापने में होता है / Used to measure lung capacity", "(d) यह पानी की शुद्धता जाँचता है / It checks water purity"], ans: "A", explanation: "ग्लूकोमीटर एक घरेलू चिकित्सा उपकरण है जिसका उपयोग रक्त में ग्लूकोज/शुगर का स्तर जानने के लिए किया जाता है। / A glucometer is a portable electronic medical device used to determine the approximate concentration of glucose in the blood." }, { qText: "पदार्थों में विसरण (Diffusion) की दर निम्नलिखित में से किस अवस्था में सबसे अधिक तीव्र होती है? / In which state of matter is the rate of diffusion fastest?", opts: ["(a) ठोस / Solids", "(b) द्रव / Liquids", "(c) गैस / Gases", "(d) प्लाज्मा / Plasma"], ans: "C", explanation: "गैसों के कणों में गतिज ऊर्जा सबसे अधिक होती है और अंतर-आणविक स्थान ज्यादा होता है, इसलिए गैसों में विसरण (Diffusion) सबसे तीव्र होता है। / Diffusion is fastest in gases because their particles move rapidly and have large spaces between them." }, { qText: "कार्बन डाइऑक्साइड के 10 मोल ($10 \\text{ moles of } CO_2$) का द्रव्यमान कितना ग्राम होता है? / What is the mass of 10 moles of $CO_2$?", opts: ["(a) 280 g", "(b) 440 g", "(c) 44 g", "(d) 220 g"], ans: "B", explanation: "$CO_2$ का मोलर द्रव्यमान = $12 + (16 \\times 2) = 44 \\text{ g/mole}$। अतः 10 मोल का द्रव्यमान = $10 \\times 44 = 440 \\text{ g}$। / Molar mass of $CO_2$ is $44 \\text{ g/mol}$. Mass of $10 \\text{ moles} = 10 \\times 44 = 440 \\text{ g}$." }, { qText: "सभी तत्वों के सापेक्ष परमाणु द्रव्यमान (Relative Atomic Masses) किस मानक परमाणु के संदर्भ में ज्ञात किए गए हैं? / The standard atomic masses of all elements are determined relative to one atom of _______", opts: ["(a) ऑक्सीजन-16 / Oxygen-16", "(b) नाइट्रोजन-14 / Nitrogen-14", "(c) कार्बन-14 / Carbon-14", "(d) कार्बन-12 / Carbon-12"], ans: "D", explanation: "अंतर्राष्ट्रीय स्तर पर परमाणु द्रव्यमान मापने के लिए कार्बन-12 ($^{12}C$) समस्थानिक को मानक (Standard) माना गया है। / Carbon-12 is the universally accepted standard isotope used as a reference for atomic mass units." }, { qText: "इलेक्ट्रॉनिक विन्यास 2, 8, 6 (Electronic Configuration 2, 8, 6) वाले तत्व की पहचान करें: / Identify the element with electronic configuration 2, 8, 6:", opts: ["(a) नाइट्रोजन / Nitrogen", "(b) ऑक्सीजन / Oxygen", "(c) सल्फर / Sulfur", "(d) क्लोरीन / Chlorine"], ans: "C", explanation: "कुल इलेक्ट्रॉनों की संख्या = $2 + 8 + 6 = 16$ है। परमाणु क्रमांक 16 सल्फर (S) का होता है। / Total electrons = 16, which corresponds to the atomic number of Sulfur (S)." }, { qText: "साइक्लोहेक्सेन ($C_6H_{12}$) के एक अणु में कुल कितने सहसंयोजक बंध (Covalent Bonds) होते हैं? / How many total covalent bonds are there in a molecule of Cyclohexane ($C_6H_{12}$)?", opts: ["(a) 12", "(b) 18", "(c) 16", "(d) 24"], ans: "B", explanation: "साइक्लोहेक्सेन की वलय संरचना में 6 C-C एकल बंध और 12 C-H एकल बंध होते हैं, जिससे कुल सहसंयोजक बंधों की संख्या $6 + 12 = 18$ होती है। / Cyclohexane has 6 C-C bonds and 12 C-H bonds, totaling 18 covalent bonds." }, { qText: "जब सूखे लिटमस पेपर (pH paper) की पट्टी को शुष्क सोडियम बाइकार्बोनेट पाउडर पर रखा जाता है, तो पट्टी का रंग: / When a dry pH/litmus paper strip is placed on dry sodium bicarbonate powder, the color of the strip:", opts: ["(a) नीला हो जाता है / Becomes blue", "(b) परिवर्तित नहीं होता है / Does not change", "(c) लाल हो जाता है / Becomes red", "(d) हरा हो जाता है / Becomes green"], ans: "B", explanation: "अम्ल या क्षार अपना प्रभाव केवल जलीय विलयन (Water solution) में आयनों की उपस्थिति में दिखाते हैं। शुष्क अवस्था में कोई रंग परिवर्तन नहीं होगा। / Acids and bases change litmus color only in the presence of moisture/water. In dry state, no ions are formed, so color remains unchanged." }, { qText: "निम्नलिखित में से किस यौगिक (Chemical) का उपयोग बोरेक्स (Borax) के निर्माण में किया जाता है? / Which compound is used in the manufacturing of Borax?", opts: ["(a) धावन सोडा (वाशिंग सोडा) / Washing soda", "(b) विरंजक चूर्ण / Bleaching powder", "(c) बेकिंग सोडा / Baking soda", "(d) प्लास्टर ऑफ पेरिस / Plaster of Paris"], ans: "A", explanation: "बोरेक्स ($Na_2B_4O_7 \\cdot 10H_2O$) का औद्योगिक निर्माण सोडियम कार्बोनेट यानी वाशिंग सोडा (Washing Soda) का उपयोग करके किया जाता है। / Borax is commercially manufactured using Sodium Carbonate (Washing Soda)." } ]; // DOM elements const questionsPanel = document.getElementById("questionsPanel"); function buildQuiz() { questionsPanel.innerHTML = ""; questionsData.forEach((q, idx) => { const qNumber = idx + 1; const card = document.createElement("div"); card.className = "quiz-card"; const questionDiv = document.createElement("div"); questionDiv.className = "question"; questionDiv.innerText = `${qNumber}. ${q.qText}`; card.appendChild(questionDiv); const optionsDiv = document.createElement("div"); optionsDiv.className = "options-wrapper"; const letters = ["A", "B", "C", "D"]; q.opts.forEach((optText, optIdx) => { const letterVal = letters[optIdx]; const label = document.createElement("label"); label.className = "option-label"; const radio = document.createElement("input"); radio.type = "radio"; radio.name = `q_${idx}`; radio.value = letterVal; const span = document.createElement("span"); span.className = "option-text"; span.innerText = optText; label.appendChild(radio); label.appendChild(span); optionsDiv.appendChild(label); }); card.appendChild(optionsDiv); const explanationBox = document.createElement("div"); explanationBox.className = "explanation-box"; explanationBox.id = `explanation_${idx}`; explanationBox.innerHTML = ` Explanation / व्याख्या: ${q.explanation} `; card.appendChild(explanationBox); questionsPanel.appendChild(card); }); } function submitQuizEvaluation() { let score = 0; const totalQ = questionsData.length; const allLabels = document.querySelectorAll(".option-label"); allLabels.forEach(label => { label.classList.remove("correct-highlight", "wrong-highlight"); }); for (let i = 0; i < totalQ; i++) { const expBox = document.getElementById(`explanation_${i}`); if (expBox) expBox.classList.remove("show"); } for (let i = 0; i < totalQ; i++) { const correctLetter = questionsData[i].ans; const selectedRadio = document.querySelector(`input[name="q_${i}"]:checked`); const allRadios = document.querySelectorAll(`input[name="q_${i}"]`); allRadios.forEach(radio => { const parentLabel = radio.parentElement; if (radio.value === correctLetter) { parentLabel.classList.add("correct-highlight"); } if (selectedRadio && radio.checked && radio.value !== correctLetter) { parentLabel.classList.add("wrong-highlight"); } }); const expBox = document.getElementById(`explanation_${i}`); if (expBox) expBox.classList.add("show"); if (selectedRadio && selectedRadio.value === correctLetter) { score++; } } const resultDiv = document.getElementById("resultBox"); resultDiv.style.display = "block"; const percentage = Math.round((score / totalQ) * 100); let feedbackMsg = ""; if (percentage >= 80) feedbackMsg = "🏆 उत्कृष्ट! Excellent!"; else if (percentage >= 60) feedbackMsg = "👍 अच्छा प्रयास! Good effort!"; else feedbackMsg = "📚 और अभ्यास करें। Keep practicing!"; resultDiv.innerHTML = `📊 Your Score: ${score} / ${totalQ} (${percentage}%) ${feedbackMsg}✨ सही उत्तर हरे में, गलत लाल में ✨⭐ सभी प्रश्नों की व्याख्या नीचे दी गई है | Explanations below each question.`; setTimeout(() => { resultDiv.scrollIntoView({ behavior: "smooth", block: "nearest" }); }, 80); } function handleSubmit() { submitQuizEvaluation(); } function init() { buildQuiz(); const submitBtn = document.getElementById("submitQuizBtn"); if (submitBtn) submitBtn.addEventListener("click", handleSubmit); } document.addEventListener("DOMContentLoaded", init);