* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #06070a;
  font-family: 'Courier New', Courier, monospace;
  color: #e2e8f0;
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

.utility-bar {
  position: fixed;
  top: 12px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 20;
}

.util-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 15, 24, 0.78);
  color: #f8fafc;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.1s ease, border-color 0.2s ease, background 0.2s ease;
}

.util-btn:hover {
  border-color: rgba(255, 180, 70, 0.65);
  background: rgba(24, 28, 42, 0.9);
}

.util-btn:active {
  transform: scale(0.92);
}

.util-btn.muted {
  color: #64748b;
  border-color: rgba(255, 80, 80, 0.35);
}

/* Mobile Touch Controls */
.touch-controls {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 20;
}

@media (pointer: coarse), (max-width: 768px) {
  .touch-controls {
    display: flex;
  }
}

.dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

.dpad-mid {
  display: flex;
  gap: 36px;
}

.t-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 19, 30, 0.72);
  color: #f1f5f9;
  font-size: 18px;
  font-weight: bold;
  backdrop-filter: blur(4px);
  touch-action: none;
}

.t-btn:active,
.t-btn.active {
  background: rgba(255, 140, 40, 0.38);
  border-color: rgba(255, 180, 70, 0.9);
}

.t-jump {
  pointer-events: auto;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  font-size: 14px;
  letter-spacing: 1px;
  border-color: rgba(255, 90, 90, 0.45);
  background: rgba(35, 15, 22, 0.76);
}
