Posts

Showing posts from November, 2026
import React, { useState, useEffect } from 'react'; import { Award, BookOpen, CheckCircle, ChevronRight, Play, Trophy, User, LogOut, Flame, Heart, Volume2, VolumeX, BarChart2, Edit3, Users, Star, Lock, ArrowLeft, Video, Sparkles, Tag, Shield, Plus, Save } from 'lucide-react'; // --- SOUND UTILITY (Web Audio API) --- const playSound = (type) => { try { const AudioContext = window.AudioContext || window.webkitAudioContext; if (!AudioContext) return; const ctx = new AudioContext(); const osc = ctx.createOscillator(); const gain = ctx.createGain(); osc.connect(gain); gain.connect(ctx.destination); if (type === 'correct') { osc.type = 'sine'; osc.frequency.setValueAtTime(523.25, ctx.currentTime); // C5 osc.frequency.exponentialRampToValueAtTime(659.25, ctx.currentTime + 0.1); // E5 gain.gain.setValueAtTime(0.2, ctx.currentTime); gain.gain.exponentialRampToValueAtTime(0.01, ctx.cur...