html, body {
  background: #0b1b1b !important;
}

#GameDiv {
  opacity: 0;
}

body.game-ready #GameDiv {
  opacity: 1;
}

#PlayStartupCover {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 44%, #173433 0, #0b1b1b 68%);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 180ms ease-out;
}

#PlayStartupCover.ready {
  opacity: 0;
  pointer-events: none;
}

#PlayStartupCover img {
  display: block;
  width: min(92vw, 360px);
  height: auto;
}

.startup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(92vw, 360px);
}

.startup-progress {
  width: min(82%, 300px);
  margin-top: 18px;
}

.startup-progress-track {
  --startup-progress: 5%;
  position: relative;
  height: 8px;
  border: 1px solid #3d635b;
  border-radius: 999px;
  background: #122b2a;
  box-shadow: inset 0 2px 5px #061817, 0 0 0 1px #102827;
}

.startup-progress-fill {
  position: relative;
  width: var(--startup-progress);
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #5a9f94, #d7c488 80%, #f4e2ab);
  box-shadow: 0 0 12px #b9d9a477;
  transition: width 420ms ease-out;
}

.startup-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, #ffffff55 50%, transparent 75%);
  background-size: 90px 100%;
  animation: startup-shimmer 1.8s linear infinite;
}

.startup-progress-float {
  position: absolute;
  top: -13px;
  left: var(--startup-progress);
  width: 8px;
  height: 19px;
  border-radius: 4px 4px 5px 5px;
  background: linear-gradient(#e26b51 0 34%, #f4e2ab 34% 100%);
  box-shadow: 0 0 8px #f4e2ab88;
  transform: translateX(-50%);
  transition: left 420ms ease-out;
  animation: startup-bob 1.9s ease-in-out infinite;
}

.startup-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  color: #b9cdc0;
  font: 14px/1.5 sans-serif;
  text-align: left;
}

#PlayStartupPercent {
  color: #f4e2ab;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#PlayStartupRetry {
  margin-top: 22px;
  padding: 10px 22px;
  border: 1px solid #b9cdc0;
  border-radius: 8px;
  background: #183735;
  color: #f5e2aa;
  font: 15px sans-serif;
  cursor: pointer;
}

#PlayStartupRetry[hidden] {
  display: none;
}

@keyframes startup-shimmer {
  from { background-position: -90px 0; }
  to { background-position: 90px 0; }
}

@keyframes startup-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -2px); }
}

@media (prefers-reduced-motion: reduce) {
  .startup-progress-fill,
  .startup-progress-float { transition: none; animation: none; }
  .startup-progress-fill::after { animation: none; }
}
