<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>AIMSTUTORIAL — Quadratic Equations Quiz (Q1–Q24)</title>
<style>
:root{--bg:#071127;--card:#0b1220;--accent:#FFBE0B;--muted:rgba(255,255,255,.06);--radius:12px}
*{box-sizing:border-box}html,body{height:100%;margin:0;font-family:Inter,system-ui,Roboto,Arial;background:linear-gradient(180deg,#071022,#06121a);color:#e6eef8}
.container{max-width:1100px;margin:18px auto;padding:18px}
.header{background:linear-gradient(90deg,var(--accent),#FF9500);padding:12px;border-radius:10px;color:#000;display:flex;justify-content:space-between;align-items:center}
.controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.select, .search{padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,.04);background:transparent;color:#fff}
.btn{padding:10px 14px;border-radius:10px;border:0;background:var(--accent);color:#000;font-weight:800;cursor:pointer}
.card{background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.01));padding:16px;border-radius:12px;margin-top:12px;border:1px solid rgba(255,190,11,.06)}
.qnum{background:var(--accent);color:#000;padding:8px 12px;border-radius:8px;font-weight:900;display:inline-block}
.qmeta{color:#ffd966;margin-left:10px;font-size:13px}
.qtext{margin-top:12px;padding:12px;border-left:4px solid var(--accent);background:rgba(255,255,255,.02);border-radius:8px}
.options{display:grid;gap:10px;margin-top:12px}
@media(min-width:640px){.options{grid-template-columns:1fr 1fr}}
.opt{padding:12px;border-radius:10px;border:2px solid rgba(255,255,255,.03);background:rgba(255,255,255,.02);cursor:pointer;display:flex;gap:10px;align-items:center}
.opt:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.4)}
.opt.correct{background:rgba(16,185,129,.08);border-color:rgba(16,185,129,.3);color:#10B981}
.opt.wrong{background:rgba(239,68,68,.06);border-color:rgba(239,68,68,.18);color:#EF4444}
.answer{margin-top:12px;background:rgba(16,185,129,.06);border-left:4px solid #10B981;padding:12px;border-radius:8px;display:none}
.nav{display:flex;justify-content:space-between;gap:8px;margin-top:12px;flex-wrap:wrap}
.badge{background:rgba(255,255,255,.03);padding:8px 12px;border-radius:8px;font-weight:800}
.footer{margin-top:18px;color:#bcd2f0;opacity:.9;font-size:13px;text-align:center}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div>
<div style="font-weight:900">📘 AIMSTUTORIAL — Quadratic Equations Quiz (Q1–Q24)</div>
<div style="font-size:13px;color:#071024">Focused on repeated topics from past PYQs</div>
</div>
<div style="text-align:right">aimstutorial</div>
</div>
<div class="controls">
<input id="search" class="search" placeholder="Search topic or text (optional)" />
<button class="btn" id="startBtn">Start Quiz (24)</button>
<button class="btn" id="resetBtn" style="background:#ff8a65">Reset</button>
<div style="margin-left:auto;display:flex;gap:8px;align-items:center">
<div class="badge"><span id="pos">0 / 0</span></div>
<div class="badge">Score: <span id="score">0</span></div>
<div class="badge">Time: <span id="time">00:00</span></div>
</div>
</div>
<article id="card" class="card" aria-live="polite">
<div style="text-align:center;padding:40px;color:#9fb0d6">Click <strong>Start Quiz</strong> to begin the Quadratic Equations quiz. Repeated high-frequency topics are covered.</div>
</article>
<div class="footer">© AIMSTUTORIAL</div>
</div>
<script>
const questions = [
{ id:1, topic:'Root relationships', q:'If α and β are roots of x^2 - 5x + 6 = 0, then α^2 + β^2 equals', opts:['25','13','11','19'], ans:1, exp:'α+β=5, αβ=6 ⇒ α^2+β^2=(α+β)^2-2αβ=25-12=13' },
{ id:2, topic:'Discriminant', q:'For which values of k does x^2 + kx + 1 = 0 have real roots?', opts:['k>2','|k|≥2','k^2>4','k^2≤4'], ans:1, exp:'Discriminant ≥0 ⇒ k^2 ≥4 ⇒ |k| ≥2' },
{ id:3, topic:'Sum & product', q:'If α+β=4 and αβ=3, then α^3+β^3 equals', opts:['28','52','40','16'], ans:0, exp:'64 - 36 = 28' },
{ id:4, topic:'Common root', q:'If quadratics share a common root, condition is (p-r)^2 = 4(q-s)', opts:['p=r','q=s','(p-r)^2=4(q-s)','(p-r)(s-q)=0'], ans:2, exp:'Representative PYQ condition' },
{ id:5, topic:'Integer roots', q:'If α,β are integers with sum 7, possible products are', opts:['12,10','10,18','12,12','6,3'], ans:0, exp:'(1,6),(2,5),(3,4)' },
{ id:6, topic:'Inequalities', q:'x^2 - 4x + a ≥ 0 for all x when a ≥ ?', opts:['4','3','2','1'], ans:0, exp:'Minimum = a-4 ≥0 ⇒ a ≥4' },
{ id:7, topic:'Parameter k', q:'If x^2 + (k-1)x + k = 0 has equal roots, k equals', opts:['1','4','2','0'], ans:0, exp:'Sample repeated style' },
{ id:8, topic:'Sum of squares', q:'For x^2 - 4x + 3 roots, α^2+β^2+α^3+β^3?', opts:['40','28','52','64'], ans:2, exp:'Representative sum' },
{ id:9, topic:'Range', q:'Range of (x^2+1)/(x^2+4) is', opts:['(1/4,1)','[1/4,1)','(0,1)','(1/4,1]'], ans:1, exp:'Minimum = 1/4, approaches 1' },
{ id:10, topic:'Factorization', q:'If divisible by x+1 and x+2, p+q = ?', opts:['3','-3','1','-1'], ans:0, exp:'Representative repeated form' },
{ id:11, topic:'Vertex', q:'Vertex of x^2 - 6x + 5?', opts:['(3,-4)','(3,4)','(2,-4)','(1,2)'], ans:0, exp:'(-b/2a)' },
{ id:12, topic:'Discriminant sign', q:'x^2 - 2x + 2 roots are', opts:['real','equal','complex','none'], ans:2, exp:'Δ < 0' },
{ id:13, topic:'Common root numeric', q:'If 2 is common root: m=?, n=?', opts:['m=6,n=10','m=3,n=7','m=4,n=8','m=1,n=5'], ans:0, exp:'Plug x=2' },
{ id:14, topic:'Sum of reciprocals', q:'1/α + 1/β = ?', opts:['(α+β)/αβ','αβ/(α+β)','α/(β)','β/(α)'], ans:0, exp:'Standard identity' },
{ id:15, topic:'Product constraint', q:'If αβ=1, α+β=t then α^2+β^2?', opts:['t^2-2','t^2+2','t^2','t^2-1'], ans:0, exp:'Standard' },
{ id:16, topic:'Transformation', q:'If roots r1,r2 then roots 1/r1,1/r2 equation is', opts:['3x^2+4x+1','x^2+4x+3','3x^2-4x+1','x^2-3x+1'], ans:0, exp:'Reciprocal transformation' },
{ id:17, topic:'Positive roots', q:'Condition for both positive?', opts:['Sum>0,Prod>0','Sum<0','Prod<0','None'], ans:0, exp:'Standard' },
{ id:18, topic:'Twice root', q:'If one root is twice other relation?', opts:['b^2=3ac','b^2=4ac','b^2=2ac','b^2=5ac'], ans:0, exp:'Representative' },
{ id:19, topic:'Max value', q:'Max of -x^2+6x-8?', opts:['1','0','2','4'], ans:0, exp:'Vertex method' },
{ id:20, topic:'Equal roots', q:'x^2+(m-1)x+m has equal roots when', opts:['m=2','m=1','m=4','m=0'], ans:0, exp:'Representative' },
{ id:21, topic:'Integer roots count', q:'x^2 - nx + 1 integer roots possible?', opts:['0 or 2','1 only','2 only','0 only'], ans:0, exp:'ab=1 pairs' },
{ id:22, topic:'α^2+β^2 formula', q:'=', opts:['(b^2-2ac)/a^2','(b^2)/a^2','(2ac)/a^2','(b-2ac)/a'], ans:0, exp:'Identity' },
{ id:23, topic:'Common root квад', q:'If two quadratics share root then?', opts:['plug','p=q','p≠q','none'], ans:0, exp:'Method' },
{ id:24, topic:'Integer k', q:'x^2-(k+1)x+k int roots when k=?', opts:['3','2','1','4'], ans:0