/* Wild's web page (adapted from big-2's template): the game is a phone in landscape. */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: #0b1d26; overflow: hidden; }
/* Desktop: a 19.5:9 play area (an iPhone held sideways), centred and letterboxed, whatever the window's shape. */
#unity-container {
  position: absolute; left: 50%; top: 50%; top: 50dvh; transform: translate(-50%, -50%);
  width: min(100vw, calc(100vh * 19.5 / 9)); height: min(100vh, calc(100vw * 9 / 19.5));
  width: min(100vw, calc(100dvh * 19.5 / 9)); height: min(100dvh, calc(100vw * 9 / 19.5));
  overflow: hidden; border-radius: 18px; box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
/* Phones and tablets: their own screen, between 4:3 and 21:9 like the native builds. */
@media (hover: none) and (pointer: coarse) {
  #unity-container {
    border-radius: 0; box-shadow: none;
    width: min(100vw, calc(100vh * 7 / 3)); height: min(100vh, calc(100vw * 3 / 4));
    width: min(100vw, calc(100dvh * 7 / 3)); height: min(100dvh, calc(100vw * 3 / 4));
  }
}
#unity-canvas { width: 100%; height: 100%; background: #10303d; display: block; }
#unity-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.4vh, 26px); background: radial-gradient(ellipse at center, #1f5a5c 0%, #10303d 70%); }
#unity-title { font: 800 clamp(28px, 7vh, 64px)/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff4d6; letter-spacing: .16em; text-shadow: 0 4px 14px rgba(0,0,0,.4); }
#unity-progress-bar-empty { width: min(60%, 360px); height: 14px; flex-shrink: 0; border-radius: 7px; background: #0a2029; box-shadow: inset 0 2px 4px rgba(0,0,0,.5); overflow: hidden; }
#unity-progress-bar-full { width: 0%; height: 100%; border-radius: 7px; background: linear-gradient(180deg, #ffe352, #f0921a); transition: width .15s ease-out; }
#unity-loading-text { font: 600 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif; color: #cfe9e4; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); background: white; padding: 10px; display: none; }
#unity-warning:not(:empty) { display: block; }
#unity-warning .error { color: #b00020; }
/* Landscape only on touch devices: a rotate prompt while held upright. */
#rotate-overlay { display: none; position: fixed; inset: 0; z-index: 10; background: #10303d; color: #fff4d6; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 0 32px; font: 600 20px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
#rotate-overlay .phone { width: 52px; height: 92px; border: 4px solid #fff4d6; border-radius: 10px; box-sizing: border-box; animation: wild-rotate 1.8s ease-in-out infinite; }
#rotate-overlay p { margin: 0; }
@keyframes wild-rotate { 0%, 25% { transform: rotate(0deg); } 65%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (hover: none) and (pointer: coarse) { #rotate-overlay { display: flex; } }
