@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

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

body {
  background: #000;
  overflow: hidden;
  font-family: "Google Sans Flex", sans-serif;
  color: #fff;
  user-select: none;
}



canvas {
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a,
p {
  font-size: 18px;
  opacity: .8;
  font-weight: 200;
}

/* ── INTRO SCREEN ── */
#loading {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 1s ease;
  overflow: hidden;
}

#loading .presents-char {
  animation-play-state: running;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(0.7rem, 1.8vw, 1.1rem);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

@keyframes introFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── INTRO PRESENTS SCREEN ── */
#intro-presents {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

#intro-presents.active {
  opacity: 1;
  pointer-events: auto;
}

#intro-presents.hidden {
  opacity: 0;
  pointer-events: none;
}

.presents-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(0.7rem, 1.8vw, 1.1rem);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.4;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.presents-char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  animation: charIn 0.5s ease forwards;
  animation-play-state: paused;
}

#intro-presents.active .presents-char {
  animation-play-state: running;
}

.presents-char.space {
  width: 0.3em;
}

/* ── WELCOME SCREEN ── */
#welcome-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99;
  overflow: hidden;
  perspective: 1200px;
  transform-style: preserve-3d;
}

#welcome-screen.active {
  display: flex;
}

.welcome-bg-image {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  background: url('img/bg.jpg') center/cover no-repeat;
  z-index: 0;
  will-change: transform;
  backface-visibility: hidden;
}

.welcome-bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.95) 50%, #000 100%);
  pointer-events: none;
  transition: background 0.8s ease-out;
  /* Añadimos una transición suave */
}

.welcome-bg-gradient:hover {
  background: transparent;
  /* El fondo se vuelve transparente al pasar el cursor */
}

.welcome-spotlight {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(600px circle at 50% 50%, rgba(79, 195, 247, 0.08), transparent 60%);
  transition: background 0.1s;
}

.welcome-content {
  position: relative;
  z-index: 3;
  text-align: center;
  animation: welcomeFadeIn 0.8s ease-out;
  max-width: 560px;
  padding: 2rem;
  margin-bottom: 15vh;
  will-change: transform;
  backface-visibility: hidden;
}

.welcome-bg-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
  backface-visibility: hidden;
}

.welcome-bg-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.1);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes fadeInOnly {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes elemFadeIn {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
  }

  to {
    opacity: 0.7;
    filter: blur(0);
    transform: translateY(0);
  }
}

.welcome-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.welcome-description {
  font-size: 16px;

  color: rgba(255, 255, 255, 0.531);
  max-width: 450px;
  margin: 0 auto 3rem;
  font-weight: 100;
  letter-spacing: 0.2px;
}

.welcome-controls {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.welcome-key {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
}

.welcome-kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  min-width: 1.4rem;
  text-align: center;
}

.welcome-launch-btn {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 2.4rem;
  background: #fff;
  border: none;
  color: #000;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.03em;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.welcome-launch-btn svg {
  width: 20px;
  height: 20px;
  stroke: #000;
}

.welcome-launch-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.02);
}

.welcome-footer {
  margin-top: 2.5rem;
  font-size: 14px;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.34);

}

.welcome-footer a {
  font-size: 14px;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.34);

  transition: color 0.2s;
}

.welcome-footer a:hover {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 600px) {
  .welcome-features {
    grid-template-columns: 1fr;
  }

  .welcome-controls {
    gap: 0.75rem;
  }

  .welcome-launch-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
  }
}



/* ── HINT ── */
#hint {
  position: fixed;
  bottom: calc(9rem + 15px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 0.5rem 1.2rem;
  font-size: 0.65rem;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.6);
  animation: pulse-hint 2.5s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.5s, filter 0.5s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

#hint.hidden {
  opacity: 0;
}

@keyframes pulse-hint {

  0%,
  100% {
    box-shadow: 0 0 0 rgba(79, 195, 247, 0);
  }

  50% {
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.3);
  }
}

/* ── PLANET NAV BAR ── */
#planet-nav {
  position: fixed;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.nav-track {
  display: flex;
  align-items: flex-end;
  gap: 0.2rem;
  padding: 0.5rem 1rem;

  scrollbar-width: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}

.nav-track::-webkit-scrollbar {
  display: none;
}

.nav-track:active {
  cursor: grabbing;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  outline: none;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-planet-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
  opacity: 0.4;
  white-space: nowrap;
}

.nav-btn.active .nav-planet-name,
.nav-btn:hover .nav-planet-name {
  color: #fff;
  opacity: 1;
  transform: scale(1.1);
}

.nav-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  filter: grayscale(100%);
  transition: border-width 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.5s ease,
    filter 0.5s ease;
}

.nav-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.nav-btn.active .nav-orb {
  border-color: rgba(255, 255, 255, 0.7);
  border-width: 2px;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.3), 0 0 48px rgba(255, 255, 255, 0.1);
  filter: grayscale(0%);
}

.nav-btn:hover .nav-orb {
  filter: grayscale(30%);
}

.nav-controls {
  position: fixed;
  bottom: 0.3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 10;
}

.nav-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: scale(1.1);
}

.nav-ctrl-btn:active {
  transform: scale(0.95);
}

.nav-ctrl-reset {
  width: 40px;
  height: 40px;
}

/* ── TOOLTIP ── */
#tooltip {
  position: fixed;
  pointer-events: none;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 0.65rem 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  color: rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  z-index: 20;
  transition: opacity 0.2s;
  display: none;
  white-space: nowrap;
}

/* ── PLANET INFO PANEL (compact, left-bottom) ── */
#planet-panel {
  position: fixed;
  bottom: 6rem;
  left: 1rem;
  width: auto;
  min-width: 320px;
  max-width: 600px;
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 1.2rem 1.5rem 1rem;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  filter: blur(8px);
  transform: translateY(10px);
  visibility: hidden;
  transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

#planet-panel.open {
  pointer-events: auto;
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  visibility: visible;
}

.panel-close {
  position: absolute;
  top: 1.5rem;
  left: 0.8rem;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.25s;
  z-index: 5;
}

.panel-close:hover {
  color: rgba(255, 255, 255, 0.9);
}

.panel-body {
  padding: 0;
  padding-top: 3rem;
}

.panel-body .panel-name {
  font-size: 6rem !important;
  font-weight: 200;
  margin-bottom: 0.4rem;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.panel-body .panel-type {
  font-size: 0.6rem;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.panel-body .panel-desc {
  font-size: 1.2rem;
  font-weight: 200;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.panel-char {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  animation: panelCharIn 0.4s ease forwards;
}

@keyframes panelCharIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}


/* Saber más button */
.panel-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.8rem 2rem;
  background: #fff;
  border: none;
  color: #000;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.03em;
  margin-top: 0.3rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.panel-footer-btn svg {
  width: 20px;
  height: 20px;
  stroke: #000;
}

.panel-footer-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.02);
}

/* ── PLANET MODAL (full-screen) ── */
#planet-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  perspective: 1200px;
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
  filter: blur(20px);
  transition: opacity 0.8s ease, filter 0.8s ease;
  overflow: hidden;
}

#planet-modal.active {
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
}

.modal-scroll-area {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  transform-style: preserve-3d;
}

.modal-scroll-area::-webkit-scrollbar {
  width: 8px;
}

.modal-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.modal-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.modal-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.modal-close {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.25s;
  z-index: 110;
}

.modal-close:hover {
  background: rgba(239, 83, 80, 0.25);
  border-color: rgba(239, 83, 80, 0.5);
  color: #ef5350;
}

.modal-content {
  position: relative;
  max-width: 640px;
  width: 100%;
  padding-bottom: 3rem;
  will-change: transform;
  backface-visibility: hidden;
}

.modal-content .modal-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
  color: #fff;
  line-height: 1;
}

.modal-name-char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  animation: charIn 0.5s ease forwards;
}

@keyframes charIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes charOut {
  to {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
  }
}

.modal-content .modal-type {
  font-size: 0.72rem;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.modal-content .modal-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 200;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Reuse existing inner panel styles for modal */
#planet-modal .section-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.65rem;
  letter-spacing: 1px;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.776);
  text-transform: uppercase;
  margin: 1.5rem 0 0.75rem;
}

#planet-modal .stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

#planet-modal .stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.7rem 1rem;
}

#planet-modal .stat-label {
  font-size: 0.6rem;
  letter-spacing: -0.1px;
  color: rgba(255, 255, 255, 0.552);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  font-weight: 100;
}

#planet-modal .stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
  color: #fff;
}

#planet-modal .temp-gauge {
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
}

#planet-modal .temp-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 200;
}

#planet-modal .temp-label {
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.5rem;
}

#planet-modal .temp-range {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

#planet-modal .temp-range-item {
  text-align: center;
}

#planet-modal .temp-range-label {
  font-size: 0.65rem;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.595);
}

#planet-modal .temp-range-val {
  font-size: 0.9rem;
  font-weight: 600;
}

#planet-modal .orbital-speed {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-top: 1rem;
}

#planet-modal .moon-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.7rem 1rem;
}

#planet-modal .moon-count {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight:  100;
  color: var(--planet-color, #ffffff);
}

#planet-modal .moon-label {
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

#planet-modal .moon-names {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

#planet-modal .atmo-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#planet-modal .atmo-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
}

#planet-modal .atmo-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 0.25rem;
}

#planet-modal .atmo-name {
  color: rgba(255, 255, 255, 0.6);
}

#planet-modal .atmo-pct {
  color: var(--planet-color, #ffffff69);
  font-weight: 200;
}

#planet-modal .atmo-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

#planet-modal .atmo-fill {
  height: 100%;
  background: var(--planet-color, #ffffff72);
  border-radius: 2px;
  width: 0;
  transition: width 1s ease;
}

#planet-modal .fact-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#planet-modal .fact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

#planet-modal .fact-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
}

#planet-modal .mission-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#planet-modal .mission-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

#planet-modal .mission-year {
  font-size: 1.1rem;
  color: var(--planet-color, #ffffffc4);
  font-weight: 200;
  font-style: italic;
  min-width: 3.2rem;
}

#planet-modal .mission-name {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

#planet-modal .mission-agency {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 600px) {
  #planet-panel {
    bottom: 5rem;
    left: 0.5rem;
    max-width: calc(100vw - 1rem);
  }

  .modal-content .modal-name {
    font-size: 1.5rem;
  }
}

.panel-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
}

.panel-desc b {
  color: var(--planet-color, #4fc3f7);
  font-weight: 700;
}

.panel-desc em {
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem;
  transition: border-color 0.3s;
}

.stat-card:hover {
  border-color: var(--planet-color, rgba(79, 195, 247, 0.4));
}

.stat-label {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.3rem;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--planet-color, #4fc3f7);
}

.stat-unit {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.8rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* Atmosphere bar */
.atmo-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.atmo-item {}

.atmo-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.atmo-name {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.atmo-pct {
  font-size: 0.75rem;
  color: var(--planet-color, #4fc3f7);
}

.atmo-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.atmo-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--planet-color, #4fc3f7), rgba(255, 255, 255, 0.6));
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Facts */
.fact-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.fact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.fact-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Moons */
.moon-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.moon-count {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--planet-color, #4fc3f7);
  line-height: 1;
}

.moon-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.moon-names {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.2rem;
}

/* Temperature gauge */
.temp-gauge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.temp-value {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.3rem;
}

.temp-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
}

.temp-range {
  display: flex;
  justify-content: space-between;
  margin-top: 0.8rem;
  gap: 0.5rem;
}

.temp-range-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.72rem;
  text-align: center;
}

.temp-range-label {
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.2rem;
}

.temp-range-val {
  font-size: 0.82rem;
}

/* Exploration missions */
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.mission-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.mission-year {
  font-size: 0.7rem;
  color: var(--planet-color, #4fc3f7);
  flex-shrink: 0;
  min-width: 40px;
}

.mission-name {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.mission-agency {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
}

/* Speed indicator */
.orbital-speed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.speed-icon {
  font-size: 1.2rem;
}

.speed-text {
  flex: 1;
}

.speed-val {
  font-size: 1rem;
  color: var(--planet-color, #4fc3f7);
}

.speed-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Controls hint */
#controls-hint {
  position: fixed;
  top: 0.3rem;
  left: 1rem;
  font-size: 0.55rem;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.7);
  z-index: 10;
  line-height: 1.5;
  pointer-events: none;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hint-line {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.476);
  letter-spacing: 0;
  line-height: 1.5;
  white-space: nowrap;
}

.hint-project-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.827);
  font-weight: 500;
}



/* ── LUCIDE ICON HELPERS ── */
.btn-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.about-link-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  vertical-align: middle;
  flex-shrink: 0;
}

.ctrl-row-icon {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 2;
  flex-shrink: 0;
}

/* ── CONTROLS PANEL (sidebar) ── */
#controls-panel {
  position: fixed;
  bottom: 8rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 15;
  align-items: flex-end;
}

.ctrl-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ctrl-row--speed {
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 40px;
  padding: 0.28rem 0.75rem;
  transition: border-color 0.25s, background 0.25s;
  align-items: center;
}

.speed-label {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.ctrl-row--speed:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
}

.ctrl-label {
  display: none;
}

.ctrl-btn {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  color: rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.ctrl-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  pointer-events: none;
  flex-shrink: 0;
}

a.ctrl-btn {
  text-decoration: none;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.6);
  transform: scale(1.03);
}

.ctrl-btn.active {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #000;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.5);
}

#speed-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

#speed-val {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  min-width: 28px;
  text-align: center;
}

/* ── KEYBOARD HINTS ── */
#controls-hint {
  position: fixed;
  top: 0.3rem;
  left: 1rem;
  font-size: 0.55rem;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0;
  z-index: 10;
  line-height: 1.5;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ── PROGRESS BAR ── */
.loader-progress {
  width: 280px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 1.2rem;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4fc3f7, #ab47bc, #ef5350);
  background-size: 200%;
  animation: progressShimmer 1.5s linear infinite;
  border-radius: 2px;
  transition: width 0.3s ease;
}

@keyframes progressShimmer {
  0% {
    background-position: 200%
  }

  100% {
    background-position: 0%
  }
}



/* ── SPACESHIP HUD ── */
#ship-hud {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

#ship-hud.active {
  display: block;
}

.hud-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(79, 195, 247, 0.5);
  border-radius: 50%;
}

.hud-crosshair::before,
.hud-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(79, 195, 247, 0.5);
}

.hud-crosshair::before {
  width: 12px;
  height: 1px;
  top: 50%;
  left: -16px;
  transform: translateY(-50%);
}

.hud-crosshair::after {
  width: 12px;
  height: 1px;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
}

.hud-speed {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: rgba(79, 195, 247, 0.7);
  letter-spacing: 2px;
}

.hud-throttle {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.hud-throttle-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4fc3f7, #ef5350);
  border-radius: 2px;
  transition: width 0.1s;
}

.hud-compass {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: rgba(79, 195, 247, 0.5);
  letter-spacing: 3px;
}

.hud-border-tl,
.hud-border-tr,
.hud-border-bl,
.hud-border-br {
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: rgba(79, 195, 247, 0.25);
  border-style: solid;
  border-width: 0;
}

.hud-border-tl {
  top: 8%;
  left: 8%;
  border-top-width: 1px;
  border-left-width: 1px;
}

.hud-border-tr {
  top: 8%;
  right: 8%;
  border-top-width: 1px;
  border-right-width: 1px;
}

.hud-border-bl {
  bottom: 8%;
  left: 8%;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.hud-border-br {
  bottom: 8%;
  right: 8%;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.hud-proximity {
  position: absolute;
  bottom: 20%;
  right: 8%;
  font-size: 0.6rem;
  color: rgba(79, 195, 247, 0.5);
  text-align: right;
  line-height: 1.8;
}

/* ── WORMHOLE OVERLAY ── */
#wormhole-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
}

#wormhole-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

#wormhole-canvas {
  width: 100%;
  height: 100%;
}

#wormhole-speed-hud {
  display: none;
  position: fixed;
  z-index: 52;
  pointer-events: none;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

#wormhole-speed-hud.active {
  display: block;
}

.wh-speed-value {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px #4fc3f7, 0 0 60px #0288d1, 0 0 90px #01579b;
  letter-spacing: 0.15em;
  animation: whSpeedPulse 0.3s ease-in-out infinite alternate;
}

.wh-speed-label {
  font-size: clamp(0.6rem, 1.5vw, 0.9rem);
  color: #4fc3f7;
  letter-spacing: 0.4em;
  margin-top: 0.2rem;
  opacity: 0.8;
}

.wh-speed-status {
  font-size: clamp(0.8rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  margin-top: 0.6rem;
  padding: 0.3rem 1.2rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(79, 195, 247, 0.3);
  text-shadow: 0 0 20px currentColor;
}

.wh-status-subluminal {
  color: #80cbc4;
}

.wh-status-lightspeed {
  color: #fff176;
  text-shadow: 0 0 30px #fff176, 0 0 60px #ff9800;
  animation: whLightspeedFlash 0.15s ease infinite alternate;
}

.wh-status-superluminal {
  color: #ff4081;
  text-shadow: 0 0 40px #ff4081, 0 0 80px #f50057;
  animation: whLightspeedFlash 0.1s ease infinite alternate;
}

.wh-status-exit {
  color: #69f0ae;
}

.wh-dest-label {
  position: fixed;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 52;
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  color: rgba(79, 195, 247, 0.7);
  letter-spacing: 0.5em;
  pointer-events: none;
  display: none;
}

.wh-dest-label.active {
  display: block;
}

.wh-dest-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2em;
  margin-top: 0.3rem;
  text-shadow: 0 0 20px #4fc3f7, 0 0 40px #0288d1;
}

@keyframes whSpeedPulse {
  from {
    opacity: 0.85;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes whLightspeedFlash {
  from {
    opacity: 0.7;
  }

  to {
    opacity: 1;
  }
}

#wormhole-vignette {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 51;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 100, 255, 0.15) 70%, rgba(0, 0, 0, 0.6) 100%);
}

#wormhole-vignette.active {
  display: block;
}

#wormhole-flash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 53;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}

/* ── PHOTO MODE ── */
#photo-flash {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
}

#photo-flash.active {
  display: block;
  animation: flashAnim 0.5s ease-out;
}

@keyframes flashAnim {
  0% {
    opacity: 0.9
  }

  100% {
    opacity: 0
  }
}

#photo-watermark {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
  z-index: 55;
}

/* ── MINIMAP ── */
#minimap {
  position: fixed;
  top: 1.5rem;
  right: 1rem;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  z-index: 15;
  overflow: hidden;
  transition: opacity 0.3s;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ── SCREENSAVER MODE INDICATOR ── */
#screensaver-badge {
  display: none;
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.55rem;
  color: rgba(79, 195, 247, 0.35);
  letter-spacing: 3px;
  z-index: 15;
}

#screensaver-badge.active {
  display: block;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

/* ── EXTRA CONTROL BUTTONS ── */
.ctrl-btn-group {
  position: fixed;
  top: 5rem;
  right: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 15;
}

/* ── ABOUT ME SECTION ── */
#about-btn {
  position: fixed;
  top: 1.2rem;
  right: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: none;
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #000;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 12;
}

#about-btn svg {
  width: 13px;
  height: 13px;
  stroke: #000;
  stroke-width: 2;
  flex-shrink: 0;
}

#about-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.03);
}

#about-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  perspective: 1200px;
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
  filter: blur(20px);
  transition: opacity 0.8s ease, filter 0.8s ease;
  overflow: hidden;
}

#about-overlay.active {
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
}

#about-overlay .modal-scroll-area {
  align-items: center;
  justify-content: center;
}

.about-modal-content {
  position: relative;
  max-width: 480px;
  width: 50%;
  padding-bottom: 0;
  text-align: center;
}

.about-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4fc3f7, #ab47bc);
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(79, 195, 247, 0.3);
}

.about-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
  color: #fff;
  line-height: 1;
}

.about-role {
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 10px auto 1.2rem;
  font-style: italic;
}

.about-bio {
  font-size: 0.88rem;
  line-height: 1.8;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.about-links {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  border-radius: 100px;
  padding: 0.65rem 1.4rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.about-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  pointer-events: none;
  flex-shrink: 0;
}

.about-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.6);
  transform: scale(1.03);
}

.about-tech {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.692);
  text-transform: uppercase;
  margin-top: 0.5rem;
  font-weight: 100;
}

.about-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.65rem;
  color: #fff;
  margin: 0.2rem;
}

.credits-btn {
  animation: creditsPulse 2.5s ease-in-out infinite;
}

@keyframes creditsPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.4), 0 0 24px rgba(255, 255, 255, 0.15); }
}

/* ── MOBILE TOUCH CONTROLS ── */
#touch-ship-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  padding: 1rem;
  pointer-events: none;
}

#touch-ship-controls.active {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.touch-stick-zone {
  width: 130px;
  height: 130px;
  background: rgba(79, 195, 247, 0.06);
  border: 1px solid rgba(79, 195, 247, 0.2);
  border-radius: 50%;
  position: relative;
  pointer-events: all;
  touch-action: none;
}

.touch-stick-knob {
  width: 50px;
  height: 50px;
  background: rgba(79, 195, 247, 0.3);
  border: 2px solid rgba(79, 195, 247, 0.6);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background 0.15s;
  pointer-events: none;
}

.touch-stick-knob.active {
  background: rgba(79, 195, 247, 0.5);
}

.touch-action-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: all;
}

.touch-action-btn {
  width: 56px;
  height: 56px;
  background: rgba(79, 195, 247, 0.08);
  border: 1px solid rgba(79, 195, 247, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: rgba(79, 195, 247, 0.7);
  touch-action: none;
  cursor: pointer;
  transition: all 0.15s;
}

.touch-action-btn:active,
.touch-action-btn.pressed {
  background: rgba(79, 195, 247, 0.3);
  border-color: #4fc3f7;
  box-shadow: 0 0 15px rgba(79, 195, 247, 0.4);
}

.touch-label {
  font-size: 0.5rem;
  letter-spacing: 1px;
  color: rgba(79, 195, 247, 0.4);
  text-align: center;
  margin-top: 0.3rem;
  pointer-events: none;
}

/* ── MOBILE RESPONSIVE ── */
/* ── TABLET / SMALL DESKTOP ── */
@media (max-width: 1400px) {

  /* Controls panel */
  #controls-panel {
    bottom: 7rem;
    gap: 0.25rem;
  }

  .ctrl-btn {
    font-size: 0.75rem;
    padding: 0.5rem 1.1rem;
    gap: 0.45rem;
  }

  .ctrl-btn svg {
    width: 12px;
    height: 12px;
  }

  .speed-label {
    font-size: 0.6rem;
  }

  .ctrl-row--speed {
    padding: 0.22rem 0.6rem;
    gap: 0.4rem;
  }

  #speed-slider {
    width: 60px;
  }

  /* Minimap */
  #minimap {
    width: 130px;
    height: 130px;
    top: 1.2rem;
    right: 0.8rem;
  }

  /* Planet nav */
  .nav-orb {
    width: 30px;
    height: 30px;
  }

  .nav-planet-name {
    font-size: 0.5rem;
  }

  /* Planet info panel */
  #planet-panel {
    bottom: 5rem;
    left: 0.8rem;
    min-width: 260px;
    max-width: 420px;
    padding: 0.9rem 1.2rem 0.8rem;
  }

  .panel-body .panel-name {
    font-size: 4rem !important;
  }

  .panel-body .panel-type {
    font-size: 0.5rem;
  }

  .panel-body .panel-desc {
    font-size: 1rem;
    margin-bottom: 0.7rem;
  }

  .panel-footer-btn {
    font-size: 0.78rem;
    padding: 0.6rem 1.5rem;
  }

  .panel-footer-btn svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 768px) {

  /* Hide keyboard-only hints */
  #controls-hint {
    display: none;
  }

  /* Minimap */
  #minimap {
    width: 90px;
    height: 90px;
    top: 3.8rem;
    right: 0.5rem;
  }

  /* Controls panel */
  #controls-panel {
    bottom: 7rem;
    top: auto;
    right: 0.3rem;
  }

  .ctrl-row {
    padding: 0.15rem 0.4rem;
  }

  .ctrl-label {
    font-size: 0.5rem;
  }

  .ctrl-btn {
    width: auto;
    height: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
    gap: 0.35rem;
  }

  #speed-slider {
    width: 55px;
  }

  /* Planet nav — horizontal scroll instead of wrap */
  .nav-orb {
    width: 30px;
    height: 30px;
  }

  .nav-planet-name {
    font-size: 0.5rem;
  }

  /* Header */
  #header {
    padding: 0.7rem 1rem;
  }

  .site-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 2px;
  }

  .site-subtitle {
    font-size: 0.5rem;
  }

  #about-btn {
    right: 0.6rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.5rem;
  }

  /* Planet info panel — larger close button, smaller hero */
  .panel-close {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    line-height: 44px;
  }

  .panel-hero {
    height: 160px;
  }

  .panel-planet-visual {
    width: 80px;
    height: 80px;
  }

  /* About overlay — scrollable */
  .about-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    width: 90%;
  }

  .about-avatar {
    width: 65px;
    height: 65px;
    font-size: 1.6rem;
  }

  .about-name {
    font-size: 1.5rem;
  }

  /* Hint bar */
  #hint {
    max-width: 88vw;
    font-size: 0.65rem;
    text-align: center;
  }

  /* Wormhole */
  .wh-speed-status {
    max-width: 90vw;
  }
}

@media (max-width: 480px) {
  #minimap {
    display: none;
  }

  .site-subtitle {
    display: none;
  }

  #controls-panel {
    bottom: 6.5rem;
    top: auto;
    right: 0.2rem;
  }

  .ctrl-row {
    padding: 0.12rem 0.3rem;
    gap: 0.2rem;
  }

  .ctrl-label {
    font-size: 0.45rem;
  }

  #about-btn {
    font-size: 0.45rem;
    padding: 0.2rem 0.5rem;
    right: 0.4rem;
  }
}

@media (max-height: 500px) and (max-width: 768px) {

  /* Landscape phone */
  #planet-nav {
    bottom: 0.8rem;
  }

  .nav-orb {
    width: 26px;
    height: 26px;
  }

  .nav-planet-name {
    font-size: 0.45rem;
  }
}

/* ── WELCOME IMAGES ── */
/* ── WELCOME DECORATIVE IMAGES ── */
.welcome-earth-wrap {
  position: absolute;
  right: 8%;
  top: 38%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.welcome-earth {
  width: 100px;
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 0 60px rgba(79, 195, 247, 0.25)) blur(10px);
  transform: translateY(30px);
  animation: elemFadeIn 0.8s ease-out 0.5s forwards;
}

.welcome-galaxy {
  position: absolute;
  top: 3%;
  left: 2%;
  width: min(260px, 22vw);
  height: auto;
  z-index: 2;
  pointer-events: none;
  opacity: 0.4;
  border-radius: 20px;
  filter: drop-shadow(0 0 40px rgba(120, 80, 200, 0.2));
  animation: fadeInOnly 1s ease-out 0.5s both;
  will-change: transform;
}

.welcome-telescope-wrap {
  position: absolute;
  right: 3%;
  top: 33%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.welcome-telescope {
  width: 30px;
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 0 30px rgba(200, 180, 255, 0.15)) blur(10px);
  transform: translateY(30px);
  animation: elemFadeIn 0.8s ease-out 0.7s forwards;
}

.welcome-images {
  position: absolute;
  bottom: -260px;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transform: translateY(30px);
  animation: elemFadeIn 0.8s ease-out 0.3s forwards;
}

.welcome-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.welcome-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
}

@media (max-width: 1000px) {
  .welcome-images {
    bottom: 0;
  }
}