meRunning = false;
        }
      }
      function startGame() {
        hideScreen();
        initLevel(levels[level - 1]); // Initialize level 1
        gameInterval = setInterval(gameLoop, 1000 / 60); // 60 FPS
        gameRunning = true;
      }

      // Event listeners for dog movement (mouse/touch)
      gameContainer.addEventListener("mousemove", (e) => {
        if (!gameRunning) return;
        const rect = gameContainer.getBoundingClientRect();
        dogX = e.clientX - rect.left - dog.offsetWi