/* U2 WebGL template — canvas locked to 16:9, letterbox для нестандартных aspect ratio. */

body { padding: 0; margin: 0; background: #000; overflow: hidden; }

#unity-container {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  width: 100vw; height: 100vh;
}
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }

/* Canvas с aspect-ratio 16:9 + max-* для letterbox/pillarbox. */
#unity-canvas {
  background: #231F20;
  display: block;
  aspect-ratio: 16 / 9;
  max-width: 100vw;
  max-height: 100vh;
}
@media (min-aspect-ratio: 16/9) { #unity-canvas { height: 100vh; width: auto; } }
@media (max-aspect-ratio: 16/9) { #unity-canvas { width: 100vw; height: auto; } }
.unity-mobile #unity-canvas { width: 100%; height: 100%; aspect-ratio: auto; max-width: none; max-height: none; }

#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; z-index: 10 }
#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 }

#unity-warning { position: fixed; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none; z-index: 20 }

/* Top nav-полоса: переключение между клиентами. Auto-hide при mouse в центре canvas. */
#u2-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 32px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #d4a85a;
  font-family: monospace; font-size: 13px;
  z-index: 30;
  pointer-events: auto;
}
#u2-nav .u2-nav-title { opacity: 0.6; }
#u2-nav .u2-nav-link {
  color: #d4a85a; text-decoration: none;
  padding: 4px 12px; border: 1px solid #d4a85a; border-radius: 2px;
  transition: background 0.15s;
}
#u2-nav .u2-nav-link:hover { background: rgba(212, 168, 90, 0.15); }
.unity-mobile + #u2-nav, .unity-mobile #u2-nav { display: none; }
