Sure, I can create a simple horror game using JavaScript in a single HTML file. Here's an example:
This game sets up a canvas element where the player can move a square (representing the player) using their mouse on a smartphone screen. The objective is to avoid getting caught by a randomly moving ghost (represented by another square). If the player collides with the ghost, a "Game Over" message is shown, and the game restarts.
Please note that this is just a basic example, and you can customize and expand it further to create a more complex and engaging horror game.