/* ------ MARK: ROCKET SCROLL
*/

.rocket-scroll {
  position: fixed;
  right: 12px;
  top: 0;
  width: 72px;
  height: auto;
  z-index: 1200;
  pointer-events: none;

  animation: rocketDown linear both;
  animation-timeline: scroll(root block);
  animation-range: 0% 100%;
}

@keyframes rocketDown {
  from {
    transform: translateY(0) rotate(180deg);
  }
  to {
    transform: translateY(85vh) rotate(180deg);
  }
}

@media (min-width: 768px) {
  .astronaut {
    width: clamp(52px, 7vw, 110px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .astronaut {
    animation: none;
  }
}

/* ------ MARK: MODULE
*/

#module {
  position: relative;
  min-height: 80vh;

  display: grid;
  grid-template-columns: 1fr;

  &.info {
    grid-template-columns: 1fr 2fr;
  }
}

#three-root {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: end;

  grid-column: 1 / -1;
}

#module.info #three-root {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
}

#three-root canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.module-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

#module div:nth-of-type(2) {
  width: 100%; 
  display: flex;
  justify-content: end;
  align-items: center;
  
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

#module-info {
  gap: 10px;
  flex-direction: column;

  width: 100%;
  max-width: 500px;

  align-items: start;
  padding: 20px;

  display: none;
}

#module-info .line {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 15px 0;
}

@media (max-width: 1000px) {
  #module {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 2fr; 

    &.info {
      grid-template-columns: 1fr;
      grid-template-rows: 1fr 2fr; 
    }
  }

  #three-root {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    max-height: 600px;
  }

  #module.info #three-root {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  #module div:nth-of-type(2) {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    justify-content: center;
    align-items: end; 
  }
}

@media (max-width: 600px) {
  #blackhole-root canvas {
    width: 100vw !important;
    height: 60vw !important;
    min-height: 200px;
    max-width: 100vw;
    max-height: 80vw;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    aspect-ratio: 16/9;
  }
  .black-hole-container, #blackhole-root {
    width: 100vw;
    height: 60vw;
    min-height: 200px;
    max-width: 100vw;
    max-height: 80vw;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
  }
}
