Here’s the updated code with the UI resembling a calculator grid:


Simple Calculator


**Changes Made:**

* The `calculator` class now uses CSS Grid (`display: grid`) to arrange the elements in a grid layout.
* `grid-template-columns: repeat(4, 1fr)` defines four columns of equal width.
* `grid-gap: 5px` adds spacing between the buttons.
* The `display` element now spans all four columns using `grid-column: span 4`.
* Buttons have a base class of `button` and additional class `operator` for styling the operators with a different background color.

This code positions the display and buttons in a grid layout, resembling a typical calculator interface.