@font-face {
  font-family: 'Pooltool Inter';
  src: url('/fonts/Inter-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.game-preloader {
  --preloader-cream: var(--club-cream, #f1ede1);
  --preloader-muted: var(--club-muted, #a5aea6);
  --preloader-gold: var(--club-gold, #c7aa72);
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  min-width: 0;
  color: var(--preloader-cream);
  background: #08110e;
  font-family: 'Pooltool Inter', sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  font-optical-sizing: none;
  line-height: 1.5;
  -webkit-user-select: none;
  user-select: none;
}

.game-preloader *, .game-preloader *::before, .game-preloader *::after { box-sizing: border-box; }
.game-preloader p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; overflow-wrap: anywhere; }
.game-preloader__atmosphere { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.game-preloader__background {
  position: absolute;
  inset: -8px;
  background: url('/ui/figma-preloader/background.jpg') center / cover no-repeat;
  filter: blur(2.5px);
}
.game-preloader__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,17,14,.79), rgba(11,20,17,.35) 45%, rgba(8,17,14,.92)); }
.game-preloader__readability { position: absolute; inset: 0; background: rgba(8,17,14,.23); }

.game-preloader__brand {
  position: absolute;
  top: 18.6666667%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16.9527px;
  width: min(458px, calc(100% - 64px));
  transform: translateX(-50%);
}
.game-preloader__logo { position: relative; flex: 0 0 auto; }
.game-preloader__logo img { position: absolute; display: block; max-width: none; pointer-events: none; }
.game-preloader__logo--desktop { left: .306px; width: 440.612px; height: 127.0473px; }
.game-preloader__logo--desktop .game-preloader__wordmark { top: 0; left: 6.6207px; }
.game-preloader__logo--desktop .game-preloader__cue { top: 78.4434px; left: 0; }
.game-preloader__logo--portrait, .game-preloader__logo--landscape { display: none; }
.game-preloader .game-preloader__slogan { width: 100%; min-height: 28px; text-align: center; color: var(--preloader-muted); }

.game-preloader__lower {
  position: absolute;
  top: calc(100% - 201px);
  left: 50%;
  width: min(640px, calc(100% - 64px));
  transform: translateX(-50%);
}
.game-preloader__tip {
  position: absolute;
  bottom: calc(100% + 41px);
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: center;
}
.game-preloader .game-preloader__tip-title { width: 100%; color: var(--preloader-gold); font-size: 9px; font-weight: 500; letter-spacing: 2.4px; }
.game-preloader .game-preloader__tip-text { width: 100%; color: var(--preloader-muted); }
.game-preloader__loading { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(440px, 100%); margin: 0 auto; }
.game-preloader__status { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: start; gap: 8px; width: 100%; min-height: 22px; }
.game-preloader__stage { min-width: 0; }
.game-preloader .game-preloader__percentage { color: var(--preloader-gold); font-size: 12px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.game-preloader__track { position: relative; flex: 0 0 auto; width: 100%; height: 4px; overflow: hidden; border-radius: 2px; background: #354039; }
.game-preloader__fill { height: 4px; border-radius: 2px; background: var(--preloader-gold); transition: width 160ms linear; }
.game-preloader__track--indeterminate .game-preloader__fill { width: 24%; animation: game-preloader-indeterminate 1.6s ease-in-out infinite; }
.game-preloader .game-preloader__hint { width: 100%; color: var(--preloader-muted); font-size: 11px; text-align: center; }
.game-preloader__footer { position: absolute; right: 0; bottom: 16px; left: 0; display: flex; justify-content: center; height: 48px; padding: 0 24px; color: var(--preloader-muted); font-size: 9px; text-align: center; letter-spacing: 1.5px; }
.game-preloader__footer p { width: 100%; }

@keyframes game-preloader-indeterminate {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(425%); }
}

@media (max-width: 600px) and (orientation: portrait) {
  .game-preloader__readability { background: rgba(8,17,14,.32); }
  .game-preloader__brand { top: 13.2701422%; gap: 12px; width: calc(100% - 64px); }
  .game-preloader__logo--desktop { display: none; }
  .game-preloader__logo--portrait { display: block; width: 220.361px; height: 61.5797px; }
  .game-preloader__logo--portrait .game-preloader__wordmark { top: 0; left: 2.99px; }
  .game-preloader__logo--portrait .game-preloader__cue { top: 38.0214px; left: 0; }
  .game-preloader .game-preloader__slogan { min-height: 0; }
  .game-preloader__lower { top: calc(100% - 152px); width: calc(100% - 64px); }
  .game-preloader__tip { bottom: calc(100% + 24.5px); }
  .game-preloader .game-preloader__tip-text { font-size: 12px; white-space: pre-line; }
  .game-preloader__loading { width: 100%; }
  .game-preloader .game-preloader__stage { font-size: 12px; }
  .game-preloader .game-preloader__hint { display: none; }
  .game-preloader__footer { bottom: 12px; height: 40px; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .game-preloader__background {
    inset: auto;
    top: -102.8205128%;
    left: -.7109005%;
    width: 100.7109005%;
    height: 220.5128205%;
    overflow: hidden;
    background: none;
  }
  .game-preloader__background::before { position: absolute; top: 0; left: -25.05%; width: 150.81%; height: 100%; background: url('/ui/figma-preloader/background.jpg') center / 100% 100% no-repeat; content: ''; }
  .game-preloader__shade { background: linear-gradient(90deg, rgba(8,17,14,.79), rgba(11,20,17,.35) 45%, rgba(8,17,14,.92)); }
  .game-preloader__readability { background: rgba(8,17,14,.32); }
  .game-preloader__brand { top: 10.5128205%; right: 7.1090047%; left: 7.1090047%; display: block; width: auto; transform: none; }
  .game-preloader__logo--desktop { display: none; }
  .game-preloader__logo--landscape { display: block; width: 148.792px; height: 41.5969px; }
  .game-preloader__logo--landscape .game-preloader__wordmark { top: 0; left: 1.81px; }
  .game-preloader__logo--landscape .game-preloader__cue { top: 25.69px; left: 0; }
  .game-preloader .game-preloader__slogan { position: absolute; top: 0; right: 0; width: 149px; min-height: 0; text-align: right; white-space: pre-line; }
  .game-preloader__lower { top: calc(100% - 92px); width: 85.7819906%; }
  .game-preloader__tip { bottom: calc(100% + 25.5px); left: 50%; width: min(326px, 100%); transform: translateX(-50%); }
  .game-preloader .game-preloader__tip-text { font-size: 12px; white-space: pre-line; }
  .game-preloader__loading { gap: 8px; width: 100%; }
  .game-preloader .game-preloader__stage { max-width: 282px; font-size: 12px; }
  .game-preloader .game-preloader__hint { display: none; }
  .game-preloader__footer { right: auto; bottom: 0; left: 50%; width: min(390px, calc(100% - 32px)); height: 40px; padding: 0; transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .game-preloader__fill { transition: none; }
  .game-preloader__track--indeterminate .game-preloader__fill { animation: none; opacity: .75; transform: translateX(158%); }
}
