* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a1a;
  color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#unity-page {
  width: min(95vw, 1280px);
  display: flex;
  flex-direction: column;
}

#unity-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

#unity-loading-bar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
}

#unity-progress-bar-empty {
  width: 60%;
  height: 10px;
  background: #2a2a2a;
  border-radius: 5px;
  overflow: hidden;
}

#unity-progress-bar-full {
  height: 100%;
  width: 0%;
  background: #c5253f;
  transition: width 0.2s ease-out;
}

#unity-footer {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #222;
  border-top: 1px solid #333;
  font-size: 13px;
}

#unity-build-title {
  font-weight: 500;
  color: #ddd;
}

#unity-fullscreen-button {
  background: transparent;
  border: 1px solid #555;
  border-radius: 4px;
  color: #ddd;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}

#unity-fullscreen-button:hover {
  background: #333;
}

/* When in fullscreen, the browser scales the canvas to the screen.
   Ensure the container stays full-bleed too. */
#unity-container:fullscreen,
#unity-canvas:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}
