// Filter buttons function setupFilterButtons() document.querySelectorAll('.filter-btn').forEach(btn => btn.addEventListener('click', () => document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active', 'bg-[var(--accent)]', 'text-[var(--bg)]'); b.classList.add('bg-[var(--bg-secondary)]', 'text-[var(--muted)]'); ); btn.classList.add('active', 'bg-[var(--accent)]', 'text-[var(--bg)]'); btn.classList.remove('bg-[var(--bg-secondary)]', 'text-[var(--muted)]'); renderGames(btn.dataset.filter); ); );

switch(gameId) case 'math-blitz': initMathBlitz(); break; case 'word-scramble': initWordScramble(); break; case 'science-quiz': initScienceQuiz(); break; case 'memory-match': initMemoryMatch(); break; case 'times-tables': initTimesTables(); break; case 'spelling-bee': initSpellingBee(); break;