JSFiddle - React, Tailwind, and code Playground

by dledle2

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Owl Alpha added mobile from donkey kong Ember Fox SuccessπŸ„ Super Mario β€” Phase 1</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: #0a0a12;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
}
#c {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
#info {
  color: #3a3a4a;
  font: 10px/2.2 monospace;
  text-align: center;
  letter-spacing: 0.08em;
  margin-top: 5px;
}

/* Mobile Controls from Donkey Kong */
#ctrl {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; max-width: 500px;
  padding: 5px 10px; margin-top: 6px; gap: 8px;
}
.cg { display: flex; gap: 7px; }
.cg button {
  width: 74px; height: 62px; font-size: 21px;
  background: rgba(255,255,255,.07);
  border: 2px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.65); border-radius: 12px;
  cursor: pointer; touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .08s, border-color .08s;
}
.cg button.pressed {
  background: rgba(80,120,255,.22);
  border-color: rgba(120,160,255,.45);
  color: #fff;
}
#tip { 
  color: #3a3a4a; 
  font-size: 9px; 
  letter-spacing: 2px; 
  margin-top: 4px; 
  text-transform: uppercase; 
  text-align: center;
  width: 100%;
  max-width: 500px;
}
</style>
</head>
<body>
<canvas id="c"></canvas>

<!-- Mobile Controls from Donkey Kong -->
<div id="ctrl">
  <div class="cg">
    <button id="b-left" data-key="ArrowLeft">β—€</button>
    <button id="b-right" data-key="ArrowRight">β–Ά</button>
  </div>
  <div class="cg">
    <button id="b-up" data-key="ArrowUp">β–²</button>
    <button id="b-jump" data-key="Space">JUMP</button>
 ...