- Created storage.js wrapper with IndexedDB support
- Automatic fallback to localStorage if IndexedDB unavailable
- Updated all username storage calls to use async API
- Better performance and more storage capacity
- Improved PWA compatibility
Benefits:
- 50MB+ storage vs 5-10MB localStorage
- Async API doesn't block main thread
- Better for future features (game history, stats, etc.)
- Add polling mechanism to wait for window.game initialization
- Disable multiplayer button until game is fully initialized
- Enable button in DOMContentLoaded after game creation
- Prevents 'Game instance not found' error on production
This fixes the critical issue where clicking Multiplayer too quickly
would fail because window.game wasn't ready yet.