JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html lang="ru">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Куб Уклонист</title>
    <style>
      body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        background-color: #111;
        font-family: Arial, sans-serif;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh;
        color: white;
      }

      #gameCanvas {
        border: 2px solid #3498db;
        box-shadow: 0 0 20px #3498db;
        cursor: none;
      }

      #ui {
        position: fixed;
        top: 20px;
        left: 20px;
        font-size: 18px;
        text-shadow: 0 0 5px #3498db;
      }

      #level-info {
        position: fixed;
        top: 20px;
        right: 20px;
        font-size: 18px;
        text-shadow: 0 0 5px #3498db;
      }

      #timer {
        position: fixed;
        top: 50px;
        right: 20px;
        font-size: 18px;
        text-shadow: 0 0 5px #3498db;
      }

      #start-screen,
      #level-complete,
      #game-over,
      #game-complete {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.8);
        z-index: 10;
      }

      h1 {
        color: #3498db;
        font-size: 48px;
        margin-bottom: 20px;
        text-shadow: 0 0 10px #3498db;
      }

      h2 {
        color: #3498db;
        font-size: 32px;
        margin-bottom: 20px;
        text-shadow: 0 0 8px #3498db;
      }

      button {
        background-color: #3498db;
        color: white;
        border: none;
        padding: 12px 24px;
        font-size: 18px;
        border-radius: 30px;
        cursor: pointer;
        margin-top: 20px;
        transition: all...