🎯 Choose Your Learning Mode

Choose Your Experience Level

🟢
Beginner
Just the basics - perfect to start!
🟡
Intermediate
More controls and options
🔴
Expert
Full power - all features!

🚀 Quick Start

⚙️ Basic Options

🎯 Your selected name(s) will appear here

📝 Try Sample Lists

👨‍🎓 Student Names
Common classroom names for demonstration
🏆 Sports Teams
Popular team names for competitions
🌈 Color Names
Rainbow colors for creative activities
🌍 World Countries
Popular country names for geography
🐾 Animal Names
Cute animal names for fun activities
🍎 Fruit Names
Fresh fruit names for healthy choices
`; toast.style.background = 'linear-gradient(135deg, #4CAF50, #45a049)'; toast.style.maxWidth = '300px'; toast.style.bottom = '80px'; document.body.appendChild(toast); setTimeout(() => toast.remove(), 4000); }, updateDifficultyUI() { const sections = { 'beginner': ['quickStart', 'basicControls'], 'intermediate': ['quickStart', 'basicControls', 'advancedControls'], 'expert': ['quickStart', 'basicControls', 'advancedControls', 'expertControls'] }; // Hide all sections first document.querySelectorAll('.control-section').forEach(section => { section.classList.add('hidden'); }); // Show sections for current difficulty sections[this.currentDifficulty].forEach(sectionId => { const section = document.getElementById(sectionId); if (section) section.classList.remove('hidden'); }); // Update difficulty selector UI document.querySelectorAll('.difficulty-btn').forEach(option => { option.classList.remove('active'); }); document.querySelector(`[data-level="${this.currentDifficulty}"]`)?.classList.add('active'); } }; // AI 모달 상태 관리 const aiModalState = { currentView: 'selector', apiKey: localStorage.getItem('geminiApiKey') || '' }; // Random Name Picker State const NamePickerState = { originalNames: [], currentNames: [], history: [], isAnimating: false, animationInterval: null }; // ========== MAIN TOOL FUNCTIONS ========== // Main picking function function pickRandomName() { const nameInput = document.getElementById('nameInput').value.trim(); if (!nameInput) { showError('nameInputError', 'Please enter at least one name'); return; } try { clearErrors(); // Parse names const names = nameInput.split('\n') .map(name => name.trim()) .filter(name => name.length > 0); if (names.length === 0) { showError('nameInputError', 'Please enter valid names'); return; } // Apply exclusions if in advanced mode const exclusionList = getExclusionList(); const availableNames = names.filter(name => !exclusionList.includes(name.toLowerCase())); if (availableNames.length === 0) { showError('nameInputError', 'No names available after applying exclusions'); return; } // Get number of names to pick const pickCount = parseInt(document.getElementById('pickCount').value) || 1; const actualPickCount = Math.min(pickCount, availableNames.length); // Perform the selection with animation performSelection(availableNames, actualPickCount); // Track usage trackEvent('name_picked', { count: actualPickCount, total_names: names.length }); OnboardingManager.unlockAchievement('first_pick', '🎯 First Pick', 'Made your first random selection!'); // Show OTA after successful use setTimeout(showOTA, 2000); } catch (error) { // Fallback: use current actual count from server const fallbackCount = 333; document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${fallbackCount}+ free online tools in 211 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); console.log('Tool count API not available, using current count:', fallbackCount); } } // Update current year dynamically function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // ========== ANALYTICS ========== // Google Analytics window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); // Track page view trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });