Features:
- Automatic backups every 30 minutes
- Manual backup creation
- Backup export/import to files
- Selective restore options
- Emergency backups before risky operations
- Backup management UI in settings
- Storage usage tracking
Components:
- BackupManager class with full functionality
- Backup UI in index.html settings
- CSS styling for backup dialogs
- Emergency backup hooks in game.js reset functions
- Auto-cleanup of old backups (keeps 5 most recent)
Data Coverage:
- All localStorage keys
- Linked directories
- Player stats and achievements
- Custom tasks and content
- Photo gallery
- Theme settings
- Game state
This prevents future data loss incidents like the one that occurred
during game mode cleanup. Users can now restore from automatic
backups or create manual ones before major operations.