ing
                        setTimeout(resolve, 100);
                    });
                }
                */

                // === ADD YOUR CUSTOM FRAME LOGIC HERE ===
                // Examples:
                // - Update particle systems
                // - Sync with external data
                // - Apply frame-specific calculations
            }
        });

        // === OPTIONAL: DEBUG EXPORTS ===
        // Expose variables for debugging (remove in production)
        window.DEBUG = {
  