- Added `handleOutsideClick` to detect clicks outside the context menu and close it automatically.
- Implemented `closeContextMenu` function to hide the context menu when necessary.
- Enhanced `isMouseOverMenuItem` logic to track mouse movements and ensure the context menu remains open when interacting with menu items.
- Improved user experience by hiding context menu items by index and restoring them after user interaction.