* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #000 url("stars.png") center/cover fixed no-repeat;
  color: white;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

/* Header */
.app-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px 10px 10px;
}

.app-title {
  font-size: 2.5rem;
  margin: 0;
  text-shadow: 0 0 10px white, 0 0 20px black, 0 0 40px white;
}

.app-subtitle {
  font-size: 1rem;
  opacity: 0.8;
  margin: 5px 0 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Menu */
.planet-menu {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 15px;
}

.planet-menu button {
  border-radius: 20px;
  padding: 8px 16px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.planet-menu button:hover,
.planet-menu button.active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}
/* Stage — where the planet lives */
.stage {
  position: relative;
  z-index: 1;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* The planet image */
.planet-bg {
  position: relative;
  transform: scale(0.3);
  width: 400px;
  max-width: 40vw;
  opacity: 0;
  transition: transform 1.5s ease-out, opacity 1.5s ease-out;
  flex-shrink: 0;
}

.planet-bg.show {
  transform: scale(1);
  opacity: 1;
}

/* White info card */
.info-card {
  position: relative;
  background: white;
  color: #222;
  border-radius: 50px;
  padding: 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  top: -40px;
}
.info-card::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 140px;
  width: 55px;
  height: 55px;
  background: white;
  border-radius: 50%;
  box-shadow: -5px 5px 10px rgba(0,0,0,0.05);
}
.info-card::after {
  content: "";
  position: absolute;
  left: -55px;
  top: 175px;
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
}

.card-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.5s ease;
}

.card-view.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.planet-type {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: #888;
  margin: 0 0 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.planet-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: #222;
  line-height: 1;
}

.planet-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: auto;
}

.facts-heading {
  font-size: 1.5rem;
  margin: 0 0 20px;
  color: #222;
}

#factsList {
  padding-left: 20px;
  line-height: 1.8;
  color: #444;
  margin-bottom: auto;
}

#factsList li {
  margin-bottom: 6px;
}

.card-btn {
  background: #4a1a6e;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  margin: 5px 5px 0 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
}

.card-btn:hover {
  background: #6a3494;
  transform: translateY(-2px);
}

/* Planet glow colors */
.mercury { filter: drop-shadow(0 0 60px rgba(180, 0, 255, 0.8)); }
.venus   { filter: drop-shadow(0 0 60px rgba(255, 200, 0, 0.8)); }
.earth   { filter: drop-shadow(0 0 60px rgba(0, 150, 255, 0.8)); }
.mars    { filter: drop-shadow(0 0 60px rgba(255, 60, 0, 0.8)); }
.jupiter { filter: drop-shadow(0 0 60px rgba(255, 140, 0, 0.7)); }
.saturn  { filter: drop-shadow(0 0 60px rgba(255, 220, 100, 0.8)); }
.uranus  { filter: drop-shadow(0 0 60px rgba(100, 220, 255, 0.8)); }
.neptune { filter: drop-shadow(0 0 60px rgba(0, 80, 255, 0.9)); }
.sun     { filter: drop-shadow(0 0 80px rgba(255, 200, 0, 1)); }
.moon    { filter: drop-shadow(0 0 50px rgba(220, 220, 220, 0.7)); }


/* Desktop astronaut */
.welcome-astronaut {
  width: 350px;
  margin-top: -50px;
}
.welcome-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}/* Mobile fixes — phones smaller than 768px */
@media (max-width: 768px) {
  
  .stage {
    flex-direction: column;
    gap: 20px;
    padding: 20px 15px;
  }
  
  .info-card {
    width: 100%;
    max-width: 100%;
    padding: 25px 20px;
    min-height: auto;
  }
  
  .planet-title {
    font-size: 2rem;
  }
  
  .planet-bg {
    width: 250px;
    max-width: 60vw;
  }
  
  /* Astronaut sized for mobile */
  .welcome-astronaut {
    width: 200px;
    max-width: 50vw;
    margin: 0 auto;
    display: block;
  }
  
  /* Hide astronaut if needed */
  .welcome-astronaut.hidden {
    display: none;
  }
}
