/* ============================================================
   space.css — SPACE EXPLORER / STAR ATLAS PAGE
   Linked from space.html after style.css
============================================================ */

/* ── 3D Solar System embed ── */
.solarEmbed {
  width: 100%;
  height: 480px;
  border: 1px solid #5500aa;
  background: #000;
  display: block;
  margin: 14px 0;
  box-shadow: 0 0 24px rgba(100,0,200,0.3);
}

.embedCredit {
  font-size: 10px;
  color: #443366;
  letter-spacing: 1px;
  text-align: right;
  margin-top: 3px;
  margin-bottom: 20px;
}

.embedCredit a { color: #664499; }

/* ── APOD Grid & Thumbnails ── */
.apodGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.apodThumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #330044;
  cursor: pointer;
  background: #050010;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.apodThumb:hover {
  border-color: #aa44ff;
  box-shadow: 0 0 14px rgba(160,0,255,0.4);
}

.apodThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.apodThumb:hover img { transform: scale(1.06); }

.apodThumbOverlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 8px 8px 6px;
  font-size: 10px;
  color: #b8adcc;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s;
}

.apodThumb:hover .apodThumbOverlay { opacity: 1; }

.apodThumbDate {
  font-size: 9px;
  color: #6644aa;
  display: block;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.apodThumbCopyright {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 8px;
  color: rgba(100,80,160,0.75);
  letter-spacing: 0.5px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.apodVideoTile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  color: #6644aa;
  font-size: 11px;
  letter-spacing: 1px;
  gap: 8px;
  text-decoration: none;
  padding: 10px;
}

.apodVideoTile span { font-size: 28px; }

/* ── APOD Featured strip ── */
.apodFeatured {
  display: flex;
  gap: 16px;
  margin: 14px 0;
  background: rgba(0,0,0,0.5);
  border: 1px solid #440066;
  border-left: 3px solid #aa44ff;
  padding: 16px;
  align-items: flex-start;
}

.apodFeaturedImg {
  width: 180px;
  min-width: 180px;
  height: 140px;
  object-fit: cover;
  border: 1px solid #330044;
}

.apodFeaturedInfo { flex: 1; }
.apodFeaturedTitle { color: #d4c8ff; font-size: 13px; letter-spacing: 1px; margin-bottom: 6px; }
.apodFeaturedDate      { color: #6644aa; font-size: 10px; letter-spacing: 2px; margin-bottom: 4px; }
.apodFeaturedCopyright { color: #3d2d5a; font-size: 10px; letter-spacing: 1px; margin-bottom: 8px; }
.apodFeaturedExpl      { font-size: 11px; color: #9988bb; line-height: 1.7; }

/* ── Lightbox modal ── */
#apodModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}
#apodModal.open { display: flex; }

#apodModalImg {
  max-width: 90vw;
  max-height: 70vh;
  border: 1px solid #7a00aa;
  box-shadow: 0 0 40px rgba(120,0,200,0.5);
}

#apodModalTitle {
  color: #d4c8ff;
  font-size: 13px;
  letter-spacing: 1px;
  margin-top: 14px;
  max-width: 700px;
  text-align: center;
}

#apodModalDate {
  color: #6644aa;
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 4px;
}

#apodModalCopyright {
  color: #4a3870;
  font-size: 10px;
  letter-spacing: 1px;
  margin-top: 4px;
}

#apodModalExpl {
  color: #9988bb;
  font-size: 11px;
  line-height: 1.7;
  max-width: 660px;
  text-align: center;
  margin-top: 10px;
  max-height: 120px;
  overflow-y: auto;
}

#apodModalClose {
  position: absolute;
  top: 18px;
  right: 24px;
  color: #7a00aa;
  font-size: 28px;
  cursor: pointer;
  font-family: monospace;
  background: none;
  border: none;
  line-height: 1;
}
#apodModalClose:hover { color: #ff66ff; }

/* ── NASA Image Search bar ── */
.nasaSearchWrap {
  display: flex;
  gap: 0;
  margin: 14px 0 18px 0;
  border: 1px solid #5500aa;
  background: rgba(0,0,0,0.6);
}

.nasaSearchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4c8ff;
  font-family: 'OCR A Std', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 10px 14px;
}
.nasaSearchInput::placeholder { color: #443366; }

.nasaSearchBtn {
  background: rgba(80,0,140,0.7);
  border: none;
  border-left: 1px solid #5500aa;
  color: #cc99ff;
  font-family: 'OCR A Std', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nasaSearchBtn:hover { background: rgba(140,0,220,0.7); color: #fff; }

.nasaSearchStatus {
  font-size: 10px;
  color: #443366;
  letter-spacing: 1px;
  margin-bottom: 10px;
  min-height: 14px;
}

/* ── Loading skeleton ── */
.apodSkeleton {
  background: linear-gradient(
    90deg,
    rgba(40,0,60,0.5) 25%,
    rgba(80,0,120,0.3) 50%,
    rgba(40,0,60,0.5) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  aspect-ratio: 1;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Telescope list styling ── */
.telescopePanel {
  background: rgba(0,0,0,0.6);
  border: 1px solid #440066;
  overflow: hidden;
  margin-bottom: 24px;
}

.telescopePanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(40,0,70,0.7);
  border-bottom: 1px solid #440066;
  font-size: 10px;
  letter-spacing: 2px;
}

.telescopePanelTitle { color: #d4c8ff; letter-spacing: 2.5px; }
.telescopePanelBadge { color: #5544aa; }

.telescopeGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.telescopeItem {
  padding: 10px 14px;
  border-right: 1px solid #1e0030;
  border-bottom: 1px solid #1e0030;
  font-size: 11px;
  color: #9988bb;
  letter-spacing: 0.5px;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.telescopeItem:hover {
  background: rgba(80,0,120,0.2);
  color: #d4c8ff;
}

.telescopeItem:nth-child(3n) { border-right: none; }

.telescopeDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.telescopeDot--active {
  background: #33ff88;
  box-shadow: 0 0 6px #33ff88;
}

.telescopeDot--inactive {
  background: #443366;
}

/* ── Deep Space Objects ── */
.deepSpaceGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.deepSpaceCard {
  background: rgba(0,0,0,0.6);
  border: 1px solid #330044;
  border-top: 2px solid #5500aa;
  padding: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.deepSpaceCard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(100,0,180,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.deepSpaceCard:hover {
  border-color: #7700bb;
  border-top-color: #aa44ff;
  box-shadow: 0 0 16px rgba(140,0,220,0.2);
  background: rgba(20,0,40,0.65);
}

.dsoHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.dsoName {
  font-size: 13px;
  color: #d4c8ff;
  letter-spacing: 1px;
}

.dsoType {
  font-size: 9px;
  color: #5544aa;
  border: 1px solid #330044;
  padding: 2px 7px;
  letter-spacing: 1px;
  background: rgba(20,0,40,0.6);
}

.dsoMeta {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.dsoMetaItem {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dsoMetaLabel {
  font-size: 9px;
  color: #443366;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dsoMetaValue {
  font-size: 11px;
  color: #9977cc;
  letter-spacing: 0.5px;
}

.dsoDesc {
  font-size: 11px;
  color: #7766aa;
  line-height: 1.7;
  font-style: italic;
  border-left: 2px solid #330044;
  padding-left: 10px;
  margin-top: 8px;
}

/* ── Missions Watchlist ── */
.missionsPanel {
  background: rgba(0,0,0,0.65);
  border: 1px solid #440066;
  overflow: hidden;
  margin-bottom: 24px;
}

.missionsPanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(40,0,70,0.7);
  border-bottom: 1px solid #440066;
  font-size: 10px;
  letter-spacing: 2px;
}

.missionsPanelTitle { color: #d4c8ff; letter-spacing: 2.5px; }

.missionRow {
  display: grid;
  grid-template-columns: 1fr 90px 120px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #1e0030;
  gap: 12px;
  transition: background 0.15s;
}

.missionRow:last-child { border-bottom: none; }

.missionRow:hover {
  background: rgba(60,0,100,0.2);
}

.missionName {
  font-size: 13px;
  color: #cc99ff;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.missionAgency {
  font-size: 10px;
  color: #5544aa;
  letter-spacing: 1px;
}

.missionDesc {
  font-size: 11px;
  color: #7766aa;
  margin-top: 4px;
  line-height: 1.5;
}

.missionYear {
  font-size: 11px;
  color: #6655aa;
  letter-spacing: 1px;
  text-align: center;
}

.missionStatus {
  text-align: right;
}

.missionBadge {
  display: inline-block;
  font-size: 9px;
  padding: 3px 9px;
  letter-spacing: 1px;
  border: 1px solid;
  text-align: center;
}

.missionBadge--active {
  color: #33ff88;
  border-color: #006633;
  background: rgba(0,40,20,0.5);
}

.missionBadge--upcoming {
  color: #ffcc44;
  border-color: #664400;
  background: rgba(40,25,0,0.5);
}

.missionBadge--extended {
  color: #cc99ff;
  border-color: #440066;
  background: rgba(30,0,50,0.5);
}

.missionBadge--watching {
  color: #66ccff;
  border-color: #004466;
  background: rgba(0,20,40,0.5);
}

.missionBadge--complete {
  color: #5544aa;
  border-color: #220033;
  background: rgba(10,0,20,0.5);
}

/* ── Night Sky Tonight panel ── */
.nightSkyPanel {
  background: rgba(0,0,0,0.65);
  border: 1px solid #440066;
  overflow: hidden;
  margin-bottom: 24px;
}

.nightSkyPanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(30,0,55,0.8);
  border-bottom: 1px solid #440066;
  font-size: 10px;
  letter-spacing: 2px;
}

.nightSkyPanelTitle { color: #d4c8ff; letter-spacing: 2.5px; }
.nightSkyNote { color: #443366; font-size: 9px; letter-spacing: 1px; }

.nightSkyGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.nightSkyBlock {
  padding: 18px 20px;
  border-right: 1px solid #1e0030;
  border-bottom: 1px solid #1e0030;
}

.nightSkyBlock:nth-child(2n) { border-right: none; }
.nightSkyBlock:nth-last-child(-n+2) { border-bottom: none; }

.nightSkyBlockTitle {
  font-size: 11px;
  color: #cc99ff;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nightSkyBlockTitle::before {
  content: '//';
  color: #440066;
  font-size: 10px;
}

.nightSkyItem {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid #1a0028;
  font-size: 11px;
}

.nightSkyItem:last-child { border-bottom: none; }

.nightSkyItemName { color: #9988bb; }

.nightSkyItemVal {
  color: #6655aa;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.nightSkyItemVal--visible {
  color: #33ff88;
  text-shadow: 0 0 6px #33ff88;
}

.nightSkyItemVal--bright {
  color: #ffcc44;
}

.constellationFact {
  padding: 18px 20px;
  border-top: 1px solid #1e0030;
  background: rgba(10,0,20,0.4);
}

.constellationFactLabel {
  font-size: 9px;
  color: #443366;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.constellationFactText {
  font-size: 11px;
  color: #7766aa;
  line-height: 1.75;
  font-style: italic;
  border-left: 2px solid #330044;
  padding-left: 10px;
}

/* ── Section label strip ── */
.sectionLabel {
  font-size: 10px;
  color: #5544aa;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sectionLabel::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #330044, transparent);
}

/* ── Glowing pulse for active telemetry ── */
@keyframes glowGreen {
  0%, 100% { text-shadow: 0 0 6px #33ff88; }
  50%       { text-shadow: 0 0 16px #33ff88, 0 0 24px #00cc66; }
}

.activeGlow {
  animation: glowGreen 2.5s ease infinite;
}

/* ── EPIC Earth photo ── */
.epicImg {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 14px auto;
  border: 1px solid #440066;
  box-shadow: 0 0 24px rgba(100,0,200,0.3);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.epicImg:hover { box-shadow: 0 0 36px rgba(160,0,255,0.5); }

.contentIntroP       { margin-bottom: 10px; }
.apodGalleryNote     { margin-bottom: 10px; font-size: 11px; color: #664488; }
#searchGrid          { margin-bottom: 20px; }
#apodGrid + h2       { margin-top: 20px; }
#apodFeaturedWrap .apodSkeleton { height: 160px; margin: 14px 0; }
