/* Konbini Quest v2 - Pokemon-style RPG */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Press Start 2P', monospace;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#game-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* Mobile D-Pad + Action Buttons */
#mobile-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  pointer-events: none;
  z-index: 100;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 16px 20px;
}

/* D-Pad grid */
#dpad {
  display: grid;
  grid-template-columns: 44px 44px 44px;
  grid-template-rows: 44px 44px 44px;
  gap: 2px;
  pointer-events: auto;
}

.dpad-btn {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active {
  background: rgba(255,255,255,0.35);
}

#dpad-center {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  pointer-events: none;
}

#dpad-up    { grid-column: 2; grid-row: 1; }
#dpad-left  { grid-column: 1; grid-row: 2; }
#dpad-center{ grid-column: 2; grid-row: 2; }
#dpad-right { grid-column: 3; grid-row: 2; }
#dpad-down  { grid-column: 2; grid-row: 3; }

/* Action buttons */
#action-buttons {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  pointer-events: auto;
}

.action-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#btn-a {
  background: rgba(220,60,60,0.45);
  color: rgba(255,255,255,0.9);
  width: 58px;
  height: 58px;
  font-size: 14px;
}

#btn-b {
  background: rgba(60,60,220,0.35);
  color: rgba(255,255,255,0.7);
}

.action-btn:active {
  transform: scale(0.92);
  filter: brightness(1.3);
}

/* Attribution */
#attribution {
  position: fixed;
  bottom: 2px;
  right: 8px;
  z-index: 200;
}

#attribution a {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
}

#attribution a:hover {
  color: rgba(255,255,255,0.5);
}
