/* The loading screen of a game. scripts/build.mjs puts it at the top of every game page and shared/loading.js fills it:
   the game's picture and name, and a gold bar with the share of the game's files that have arrived, on the room's own
   glow. It covers the page until everything is in and the fonts are ready, then fades away. */
.gk-loading { position: fixed; inset: 0; z-index: var(--gk-z-loading); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
  background: radial-gradient(ellipse at 50% 28%, var(--gk-room-glow) 0, var(--gk-room) 52%, var(--gk-night) 100%); color: var(--gk-ink); font-family: var(--gk-font);
  transition: opacity var(--gk-slow) ease, visibility 0s linear var(--gk-slow); }
.gk-loading.done { opacity: 0; visibility: hidden; pointer-events: none; }
.gk-loading-art { width: min(280px, 64vw); height: auto; border-radius: var(--gk-r-lg); filter: drop-shadow(var(--gk-shadow-2)); animation: gk-loading-float 1.4s ease-in-out infinite alternate; }
.gk-loading-name { font-size: var(--gk-text-2xl); font-weight: var(--gk-bold); color: var(--gk-gold); text-align: center; }
/* The name in the player's language: Arabic first, English once shared/loading.js has read the choice. */
.gk-loading-name [lang="en"], .gk-loading.en .gk-loading-name [lang="ar"] { display: none; }
.gk-loading.en .gk-loading-name [lang="en"] { display: inline; }
.gk-loading-bar { position: relative; width: min(300px, 72vw); height: 14px; border-radius: var(--gk-r-pill); background: var(--gk-well); box-shadow: inset 0 0 0 1px var(--gk-line), var(--gk-shadow-1); overflow: hidden; }
.gk-loading-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--done, 0) * 1%); border-radius: inherit;
  background: linear-gradient(180deg, var(--gk-gold-pale), var(--gk-gold-warm)); box-shadow: 0 0 10px var(--gk-gold); transition: width .25s var(--gk-ease); }
.gk-loading-pct { font-size: var(--gk-text-md); font-weight: var(--gk-medium); color: var(--gk-muted); font-variant-numeric: tabular-nums; }
@keyframes gk-loading-float { to { translate: 0 -8px; } }
