Transform + transition glitches

Hello everyone!
Hope you are having a great day.
This is my project if I can call it so:
I had an idea and started to implement it. However, it did not work quite the way I was hoping. I tried to make rotation smoother by adding

transition: transform 1s ease-out;

to # whole-box element … it worked fine except for the left side. if you hover over the left side of the screen it starts to move uncontrollably if anyone, has any ideas why please let me know.

Thanks in advance.