اختبار أزمنة اللغة الإنجليزية @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap'); body{font-family:'Cairo',sans-serif;background:#f0f4f8;margin:0;padding:20px;display:flex;justify-content:center;align-items:center;min-height:100vh} .quiz-container{background:#fff;border-radius:15px;max-width:800px;width:100%;box-shadow:0 4px 20px rgba(0,0,0,.1)} .quiz-header{background:#4a90e2;color:#fff;padding:20px;text-align:center} .quiz-body{padding:30px} #question-screen,#result-screen{display:none} .question-text{font-size:20px;font-weight:bold;margin-bottom:20px;direction:ltr;text-align:left} .question-text span{color:#d9534f} .options-container{display:grid;gap:10px} .option-btn{padding:15px;font-size:16px;cursor:pointer;direction:ltr;text-align:left} .correct{background:#d4edda} .wrong{background:#f8d7da} .btn{padding:12px 25px;font-size:18px;cursor:pointer;margin-top:20px} .progress-bar-container{width:100%;background:#ddd;border-radius:10px} .progress-bar{height:10px;width:0%;background:#4a90e2;border-radius:10px} اختبار أزمنة اللغة الإنجليزية مرحباً بك في اختبار الأزمنة سيتم اختيار 10 أسئلة عشوائيًا من أصل 100 سؤال. ابدأ الاختبار السؤال التالي النتيجة النهائية إعادة الاختبار const allQuestions = [ {question:"She ___ English very well.",options:["speaks","speak","is speaking","spoke"],answer:"speaks"}, {question:"They ___ football now.",options:["are playing","play","played","plays"],answer:"are playing"}, {question:"I usually ___ coffee in the morning.",options:["drink","drinks","am drinking","drank"],answer:"drink"}, {question:"He ___ TV when I arrived.",options:["was watching","watched","is watching","has watched"],answer:"was watching"}, {question:"We ___ Paris last year.",options:["visited","visit","are visiting","have visited"],answer:"visited"}, {question:"She ___ her homework already.",options:["has finished","finished","finishes","is finishing"],answer:"has finished"}, {question:"Look! The baby ___.",options:["is crying","cries","cried","has cried"],answer:"is crying"}, {question:"I ___ to London twice.",options:["have been","was","am","went"],answer:"have been"}, {question:"He ___ a car next year.",options:["will buy","buys","bought","is buying"],answer:"will buy"}, {question:"When I was young, I ___ football.",options:["played","play","am playing","have played"],answer:"played"}, {question:"She ___ at 7 every day.",options:["wakes up","wake up","is waking","woke"],answer:"wakes up"}, {question:"They ___ dinner now.",options:["are having","have","had","has"],answer:"are having"}, {question:"I ___ him yesterday.",options:["saw","see","have seen","am seeing"],answer:"saw"}, {question:"We ___ here since 2020.",options:["have lived","lived","live","are living"],answer:"have lived"}, {question:"She ___ when the phone rang.",options:["was sleeping","slept","sleeps","is sleeping"],answer:"was sleeping"}, {question:"He ___ finished his work.",options:["has","have","is","was"],answer:"has"}, {question:"I ___ call you later.",options:["will","am","was","have"],answer:"will"}, {question:"They ___ English at school.",options:["study","studies","are studying","studied"],answer:"study"}, {question:"She ___ a movie right now.",options:["is watching","watches","watched","has watched"],answer:"is watching"}, {question:"We ___ lunch when he arrived.",options:["were eating","eat","ate","are eating"],answer:"were eating"} ]; let quizQuestions=[],currentQuestionIndex=0,score=0; function shuffleArray(a){return [...a].sort(()=>Math.random()-0.5)} function startQuiz(){ quizQuestions=shuffleArray(allQuestions).slice(0,10); currentQuestionIndex=0;score=0; startScreen.style.display='none'; resultScreen.style.display='none'; questionScreen.style.display='block'; showQuestion(); } function showQuestion(){ const q=quizQuestions[currentQuestionIndex]; document.getElementById("question-counter").innerText=`السؤال ${currentQuestionIndex+1} من ${quizQuestions.length}`; document.getElementById("question-text").innerHTML=q.question.replace("___","___"); const c=document.getElementById("options-container");c.innerHTML=""; shuffleArray(q.options).forEach(o=>{ const b=document.createElement("button"); b.className="option-btn"; b.innerText=o; b.onclick=()=>selectAnswer(b,o); c.appendChild(b); }); document.getElementById("progress-bar").style.width=((currentQuestionIndex+1)/quizQuestions.length*100)+"%"; } function selectAnswer(btn,opt){ const q=quizQuestions[currentQuestionIndex]; if(opt===q.answer){score++;btn.classList.add("correct")} else{btn.classList.add("wrong")} document.querySelectorAll(".option-btn").forEach(b=>{ b.disabled=true; if(b.innerText===q.answer)b.classList.add("correct"); }); document.getElementById("next-btn").style.display="block"; } document.getElementById("next-btn").onclick=()=>{ currentQuestionIndex++; if(currentQuestionIndex