body {
  margin: 0;
  background: #000814; /* тёмно-морской */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
}

canvas {
  border: 2px solid #003566;
  background: radial-gradient(circle at top, #001d3d 0%, #000814 60%);
  box-shadow: 0 0 20px rgba(0, 150, 255, 0.4);
}

html, body {
  margin: 0;
  padding: 0;
  /* Запрещаем выделение текста везде */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  /* Запрещаем iOS-callout по долгому тапу */
  -webkit-touch-callout: none;
}

canvas, #ui, #game {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button, .btn, .hud-text {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}




/* === ГЛОБАЛЬНАЯ БЛОКИРОВКА ПРОКРУТКИ / ВЫДЕЛЕНИЯ === */
html, body {
  user-select: none;            /* стандарт */
  -webkit-user-select: none;    /* Safari / iOS / Android */
  -moz-user-select: none;       /* старый Firefox */
  -ms-user-select: none;        /* старый IE/Edge */

  -webkit-touch-callout: none;  /* отключает меню copy/paste на iOS */
  touch-action: none;           /* блокирует жесты (scroll, zoom) */

  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
  overscroll-behavior: none;
}

/* === Мобильные: адаптивный канвас без жёстких размеров === */
@media (max-width: 768px) {
  #game {
    image-rendering: pixelated;
    width: calc(100% - 4px);        /* растягивается по ширине экрана */
    height: auto;       /* автоматическая высота, пропорции сохраняются */
    max-width: 480px;   /* не расширяется больше оригинала */
    max-height: 100vh;  /* не вылезает за вертикаль */

    border: 2px solid #003566;
    box-shadow: 0 0 20px rgba(0,150,255,0.4);
  }
}

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