/* Ensure the html and body cover the full viewport */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden; /* Prevent overflow */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at bottom, #0d2c31, #111);
  position: relative;
}

/* Style the content area */
.content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 70%;
  width: 100%;
  text-align: center;
}

/* Style the heading */
h1 {
  color: antiquewhite;
  font-size: 2.3em;
  z-index: 3;
  margin: 0;
  position: relative; /* Ensure it's above the stars */
}

/* Container for the stars, covering the entire viewport */
.night {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Prevent overflow issues */
  transform: rotateZ(40deg);
}

/* Individual star styles */
.star {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 4px;
  background: linear-gradient(-45deg, #5436a0, rgba(213, 19, 136, 0.603));
  border-radius: 999px;
  filter: drop-shadow(0 0 6px #f5ff69);
  animation: tail 3s ease-in-out infinite, falling 3s ease-in-out infinite;
}

@keyframes tail {
  0% {
    width: 0;
  }
  30% {
    width: 100px;
  }
  100% {
    width: 0;
  }
}

@keyframes falling {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(300px);
  }
}

/* Star's before and after pseudo-elements for shining effect */
.star::before,
.star::after {
  content: '';
  position: absolute;
  top: calc(50% - 2px);
  right: 0;
  height: 4px;
  background: linear-gradient(-45deg, rgba(0, 0, 255, 0), #5F91FF, rgba(0, 0, 255, 0));
  border-radius: 100%;
  transform: translateX(50%) rotateZ(45deg);
  animation: shining 3s ease-in-out infinite;
}

@keyframes shining {
  0% {
    width: 0;
  }
  50% {
    width: 30px;
  }
  100% {
    width: 0;
  }
}

.star::after {
  transform: translateX(50%) rotateZ(-45deg);
}

/* Specific positions for each star with animation delays */
.star:nth-child(1) {
  top: calc(50% - 100px);
  left: calc(50% - 250px);
  animation-delay: 1s;
}

.star:nth-child(1)::before,
.star:nth-child(1)::after {
  animation-delay: 1s;
}

.star:nth-child(2) {
  top: calc(50% - 50px);
  left: calc(50% - 200px);
  animation-delay: 1.2s;
}

.star:nth-child(2)::before,
.star:nth-child(2)::after {
  animation-delay: 1.2s;
}

.star:nth-child(3) {
  top: calc(50% - 0px);
  left: calc(50% - 150px);
  animation-delay: 1.4s;
}

.star:nth-child(3)::before,
.star:nth-child(3)::after {
  animation-delay: 1.4s;
}

.star:nth-child(4) {
  top: calc(50% - -50px);
  left: calc(50% - 200px);
  animation-delay: 1.6s;
}

.star:nth-child(4)::before,
.star:nth-child(4)::after {
  animation-delay: 1.6s;
}

.star:nth-child(5) {
  top: calc(50% - -100px);
  left: calc(50% - 250px);
  animation-delay: 1.8s;
}

.star:nth-child(5)::before,
.star:nth-child(5)::after {
  animation-delay: 1.8s;
}

/* Style the signup form */
.signup {
  position: relative;
  z-index: 3;
  text-align: center;
  color: antiquewhite;
  margin-top: -30px;
  margin-bottom: 10px;
}

.signup p {
  margin-bottom: 10px;
  font-size: 1.2em;
}

#signup-form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#signup-form input[type="email"] {
  padding: 7px;
  margin-bottom: 10px;
  border: none;
  border-radius: 5px;
  width: 80%;
  max-width: 300px;
  font-size: 1em;
}

#signup-form button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #5436a0;
  color: antiquewhite;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
}

#signup-form button:hover {
  background-color: #432780;
}

/* Style the success/error message */
.message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: #5436a0;
  color: antiquewhite; /* Match the color of the h1 */
  font-size: 1.5em;
  font-weight: bold;
  border-radius: 5px;
  text-align: center;
  z-index: 4;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Reduce the thickness of the border */
  transition: opacity 0.5s;
  opacity: 0;
}

.message.show {
  opacity: 1;
}

