/* ═══════════════════════════════════════════════════════════════
   NASA — Solar System Discarded Equipment Exploration
   style.css  |  Typography: Space Grotesk throughout
   ═══════════════════════════════════════════════════════════════ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #020206;
  color: #ffffff;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* ── GALAXY BACKGROUND CANVAS ───────────────────────────────── */
#galaxy-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

/* ── FLIGHT & EXHAUST PARTICLE CANVAS FOR ROCKET TRANSITION ─── */
#transition-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 25;
  pointer-events: none;
  display: block;
}

/* ── MAIN CONTAINER ─────────────────────────────────────────── */
#container {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 2vh 2vw;
}

/* ── HEADER & THEME TITLE (LIGHT & STANDS OUT CRISPLY) ──────── */
.title-container {
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Category Badge — Light & Clear */
.category-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #fce4b8;
  padding: 4px 15px;
  border: 1px solid rgba(250, 215, 140, 0.55);
  border-radius: 20px;
  background: rgba(22, 18, 12, 0.6);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 16px rgba(250, 215, 140, 0.22);
}

/* Main Title with Light Spaceship Construction Particle Texture */
.main-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4.8vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.08;
  position: relative;
  display: inline-block;
  cursor: default;

  /* Plain real spaceship particle texture - Light, high-contrast, strictly NO gradient */
  background-size: 320px 320px;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.5)) 
          drop-shadow(0 0 45px rgba(220, 235, 255, 0.3));
  transition: filter 0.4s ease, transform 0.4s ease;
}

.main-title:hover {
  filter: drop-shadow(0 0 32px rgba(255, 255, 255, 0.7)) 
          drop-shadow(0 0 55px rgba(230, 240, 255, 0.45));
  transform: scale(1.008);
}

/* Particle canvas inside the title letters */
#title-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.95;
}

/* Description Text — Lightened for high contrast & effortless readability */
.equipment-description {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.8rem, 1.3vw, 0.94rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: #e6eef8;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
  max-width: 680px;
  margin: 0 auto;
}

/* ── ABANDONED RELIC BANNER (COVERED IN MOSS & DUST) ────────── */
.abandoned-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  margin: 4px 0;
}

.abandoned-banner::before,
.abandoned-banner::after {
  content: '';
  height: 1px;
  width: clamp(24px, 5vw, 60px);
  background: linear-gradient(90deg, transparent, rgba(120, 160, 80, 0.5), transparent);
}

.abandoned-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.02rem, 1.9vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  display: inline-block;
  position: relative;
  cursor: default;

  /* Plain real abandoned moss, lichen, rust & cosmic dust texture */
  background-size: 300px 300px;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* Weathered organic & earthy relic glow */
  filter: drop-shadow(0 0 12px rgba(105, 160, 65, 0.55)) 
          drop-shadow(0 0 22px rgba(185, 105, 45, 0.35));
  transition: filter 0.4s ease, letter-spacing 0.4s ease;
}

.abandoned-text:hover {
  filter: drop-shadow(0 0 18px rgba(135, 195, 85, 0.75)) 
          drop-shadow(0 0 30px rgba(215, 130, 60, 0.5));
  letter-spacing: 0.32em;
}

/* ── 3D PLANETS STAGE ───────────────────────────────────────── */
.planets-stage {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(45px, 10vw, 160px);
  width: 100%;
  max-width: 1300px;
}

.planet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vh, 20px);
  position: relative;
}

/* ── PLANET CANVAS VIEWPORT ─────────────────────────────────── */
.planet-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.planet-viewport:active {
  cursor: grabbing;
}

.planet-canvas {
  display: block;
  border-radius: 50%;
  outline: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.planet-viewport:hover .planet-canvas {
  transform: scale(1.03);
}

/* Equipment locator beacons */
.equipment-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.equipment-beacon {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease;
  z-index: 10;
}

.equipment-beacon:hover {
  transform: translate(-50%, -50%) scale(1.18);
}

.beacon-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px #ffffff;
  position: relative;
}

.beacon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid;
  animation: pulseBeacon 0.9s infinite ease-out;
}

.mars-beacon .beacon-core { background: #ffaa55; box-shadow: 0 0 14px #ff8833; }
.mars-beacon .beacon-ring { border-color: rgba(255, 150, 70, 0.8); }

.moon-beacon .beacon-core { background: #d0e0ff; box-shadow: 0 0 14px #aaccff; }
.moon-beacon .beacon-ring { border-color: rgba(190, 220, 255, 0.75); }

.beacon-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(10, 14, 22, 0.9);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  backdrop-filter: blur(6px);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Beacon Interactive Preview Popup */
.beacon-preview-card {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 220px;
  background: rgba(8, 12, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 100;
}

.equipment-beacon:hover .beacon-preview-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.beacon-preview-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.beacon-preview-body {
  padding: 10px 12px;
  text-align: left;
}

.beacon-preview-year {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffaa55;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.moon-beacon .beacon-preview-year {
  color: #99d5ff;
}

.beacon-preview-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 4px;
}

.beacon-preview-site {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.beacon-preview-status {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

@keyframes pulseBeacon {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.3); opacity: 0; }
}

/* ── EXPLORATION OPTIONS (CLEAN, HIGH-CONTRAST SPACE GROTESK WITH REAL TEXTURE) ── */
.explore-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px 20px;
  text-decoration: none;
  transition: transform 0.3s ease;
  user-select: none;
}

.explore-option:hover {
  transform: translateY(-2px) scale(1.03);
}

.explore-text {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(1.2rem, 2.0vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
  position: relative;
  color: #ffffff;

  /* Plain real surface texture - strictly NO CSS gradient */
  background-size: cover;
  background-position: center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter 0.35s ease, letter-spacing 0.35s ease;
}

/* Mars Text — Vibrant, crisp Martian iron-oxide texture */
.mars-text {
  color: #ff9944;
  filter: brightness(2.3) contrast(1.25) drop-shadow(0 0 16px rgba(240, 100, 35, 0.7));
}

.explore-option:hover .mars-text {
  filter: brightness(2.7) contrast(1.35) drop-shadow(0 0 24px rgba(255, 125, 50, 0.95));
  letter-spacing: 0.22em;
}

/* Moon Text — Silver-white, crisp lunar regolith texture */
.moon-text {
  color: #dbeafe;
  filter: brightness(2.2) contrast(1.2) drop-shadow(0 0 16px rgba(210, 230, 255, 0.65));
}

.explore-option:hover .moon-text {
  filter: brightness(2.6) contrast(1.3) drop-shadow(0 0 24px rgba(230, 240, 255, 0.95));
  letter-spacing: 0.22em;
}

/* Subtle accent glow line underneath text on hover */
.explore-option::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  transform: translateX(-50%);
  transition: width 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  border-radius: 2px;
}

#explore-mars::after {
  background: #ff6a20;
  box-shadow: 0 0 12px #ff6a20;
}

#explore-moon::after {
  background: #a8d5ff;
  box-shadow: 0 0 12px #a8d5ff;
}

.explore-option:hover::after {
  width: 80%;
  opacity: 1;
}

/* ── RESPONSIVE DESIGN ──────────────────────────────────────── */
@media (max-width: 768px) {
  #container {
    height: auto;
    min-height: 100vh;
    padding: 24px 16px 36px;
    gap: 28px;
    justify-content: center;
  }

  .planets-stage {
    flex-direction: column;
    gap: 36px;
  }

  .main-title {
    letter-spacing: 0.08em;
  }
}
