// Welcome overlay for first-time users class WelcomeOverlay { constructor() { this.isVisible = false; this.hasBeenShown = localStorage.getItem('cloze-reader-welcomed') === 'true'; } show() { // Always show overlay regardless of previous views this.isVisible = true; const overlay = this.createOverlay(); document.body.appendChild(overlay); // Animate in requestAnimationFrame(() => { overlay.style.opacity = '1'; }); } createOverlay() { const overlay = document.createElement('div'); overlay.className = 'welcome-overlay'; overlay.style.opacity = '0'; const modal = document.createElement('div'); modal.className = 'welcome-modal'; modal.style.cssText = ` max-width: 500px; margin: 20px; text-align: center; `; modal.innerHTML = `
How to play: Fill in the blanks to advance through levels with increasing difficulty and vocabulary complexity.
Data source: Excerpted historical and literary texts from Project Gutenberg's public domain collection, processed via Hugging Face Datasets.
AI assistance: Powered by Google's Gemma-3-27b model via OpenRouter for word selection, hints, and contextualization.