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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  display: block;
  border: 0;
  background: #000;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#download-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(40, 40, 50, 0.85);
  border: 1px solid rgba(23, 235, 217, 0.4);
  color: rgba(23, 235, 217, 0.7);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

#download-btn:hover {
  background: rgba(40, 40, 50, 0.95);
  border-color: rgba(23, 235, 217, 0.8);
  color: rgba(23, 235, 217, 1);
}
