Create a classic snake game where the player controls a snake that moves around the screen. The snake must eat apples to grow longer and increase the player's score. However, if the snake collides with the walls of a square border or with its own body, the game is over. The game should feature a simple and intuitive interface with arrow keys to control the snake's movement. The score should be displayed on the screen throughout the game and should update each time the snake eats an apple. Once the game is over, the final score should be displayed along with the option to restart the game.