body { margin: 0; overflow: hidden; background-color: black; } #gameCanvas { display: block; background-image: url("pics/bg.png"); background-size: cover; background-position: center; cursor: url("pics/gun_cursor.png"), auto; } #score, #chances, #timer, #gameOver { position: absolute; font-weight: bold; text-shadow: 2px 2px 4px #000; } #score { top: 10px; left: 50%; transform: translateX(-50%); color: yellow; } #chances { top: 10px; left: 10px; color: red; } #timer { top: 10px; right: 10px; color: white; } #gameOver { display: none; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; text-shadow: 4px 4px 8px #000; } /* Responsive font sizes */ @media (max-width: 600px) { #score, #chances, #timer { font-size: 4vw; } #gameOver { font-size: 8vw; } } @media (min-width: 601px) { #score, #chances, #timer { font-size: 2vw; } #gameOver { font-size: 5vw; } }