/* Global reset & box sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base page styles */
body {
  min-height: 100vh;
  font-family: 'Public Sans', 'Segoe UI', Arial, sans-serif;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.25), transparent 35%),
    linear-gradient(135deg, #01030a 0%, #061126 45%, #000000 100%);
  color: #ffffff;
  overflow-y: auto;
}

/* Centered container */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

h1 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #212121;
}

/* NASA-inspired color scheme */
.site-header h1 {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(80, 200, 255, 0.3);
}

/* Logo */
.logo {
  width: 150px;
  margin-right: 15px;
  display: block;
}

/* Logo glow and circling light */
.logo-wrap {
  position: relative;
  display: inline-block;
  width: 140px;
  height: auto;
}
.logo-wrap .logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(10,120,255,0.25)) drop-shadow(0 2px 6px rgba(0,200,255,0.06));
  border-radius: 6px;
  position: relative;
  z-index: 2;
}
.logo-glow {
  position: absolute;
  inset: -6px -10px -6px -10px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
  background: conic-gradient(from 0deg, rgba(80,200,255,0.95), rgba(255,255,255,0.6), rgba(80,200,255,0.95), rgba(255,255,255,0.2));
  filter: blur(16px) saturate(140%);
  opacity: 0.9;
  mix-blend-mode: screen;
  transform-origin: 50% 50%;
  animation: spinGlow 6s linear infinite;
}

@keyframes spinGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Subtle halo around the logo */
.logo-wrap::before {
  content: '';
  position: absolute;
  inset: -14px -18px -14px -18px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(80,200,255,0.08), transparent 20%), radial-gradient(circle at 70% 70%, rgba(120,160,255,0.06), transparent 30%);
  z-index: 0;
}

/* Date‐picker & button row */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 0 20px;
}

/* Inputs and buttons */
input[type="date"],
button {
  font-family: 'Public Sans', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  color: #666;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.4;
  width: 100%;
}

/* Button specific */
button {
  background-color: #d3d3d3;
  color: black;
  cursor: pointer;
}
button:hover {
  background-color: #bfbfbf;
}

/* Stack horizontally on wider screens */
@media (min-width: 600px) {
  .filters {
    flex-direction: row;
    padding: 0;
  }
  
  input[type="date"],
  button {
    width: auto;
  }
}

/* Gallery flex container */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
}

/* Gallery items */
.gallery-item {
  flex: 1 1 100%;  /* full width by default */
  min-width: 280px;
  max-width: 500px;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Three columns on wider screens */
@media (min-width: 1000px) {
  .gallery-item {
    flex: 0 1 31%;
  }
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item p {
  margin-top: 10px;
  padding: 5px;
  font-size: 14px;
}

/* Placeholder content */
.placeholder {
  flex: 1 1 100%;
  text-align: center;
  padding: 40px;
  color: #666;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* Did You Know box */
.did-you-know {
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 20px 20px 20px;
  text-align: center;
  font-weight: bold;
}

/* Modal styles */
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,0.6); }
.modal-content { position: relative; background: #fff; color: #111; width: min(1000px, 96%); max-height: 90vh; overflow: auto; border-radius: 10px; box-shadow: 0 10px 30px rgba(2,6,23,0.4); padding: 18px; z-index: 10; }
.modal-close { position: absolute; right: 10px; top: 10px; background: transparent; border: none; font-size: 20px; cursor: pointer; }
.modal-body img { width: 100%; height: auto; border-radius: 6px; }
.modal-body iframe { width: 100%; height: 560px; border: none; border-radius: 6px; }
.modal-body .video-player { display: flex; flex-direction: column; gap: 10px; }
.modal-body .video-link { display: inline-flex; align-self: flex-start; padding: 8px 12px; background: #0b3d91; color: #fff; text-decoration: none; border-radius: 999px; font-weight: 600; }
.modal-body .video-link:hover { background: #072a5b; }
.modal-body h2 { margin-top: 8px; color: #0b3d91; }
.modal-body .meta { color: #666; margin-bottom: 8px; }
.modal-body p { line-height: 1.5; }

/* Starfield background and shooting stars */
.container::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.0)),
    radial-gradient(1.2px 1.2px at 40% 70%, rgba(255,255,255,0.8), rgba(255,255,255,0.0)),
    radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.7), rgba(255,255,255,0.0));
  background-repeat: repeat;
  background-size: 200px 200px, 300px 300px, 250px 250px;
}

/* Shooting star animation */
.shooting-star {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 3px;
  height: 3px;
  background: linear-gradient(45deg, rgba(255,255,255,1), rgba(255,255,255,0));
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.8);
  transform: rotate(25deg) translateX(-100vw);
  animation: shoot 3s linear infinite;
  opacity: 0;
}

@keyframes shoot {
  0% { transform: translate3d(-10vw, -10vh, 0) scaleX(0.2); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate3d(120vw, 120vh, 0) scaleX(1); opacity: 0; }
}

/* Add multiple shooting stars with staggered animation delays */
.shooting-star.s1 { animation-delay: 0s; }
.shooting-star.s2 { animation-delay: 2.2s; }
.shooting-star.s3 { animation-delay: 4.6s; }

/* Ensure gallery text is readable */
.gallery-item { background: rgba(255,255,255,0.03); }
.gallery-item h3 { color: #fff; }
.gallery-item p { color: rgba(255,255,255,0.85); }
