html, body, ul, li {
  margin: 0;
  padding: 0;
  border: 0;
  height: 100%;
  overflow-x: hidden; /* allow vertical scroll */
}

body {
  background-color: black;
  color: white;
  font-family: sans-serif;
  text-align: center;
}

/* 🎮 Game Canvas */
canvas {
  display: block;
  width: 762px; /* NES x3 (256 * 3) */
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background-color: blue;
}

/* 🧠 Info Panel */
.info {
  position: absolute;
  top: 0;
  left: 0;
  color: white;
  font-size: 14px;
  padding: 5px;
}
#onscreen-buttons {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;                /* Prevents wrapping to new lines */
  gap: 8px;                         /* Reduced spacing between buttons */
  max-width: 95vw;                  /* Responsive width */
  overflow-x: auto;                 /* Allow horizontal scroll if needed */
  padding: 0 10px;
}

#onscreen-buttons button {
  padding: 6px 12px;                /* Smaller padding */
  font-size: 14px;                  /* Smaller font for tighter layout */
  background: #444;
  color: white;
  border: 2px solid #999;
  border-radius: 8px;
  min-width: 60px;                 /* Smaller minimum width */
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  font-weight: bold;
  white-space: nowrap;             /* Prevent button text from wrapping */
  flex: 1 0 auto;
}
