Modular architecture refactor
Refactored the implementation from a single script into focused modules for physics, rendering, object management, UI, and interaction handling. The main goal was to reduce coupling and make feature edits safer as the project complexity grows.
Each module now owns a clear responsibility and exposes a small API surface, which keeps cross-module assumptions low. Physics does not directly mutate UI state, UI does not own physics internals, and object lifecycle logic sits in one place instead of being spread across event handlers.
I updated bootstrap initialization so module wiring is explicit in one entry path. This made the code easier to read and made future feature staging much cleaner, because new behavior can be placed in the right module instead of patching random sections.