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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #cbd5e1;
}

#stage { position: fixed; inset: 0; }
#stage canvas { display: block; width: 100% !important; height: 100% !important; }

.input_video {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.skeleton-panel {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 195px;
  pointer-events: none;
  z-index: 6;
  opacity: 0.85;
}

.skeleton_canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

.hud {
  position: fixed;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(148, 197, 255, 0.65);
  letter-spacing: 0.4px;
  user-select: none;
  pointer-events: none;
  z-index: 5;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 197, 255, 0.2);
  transition: background 0.2s, box-shadow 0.2s;
}

.dot.active {
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
}

.planet-label {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.4s;
}

.planet-label[hidden] { display: none; }

.planet-name {
  font-size: 46px;
  font-weight: 200;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 24px rgba(100, 150, 255, 0.5);
  text-transform: uppercase;
}

.planet-sub {
  margin-top: 6px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.4em;
  color: rgba(148, 197, 255, 0.5);
  text-transform: uppercase;
}

.tooltip {
  position: fixed;
  padding: 4px 10px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  background: rgba(10, 20, 40, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 4px;
  pointer-events: none;
  z-index: 4;
  transform: translate(-50%, -140%);
  white-space: nowrap;
}

.tooltip[hidden] { display: none; }

.info-panel {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 260px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(10,20,40,0.75), rgba(5,10,25,0.6));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 40px rgba(56, 189, 248, 0.08);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.45s, transform 0.45s;
}

.info-panel.visible {
  opacity: 1;
  transform: translateX(0);
}

.info-panel[hidden] { display: none; }

.info-title {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.35em;
  color: rgba(125, 211, 252, 0.8);
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.info-row .k {
  color: rgba(148, 197, 255, 0.55);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-row .v {
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 20;
  padding: 24px;
}

.overlay[hidden] { display: none; }


.overlay-box {
  background: #0a1020;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 22px 26px;
  max-width: 540px;
  font-size: 14px;
  line-height: 1.6;
}

.overlay-box strong { color: #f59e0b; font-size: 15px; display: block; margin-bottom: 8px; }
.overlay-box code {
  display: inline-block; margin-top: 6px; padding: 4px 8px;
  background: #000; border: 1px solid #1e293b; border-radius: 4px;
  font-size: 12px; color: #7dd3fc;
}
