/* Layout of the Unity game pages (tools/pages.mjs): a bar on top, the game
   canvas as large as the window allows at 16:9, and the controls below. */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }
.game-bar { padding: 10px 16px 6px; }
.game-bar .top { justify-content: flex-start; margin-bottom: 2px; }
.game-bar .repo { font-size: 14px; color: var(--muted); }
.game-bar .repo:hover { color: var(--link); }
.game-bar .lang { margin-left: auto; }
.game-bar h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 16px; }
#unity-canvas { display: block; background: #000; border-radius: 8px; box-shadow: var(--shadow); }
#unity-canvas:focus { outline: none; }
.loading {
  position: absolute; left: 50%; top: 50%; width: min(60%, 320px); height: 8px; transform: translate(-50%, -50%);
  border-radius: 999px; background: var(--chip); overflow: hidden;
}
.loading-bar { width: 0; height: 100%; background: var(--accent); transition: width .2s ease; }
.warning {
  position: absolute; left: 16px; right: 16px; top: 12px; padding: 10px 14px; border-radius: 9px;
  background: var(--warn-bg); color: var(--warn-text);
}
.warning.error { background: #7f1d1d; color: #fff; }
.game-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 6px 16px 14px; color: var(--muted); font-size: 15px; }
.game-info p { margin: 0; }
.game-info strong { color: var(--text); }
.game-info .description { flex-basis: 100%; }
.fullscreen {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 4px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.fullscreen:hover { border-color: var(--accent); }
.fullscreen:focus-visible, .game-bar a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Phone in landscape: give the game every pixel the bars can spare. */
@media (max-height: 520px) {
  .game-bar { display: flex; align-items: baseline; gap: 16px; padding: 4px 12px; }
  .game-bar .top { order: 2; flex: 1; margin: 0; }
  .game-bar h1 { font-size: 16px; }
  .stage { padding: 2px 12px; }
  .game-info { padding: 2px 12px 6px; font-size: 13px; }
  .game-info .description { display: none; }
}
