*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f5f5f5;
}

canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  aspect-ratio: 2 / 1;
  border: 3px solid #333;
  background-color: #fff;
  display: block;
}

.game-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 2 / 1;
  touch-action: none;
}

.controls {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.control-group {
  display: flex;
  gap: 15px;
}

.btn-control {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(51, 51, 51, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(2px);
  transition: background 0.1s, transform 0.1s;
}

.btn-control:hover {
  background: rgba(51, 51, 51, 0.12);
}

.btn-control:active,
.btn-control.pressed {
  background: rgba(51, 51, 51, 0.4);
  transform: scale(0.95);
}

.btn-control svg {
  width: 32px;
  height: 32px;
  fill: #333;
}