/* ========================= */
/* CONSTELLATION PAGE        */
/* ========================= */

.constellation-page{
  position:fixed;
  top:72px;
  left:0;
  right:0;
  bottom:0;
  background:#191622;
  overflow:hidden;
}

.constellation-ui{
  position:absolute;
  top:24px;
  left:50%;
  transform:translateX(-50%);
  z-index:10;
  pointer-events:none;
  text-align:center;
}

.constellation-title{
  font-family:'Montserrat', sans-serif;
  font-weight:900;
  font-size:1.4rem;
  color:#F9F7F7;
  letter-spacing:0.08em;
  margin-bottom:4px;
}

.constellation-subtitle{
  font-size:0.82rem;
  color:#75737c;
  font-weight:700;
  letter-spacing:0.05em;
  text-transform:uppercase;
}

/* ========================= */
/* STARFIELD BG              */
/* ========================= */

.constellation-bg{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
}

/* ========================= */
/* MAIN CANVAS AREA          */
/* ========================= */

.constellation-container{
  position:absolute;
  top:60px;
  left:0;
  right:0;
  bottom:0;
  z-index:1;
}

.constellation-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:2;
  overflow:visible;
}

.constellation-line{
  stroke:#7360d6;
  stroke-width:1.5;
  opacity:0.55;
  stroke-linecap:round;
  stroke-dasharray:2000;
  stroke-dashoffset:2000;
  filter:url(#lineGlow);
}

@keyframes constellationDraw{
  to{ stroke-dashoffset:0; }
}

/* Stars */
.constellation-star-wrap{
  position:absolute;
  transform:translate(-50%,-50%);
  z-index:3;
  cursor:pointer;
}

/* Fade-in stagger applied via JS */
.constellation-star-wrap{
  opacity:0;
}

@keyframes starFadeIn{
  from{
    opacity:0;
    transform:translate(-50%,-50%) scale(0.5);
  }
  to{
    opacity:1;
    transform:translate(-50%,-50%) scale(1);
  }
}

/* ========================= */
/* EMPTY + LOADING STATES    */
/* ========================= */

.constellation-loading,
.constellation-empty{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:24px;
  text-align:center;
  z-index:20;
  padding:32px;
}

.constellation-loading{
  color:#75737c;
  font-size:1rem;
  font-weight:700;
}

.constellation-empty-title{
  font-family:'Montserrat', sans-serif;
  font-weight:900;
  font-size:1.6rem;
  color:#F9F7F7;
}

.constellation-empty-text{
  color:#75737c;
  font-size:0.95rem;
  max-width:320px;
  line-height:1.6;
}

/* ========================= */
/* POPUP OVERLAY             */
/* ========================= */

.constellation-popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(25,22,34,0.65);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9000;
  padding:20px;
}

.constellation-popup-card{
  position:relative;
  max-width:540px;
  width:100%;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 20px 48px rgba(0,0,0,0.5);
  animation:popupZoomIn 520ms cubic-bezier(0.22,1,0.36,1);
}

.constellation-popup-close{
  position:absolute;
  top:10px;
  right:16px;
  z-index:10;
  background:none;
  border:none;
  font-size:1.5rem;
  line-height:1;
  color:#8f8d94;
  cursor:pointer;
  padding:4px 6px;
}

.constellation-popup-close:hover{
  color:#F9F7F7;
}

/* Push header row content away from the × close button */
.constellation-popup-card .popup-header-row{
  padding-right:28px;
}

/* Reuse timeline scroll styles from style.css — they already apply. */

/* ========================= */
/* PIN LABEL TOOLTIP         */
/* ========================= */

.constellation-pin-label{
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%);
  margin-top:6px;
  white-space:nowrap;
  font-size:0.7rem;
  font-weight:700;
  color:#9e8be3;
  pointer-events:none;
  opacity:0;
  transition:opacity 180ms ease;
}

.constellation-star-wrap:hover .constellation-pin-label{
  opacity:1;
}
