html,
body {
  overflow: hidden;
  background: #64cceb;
}

#game-loading {
  position: fixed;
  z-index: 10000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #fff;
  background-color: #64cceb;
  background-image: url("loading-bg.jpg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 300ms ease;
}

#game-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.game-loading__panel {
  position: absolute;
  left: 50%;
  right: auto;
  width: 76%;
  bottom: calc(6.5% + env(safe-area-inset-bottom));
  max-width: 460px;
  margin: 0;
  padding: 14px 16px 15px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(96, 51, 18, 0.68);
  box-shadow: 0 8px 24px rgba(91, 44, 5, 0.24);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transform: translateX(-50%);
}

.game-loading__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #fff8df;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(96, 44, 0, 0.85);
}

#game-loading-percent {
  min-width: 42px;
  margin-left: 12px;
  text-align: right;
  color: #fff2a8;
  font-variant-numeric: tabular-nums;
}

.game-loading__track {
  height: 15px;
  padding: 3px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 999px;
  background: rgba(82, 38, 9, 0.75);
  box-shadow: inset 0 2px 4px rgba(57, 24, 2, 0.52), 0 1px 0 rgba(255, 255, 255, 0.36);
}

.game-loading__fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb31a 0%, #ffe15a 62%, #fff3a0 100%);
  box-shadow: 0 0 8px rgba(255, 213, 54, 0.85);
  transition: width 220ms ease-out;
}

.game-loading__retry {
  display: none;
  min-width: 112px;
  height: 36px;
  margin: 13px auto 0;
  padding: 0 20px;
  border: 2px solid #fff2af;
  border-radius: 18px;
  outline: none;
  color: #9b4d00;
  background: linear-gradient(#fff06a, #ffb51c);
  box-shadow: 0 3px 0 #c56a05;
  font-size: 15px;
  font-weight: 700;
}

#game-loading.has-error .game-loading__retry {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  #game-loading,
  .game-loading__fill {
    transition: none;
  }
}
