/* Neon Dash — portrait (9:16) web shell.
 *
 * The game is authored for a phone screen: DashResponsiveLayout switches to its portrait
 * layout whenever Screen.width < Screen.height, using a 1080x1920 reference resolution and
 * gesture input instead of the on-screen buttons. So the canvas is locked to 9:16 on every
 * device, and desktop just gets the same phone-shaped panel centred on a dark page rather
 * than a different, wider view of the course (which would change how far ahead the player
 * can see, i.e. the difficulty).
 *
 * The canvas ATTRIBUTE size stays 1080x1920 (set from PlayerSettings) so the render
 * resolution is fixed; only the CSS box scales to fit the viewport. */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0b0710;
  overflow: hidden;
}

#unity-container {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop: a centred phone-shaped panel. Height drives the fit (the viewport is almost
 * always wider than 9:16), with a width cap so an unusually short-and-wide window still
 * gets a canvas that fits horizontally. */
#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#unity-canvas {
  background: #231F20;
  display: block;
  aspect-ratio: 9 / 16;
  height: min(100dvh, calc(100vw * 16 / 9));
  width: auto;
  max-width: 100vw;
  touch-action: none;   /* the game handles its own gestures; don't let the page pan/zoom */
}

/* Mobile: fill the screen. Same 9:16 shape, so this is just the panel at full size. */
#unity-container.unity-mobile {
  position: fixed;
  width: 100%;
  height: 100%;
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;   /* let it fill the device screen exactly */
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#unity-logo {
  width: 154px;
  height: 130px;
  background: url('unity-logo-dark.png') no-repeat center;
}

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin-top: 10px;
  margin-left: 6.5px;
  background: url('progress-bar-empty-dark.png') no-repeat center;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  margin-top: 10px;
  background: url('progress-bar-full-dark.png') no-repeat center;
}

/* The Unity logo/title footer is dropped for a portal-facing game; the fullscreen button
 * is kept and floated over the bottom-right of the canvas. */
#unity-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 8px;
}

#unity-fullscreen-button {
  cursor: pointer;
  width: 38px;
  height: 38px;
  background: url('fullscreen-button.png') no-repeat center;
  opacity: .55;
}

#unity-fullscreen-button:hover { opacity: 1; }

/* Kept in the DOM only so a DEVELOPMENT_PLAYER build can hang its profiler/unload buttons
 * off it; carries no visible chrome in a release build. */
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; color: #cfc6dd }

.unity-mobile #unity-footer { display: none; }

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}
