window.App = window.App || {}; // Centralized runtime state for pagination, player, and UI behavior. App.state = { currentPage: 1, perPage: 12, renderedVideoIds: new Set(), hasNextPage: true, isLoading: false, hlsPlayer: null, currentLoadController: null, errorToastTimer: null, playerMode: 'modal', playerHome: null, onFullscreenChange: null, onWebkitEndFullscreen: null }; // Local storage keys used across modules. App.constants = { FAVORITES_KEY: 'favorites', FAVORITES_VISIBILITY_KEY: 'favoritesVisible' };