html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #14100b;
  font-family: 'Courier New', Courier, monospace;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: default;
}

/* Subtle vignette to give the canvas an old-console feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
  z-index: 2;
}

.info-box {
  position: fixed;
  z-index: 3;
  color: #eae2c8;
  background: rgba(20, 16, 11, 0.55);
  border: 2px solid #5a4a2f;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
  user-select: none;
}

#hud {
  top: 12px;
  left: 12px;
  opacity: 0.5;
}

#sitename {
  bottom: 12px;
  right: 12px;
  opacity: 1;
  font-weight: bold;
}

#instructions {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: #eae2c8;
  background: rgba(20, 16, 11, 0.6);
  border: 2px solid #5a4a2f;
  border-radius: 6px;
  padding: 10px 18px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
  user-select: none;
  transition: opacity 1s ease;
  pointer-events: none;
}

#instructions p {
  margin: 2px 0;
}

#instructions .small {
  font-size: 11px;
  opacity: 0.75;
}

#instructions.hidden {
  opacity: 0;
}

/* Virtual joystick — only shown on touch/mobile devices, via JS toggling
   the "active-device" class on #joystick */
#joystick {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 4;
  touch-action: none;
}

#joystick.active-device {
  display: block;
}

#joystick-base {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(20, 16, 11, 0.45);
  border: 2px solid rgba(234, 226, 200, 0.35);
  position: relative;
  box-sizing: border-box;
}

#joystick-nub {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(234, 226, 200, 0.8);
  border: 2px solid rgba(20, 16, 11, 0.5);
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -24px 0 0 -24px;
  transition: transform 0.08s linear;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}
