/* === Global Reset & Fonts === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
}

body {
  color: #f0f0f0;
  padding: 20px;
  text-align: center;
  overflow-x: hidden;
  background-image: url('StarTrace-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;                    /* Ensure full screen height */
  width: 100%;
}

/* === Night Sky & Particles === */
.background {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: transparent;
  z-index: -20;
}

.night-sky {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: -10;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* === Shooting Stars === */
.shooting-star {
  position: absolute;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, white, transparent);
  animation: shoot 3s linear infinite;
  opacity: 0.7;
}

@keyframes shoot {
  0% {
    transform: translateX(-100px) translateY(0px) rotate(45deg);
    opacity: 1;
  }
  100% {
    transform: translateX(150vw) translateY(100vh) rotate(45deg);
    opacity: 0;
  }
}

/* === Logo === */
.logo-container {
  text-align: center;
  margin-top: 20px;
}

.logo {
  max-width: 150px;
  width: 15%;
  height: auto;
  margin-bottom: 10px;
  border-radius: 20%;
}

/* Responsive logo */
@media screen and (max-width: 768px) {
  .logo {
    width: 25%;
  }
}

/* === Headings === */
h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #f7d84c;
}
h2 {
  color: #f9e488;
}
h3 {
  color: #fae068;
}

/* === Date Input === */
#dateInput {
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  margin-bottom: 20px;
}

/* === Spinner === */
#spinner {
  font-size: 1.2rem;
  color: #00ffcc;
  margin: 15px 0;
}
.hidden {
  display: none;
}

/* === Milestones === */
.milestone-box,
.POTD {
  background-color: #002a39;
  
  padding: 20px;
  border-radius: 10px;
  margin-top: 25px;
}

.milestone-entry,
.milestone-item {
  background-color:#01001b;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
  text-align: left;
}

.milestone-entry em,
.milestone-entry strong {
  color: #ffd000;
  font-style: italic;
}

.milestone-item h4 {
  color: #ffc107;
  font-style: italic;
}

/* === APOD === */
#apodBox {
  margin-top: 30px;
}

#media img,
#media iframe {
  max-width: 100%;
  border-radius: 10px;
  margin: 15px 0;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

#explanation {
  text-align: justify;
  padding: 10px;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-top: 15px;
  font-size: 1rem;
}

/* === Buttons === */
button {
  background-color: #ff4081;
  border: none;
  color: white;
  padding: 10px 18px;
  margin: 5px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #e73370;
}

.apod-actions button {
  padding: 8px 14px;
  margin-right: 10px;
  background-color: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.apod-actions button:hover {
  background-color: #333;
}

/* === Footer === */
.footer {
  text-align: center;
  font-size: 14px;
  color: rgb(255, 225, 55);
  background: #002a39;
 
  padding: 10px 0;
  border-radius: 5px;
  width: 100%;
}

@media screen and (max-width: 480px) {
  .footer {
    font-size: 0.9rem;
    padding: 12px 5px;
  }

  h1 {
    font-size: 1.6rem;
  }

  #explanation {
    font-size: 0.95rem;
  }

  #milestoneContent div {
    font-size: 0.9rem;
  }

  input[type="date"] {
    width: 90%;
  }

  #apodBox,
  .milestone-box {
    padding: 1rem;
    margin: 1rem;
  }
}
/* === Glowing Stars === */
.glowing-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 30%, #ffe600 70%);
  box-shadow: 0 0 6px 2px #ffe600;
  animation: glowStar 3s ease-in-out infinite alternate;
  opacity: 0.8;
}

@keyframes glowStar {
  0% {
    transform: scale(1);
    opacity: 0.4;
    box-shadow: 0 0 4px 1px #fbfbfb;
  }
  100% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 10px 4px #ffec8d;
  }
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
@media screen and (max-width: 480px) {
  body {
    background-size: cover;
    background-position: center;
  }
}
.no-milestone {
  color: #ccc;
  font-style: italic;
  text-align: center;
  padding: 1em;
}
