@font-face {
  font-family: "04b03";
  src: url("./04b03.ttf");
}

* {
  box-sizing: border-box;
}

:root {
  --doc-height: 100vh;
  --button-size: 40px;
  --button-font-size: 12px;
  --start-select-width: 50px;
  --start-select-height: 20px;
  --start-select-font-size: 8px;
  --gamepad-opacity: 0.25;
}

html,
body {
  touch-action: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* align-items: center; */
  font-family: "04b03", monospace;
  align-items: flex-start;
  height: var(--doc-height);
  max-height: -webkit-fill-available;
  width: 100vw;
  margin: 0;
  background: #202124;
}
@media (orientation: portrait) and (hover: none) {
  html,
  body {
    justify-content: flex-start;
  }
}

button {
  font-family: "04b03", monospace;
}

#player {
  position: relative;
  display: flex;
  flex: 1;
  width: 100vw;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: #202124;
  user-select: none;
}

canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  margin: auto;
  background-color: #202124;
  image-rendering: pixelated;
  outline: none;
}

p {
  color: #fff;
  font-size: 100px;
}

/* Touch Gamepad Overlay Styles */
#touch-gamepad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  font-family: Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.gamepad-button {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: all;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
  font-size: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.1s ease;
}

.gamepad-button:active,
.gamepad-button.pressed {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(0.95);
}

.action-q {
  right: 100px;
  bottom: 120px;
  width: 60px;
  height: 60px;
}

.action-e {
  right: 20px;
  bottom: 120px;
  width: 60px;
  height: 60px;
}

/* Hide overlay toggle */
#gamepad-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}
