html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
  color: white;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  overflow: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

header {
  background-color: #333;
  color: #fff;
  padding: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

nav {
  background-color: #f4f4f4;
  padding: 10px;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

nav ul li {
  margin-right: 10px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  padding: 5px 10px;
}

main {
  flex: 1;
  padding: 20px;
}

body.home {
  background-image: url('images/solarsystem.jpg');
}

body.mercury {
  background-image: url('images/mercury.jpg');
}

body.venus {
  background-image: url('images/venus.jpg');
}

body.mars {
  background-image: url('images/mars.png');
}

body.earth {
  background-image: url('images/earth.jpg');
}

body.jupiter {
  background-image: url('images/jupiter.webp');
}

body.saturn {
  background-image: url('images/saturn.jpg');
}

body.uranus {
  background-image: url('images/uranus.jpg');
}

body.neptune {
  background-image: url('images/neptune.jpg');
}

.planet-info {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.planet-info-box {
  flex: 1;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 20px;
  margin: 10px;
  min-width: 200px; /* Set a minimum width */
  max-width: 300px; /* Set a maximum width */
}

.planet-info-box h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.planet-info-box p {
  font-size: 16px;
}

.content-button {
  margin: 10px;
  padding: 8px 16px;
  font-size: 16px;
}

.content-section {
  display: none;
  margin-top: 20px;
}

.planet-content {
  margin-top: 40px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  header {
    padding: 15px;
  }

  .planet-info {
    flex-direction: column; /* Stack boxes vertically on smaller screens */
  }

  .planet-info-box {
    margin: 5px 0; /* Reduce margin for smaller screens */
    max-width: none; /* Remove max-width to utilize full width */
  }

  nav ul {
    flex-direction: column; /* Stack navigation items vertically */
  }

  nav ul li {
    margin: 5px 0; /* Reduce margin for smaller screens */
  }

  .content-button {
    padding: 6px 12px;
    font-size: 14px; /* Smaller button font size */
  }
}

@media (max-width: 480px) {
  .planet-info-box h3 {
    font-size: 16px; /* Smaller heading font size */
  }

  .planet-info-box p {
    font-size: 14px; /* Smaller paragraph font size */
  }

  .content-button {
    padding: 5px 10px; /* Smaller button padding */
    font-size: 12px; /* Even smaller button font size */
  }
}
