<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JEE Main Chemistry - RDKit.js Production Layout</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="https://unpkg.com/@rdkit/rdkit/dist/RDKit_minimal.js"></script>
<style>
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background-color: #f8fafc; color: #1e293b; margin: 0; padding: 20px; line-height: 1.6; }
.container { max-width: 850px; margin: 20px auto; background: #ffffff; padding: 35px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
h1 { text-align: center; color: #0f172a; font-size: 1.75rem; border-bottom: 3px solid #3b82f6; padding-bottom: 12px; margin-bottom: 35px; }
.question-block { border-bottom: 1px solid #e2e8f0; padding: 25px 0; }
.q-text { font-size: 1.1rem; font-weight: 600; color: #1e293b; display: block; margin-bottom: 20px; }
.options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 20px 0; }
.option-card { border: 2px solid #e2e8f0; border-radius: 8px; padding: 15px; background: #ffffff; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; min-height: 180px; }
.option-label { position: absolute; top: 10px; left: 10px; font-weight: bold; color: #64748b; font-size: 0.9rem; }
.btn-toggle { background: #2563eb; color: white; border: none; padding: 10px 20px; font-size: 0.95rem; border-radius: 6px; cursor: pointer; font-weight: 600; margin-top: 10px; }
.btn-toggle:hover { background: #1d4ed8; }
.solution-box { display: none; background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 5px solid #22c55e; padding: 20px; margin-top: 20px; border-radius: 6px; }
.ans-heading { font-weight: bold; color: #15803d; font-size: 1.1rem; display: block; margin-bottom: 8px; }
.scheme-container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 15px; background: #f8fafc; padding: 15px; border-radius: 6px; margin: 15px 0; }
.scheme-arrow { font-weight: bold; color: #475569; font-size: 1rem; text-align: center; }
.molecule-render { display: flex; justify-content: center; align-items: center; min-width: 150px; min-height: 130px; }
.molecule-render svg { width: 100%; height: auto; display: block; }
@media (max-width: 600px) { .options-grid { grid-template-columns: 1fr; } }
</style>
</head>
<body>
<div class="container">
<h1>JEE Main Chemistry — RDKit Web Implementation</h1>
<div class="question-block">
<span class="q-text">Q53. Which compound would give 5-keto-2-methylhexanal upon reductive ozonolysis?</span>
<div class="options-grid">
<div class="option-card">
<span class="option-label">(A)</span>
<div class="molecule-render" data-smiles="CC1=CCCC(C)1" data-width="180" data-height="140"></div>
</div>
<div class="option-card">
<span class="option-label">(B)</span>
<div class="molecule-render" data-smiles="CC1=C(C)CCC1" data-width="180" data-height="140"></div>
</div>
<div class="option-card">
<span class="option-label">(C)</span>
<div class="molecule-render" data-smiles="CC1=CC(C)CC1" data-width="180" data-height="140"></div>
</div>
<div class="option-card">
<span class="option-label">(D)</span>
<div class="molecule-render" data-smiles="CC1CC=C(C)C1" data-width="180" data-height="140"></div>
</div>
</div>
<button class="btn-toggle" onclick="toggleSolution(this)">View Explanation</button>
<div class="solution-box">
<span class="ans-heading">Correct Option: (B)</span>
<strong>Mechanism & Explanation:</strong>
<p>Reductive ozonolysis completely cleaves the carbon-carbon double bond \((C=C)\) structure, replacing it with two terminal carbonyl groupings \((C=O)\).</p>
<div class="scheme-container">
<div class="molecule-render" data-smiles="CC1=C(C)CCC1" data-width="140" data-height="130"></div>
<div class="scheme-arrow">\(\xrightarrow{\text{(i) } O_3 \text{ / (ii) } \text{Zn}\cdot\text{H}_2\text{O}}\)</div>
<div class="molecule-render" data-smiles="CC(=O)CCCC(C)=O" data-width="220" data-height="100"></div>
</div>
<p>Cleaving 1,2-dimethylcyclopentene breaks the ring layout apart to yield a hexanal chain structure. Numbering systematically from the primary aldehyde suffix assigns **5-keto-2-methylhexanal** correctly.</p>
</div>
</div>
<div class="question-block">
<span class="q-text">Q55. In the following sequence of reactions:<br>
$$\text{Toluene} \xrightarrow{\text{KMnO}_4} A \xrightarrow{\text{SOCl}_2} B \xrightarrow{\frac{\text{H}_2/\text{Pd}}{\text{BaSO}_4}} C$$
The final product C is:</span>
<div class="options-grid">
<div class="option-card"><span class="option-label">(A)</span> \(\text{C}_6\text{H}_5\text{COOH}\)</div>
<div class="option-card"><span class="option-label">(B)</span> \(\text{C}_6\text{H}_5\text{CH}_3\)</div>
<div class="option-card"><span class="option-label">(C)</span> \(\text{C}_6\text{H}_5\text{CH}_2\text{OH}\)</div>
<div class="option-card"><span class="option-label">(D)</span> \(\text{C}_6\text{H}_5\text{CHO}\)</div>
</div>
<button class="btn-toggle" onclick="toggleSolution(this)">View Explanation</button>
<div class="solution-box">
<span class="ans-heading">Correct Option: (D)</span>
<strong>Reaction Roadmap:</strong>
<div class="scheme-container">
<div>
<div class="molecule-render" data-smiles="Cc1ccccc1" data-width="110" data-height="110"></div>
<div style="text-align:center; font-size:0.85rem; font-weight:bold; margin-top:5px;">Toluene</div>
</div>
<div class="scheme-arrow">\(\xrightarrow{\text{KMnO}_4}\)</div>
<div>
<div class="molecule-render" data-smiles="O=C(O)c1ccccc1" data-width="120" data-height="110"></div>
<div style="text-align:center; font-size:0.85rem; font-weight:bold; margin-top:5px;">A (Benzoic Acid)</div>
</div>
<div class="scheme-arrow">\(\xrightarrow{\text{SOCl}_2}\)</div>
<div>
<div class="molecule-render" data-smiles="O=C(Cl)c1ccccc1" data-width="120" data-height="110"></div>
<div style="text-align:center; font-size:0.85rem; font-weight:bold; margin-top:5px;">B (Benzoyl Chloride)</div>
</div>
<div class="scheme-arrow">\(\xrightarrow{\text{H}_2/\text{Pd}/\text{BaSO}_4}\)</div>
<div>
<div class="molecule-render" data-smiles="O=Cc1ccccc1" data-width="120" data-height="110"></div>
<div style="text-align:center; font-size:0.85rem; font-weight:bold; margin-top:5px;">C (Benzaldehyde)</div>
</div>
</div>
</div>
</div>
</div>
<script>
function toggleSolution(btn) {
let box = btn.nextElementSibling;
box.style.display = (box.style.display === "block") ? "none" : "block";
btn.textContent = (box.style.display === "block") ? "Hide Explanation" : "View Explanation";
}
// Safely load and initialize the RDKit WASM context
window.initRDKitModule().then(function(RDKit) {
console.log("RDKit Engine loaded!");
document.querySelectorAll('.molecule-render').forEach(el => {
const smiles = el.getAttribute('data-smiles');
const w = parseInt(el.getAttribute('data-width')) || 150;
const h = parseInt(el.getAttribute('data-height')) || 130;
if (!smiles) return;
const mol = RDKit.get_mol(smiles);
if (mol) {
// Production-grade settings: explicitMethyls draws CH3 text labels
const drawingOptions = {
width: w,
height: h,
bondLineWidth: 1.8,
clearBackground: true,
explicitMethyls: true,
addAtomIndices: false
};
// Render vector graphic string directly into the inner DOM
el.innerHTML = mol.get_svg_with_highlights(JSON.stringify(drawingOptions));
mol.delete(); // Free WASM memory leak allocation
}
});
}).catch(err => {
console.error("RDKit WASM error:", err);
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SSC CGL Non-Verbal Reasoning Quiz</title>
<style>
body { font-family: 'Segoe UI', system-ui, sans-serif; background-color: #f1f5f9; padding: 20px; color: #334155; }
.quiz-card { max-width: 650px; margin: 0 auto; background: #ffffff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.q-text { font-size: 1.15rem; font-weight: 600; margin-bottom: 20px; }
/* THE MAIN MATRIX BOX */
.pattern-matrix {
display: grid;
grid-template-columns: repeat(2, 110px);
grid-template-rows: repeat(2, 110px);
gap: 0px;
width: 220px;
margin: 20px auto;
border: 3px solid #1e293b;
}
.box { position: relative; border: 1px dashed #cbd5e1; background: #fff; overflow: hidden; }
/* Pure CSS Shapes mimicking a real SSC Pattern Question */
.circle-corner { position: absolute; width: 40px; height: 40px; border: 3px solid #2563eb; border-radius: 50%; }
.diagonal-line { position: absolute; width: 150px; height: 3px; background: #1e293b; }
.dot { position: absolute; width: 12px; height: 12px; background: #e11d48; border-radius: 50%; }
/* Orienting individual matrix quadrants */
.top-left .circle-corner { bottom: -20px; right: -20px; }
.top-left .diagonal-line { top: 0; left: 0; transform: rotate(45deg); transform-origin: top left; }
.top-left .dot { bottom: 15px; right: 15px; }
.top-right .circle-corner { bottom: -20px; left: -20px; }
.top-right .diagonal-line { top: 0; right: 0; transform: rotate(-45deg); transform-origin: top right; }
.top-right .dot { bottom: 15px; left: 15px; }
.bottom-left .circle-corner { top: -20px; right: -20px; }
.bottom-left .diagonal-line { bottom: 0; left: 0; transform: rotate(-45deg); transform-origin: bottom left; }
.bottom-left .dot { top: 15px; right: 15px; }
/* The Missing Piece Placeholder Styles */
.missing-piece { background: #f8fafc; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.5rem; color: #94a3b8; }
/* OPTIONS LAYOUT GRID */
.options-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 30px; }
.option-card { border: 2px solid #e2e8f0; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; align-items: center; cursor: pointer; background: white; }
.option-card:hover { border-color: #3b82f6; }
.option-box { width: 80px; height: 80px; border: 2px solid #1e293b; position: relative; overflow: hidden; background: white; margin-bottom: 8px; }
.option-label { font-weight: bold; font-size: 0.95rem; }
/* Creating shapes inside the Options directly via CSS positioning rules */
.opt-a .circle-corner { bottom: -20px; right: -20px; } /* Incorrect */
.opt-b .circle-corner { top: -20px; left: -20px; } /* Correct Option */
.opt-b .diagonal-line { bottom: 0; right: 0; transform: rotate(45deg); transform-origin: bottom right; }
.opt-b .dot { top: 12px; left: 12px; }
.btn-sol { background: #0f172a; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; margin-top: 20px; display: block; width: 100%; }
.sol-box { display: none; background: #f0fdf4; border-left: 4px solid #22c55e; padding: 15px; margin-top: 15px; border-radius: 4px; }
</style>
</head>
<body>
<div class="quiz-card">
<div class="q-text">Q. Select a suitable figure from the four alternative figures which will complete the question matrix layout:</div>
<div class="pattern-matrix">
<div class="box top-left"><div class="circle-corner"></div><div class="diagonal-line"></div><div class="dot"></div></div>
<div class="box top-right"><div class="circle-corner"></div><div class="diagonal-line"></div><div class="dot"></div></div>
<div class="box bottom-left"><div class="circle-corner"></div><div class="diagonal-line"></div><div class="dot"></div></div>
<div class="box missing-piece">?</div>
</div>
<div class="options-grid">
<div class="option-card" onclick="checkAns(false)">
<div class="option-box opt-a"><div class="circle-corner"></div></div>
<span class="option-label">(A)</span>
</div>
<div class="option-card" onclick="checkAns(true)">
<div class="option-box opt-b"><div class="circle-corner"></div><div class="diagonal-line"></div><div class="dot"></div></div>
<span class="option-label">(B)</span>
</div>
<div class="option-card" onclick="checkAns(false)">
<div class="option-box"><div class="dot" style="top:30px; left:30px;"></div></div>
<span class="option-label">(C)</span>
</div>
<div class="option-card" onclick="checkAns(false)">
<div class="option-box"><div class="diagonal-line" style="top:40px; left:-20px;"></div></div>
<span class="option-label">(D)</span>
</div>
</div>
<button class="btn-sol" onclick="document.getElementById('sol').style.display='block'">Show Trick & Solution</button>
<div id="sol" class="sol-box">
<strong>Correct Option: (B)</strong><br>
<strong>The Matrix Trick:</strong> Notice the symmetry rules. The pattern in the bottom row must mirror the top row. The bottom-left quadrant features a diagonal line running up-to-right, an inner circle arc facing top-right, and an explicit red dot. To complete the pattern symmetrically, the missing bottom-right piece **(B)** must reflect it along the vertical axis perfectly!
</div>
</div>
<script>
function checkAns(isCorrect) {
alert(isCorrect ? "Correct Choice! ๐" : "Incorrect, try applying the elimination trick!");
}
</script>
</body>
</html>