::selection {
  background-color: #f0dc03;
  color: #000;
}

body {
  font-family: "Poppins", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: black;
  color: #fff;
}

img {
  max-width: 90% !important;
  height: auto;
}

header {
  top: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: absolute; /* Changed from sticky to absolute */
  width: 100%;
  color: #fff;
  z-index: 1000;
  display: flex;
}

header h1 {
  margin: 1rem 0 0 0 !important;
  padding: 0;
}

header p {
  margin: 0 !important;
  padding: 0;
  margin-bottom: 3rem !important;
}

.container {
  margin-top: 10vh !important;
  text-align: center;
  max-width: 800px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.date {
  font-size: 1rem;
  z-index: 1;
  position: relative;
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
}

#image-container {
  margin-top: 2rem !important;
  margin: 20px 0;
}

#apod-image {
  max-width: 100%;
  height: auto;
  border: 2px solid #fff;
  border-radius: 10px;
}

#date {
  font-size: 1rem;
  font-weight: lighter;
  opacity: 0.8;
  margin-top: 1rem;
}

#info-container {
  text-align: left;
}

#explanation {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
}

#description {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
  cursor: text;
}

#rate-limit-info {
  margin-top: 2rem;
  font-weight: bolder;
  width: 100%;
}

#footer {
  width: 100%;
  text-align: center;
  margin: 1rem;
  background-color: #000;
  color: #fff;
  z-index: 1000;
  font-size: small;
  font-weight: bold;
  margin-top: 2rem;
}

.githubLogo {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 30px;
  filter: drop-shadow(0 0 2px #070ed9);
  z-index: 1000;
}

.githubLogo a {
  color: #626262;
  transition: color 0.3s ease;
}

.githubLogo a:hover {
  color: #ffffff;
}

p a {
  color: #f0dc03;
  text-decoration: none;
  font-weight: bolder;
}

p a:hover {
  text-decoration: underline;
}

/* Media Queries */

@media (max-width: 768px) {
  header {
    position: absolute;
    margin-bottom: 3rem !important;
  }
  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 1rem;
  }

  .container {
    margin-top: 5vh !important;
  }

  #apod-image {
    max-width: 90%;
    margin-top: 5rem !important;
  }

  #info-container {
    padding: 0 20px;
  }

  #footer {
    font-size: x-small;
  }

  .githubLogo {
    top: 10px;
    right: 10px;
  }

  .githubLogo a {
    font-size: 20px;
  }

  .date {
    font-size: 0.8rem;
  }

  #date {
    font-size: 0.8rem;
  }

  #explanation {
    font-size: 0.8rem;
  }

  #rate-limit-info {
    font-size: 0.8rem;
  }

  p a {
    font-size: 0.8rem;
  }

  p a:hover {
    font-size: 0.8rem;
  }

  img {
    max-width: 90% !important;
  }
}
