ÿþ<!DOCTYPE html> <html lang="hi"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>CTET * G * 0 -1 |  # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 | & H ( ?   - M / > 8  ( 0 G  0 </title> <link href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='%230088cc'/%3E%3Ctext x='50' y='68' font-size='48' text-anchor='middle' fill='white' font-weight='bold'%3E %3C/text%3E%3C/svg%3E" rel="icon"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> :root { --primary: #0088cc; --primary-dark: #006699; --secondary: #66ccff; --danger: #e53e3e; --success: #38a169; --light: #e6f7ff; --dark: #004466; --gray: #006699; --border-radius: 12px; --box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); --transition: all 0.3s ease; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif; } body { background: linear-gradient(135deg, #e6f7ff 0%, #b3e0ff 100%); min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; color: var(--dark); line-height: 1.5; } .container { width: 100%; max-width: 1100px; background: white; border-radius: var(--border-radius); box-shadow: var(--box-shadow); overflow: hidden; transition: var(--transition); animation: fadeIn 0.4s ease-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 28px 20px; text-align: center; position: relative; } .header::before { content: '•''; position: absolute; bottom: 10px; right: 20px; font-size: 70px; opacity: 0.1; } .header h1 { font-size: 1.9rem; margin-bottom: 8px; font-weight: 700; letter-spacing: -0.5px; } .header p { font-size: 1rem; opacity: 0.9; } .header-controls { position: absolute; top: 20px; right: 20px; display: flex; gap: 12px; z-index: 5; } .header-controls .home-icon { position: relative; top: 0; left: 0; color: white; font-size: 24px; cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-block; background: rgba(0,0,0,0.2); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .header-controls .home-icon:hover { transform: scale(1.08); background: rgba(0,0,0,0.4); } .lang-toggle { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); border-radius: 30px; color: white; padding: 6px 16px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 8px; } .lang-toggle:hover { background: rgba(255,255,255,0.3); } .lang-toggle i { font-size: 1rem; } .content-area { padding: 28px; } .hidden { display: none !important; } .btn { display: inline-block; padding: 12px 28px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; text-align: center; box-shadow: 0 4px 8px rgba(0,0,0,0.05); margin: 8px 5px; font-size: 0.95rem; } .btn-primary { background: var(--primary); color: white; } .btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 10px 20px -5px var(--primary); } .btn-success { background: var(--success); color: white; } .btn-success:hover { background: #2c7a4a; transform: translateY(-2px); } .btn-danger { background: var(--danger); color: white; } .btn-danger:hover { background: #c53030; transform: translateY(-2px); } .btn-level { background: white; color: var(--dark); border: 2px solid #cbd5e0; font-size: 1.1rem; padding: 14px 28px; width: 190px; font-weight: 600; transition: all 0.2s; } .btn-level:hover { transform: translateY(-4px); background: #f7fafc; border-color: var(--primary); } .btn-level.selected { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 8px 16px -4px rgba(0,136,204,0.4); } .btn-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0; } .level-buttons { display: flex; justify-content: center; gap: 25px; margin: 30px 0; flex-wrap: wrap; } .section-title { text-align: center; margin-bottom: 25px; color: var(--primary-dark); font-size: 1.7rem; position: relative; padding-bottom: 12px; font-weight: 600; } .section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--secondary); border-radius: 4px; } .checkbox-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin: 25px 0; max-height: 520px; overflow-y: auto; padding: 15px; border: 1px solid #e2e8f0; border-radius: 18px; background: #f0f8ff; } .checkbox-item { display: flex; align-items: center; background: white; padding: 8px 12px; border-radius: 40px; transition: all 0.2s; border: 1px solid #e9ecef; } .checkbox-item:hover { background: #e6f7ff; transform: translateX(3px); } .checkbox-item input { margin-right: 12px; width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); } .checkbox-item label { cursor: pointer; font-size: 0.9rem; font-weight: 500; } .question { margin-bottom: 25px; page-break-inside: avoid; background: #ffffff; padding: 15px; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); border-left: 4px solid var(--secondary); } .question-text { font-weight: 700; margin-bottom: 12px; font-size: 1.05rem; color: #2d3748; } .option { margin-left: 24px; margin-bottom: 6px; color: #4a5568; } .action-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 40px; } .answer-sheet { margin-top: 40px; padding: 20px; background: #e6f7ff; border-radius: var(--border-radius); } .answer-table { width: 100%; border-collapse: collapse; margin-top: 15px; border-radius: 12px; overflow: hidden; } .answer-table th, .answer-table td { border: 1px solid #cbd5e0; padding: 10px; text-align: center; } .answer-table th { background-color: var(--primary); color: white; font-weight: 600; } .streak-container { display: flex; justify-content: center; align-items: center; margin: 20px 0; gap: 20px; flex-wrap: wrap; } .streak-counter { background: #ff9100; color: white; padding: 10px 20px; border-radius: 60px; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.1); } .date-display { font-size: 1rem; font-weight: 600; background: #e2e8f0; padding: 8px 18px; border-radius: 40px; color: var(--primary-dark); } .progress-container { margin: 20px 0; background: #edf2f7; padding: 20px; border-radius: 28px; } .progress-bar { height: 12px; background: #cbd5e0; border-radius: 20px; overflow: hidden; margin-top: 12px; } .progress-fill { height: 100%; background: var(--success); border-radius: 20px; transition: width 0.5s ease; } .problem-of-day { background: linear-gradient(115deg, #fff6e5, #ffedd5); border-left: 5px solid var(--danger); padding: 20px; margin: 20px 0; border-radius: 24px; } .daily-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin: 20px 0; } .summary-card { flex: 1; min-width: 110px; background: white; padding: 15px; border-radius: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.05); text-align: center; border: 1px solid #e2e8f0; } .home-icon { position: absolute; top: 20px; left: 20px; color: white; font-size: 26px; cursor: pointer; transition: transform 0.2s; z-index: 5; background: rgba(0,0,0,0.2); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .home-icon:hover { transform: scale(1.08); background: rgba(0,0,0,0.4); } .instructions { margin-bottom: 30px; padding: 18px 22px; background: #f0f8ff; border-radius: 24px; border: 1px solid #e2e8f0; } @media (max-width: 680px) { .header h1 { font-size: 1.3rem; } .btn-level { width: 140px; font-size: 0.9rem; padding: 12px 16px; } .checkbox-container { grid-template-columns: 1fr; } .header-controls { top: 12px; right: 12px; gap: 8px; } .lang-toggle { font-size: 0.7rem; padding: 4px 12px; } } @media print { .action-buttons, .streak-container, .progress-container, .problem-of-day, .daily-summary, .header-controls { display: none; } .question { break-inside: avoid; } } .text-center { text-align: center; } </style> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4930137336556867" crossorigin="anonymous"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KMZ9RJ62EY"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KMZ9RJ62EY'); </script> </head> <body> <div class="container" id="startContainer"> <div class="header"> <div class="header-controls"> <a href="ctet-exam-paper1-daily-practice-problem-generator.html" class="home-icon" ><i class="fas fa-chalkboard-user"></i></a> <button class="lang-toggle" id="langToggleBtn"><i class="fas fa-globe"></i> <span id="langLabel">9 ?  & @ </span></button> </div> <h1 id="mainTitle"><i class="fas fa-calculator"></i> CTET * G * 0 -1</h1> <p id="mainSubtitle"> # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 | & H ( ?   - M / > 8 8 . 8 M / >  ( 0 G  0 </p> </div> <div class="content-area"> <div id="startScreen"> <h2 class="section-title" id="startTitle">•'  # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 </h2> <div class="streak-container"> <div class="streak-counter"><i class="fas fa-fire"></i> <span id="streakLabel">2  > $ > 0 </span>: <span id="streakDays">0</span> <span id="dayLabel">& ? ( </span></div> <div class="date-display" id="currentDate"></div> </div> <div class="progress-container"> <h3><i class="fas fa-chart-line"></i> <span id="progressTitle"> *  @ * M 0  $ ? </span></h3> <div class="progress-bar"><div class="progress-fill" id="progressFill" style="width: 0%"></div></div> <p id="progressText" style="margin-top: 8px;">0% * B 0 M # </p> </div> <div class="btn-group"> <button class="btn btn-primary" id="problemOfDayBtn"><i class="fas fa-calendar-day"></i> <span id="podBtnText">& ? (  @ 8 . 8 M / > </span></button> <button class="btn btn-success" id="customPracticeBtn"><i class="fas fa-pen-ruler"></i> <span id="customBtnText"> 8 M  .  - M / > 8 </span></button> </div> </div> <div id="subjectSelection" class="hidden"> <h2 class="section-title" id="subjectTitle"><Ø¯ß 5 ? 7 /  / ( </h2> <div class="btn-group"><button class="btn btn-primary" id="selectMathBtn"><i class="fas fa-brain"></i> <span id="selectSubjectText"> # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 </span></button></div> </div> <div id="topicSelection" class="hidden"> <h2 class="section-title" id="topicTitle">=ØÚÜ <span id="chapterSelectText"> ' M / > / K   >  / (  0 G  </span> (23  ' M / > / )</h2> <form id="topicForm"> <div class="checkbox-container" id="topicsContainer"></div> </form> <div class="btn-group"> <button class="btn btn-danger" id="backToStartBtn"><i class="fas fa-arrow-left"></i> <span id="backStartText">* M 0 > 0  - * 0 5 > * 8 </span></button> <button class="btn btn-success" id="generateAssignmentBtn"><i class="fas fa-cogs"></i> <span id="genAssignText"> - M / > 8 * M 0 6 M (  G ( 0 G   0 G  </span></button> </div> </div> <div id="levelSelection" class="hidden"> <h2 class="section-title" id="levelTitle">¡& <span id="levelSelectText"> ? ( >  8 M $ 0  A ( G  </span></h2> <p class="text-center" id="levelDescText" style="text-align:center; margin-bottom:10px;"> * ( G CTET 8 M $ 0  G  ( A 8 > 0  A ( G  :</p> <div class="level-buttons"> <button class="btn btn-level" id="level1Btn"><span id="l1Title">8 M $ 0 1</span> <br><small id="l1Sub">, G 8 ?  / CTET  ' > 0 </small></button> <button class="btn btn-level" id="level2Btn"><span id="l2Title">8 M $ 0 2</span> <br><small id="l2Sub">. ' M / . (CTET . > (  )</small></button> <button class="btn btn-level" id="level3Btn"><span id="l3Title">8 M $ 0 3</span> <br><small id="l3Sub"> ( M ( $ (5 ? 6 M 2 G 7 # > $ M .  )</small></button> </div> <div class="btn-group"> <button class="btn btn-danger" id="backToTopicsBtn"><i class="fas fa-arrow-left"></i> <span id="backTopicsText">5 ? 7 / K  * 0 5 > * 8 </span></button> <button class="btn btn-success" id="generateFinalBtn"><i class="fas fa-cogs"></i> <span id="genFinalText"> - M / > 8 * M 0 6 M (  G ( 0 G   0 G  </span></button> </div> </div> </div> </div> <div class="container hidden" id="generatedPaperContainer"></div> <script> const { jsPDF } = window.jspdf; const startContainer = document.getElementById('startContainer'); const startScreen = document.getElementById('startScreen'); const subjectSelection = document.getElementById('subjectSelection'); const topicSelection = document.getElementById('topicSelection'); const levelSelection = document.getElementById('levelSelection'); const generatedPaperContainer = document.getElementById('generatedPaperContainer'); // ===================================================== // BILINGUAL QUESTIONS DATABASE (23 TOPICS: 15 Maths + 8 Pedagogy) // ===================================================== const questionBank = {}; function addQuestions(topicKey, enQ, hiQ) { if (!questionBank[topicKey]) questionBank[topicKey] = { en: { level1: [], level2: [], level3: [] }, hi: { level1: [], level2: [], level3: [] } }; const levels = ['level1', 'level2', 'level3']; enQ.forEach((q, idx) => { const levelKey = levels[idx] || 'level1'; questionBank[topicKey].en[levelKey].push(q); }); hiQ.forEach((q, idx) => { const levelKey = levels[idx] || 'level1'; questionBank[topicKey].hi[levelKey].push(q); }); } // ----- MATHEMATICS (15) ----- addQuestions('8   M / > * & M ' $ ? ', [ { question: "Which is a prime number?", options: ["17", "21", "27", "39"], answer: "A" }, { question: "LCM of 12 and 18 is:", options: ["36", "72", "108", "144"], answer: "A" }, { question: "5! = ?", options: ["120", "60", "24", "720"], answer: "A" } ], [ { question: " - >  M / 8   M / >  L ( 8 @ 9 H ?", options: ["17", "21", "27", "39"], answer: "A" }, { question: "12  0 18  > LCM 9 H :", options: ["36", "72", "108", "144"], answer: "A" }, { question: "5! = ?", options: ["120", "60", "24", "720"], answer: "A" } ] ); addQuestions(' # ? $ @ / . B 2 8   M 0 ? / >   ', [ { question: "123 + 456 = ?", options: ["579", "569", "589", "599"], answer: "A" }, { question: "1000 - 254 = ?", options: ["746", "756", "736", "766"], answer: "A" }, { question: "25 × 4 = ?", options: ["80", "100", "120", "90"], answer: "B" } ], [ { question: "123 + 456 = ?", options: ["579", "569", "589", "599"], answer: "A" }, { question: "1000 - 254 = ?", options: ["746", "756", "736", "766"], answer: "A" }, { question: "25 × 4 = ?", options: ["80", "100", "120", "90"], answer: "B" } ] ); addQuestions('2  A $ M $ . 8 . > * 5 0 M $ M /  0 . 9 $ M $ . 8 . > * 5 0 M $  ', [ { question: "HCF of 24 and 36 is:", options: ["12", "6", "18", "24"], answer: "A" }, { question: "LCM of 4,5,10 is:", options: ["20", "40", "10", "5"], answer: "A" }, { question: "HCF of 48 and 72 is:", options: ["24", "16", "12", "8"], answer: "A" } ], [ { question: "24  0 36  > HCF 9 H :", options: ["12", "6", "18", "24"], answer: "A" }, { question: "4,5,10  > LCM 9 H :", options: ["20", "40", "10", "5"], answer: "A" }, { question: "48  0 72  > HCF 9 H :", options: ["24", "16", "12", "8"], answer: "A" } ] ); addQuestions('. ? ( M (  5  & 6 . 2 5 8   M / >   ', [ { question: "1/2 + 1/4 = ?", options: ["3/4", "2/6", "1/6", "2/4"], answer: "A" }, { question: "2.5 + 3.7 = ?", options: ["6.2", "5.2", "6.5", "5.5"], answer: "A" }, { question: "3/5 × 2/3 = ?", options: ["2/5", "5/8", "6/15", "1/2"], answer: "A" } ], [ { question: "1/2 + 1/4 = ?", options: ["3/4", "2/6", "1/6", "2/4"], answer: "A" }, { question: "2.5 + 3.7 = ?", options: ["6.2", "5.2", "6.5", "5.5"], answer: "A" }, { question: "3/5 × 2/3 = ?", options: ["2/5", "5/8", "6/15", "1/2"], answer: "A" } ] ); addQuestions('5 0 M  -5 0 M  . B 2  5   ( - ( . B 2 ', [ { question: "12² = ?", options: ["144", "122", "124", "136"], answer: "A" }, { question: ""81 = ?", options: ["9", "8", "7", "10"], answer: "A" }, { question: "5³ = ?", options: ["125", "25", "75", "100"], answer: "A" } ], [ { question: "12² = ?", options: ["144", "122", "124", "136"], answer: "A" }, { question: ""81 = ?", options: ["9", "8", "7", "10"], answer: "A" }, { question: "5³ = ?", options: ["125", "25", "75", "100"], answer: "A" } ] ); addQuestions(' 8 $ ', [ { question: "Average of 10,20,30 is:", options: ["20", "15", "25", "30"], answer: "A" }, { question: "Average of first 5 natural numbers:", options: ["3", "2", "4", "5"], answer: "A" }, { question: "Sum of 6 numbers with average 10:", options: ["60", "50", "70", "80"], answer: "A" } ], [ { question: "10,20,30  >  8 $ 9 H :", options: ["20", "15", "25", "30"], answer: "A" }, { question: "* 9 2 @ 5 * M 0 >  C $ ?  8   M / >    >  8 $ :", options: ["3", "2", "4", "5"], answer: "A" }, { question: "6 8   M / >    >  8 $ 10 9 H , / K  :", options: ["60", "50", "70", "80"], answer: "A" } ] ); addQuestions('8 . /  0 & B 0 @ ', [ { question: "Speed 60 km/h, Time 2h, Distance = ?", options: ["120 km", "30 km", "60 km", "180 km"], answer: "A" }, { question: "Distance 180 km, Speed 60 km/h, Time = ?", options: ["3 h", "2 h", "4 h", "5 h"], answer: "A" }, { question: "Speed 40 km/h, Time 5h, Distance = ?", options: ["200 km", "160 km", "180 km", "220 km"], answer: "A" } ], [ { question: " $ ? 60  ? . @ /   > , 8 . / 2    G , & B 0 @ = ?", options: ["120  ? . @ ", "30  ? . @ ", "60  ? . @ ", "180  ? . @ "], answer: "A" }, { question: "& B 0 @ 180  ? . @ ,  $ ? 60  ? . @ /   > , 8 . / = ?", options: ["3    G ", "2    G ", "4    G ", "5    G "], answer: "A" }, { question: " $ ? 40  ? . @ /   > , 8 . / 5    G , & B 0 @ = ?", options: ["200  ? . @ ", "160  ? . @ ", "180  ? . @ ", "220  ? . @ "], answer: "A" } ] ); addQuestions(' M / > . ? $ ? ', [ { question: "Sum of angles in a triangle:", options: ["180°", "90°", "360°", "270°"], answer: "A" }, { question: "Sides in a hexagon:", options: ["6", "5", "7", "8"], answer: "A" }, { question: "Area of rectangle 5x4:", options: ["20", "9", "18", "15"], answer: "A" } ], [ { question: "$ M 0 ? - A   G  K # K   > / K  :", options: ["180°", "90°", "360°", "270°"], answer: "A" }, { question: "7  M - A   @ - A  >   :", options: ["6", "5", "7", "8"], answer: "A" }, { question: "5x4  / $  >  M 7 G $ M 0 + 2 :", options: ["20", "9", "18", "15"], answer: "A" } ] ); addQuestions(' M 7 G $ M 0 . ? $ ? ', [ { question: "Perimeter of square side 5 cm:", options: ["20 cm", "25 cm", "15 cm", "30 cm"], answer: "A" }, { question: "Area of circle radius 7 cm (À=22/7):", options: ["154 sq cm", "44 sq cm", "88 sq cm", "77 sq cm"], answer: "A" }, { question: "Volume of cube side 3 cm:", options: ["27 cu cm", "9 cu cm", "18 cu cm", "36 cu cm"], answer: "A" } ], [ { question: "5 8 G . @ - A  > 5 > 2 G 5 0 M   > * 0 ? . > * :", options: ["20 8 G . @ ", "25 8 G . @ ", "15 8 G . @ ", "30 8 G . @ "], answer: "A" }, { question: "7 8 G . @ $ M 0 ?  M / > 5 > 2 G 5 C $ M $  >  M 7 G $ M 0 + 2 (À=22/7):", options: ["154 5 0 M  8 G . @ ", "44 5 0 M  8 G . @ ", "88 5 0 M  8 G . @ ", "77 5 0 M  8 G . @ "], answer: "A" }, { question: "3 8 G . @ - A  > 5 > 2 G  (  >  / $ ( :", options: ["27  ( 8 G . @ ", "9  ( 8 G . @ ", "18  ( 8 G . @ ", "36  ( 8 G . @ "], answer: "A" } ] ); addQuestions('6 ?  M 7 > / K   5  . > * ( ', [ { question: "1 km = ? m", options: ["1000", "100", "500", "2000"], answer: "A" }, { question: "1 L = ? mL", options: ["1000", "100", "500", "2000"], answer: "A" }, { question: "1 kg = ? g", options: ["1000", "100", "500", "2000"], answer: "A" } ], [ { question: "1  ? . @ = ? . @  0 ", options: ["1000", "100", "500", "2000"], answer: "A" }, { question: "1 2 @  0 = ? . ? 2 @ 2 @  0 ", options: ["1000", "100", "500", "2000"], answer: "A" }, { question: "1  ?  M 0 > = ?  M 0 > . ", options: ["1000", "100", "500", "2000"], answer: "A" } ] ); addQuestions('. A & M 0 > ', [ { question: "5 rupees 50 paise in rupees:", options: ["5.50", "5.05", "5.55", "5.00"], answer: "A" }, { question: "2.75 rupees in paise:", options: ["275", "270", "280", "260"], answer: "A" }, { question: "8.40 + 3.60 = ?", options: ["12.00", "12.50", "11.00", "13.00"], answer: "A" } ], [ { question: "5 0 A * / G 50 * H 8 G  K 0 A * / G . G  :", options: ["5.50", "5.05", "5.55", "5.00"], answer: "A" }, { question: "2.75 0 A * / G  K * H 8 G . G  :", options: ["275", "270", "280", "260"], answer: "A" }, { question: "8.40 + 3.60 = ?", options: ["12.00", "12.50", "11.00", "13.00"], answer: "A" } ] ); addQuestions(' G 2 G * ! 0 ', [ { question: "Days in leap year:", options: ["366", "365", "364", "367"], answer: "A" }, { question: "10 Mar 2024 Sunday, 17 Mar 2024:", options: ["Sunday", "Monday", "Saturday", "Friday"], answer: "A" }, { question: "Days in Feb 2024:", options: ["29", "28", "30", "31"], answer: "A" } ], [ { question: "2 @ * 5 0 M 7 . G  & ? ( :", options: ["366", "365", "364", "367"], answer: "A" }, { question: "10 Mar 2024 0 5 ? 5 > 0 , 17 Mar 2024:", options: ["0 5 ? 5 > 0 ", "8 K . 5 > 0 ", "6 ( ? 5 > 0 ", "6 A  M 0 5 > 0 "], answer: "A" }, { question: "+ 0 5 0 @ 2024 . G  & ? ( :", options: ["29", "28", "30", "31"], answer: "A" } ] ); addQuestions(' ! @  0 8 . / 8 > 0 # @ ', [ { question: "Angle at 6:00 between hour and minute:", options: ["180°", "90°", "120°", "150°"], answer: "A" }, { question: "10:15 to 13:45 duration:", options: ["3h 30m", "3h", "4h", "2h 30m"], answer: "A" }, { question: "45 min = ? seconds", options: ["2700", "1800", "3600", "3000"], answer: "A" } ], [ { question: "6:00 * 0    G  0 . ? (   @ 8 A   G , @   K # :", options: ["180°", "90°", "120°", "150°"], answer: "A" }, { question: "10:15 8 G 13:45 $   5 ' ? :", options: ["3h 30m", "3h", "4h", "2h 30m"], answer: "A" }, { question: "45 . ? (  = ? 8 G   ! ", options: ["2700", "1800", "3600", "3000"], answer: "A" } ] ); addQuestions('* G   ( ', [ { question: "Next in series: 2,4,6,8,?", options: ["10", "12", "14", "16"], answer: "A" }, { question: "Next: 5,10,15,20,?", options: ["25", "30", "35", "40"], answer: "A" }, { question: "Next: 3,9,27,?", options: ["81", "54", "72", "90"], answer: "A" } ], [ { question: "6 M 0 C   2 > . G    2 > : 2,4,6,8,?", options: ["10", "12", "14", "16"], answer: "A" }, { question: "  2 > : 5,10,15,20,?", options: ["25", "30", "35", "40"], answer: "A" }, { question: "  2 > : 3,9,27,?", options: ["81", "54", "72", "90"], answer: "A" } ] ); addQuestions('8 >   M / ?  @  0    ! < > * M 0 , ( M ' ( ', [ { question: "Mean of 2,4,6,8,10:", options: ["6", "5", "7", "8"], answer: "A" }, { question: "Median of 3,5,7,9,11:", options: ["7", "5", "9", "8"], answer: "A" }, { question: "Mode of 2,3,3,4,5,5,5:", options: ["5", "3", "4", "2"], answer: "A" } ], [ { question: "2,4,6,8,10  > . > ' M / :", options: ["6", "5", "7", "8"], answer: "A" }, { question: "3,5,7,9,11  @ . > ' M / ?  > :", options: ["7", "5", "9", "8"], answer: "A" }, { question: "2,3,3,4,5,5,5  > , 9 A 2  :", options: ["5", "3", "4", "2"], answer: "A" } ] ); // ----- PEDAGOGY (8) ----- addQuestions(' # ? $  @ * M 0  C $ ? /$ >  ?  M   8 K  ', [ { question: "Mathematics is science of:", options: ["Pattern and order", "Nature", "Language", "Art"], answer: "A" }, { question: "Logical thinking involves:", options: ["Reasoning", "Memorization", "Creativity", "Imagination"], answer: "A" }, { question: "Not a characteristic of mathematical thinking:", options: ["Rote memorization", "Abstraction", "Logical reasoning", "Problem solving"], answer: "A" } ], [ { question: " # ? $  ? 8  > 5 ?  M  > ( 9 H ?", options: ["* H  0 M (  0 5 M / 5 8 M % > ", "* M 0  C $ ? ", "- > 7 > ", " 2 > "], answer: "A" }, { question: "$ > 0 M  ?  8 K  . G  6 > . ? 2 9 H :", options: ["$ 0 M  ", "0  ( > ", "0  ( > $ M .  $ > ", " 2 M * ( > "], answer: "A" }, { question: " # ? $ @ / 8 K   @ 5 ? 6 G 7 $ > ( 9 @  :", options: ["0  ( > ", " . B 0 M $ $ > ", "$ > 0 M  ?  $ 0 M  ", "8 . 8 M / > 8 . > ' > ( "], answer: "A" } ] ); addQuestions('* > M /  M 0 . . G   # ? $  > 8 M % > ( ', [ { question: "Math in curriculum develops:", options: ["Logical reasoning", "Physical fitness", "Artistic skills", "Social skills"], answer: "A" }, { question: "Goal of teaching math:", options: ["Problem solving", "Entertainment", "Physical development", "Memorization"], answer: "A" }, { question: "Math helps in:", options: ["Daily life", "Only exams", "Only science", "Only commerce"], answer: "A" } ], [ { question: "* > M /  M 0 . . G   # ? $ 5 ?  8 ? $  0 $ > 9 H :", options: ["$ > 0 M  ?  $ 0 M  ", "6 > 0 @ 0 ?  + ?  ( G 8 ", " 2 > $ M .   L 6 2 ", "8 > . >  ?   L 6 2 "], answer: "A" }, { question: " # ? $ 6 ?  M 7 #  > 2  M 7 M / :", options: ["8 . 8 M / > 8 . > ' > ( ", ". ( K 0   ( ", "6 > 0 @ 0 ?  5 ?  > 8 ", "0  ( > "], answer: "A" }, { question: " # ? $ 8 9 > /  9 H :", options: ["& H ( ?   @ 5 ( . G  ", " G 5 2 * 0 @  M 7 > . G  ", " G 5 2 5 ?  M  > ( . G  ", " G 5 2 5 > # ?  M / . G  "], answer: "A" } ] ); addQuestions(' # ? $  @ - > 7 > ', [ { question: "Language of mathematics:", options: ["Symbolic and precise", "Vague", "Artistic", "Poetic"], answer: "A" }, { question: "Mathematical symbol:", options: ["+", "&", "@", "#"], answer: "A" }, { question: "Math language helps in:", options: ["Clear communication", "Confusion", "Art", "Music"], answer: "A" } ], [ { question: " # ? $  @ - > 7 > 9 H :", options: ["* M 0 $ @  > $ M .   0 8  @  ", " 8 M * 7 M  ", " 2 > $ M .  ", " > 5 M / > $ M .  "], answer: "A" }, { question: " # ? $ @ / * M 0 $ @  :", options: ["+", "&", "@", "#"], answer: "A" }, { question: " # ? $ @ / - > 7 > 8 9 > /  9 H :", options: ["8 M * 7 M  8   > 0 . G  ", "- M 0 . . G  ", " 2 > . G  ", "8   @ $ . G  "], answer: "A" } ] ); addQuestions('8 > . A & > / ?   # ? $ ', [ { question: "Community math relates to:", options: ["Real life situations", "Abstract theory", "Pure numbers", "Geometry"], answer: "A" }, { question: "Example of community math:", options: ["Budgeting", "Algebra", "Calculus", "Trigonometry"], answer: "A" }, { question: "Community math helps in:", options: ["Practical problem solving", "Theoretical research", "Memorization", "Rote learning"], answer: "A" } ], [ { question: "8 > . A & > / ?   # ? $ 8  ,  ' ? $ 9 H :", options: ["5 > 8 M $ 5 ?   @ 5 ( 8 M % ? $ ? / K  8 G ", " . B 0 M $ 8 ? & M ' >  $ 8 G ", "6 A & M ' 8   M / >   8 G ", " M / > . ? $ ? 8 G "], answer: "A" }, { question: "8 > . A & > / ?   # ? $  > & > 9 0 # :", options: [",   , ( > ( > ", ", @   # ? $ ", " H 2  A 2 8 ", "$ M 0 ?  K # . ? $ ? "], answer: "A" }, { question: "8 > . A & > / ?   # ? $ 8 9 > /  9 H :", options: ["5 M / > 5 9 > 0 ?  8 . 8 M / > 8 . > ' > ( . G  ", "8 H & M ' >  $ ?  6 K ' . G  ", "0  ( G . G  ", "  8 M % @  0 # . G  "], answer: "A" } ] ); addQuestions('. B 2 M / >   ( ', [ { question: "Evaluation in math is:", options: ["Continuous process", "One time event", "Only written test", "Only oral test"], answer: "A" }, { question: "Formative assessment is:", options: ["During instruction", "At end", "At beginning", "After exams"], answer: "A" }, { question: "Summative assessment aims to:", options: ["Assign grades", "Improve learning", "Diagnose difficulties", "Plan instruction"], answer: "A" } ], [ { question: " # ? $ . G  . B 2 M / >   ( 9 H :", options: ["8 $ $ * M 0  M 0 ? / > ", "  , > 0  @   ( > ", " G 5 2 2 ?  ? $ * 0 @  M 7 > ", " G 5 2 . L  ?  * 0 @  M 7 > "], answer: "A" }, { question: "0  ( > $ M .  . B 2 M / >   ( 9 H :", options: ["6 ?  M 7 #  G & L 0 > ( ", "  $ . G  ", "6 A 0 A  $ . G  ", "* 0 @  M 7 >  G , > & "], answer: "A" }, { question: "/ K  > $ M .  . B 2 M / >   (  > & M & G 6 M / :", options: [" M 0 G ! & G ( > ", "8 @  ( G . G  8 A ' > 0 ", " ? ( >  / K   > ( ? & > ( ", "6 ?  M 7 #  @ / K  ( > "], answer: "A" } ] ); addQuestions('( ? 0 M & > ( > $ M .   5  *  > 0 > $ M .  6 ?  M 7 # ', [ { question: "Diagnostic teaching identifies:", options: ["Learning difficulties", "Talents", "Physical abilities", "Interests"], answer: "A" }, { question: "Remedial teaching aims to:", options: ["Correct errors", "Punish", "Ignore", "Skip topics"], answer: "A" }, { question: "Diagnostic test is:", options: ["Specific", "General", "Comprehensive", "Standardized"], answer: "A" } ], [ { question: "( ? 0 M & G 6 > $ M .  6 ?  M 7 # * 9  > ( $ > 9 H :", options: [" ' ?  .  @  ? ( >  / >  ", "* M 0 $ ? - >   ", "6 > 0 @ 0 ?   M 7 . $ >   ", "0 A  ? / >  "], answer: "A" }, { question: " *  > 0 > $ M .  6 ?  M 7 #  > & M & G 6 M / :", options: ["$ M 0 A  ? / K   K 8 A ' > 0 ( > ", "&  ! & G ( > ", " ( & G  >  0 ( > ", "5 ? 7 /  K ! < ( > "], answer: "A" }, { question: "( ? 0 M & G 6 > $ M .  * 0 @  M 7 # 9 H :", options: ["5 ? 6 ? 7 M  ", "8 > . > ( M / ", "5 M / > *  ", ". > (  @  C $ "], answer: "A" } ] ); addQuestions('6 ?  M 7 # . G  8 . 8 M / >   ', [ { question: "Major problem in math teaching:", options: ["Lack of conceptual understanding", "Too many books", "Less time", "More teachers"], answer: "A" }, { question: "Challenge in teaching math:", options: ["Student anxiety", "High interest", "Good resources", "Motivated students"], answer: "A" }, { question: "Classroom management issue:", options: ["Diverse learning levels", "Same level", "Perfect behavior", "Full attendance"], answer: "A" } ], [ { question: " # ? $ 6 ?  M 7 # . G  * M 0 . A  8 . 8 M / > :", options: [" 5 ' > 0 # > $ M .  8 .   @  . @ ", ", 9 A $  ' ?  * A 8 M $  G  ", " . 8 . / ", " ' ?  6 ?  M 7  "], answer: "A" }, { question: " # ? $ 6 ?  M 7 # . G   A ( L $ @ :", options: [" > $ M 0 K   @  ?  $ > ", "  M  0 A  ? ", "  M  G 8  8 > ' ( ", "* M 0 G 0 ? $  > $ M 0 "], answer: "A" }, { question: "  M 7 > * M 0 ,  ' (  @ 8 . 8 M / > :", options: ["5 ? 5 ? '  ' ?  . 8 M $ 0 ", "8 . > ( 8 M $ 0 ", "* 0 ? * B 0 M # 5 M / 5 9 > 0 ", "* B 0 M # * 8 M % ? $ ? "], answer: "A" } ] ); addQuestions('& M 5 ? $ @ / 5 ? 6 M 2 G 7 #  0 8 @  ( G  0 8 ?  > ( G  G 8 . M , ( M ' ? $ * 9 2 B ', [ { question: "Error analysis helps in:", options: ["Identifying misconceptions", "Punishing", "Ignoring mistakes", "Testing memory"], answer: "A" }, { question: "Common error in math:", options: ["Misplacing decimal", "Correct placement", "Right method", "Perfect answer"], answer: "A" }, { question: "Error analysis useful for:", options: ["Remedial planning", "Ignoring", "Rote learning", "Standardized tests"], answer: "A" } ], [ { question: "$ M 0 A  ? 5 ? 6 M 2 G 7 # 8 9 > /  9 H :", options: [" 2 $ ' > 0 # >    @ * 9  > ( . G  ", "&  ! & G ( G . G  ", " 2 $ ? / K   K  ( & G  >  0 ( G . G  ", "8 M . 0 # 6  M $ ? * 0 @  M 7 # . G  "], answer: "A" }, { question: " # ? $ . G  8 > . > ( M / $ M 0 A  ? :", options: ["& 6 . 2 5  2 $ 0  ( > ", "8 9 @ 0  ( > ", "8 9 @ 5 ? ' ? ", "* 0 ? * B 0 M # $ M $ 0 "], answer: "A" }, { question: "$ M 0 A  ? 5 ? 6 M 2 G 7 # * / K  @ 9 H :", options: [" *  > 0 > $ M .  / K  ( >  G 2 ?  ", " ( & G  @  G 2 ?  ", "0  ( G  G 2 ?  ", ". > (  @  C $ * 0 @  M 7 #  G 2 ?  "], answer: "A" } ] ); // ===================================================== // TOPIC KEYS & BILINGUAL NAMES // ===================================================== const topicKeys = [ "8   M / > * & M ' $ ? ", " # ? $ @ / . B 2 8   M 0 ? / >   ", "2  A $ M $ . 8 . > * 5 0 M $ M /  0 . 9 $ M $ . 8 . > * 5 0 M $  ", ". ? ( M (  5  & 6 . 2 5 8   M / >   ", "5 0 M  -5 0 M  . B 2  5   ( - ( . B 2 ", " 8 $ ", "8 . /  0 & B 0 @ ", " M / > . ? $ ? ", " M 7 G $ M 0 . ? $ ? ", "6 ?  M 7 > / K   5  . > * ( ", ". A & M 0 > ", " G 2 G * ! 0 ", " ! @  0 8 . / 8 > 0 # @ ", "* G   ( ", "8 >   M / ?  @  0    ! < > * M 0 , ( M ' ( ", " # ? $  @ * M 0  C $ ? /$ >  ?  M   8 K  ", "* > M /  M 0 . . G   # ? $  > 8 M % > ( ", " # ? $  @ - > 7 > ", "8 > . A & > / ?   # ? $ ", ". B 2 M / >   ( ", "( ? 0 M & > ( > $ M .   5  *  > 0 > $ M .  6 ?  M 7 # ", "6 ?  M 7 # . G  8 . 8 M / >   ", "& M 5 ? $ @ / 5 ? 6 M 2 G 7 #  0 8 @  ( G  0 8 ?  > ( G  G 8 . M , ( M ' ? $ * 9 2 B " ]; const topicNames = { hi: [ "8   M / > * & M ' $ ? ", " # ? $ @ / . B 2 8   M 0 ? / >   ", "2  A $ M $ . 8 . > * 5 0 M $ M /  0 . 9 $ M $ . 8 . > * 5 0 M $  ", ". ? ( M (  5  & 6 . 2 5 8   M / >   ", "5 0 M  -5 0 M  . B 2  5   ( - ( . B 2 ", " 8 $ ", "8 . /  0 & B 0 @ ", " M / > . ? $ ? ", " M 7 G $ M 0 . ? $ ? ", "6 ?  M 7 > / K   5  . > * ( ", ". A & M 0 > ", " G 2 G * ! 0 ", " ! @  0 8 . / 8 > 0 # @ ", "* G   ( ", "8 >   M / ?  @  0    ! < > * M 0 , ( M ' ( ", " # ? $  @ * M 0  C $ ? /$ >  ?  M   8 K  ", "* > M /  M 0 . . G   # ? $  > 8 M % > ( ", " # ? $  @ - > 7 > ", "8 > . A & > / ?   # ? $ ", ". B 2 M / >   ( ", "( ? 0 M & > ( > $ M .   5  *  > 0 > $ M .  6 ?  M 7 # ", "6 ?  M 7 # . G  8 . 8 M / >   ", "& M 5 ? $ @ / 5 ? 6 M 2 G 7 #  0 8 @  ( G  0 8 ?  > ( G  G 8 . M , ( M ' ? $ * 9 2 B " ], en: [ "Number System", "Mathematical Operations", "L.C.M. and H.C.F.", "Fractions and Decimal Numbers", "Square-Square Root and Cube-Cube Root", "Average", "Time and Distance", "Geometry", "Mensuration", "Units and Measurement", "Money", "Calendar", "Clock and Time Table", "Pattern", "Statistics & Data Handling", "Nature of Mathematics/Logical Thinking", "Place of Mathematics in Curriculum", "Language of Mathematics", "Community Mathematics", "Evaluation", "Diagnostic and Remedial Teaching", "Problems of Teaching", "Error Analysis and Related Aspects of Learning and Teaching" ] }; function getTopicDisplay(key, lang) { const idx = topicKeys.indexOf(key); if (idx === -1) return key; return topicNames[lang][idx] || key; } // ===================================================== // UI TRANSLATIONS // ===================================================== const uiText = { hi: { mainTitle: "•' CTET * G * 0 -1 -  # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 ", mainSubtitle: " # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 | & H ( ?   - M / > 8 8 . 8 M / >  ( 0 G  0 ", startTitle: "•'  # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 ", streakLabel: "2  > $ > 0 ", dayLabel: "& ? ( ", progressTitle: " *  @ * M 0  $ ? ", podBtnText: "& ? (  @ 8 . 8 M / > ", customBtnText: " 8 M  .  - M / > 8 ", subjectTitle: "<Ø¯ß 5 ? 7 /  / ( ", selectSubjectText: " # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 ", topicTitle: "=ØÚÜ  ' M / > / K   >  / (  0 G  ", chapterSelectText: " ' M / > / K   >  / (  0 G  ", backStartText: "* M 0 > 0  - * 0 5 > * 8 ", genAssignText: " - M / > 8 * M 0 6 M (  G ( 0 G   0 G  ", levelTitle: "¡&  ? ( >  8 M $ 0  A ( G  ", levelSelectText: " ? ( >  8 M $ 0  A ( G  ", levelDescText: " * ( G CTET 8 M $ 0  G  ( A 8 > 0  A ( G  :", l1Title: "8 M $ 0 1", l1Sub: ", G 8 ?  / CTET  ' > 0 ", l2Title: "8 M $ 0 2", l2Sub: ". ' M / . (CTET . > (  )", l3Title: "8 M $ 0 3", l3Sub: " ( M ( $ (5 ? 6 M 2 G 7 # > $ M .  )", backTopicsText: "5 ? 7 / K  * 0 5 > * 8 ", genFinalText: " - M / > 8 * M 0 6 M (  G ( 0 G   0 G  ", langLabel: "9 ?  & @ ", fullPaper: "8 - @ 5 ? 7 / (* B 0 M # * > M /  M 0 . - 23  ' M / > / )", noTopicAlert: " C * / >  . 8 G  .    ' M / > /  A ( G  !", noLevelAlert: " C * / >  ? ( >  8 M $ 0  A ( G  !", instructions: "( ? 0 M & G 6 ( # ? $  - M / > 8 ):", inst1: "10 , 9 A 5 ?  2 M * @ * M 0 6 M ( ,  # ? $  5  6 ?  M 7 > 6 > 8 M $ M 0 * 0  ' > 0 ? $ d ", inst2: "15 . ? (  . G  9 2  0 G  , $ M $ 0  A   @ 8 G . ? 2 >   d ", mcqHeading: "'þ  - M / > 8 * M 0 6 M ( ", answerKey: "=ØÝ $ M $ 0  A   @ ", qNo: "* M 0 6 M ( 8  .", ans: " $ M $ 0 ", print: "* M 0 ?   / PDF", newPractice: "( / >  - M / > 8 ", markComplete: "* B 0 M #  ? 9 M ( ? $  0 G  ", completeMsg: "<Ø‰ß 6 > ( & > 0 !  - M / > 8 * B 0 M # 9 A  d * M 0  $ ? 8 9 G  @   d ", dailyComplete: ", ' >  9 K ! & ? (  @ 8 . 8 M / > 9 2 9 A  d ", podTitle: "<Øß & ? (  @  A ( L $ @ ( # ? $ )", podSub: "<دß", podLevel: "8 M $ 0 ", podToday: "   >  - M / > 8 * M 0 6 M ( ", podStreak: "=Ø%Ý 2  > $ > 0 ", podSolved: "' 9 2 * M 0 6 M ( ", podProgress: "=ØÚÜ * M 0  $ ? ", podSolution: "=ØÌÜ 8 . > ' > ( ", podCorrect: "8 9 @ $ M $ 0 :", podExplanation: "5 M / >  M / > : CTET  # ? $  5 ' > 0 # >  G  ( A 8 > 0 ", podComplete: "* B 0 M #  ? / > ", podPrint: "* M 0 ?    0 G  ", podNew: "( / >  - M / > 8 " }, en: { mainTitle: "•' CTET Paper 1 - Mathematics and Pedagogy", mainSubtitle: "Mathematics and Pedagogy | Daily Practice Problem Generator", startTitle: "•' Mathematics and Pedagogy", streakLabel: "Streak", dayLabel: "days", progressTitle: "Your Progress", podBtnText: "Problem of the Day", customBtnText: "Custom Practice", subjectTitle: "<Ø¯ß Select Subject", selectSubjectText: "Mathematics and Pedagogy", topicTitle: "=ØÚÜ Select Chapters", chapterSelectText: "Select Chapters", backStartText: "Back to Start", genAssignText: "Generate Practice Questions", levelTitle: "¡& Select Difficulty Level", levelSelectText: "Select Difficulty Level", levelDescText: "Choose according to your CTET level:", l1Title: "Level 1", l1Sub: "Basic / CTET Foundation", l2Title: "Level 2", l2Sub: "Medium (CTET Standard)", l3Title: "Level 3", l3Sub: "Advanced (Analytical)", backTopicsText: "Back to Topics", genFinalText: "Generate Practice Questions", langLabel: "English", fullPaper: "All Topics (Full Syllabus - 23 Chapters)", noTopicAlert: "Please select at least one chapter!", noLevelAlert: "Please select a difficulty level!", instructions: "Instructions (Maths Practice):", inst1: "10 multiple choice questions based on Mathematics and Pedagogy.", inst2: "Solve in 15 minutes, check with answer key.", mcqHeading: "'þ Practice Questions", answerKey: "=ØÝ Answer Key", qNo: "Q. No.", ans: "Answer", print: "Print / PDF", newPractice: "New Practice", markComplete: "Mark Complete", completeMsg: "<Ø‰ß Excellent! Practice marked complete. Progress saved.", dailyComplete: "Congratulations! Problem of the day solved.", podTitle: "<Øß Problem of the Day (Maths)", podSub: "<دß", podLevel: "Level", podToday: "Today's Practice Question", podStreak: "=Ø%Ý Streak", podSolved: "' Solved", podProgress: "=ØÚÜ Progress", podSolution: "=ØÌÜ Solution", podCorrect: "Correct Answer:", podExplanation: "Explanation: As per CTET Mathematics concept", podComplete: "Mark Complete", podPrint: "Print", podNew: "New Practice" } }; // ===================================================== // DOM REFS & STATE // ===================================================== const langToggleBtn = document.getElementById('langToggleBtn'); const langLabel = document.getElementById('langLabel'); let currentLang = 'hi'; let selectedTopics = []; let selectedLevel = null; let userProgress = { streak: 0, lastPracticeDate: null, totalProblemsSolved: 0, topicsCompleted: 0, totalTopics: topicKeys.length }; function applyUILanguage(lang) { const t = uiText[lang]; document.getElementById('mainTitle').textContent = t.mainTitle; document.getElementById('mainSubtitle').textContent = t.mainSubtitle; document.getElementById('startTitle').textContent = t.startTitle; document.getElementById('streakLabel').textContent = t.streakLabel; document.getElementById('dayLabel').textContent = t.dayLabel; document.getElementById('progressTitle').textContent = t.progressTitle; document.getElementById('podBtnText').textContent = t.podBtnText; document.getElementById('customBtnText').textContent = t.customBtnText; document.getElementById('subjectTitle').textContent = t.subjectTitle; document.getElementById('selectSubjectText').textContent = t.selectSubjectText; document.getElementById('topicTitle').textContent = t.topicTitle; document.getElementById('chapterSelectText').textContent = t.chapterSelectText; document.getElementById('backStartText').textContent = t.backStartText; document.getElementById('genAssignText').textContent = t.genAssignText; document.getElementById('levelTitle').textContent = t.levelTitle; document.getElementById('levelSelectText').textContent = t.levelSelectText; document.getElementById('levelDescText').textContent = t.levelDescText; document.getElementById('l1Title').textContent = t.l1Title; document.getElementById('l1Sub').textContent = t.l1Sub; document.getElementById('l2Title').textContent = t.l2Title; document.getElementById('l2Sub').textContent = t.l2Sub; document.getElementById('l3Title').textContent = t.l3Title; document.getElementById('l3Sub').textContent = t.l3Sub; document.getElementById('backTopicsText').textContent = t.backTopicsText; document.getElementById('genFinalText').textContent = t.genFinalText; langLabel.textContent = t.langLabel; renderTopics(); if (!generatedPaperContainer.classList.contains('hidden')) { if (selectedTopics.length > 0 && selectedLevel) { generatePaper(selectedTopics, selectedLevel, currentLang); } } } langToggleBtn.addEventListener('click', function() { currentLang = (currentLang === 'hi') ? 'en' : 'hi'; applyUILanguage(currentLang); }); // ============ CORE FUNCTIONS ============ function renderTopics() { const container = document.getElementById('topicsContainer'); const t = uiText[currentLang]; const fullLabel = (currentLang === 'hi') ? "' 8  * B 0 M # * > M /  M 0 . (8 - @ 23  ' M / > / )" : "' Full Syllabus (All 23 Chapters)"; container.innerHTML = `<div class="checkbox-item" style="background:#e6f7ff;"><input type="checkbox" id="fullSyllabus" value="full"><label for="fullSyllabus"><strong>${fullLabel}</strong></label></div>`; topicKeys.forEach(topic => { const id = `topic_${topic.replace(/[\s,?()]/g, '_').substring(0, 40)}`; const displayName = getTopicDisplay(topic, currentLang); container.innerHTML += `<div class="checkbox-item"><input type="checkbox" id="${id}" name="topic" value="${topic}"><label for="${id}">${displayName}</label></div>`; }); document.getElementById('fullSyllabus')?.addEventListener('change', (e) => { const allCheckboxes = document.querySelectorAll('input[name="topic"]'); allCheckboxes.forEach(cb => cb.disabled = e.target.checked); if(e.target.checked) allCheckboxes.forEach(cb => cb.checked = false); }); } function getRandomQuestions(topics, level, count, lang) { let allQs = []; topics.forEach(topic => { if (questionBank[topic] && questionBank[topic][lang] && questionBank[topic][lang][`level${level}`]) { allQs = allQs.concat(questionBank[topic][lang][`level${level}`]); } }); if (allQs.length === 0) { const t = uiText[lang]; return [{ question: t.noTopicAlert, options: ["A", "B", "C", "D"], answer: "A" }]; } allQs = allQs.sort(() => Math.random() - 0.5); return allQs.slice(0, count); } function loadUserProgress() { const saved = localStorage.getItem('ctetMathDailyProgress'); if (saved) userProgress = JSON.parse(saved); const today = new Date().toDateString(); if (userProgress.lastPracticeDate !== today) { const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1); if (userProgress.lastPracticeDate === yesterday.toDateString()) userProgress.streak++; else userProgress.streak = 1; userProgress.lastPracticeDate = today; saveUserProgress(); } updateUI(); } function saveUserProgress() { localStorage.setItem('ctetMathDailyProgress', JSON.stringify(userProgress)); } function updateUI() { const t = uiText[currentLang]; document.getElementById('streakDays').textContent = userProgress.streak; const today = new Date(); document.getElementById('currentDate').textContent = today.toLocaleDateString(currentLang === 'hi' ? 'hi-IN' : 'en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }); const percent = Math.min(100, Math.round((userProgress.topicsCompleted / userProgress.totalTopics) * 100)); document.getElementById('progressFill').style.width = `${percent}%`; document.getElementById('progressText').textContent = `${percent}% ${currentLang === 'hi' ? '* B 0 M # ' : 'complete'} (${userProgress.topicsCompleted}/${userProgress.totalTopics} ${currentLang === 'hi' ? ' ' M / > / ' : 'chapters'})`; } function generatePaper(topics, level, lang) { const t = uiText[lang]; const topicNamesDisplay = topics.length > 5 ? topics.slice(0,5).map(t => getTopicDisplay(t, lang)).join(", ")+" ..." : topics.map(t => getTopicDisplay(t, lang)).join(", "); const mcqs = getRandomQuestions(topics, level, 10, lang); let paperContent = `<div class="header"><h2>=ØØÜ CTET Paper-1 (Mathematics & Pedagogy)</h2><h3>=ØÌÜ ${topics.length === topicKeys.length ? (currentLang === 'hi' ? "8 . M * B 0 M # * > M /  M 0 . (23  ' M / > / )" : "Full Syllabus (23 Chapters)") : topicNamesDisplay.substring(0, 85)}</h3><p>¡& ${currentLang === 'hi' ? ' ? ( >  8 M $ 0 ' : 'Difficulty Level'} ${level}  ${level === 1 ? (currentLang === 'hi' ? ', G 8 ?  ' : 'Basic') : level === 2 ? (currentLang === 'hi' ? '. ' M / . ' : 'Medium') : (currentLang === 'hi' ? ' ( M ( $ ' : 'Advanced')}</p></div><div class="content-area"><div class="instructions"><p><strong>${t.instructions}</strong></p><ol><li>${t.inst1}</li><li>${t.inst2}</li></ol></div><div class="question-section"><div style="font-size:1.4rem; margin-bottom:20px; font-weight:bold;">${t.mcqHeading}</div>`; let qNum = 1; mcqs.forEach(mcq => { paperContent += `<div class="question"><div class="question-text">${qNum}. ${mcq.question}</div> <div class="option">A. ${mcq.options[0]}</div><div class="option">B. ${mcq.options[1]}</div> <div class="option">C. ${mcq.options[2]}</div><div class="option">D. ${mcq.options[3]}</div></div>`; qNum++; }); paperContent += `</div><div class="answer-sheet"><h3 class="section-title">${t.answerKey}</h3><table class="answer-table"><thead><tr><th>${t.qNo}</th><th>${t.ans}</th><th>${t.qNo}</th><th>${t.ans}</th></tr></thead><tbody>`; for (let i = 0; i < mcqs.length; i += 2) { paperContent += `<tr><td>${i+1}</td><td><strong>${mcqs[i].answer}</strong></td>`; if (i+1 < mcqs.length) paperContent += `<td>${i+2}</td><td><strong>${mcqs[i+1].answer}</strong></td>`; else paperContent += `<td></td><td></td>`; paperContent += `</tr>`; } paperContent += `</tbody></table></div><div class="action-buttons"><button class="btn btn-success" id="markCompleteBtn"><i class="fas fa-check-circle"></i> ${t.markComplete}</button><button class="btn btn-primary" id="printBtn"><i class="fas fa-print"></i> ${t.print}</button><button class="btn btn-danger" id="newAssignmentBtn"><i class="fas fa-undo-alt"></i> ${t.newPractice}</button></div></div>`; generatedPaperContainer.innerHTML = paperContent; generatedPaperContainer.classList.remove('hidden'); startContainer.classList.add('hidden'); document.getElementById('markCompleteBtn')?.addEventListener('click', markPracticeComplete); document.getElementById('printBtn')?.addEventListener('click', () => window.print()); document.getElementById('newAssignmentBtn')?.addEventListener('click', backToStart); } function markPracticeComplete() { const t = uiText[currentLang]; userProgress.totalProblemsSolved += 10; let newlyCompleted = 0; selectedTopics.forEach(t => { if (!userProgress[`comp_${t}`]) { userProgress[`comp_${t}`] = true; newlyCompleted++; } }); userProgress.topicsCompleted = Math.min(userProgress.totalTopics, userProgress.topicsCompleted + newlyCompleted); saveUserProgress(); updateUI(); alert(t.completeMsg); backToStart(); } function generateProblemOfDay() { const t = uiText[currentLang]; const randomTopic = topicKeys[Math.floor(Math.random() * topicKeys.length)]; const randomLevel = Math.floor(Math.random() * 3) + 1; selectedTopics = [randomTopic]; selectedLevel = randomLevel; const mcq = getRandomQuestions(selectedTopics, randomLevel, 1, currentLang)[0]; const topicDisplay = getTopicDisplay(randomTopic, currentLang); startContainer.classList.add('hidden'); generatedPaperContainer.classList.remove('hidden'); let content = `<div class="header"><h2>${t.podTitle}</h2><h3>${t.podSub} ${topicDisplay}</h3><p>${t.podLevel} ${randomLevel}</p></div><div class="content-area"><div class="problem-of-day"><h3><i class="fas fa-star-of-life"></i> ${t.podToday}</h3><p>${currentLang === 'hi' ? ' * ( @ learning streak , ( >  0  G  !' : 'Keep your learning streak going!'}</p></div><div class="daily-summary"><div class="summary-card"><h4>${t.podStreak}</h4><p>${userProgress.streak} ${currentLang === 'hi' ? '& ? ( ' : 'days'}</p></div><div class="summary-card"><h4>${t.podSolved}</h4><p>${userProgress.totalProblemsSolved}</p></div><div class="summary-card"><h4>${t.podProgress}</h4><p>${Math.round((userProgress.topicsCompleted / userProgress.totalTopics) * 100)}%</p></div></div><div class="question"><div class="question-text">${mcq.question}</div><div class="option">A. ${mcq.options[0]}</div><div class="option">B. ${mcq.options[1]}</div><div class="option">C. ${mcq.options[2]}</div><div class="option">D. ${mcq.options[3]}</div></div><div class="answer-sheet"><h3>${t.podSolution}</h3><p><strong>${t.podCorrect}</strong> ${mcq.answer}</p><p><strong>${t.podExplanation}</strong></p></div><div class="action-buttons"><button class="btn btn-success" id="markCompleteDailyBtn"><i class="fas fa-check"></i> ${t.podComplete}</button><button class="btn btn-primary" id="printBtn">${t.podPrint}</button><button class="btn btn-danger" id="newAssignmentBtn">${t.podNew}</button></div></div>`; generatedPaperContainer.innerHTML = content; document.getElementById('markCompleteDailyBtn')?.addEventListener('click', () => { userProgress.totalProblemsSolved++; saveUserProgress(); updateUI(); alert(t.dailyComplete); backToStart(); }); document.getElementById('printBtn')?.addEventListener('click', () => window.print()); document.getElementById('newAssignmentBtn')?.addEventListener('click', backToStart); } function backToStart() { generatedPaperContainer.classList.add('hidden'); startContainer.classList.remove('hidden'); document.getElementById('topicSelection').classList.add('hidden'); document.getElementById('levelSelection').classList.add('hidden'); document.getElementById('subjectSelection').classList.add('hidden'); document.getElementById('startScreen').classList.remove('hidden'); updateUI(); } // ===================================================== // EVENT BINDINGS // ===================================================== document.getElementById('customPracticeBtn').addEventListener('click', () => { document.getElementById('startScreen').classList.add('hidden'); document.getElementById('subjectSelection').classList.remove('hidden'); }); document.getElementById('selectMathBtn').addEventListener('click', () => { renderTopics(); document.getElementById('subjectSelection').classList.add('hidden'); document.getElementById('topicSelection').classList.remove('hidden'); }); document.getElementById('backToStartBtn').addEventListener('click', backToStart); document.getElementById('generateAssignmentBtn').addEventListener('click', () => { const full = document.getElementById('fullSyllabus')?.checked; if (full) selectedTopics = [...topicKeys]; else selectedTopics = Array.from(document.querySelectorAll('input[name="topic"]:checked')).map(cb => cb.value); if (selectedTopics.length === 0) { const t = uiText[currentLang]; alert(t.noTopicAlert); return; } document.getElementById('topicSelection').classList.add('hidden'); document.getElementById('levelSelection').classList.remove('hidden'); }); document.getElementById('backToTopicsBtn').addEventListener('click', () => { document.getElementById('levelSelection').classList.add('hidden'); document.getElementById('topicSelection').classList.remove('hidden'); }); document.getElementById('level1Btn').addEventListener('click', () => { document.querySelectorAll('.btn-level').forEach(b => b.classList.remove('selected')); document.getElementById('level1Btn').classList.add('selected'); selectedLevel = 1; }); document.getElementById('level2Btn').addEventListener('click', () => { document.querySelectorAll('.btn-level').forEach(b => b.classList.remove('selected')); document.getElementById('level2Btn').classList.add('selected'); selectedLevel = 2; }); document.getElementById('level3Btn').addEventListener('click', () => { document.querySelectorAll('.btn-level').forEach(b => b.classList.remove('selected')); document.getElementById('level3Btn').classList.add('selected'); selectedLevel = 3; }); document.getElementById('generateFinalBtn').addEventListener('click', () => { if (!selectedLevel) { const t = uiText[currentLang]; alert(t.noLevelAlert); return; } generatePaper(selectedTopics, selectedLevel, currentLang); }); document.getElementById('problemOfDayBtn').addEventListener('click', generateProblemOfDay); document.getElementById('homeIconBtn').addEventListener('click', (e) => { e.preventDefault(); backToStart(); }); document.addEventListener('DOMContentLoaded', () => { loadUserProgress(); }); </script> </body> </html>