*,
*::before,
*::after {
  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: radial-gradient(circle at 50% 18%, #1e293b 0%, #070b14 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.game-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
}

.canvas-container {
  position: relative;
  aspect-ratio: 2 / 3;
  height: min(92vh, 680px);
  max-width: 95vw;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.68),
    0 0 0 3px rgba(255, 255, 255, 0.14);
  background: #4ec0ca;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.hud-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.hud-btn {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.72;
  transition:
    transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.15s ease,
    opacity 0.15s ease,
    border-color 0.15s ease;
}

.hud-btn.active {
  opacity: 1;
  border-color: #fde047;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.35);
}

.hud-btn[hidden] {
  display: none;
}

.hud-btn:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.78);
  transform: scale(1.08);
}

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