/* Constellation — dark cosmic canvas */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #05070d;
  color: #cfd6e4;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* HUD — top-left panel */
#hud {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 14px 18px;
  background: rgba(10, 13, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 220px;
  z-index: 10;
  animation: fadein 1.2s ease-out both;
  animation-delay: 0.4s;
}

#hud .row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 3px 0;
}

#hud .row.title {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: #e8ecf5;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: flex-start;
}

#hud .k { color: #6b7690; text-transform: uppercase; font-size: 10px; letter-spacing: 0.15em; }
#hud .v { color: #cfd6e4; }

/* Tooltip on star hover/click */
#tooltip {
  position: fixed;
  padding: 8px 12px;
  background: rgba(10, 13, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e8ecf5;
  font-size: 11px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  white-space: nowrap;
  z-index: 20;
  transition: opacity 0.15s ease-out;
}
#tooltip.hidden { opacity: 0; }

/* Hint text — fades away after a few seconds */
#hint {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #4a5570;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  animation: fadein 1.5s ease-out 1.5s both, fadeout 2s ease-in 8s both;
  z-index: 10;
}

@keyframes fadein {
  from { opacity: 0; transform: translate(0, -6px); }
  to { opacity: 1; transform: translate(0, 0); }
}

@keyframes fadeout {
  to { opacity: 0; }
}

/* Hint uses translateX — override the fadein transform */
#hint {
  animation-name: hintin, hintout;
  animation-duration: 1.5s, 2s;
  animation-delay: 1.5s, 8s;
  animation-timing-function: ease-out, ease-in;
  animation-fill-mode: both, both;
}
@keyframes hintin { from { opacity: 0; } to { opacity: 1; } }
@keyframes hintout { to { opacity: 0; } }
