*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;

  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;

  overscroll-behavior: none;
  touch-action: none;
}

#game-container {
  width: 100%;
  height: 100%;

  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

#game-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ─── Loading overlay ─── */
#loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  z-index: 1000;
  transition: opacity 0.4s ease-out;
}

#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-bar-track {
  width: 200px;
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: #4488ff;
  border-radius: 3px;
  transition: width 0.15s ease-out;
}

.loading-text {
  margin-top: 12px;
  font-size: 13px;
  color: #aaa;
  font-family: Arial, sans-serif;
}
