* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: #0a0a0f;
  width: 100%;
  height: 100%;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  image-rendering: pixelated;
}

#game-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  touch-action: none;
  /* JS sets position/size dynamically */
}

.overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.loading-content {
  text-align: center;
  color: #c4a87a;
}
.loading-content h2 { font-size: 28px; margin-bottom: 20px; letter-spacing: 4px; }
.loading-bar {
  width: 300px; height: 16px;
  max-width: 80vw;
  background: #1a1a22;
  border: 2px solid #4a3a20;
  border-radius: 2px;
  overflow: hidden;
}
#loading-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #8b6a30, #d4a850);
  transition: width 0.2s;
}
#loading-text { margin-top: 10px; font-size: 14px; color: #8a7a5a; }

.load-error .loading-content h2 { color: #ff8060; }
.loading-error-hint { margin-top: 12px; font-size: 13px; color: #c4a87a; }
.loading-retry {
  margin-top: 18px;
  padding: 10px 24px;
  border: 1px solid #c4a87a;
  background: #241b12;
  color: #ffd080;
  font: bold 14px 'Courier New', monospace;
  cursor: pointer;
}
.loading-retry:active { background: #4a3020; }
