/* General Styles */
body, html {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: url("../img/bg.jpg") repeat #12181f;
  color: white;
}

.hidden-until-loaded {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-in-out; /* Optional fade-in effect */
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#solar-system {
  position: relative;
  width: 30000px;
  height: 100vh;
}

.planet-layer, .moon-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.planet, .moon, .sun {
  position: absolute;
  text-align: center;
  font-size: 12px;
  color: white;
  transform: translate(-50%, -50%);
}

.planet img, .moon img, .sun img {
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
}

.moon img {
  max-width: 110px;
  max-height: 110px;
  object-fit: contain;
}

.sun img {
  max-width: 450px;
  max-height: 450px;
}

.orbit-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.title {
  margin-top: 10px;
  font-size: 14px;
  color: #ffffff;
}

#hugo {
  position: absolute;
  width: 100px;
  z-index: 10;
  transform-origin: center;
  transition: transform 0.3s ease;
  margin: 80px 0 0 0;
}

#hugo img {
  width: 130%;
  object-fit: contain;
}

/* Jetpack flame effect */
.jetpack-flame {
  position: absolute;
  left: 25px;
  bottom: 12px;
  width: 20px;
  height: 40px;
  background: radial-gradient(circle at 50% 20%, orange, transparent 60%);
  opacity: 0;
  transform-origin: top;
  z-index: -1;
}

/* Dream Zzzz effect */
.zzz-container {
  position: absolute;
  top: 15px;
  left: 118px;
  font-size: 20px;
  color: #ffffff;
  opacity: 0;
  animation: floatZ 2s ease-in-out infinite;
}

@keyframes floatZ {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}
/* Shooting star effect */
.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 0 10px white;
  opacity: 1;
}

#loader, #planet-details, #volume-control, #instructions {
  position: absolute;
}

#loader {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: white;
}

#planet-details {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 10px;
  display: none;
  color: white;
}

#volume-control {
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 8px;
}

#volume-slider {
  width: 100px;
  margin-left: 10px;
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg);
  }
}
/* Instructions styling */
#instructions {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  text-align: center;
  padding: 1em;
  background-color: rgba(0, 0, 0, 0.7); /* 70% opacity black background */
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

#instructions .bi {
  font-size: 20px;
  color: #ffffff;
}

#start-button {
  padding: 15px 25px;
  font-size: 18px;
  background-color: #cb592b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: none;
}

#navigation-menu {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  padding: 10px 15px;
  border-radius: 10px;
  z-index: 100;
}

.nav-item {
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease;
  opacity: 0.4; /* Initial opacity */
  filter: grayscale(100%); /* Desaturated initially */
}

.nav-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%; /* Optional for rounded icons */
}

.nav-item.visited {
  opacity: 1; /* Full visibility when visited */
  filter: grayscale(0%); /* Full color when visited */
  transform: scale(1.2); /* Slight zoom effect */
}

.hidden {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s linear;
}

#modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s;
  z-index: 1;
}

#modal.show {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  z-index: 100000;
  color: #12181f;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 24px;
  color: #333;
}

.planet-layer, .moon-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  /* Remove this line */
  /* pointer-events: none; */
}

.planet, .moon {
  pointer-events: all; /* Allow pointer events on these elements */
  cursor: pointer; /* Add a pointer cursor for visual feedback */
}

/* Wobble animation for the start button */
@keyframes wobble {
  0% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-5px);
  }
  30% {
    transform: translateX(5px);
  }
  45% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}
.wobble {
  animation: wobble 0.6s ease-in-out;
}

.dwarf-planet {
  position: absolute;
  text-align: center;
  font-size: 12px;
  color: white;
  transform: translate(-50%, -50%);
  pointer-events: all; /* Allow clicking */
  cursor: pointer;
}

.dwarf-planet img {
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
}

.dwarf-planet .title {
  margin-top: 10px;
  font-size: 14px;
  color: #ffffff;
}

.planet img, .sun img {
  animation: bobbing 8s ease-in-out infinite;
}

@keyframes bobbing {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
