html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #050507;
  color: #e8e8e8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #050507;
  pointer-events: none;
}

#small-stars,
#large-stars {
  position: absolute;
  left: -50vw;
  top: -50vh;
  width: 200vw;
  height: 200vh;
  background-repeat: repeat;
  will-change: transform;
  pointer-events: none;
}

#small-stars {
  background-image: url("img/bgstarssmall.png");
}

#large-stars {
  background-image: url("img/bgstarslarge.png");
}

#scene {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#scene:active {
  cursor: grabbing;
}

#hud {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: block;
  width: 328px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 105, 180, 0.55);
  background: rgba(0, 0, 0, 0.72);
  box-sizing: border-box;
  pointer-events: auto;
}

#hud.locked {
  width: 42px;
  height: 42px;
  min-height: 38px;
  padding: 5px;
}

#hud > *:not(#hudLockButton) {
  pointer-events: none;
}

#hud.locked > *:not(#hudLockButton) {
  display: none;
}

#hudLockButton {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 105, 180, 0.5);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

#hudLockButton:hover,
#hudLockButton:focus-visible {
  border-color: hotpink;
  outline: none;
}

#hudDetails {
  width: 100%;
  padding-left: 38px;
  box-sizing: border-box;
}

#catSummary {
  display: flex;
  align-items: center;
  gap: 12px;
}

#catId {
  display: inline-block;
  width: 6ch;
  color: hotpink;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#preview {
  width: 168px;
  height: 176px;
  border: 2px solid hotpink;
  background-color: #000;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#status {
  max-width: 100%;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #bfbfbf;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

#tooltip {
  position: fixed;
  z-index: 3;
  display: none;
  padding: 5px 7px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 105, 180, 0.65);
  color: hotpink;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

#loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #050507;
  color: #f3f3f3;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms ease, visibility 280ms ease;
}

#loadingOverlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loadingCard {
  width: min(320px, 100%);
  padding: 24px 22px;
  border: 1px solid rgba(255, 105, 180, 0.55);
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
  box-sizing: border-box;
}

#loadingSpinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 2px solid rgba(255, 105, 180, 0.2);
  border-top-color: hotpink;
  transform: rotate(45deg);
  animation: catmoonSpin 960ms linear infinite;
}

#loadingTitle {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 7px;
}

#loadingProgress {
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1.35;
}

@keyframes catmoonSpin {
  from {
    transform: rotate(45deg);
  }

  to {
    transform: rotate(405deg);
  }
}
