.btn-filter:hover:not(.active) background: #eaf4f9; border-color: #b9d3e2;
// Helper: generate descriptive content per TPO function getDescription(tpoNum) if (tpoNum <= 24) return "Reading + Listening + Speaking + Writing • Classic materials"; if (tpoNum <= 48) return "Updated passages, academic lectures, integrated tasks"; return "Latest edition • Real exam interface simulation, high difficulty";
.stat-card span font-size: 1.4rem; font-weight: 800; margin-right: 6px; color: #0f4c6b;
// Core download simulation: generate a mock .zip file per TPO function downloadSingleTPO(tpoNumber) TOEFL iBT Prep`; const blob = new Blob([content], type: 'application/zip' ); // using zip mime to mimic archive // create object URL const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `TPO_$tpoNumber_FullSet.zip`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); showToast(`✅ TPO $tpoNumber download started! (simulated ZIP)`); Toefl Tpo 1-72 Download-
/* grid */ .tpo-grid display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 0.5rem;
// search with debounce let debounceTimer; searchInput.addEventListener('input', (e) => clearTimeout(debounceTimer); debounceTimer = setTimeout(() => searchTerm = e.target.value; updateAndRender(); , 280); );
// attach info/details event const infoBtns = document.querySelectorAll('.btn-download:not(.primary)'); infoBtns.forEach(btn => btn.addEventListener('click', (e) => const tpoNum = btn.getAttribute('data-quickinfo'); if (tpoNum) showToast(`📖 TPO $tpoNum: Full-length simulation, answer keys, and audio scripts included.`, false); ); ); .btn-filter:hover:not(.active) background: #eaf4f9
// optional: extra full range "select all" but already bulk works on visible // initial render renderGrid();
.tpo-number font-size: 1.6rem; font-weight: 800; background: linear-gradient(120deg, #1a5f7a, #2d8bad); background-clip: text; -webkit-background-clip: text; color: transparent;
// attach download events to each button const downloadBtns = document.querySelectorAll('.btn-download.primary'); downloadBtns.forEach(btn => btn.addEventListener('click', (e) => e.stopPropagation(); const tpoVal = btn.getAttribute('data-tpo'); if (tpoVal) downloadSingleTPO(parseInt(tpoVal, 10)); ); ); if (tpoNum <
.search-box input border: none; background: transparent; padding: 0.6rem 0.5rem; font-size: 0.9rem; width: 100%; outline: none; font-weight: 500;
.tpo-badge background: #eef3f7; padding: 0.2rem 0.8rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; color: #226f8f;
.btn-download.primary:hover background: #0e556e;
.filter-group display: flex; gap: 10px; flex-wrap: wrap;
// Toast notification helper let toastTimeout = null; function showToast(message, isError = false) const toast = document.getElementById('toastMessage'); if (toastTimeout) clearTimeout(toastTimeout); toast.textContent = message; toast.style.backgroundColor = isError ? '#9e2d2f' : '#1e4a6e'; toast.style.opacity = '1'; toast.style.visibility = 'visible'; toastTimeout = setTimeout(() => toast.style.opacity = '0'; toast.style.visibility = 'hidden'; , 2800);