/* Spinner.io web template styles. Portrait game; the loader mirrors the game's white loading screen. */

* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #14346b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* The game is a 9:16 box; on a wide window the sides show this arena-themed pattern instead of a flat fill
   (concentric rings over a blue gradient, in the game's palette). */
html,
body,
#unity-container {
  background-color: #14346b;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.10) 0 3px, transparent 4px),
    repeating-radial-gradient(circle at 50% 50%, rgba(41, 163, 227, 0.22) 0 20px, rgba(20, 52, 107, 0) 20px 70px),
    linear-gradient(135deg, #1f6fc4, #0e2a5a);
  background-size: 56px 56px, auto, auto;
}

#unity-container {
  position: absolute;
  inset: 0;
}

/* Size and position come from index.html: a fixed render resolution scaled into the window with its
   aspect kept (a 9:16 box on desktop, the startup screen shape on phones). */
#unity-canvas {
  position: absolute;
  display: block;
  background: #ffffff;
  touch-action: none;
}

#startup-loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #ffffff;
  overflow: hidden;
  touch-action: none;
  outline: none;
}

#startup-logo {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  width: min(82vw, 46vh, 520px);
  height: auto;
}

/* The game's loading-screen spinner, spinning on its axis. */
#startup-spinner {
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(22vw, 12vh, 120px);
  height: auto;
  transform: translate(-50%, -50%);
  animation: startup-spin 1.1s ease-in-out infinite;
}

@keyframes startup-spin {
  0% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  50% { transform: translate(-50%, -54%) rotate(8deg) scale(1.04); }
  100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
}

#unity-loading-bar {
  position: absolute;
  bottom: max(9%, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 64px), 420px);
}

#startup-progress-value {
  margin-bottom: 8px;
  color: #1f6fc4;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: #d9e8f7;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #29a3e3, #1f6fc4);
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, 0);
  display: none;
  z-index: 10;
  color: #231f20;
  font-size: 14px;
}
