/**
 * Hujan Falak - Starry background, celestial hero, falak-themed
 */
.hujan-falak-page {
  position: relative;
  overflow-x: hidden;
}

body.hujan-falak-page {
  background: #040210 !important;
}

body.hujan-falak-page::before {
  display: none;
}

.hujan-falak-page .falak-nav,
.hujan-falak-page .falak-main,
.hujan-falak-page .falak-prefooter,
.hujan-falak-page .falak-footer {
  position: relative;
  z-index: 2;
}

/* ===== GALAXY NIGHT (selaras dengan falak.css) ===== */
.hujan-stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(165deg, #030014 0%, #0a0328 18%, #120a35 38%, #0a1638 55%, #061228 72%, #020510 100%),
    radial-gradient(ellipse 120% 80% at 15% 25%, rgba(88, 28, 135, 0.45) 0%, transparent 45%),
    radial-gradient(ellipse 90% 70% at 85% 20%, rgba(30, 64, 175, 0.35) 0%, transparent 42%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(8, 47, 73, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 70% 75%, rgba(124, 58, 237, 0.2) 0%, transparent 40%),
    radial-gradient(ellipse 55% 45% at 30% 60%, rgba(6, 182, 212, 0.12) 0%, transparent 45%);
  background-attachment: fixed;
}

.hujan-stars-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 14%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1px 1px at 28% 8%, rgba(165, 243, 252, 0.9), transparent),
    radial-gradient(1.4px 1.4px at 44% 18%, rgba(253, 230, 138, 0.88), transparent),
    radial-gradient(1px 1px at 58% 6%, rgba(196, 181, 253, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 72% 16%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 88% 11%, rgba(249, 168, 212, 0.82), transparent),
    radial-gradient(1.4px 1.4px at 8% 42%, rgba(125, 211, 252, 0.75), transparent),
    radial-gradient(1px 1px at 22% 55%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.6px 1.6px at 38% 48%, rgba(253, 230, 138, 0.72), transparent),
    radial-gradient(1px 1px at 52% 62%, rgba(196, 181, 253, 0.68), transparent),
    radial-gradient(1.4px 1.4px at 68% 54%, rgba(165, 243, 252, 0.72), transparent),
    radial-gradient(1px 1px at 82% 68%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 94% 48%, rgba(125, 211, 252, 0.65), transparent),
    radial-gradient(1px 1px at 18% 78%, rgba(249, 168, 212, 0.6), transparent),
    radial-gradient(1.4px 1.4px at 48% 88%, rgba(255, 255, 255, 0.68), transparent),
    radial-gradient(1px 1px at 76% 92%, rgba(253, 230, 138, 0.62), transparent);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: hujan-twinkle 5.5s ease-in-out infinite;
}

.hujan-stars-bg::after {
  content: "";
  position: absolute;
  inset: -15%;
  background:
    linear-gradient(
      52deg,
      transparent 0%,
      rgba(99, 102, 241, 0.07) 18%,
      rgba(139, 92, 246, 0.1) 32%,
      rgba(56, 189, 248, 0.08) 48%,
      rgba(167, 139, 250, 0.06) 62%,
      transparent 78%
    ),
    radial-gradient(ellipse 130% 55% at 50% -5%, rgba(59, 130, 246, 0.16) 0%, transparent 52%);
  pointer-events: none;
  animation: hujan-nebula-drift 90s linear infinite;
}

@keyframes hujan-twinkle {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.82; }
  55% { opacity: 0.88; }
}

@keyframes hujan-nebula-drift {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(1.5deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hujan-stars-bg::before,
  .hujan-stars-bg::after {
    animation: none;
  }
}

/* ===== HERO - Bintang, Bulan, Planet ===== */
.hujan-hero {
  position: relative;
  z-index: 1;
  padding: 80px 24px 60px;
  text-align: center;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hujan-hero-celestial {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hujan-hero-moon {
  position: absolute;
  top: 15%;
  right: 12%;
  font-size: clamp(48px, 10vw, 80px);
  opacity: 0.9;
  animation: hujan-float 6s ease-in-out infinite;
}

.hujan-hero-star {
  position: absolute;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  animation: hujan-twinkle 2s ease-in-out infinite;
}

.hujan-hero-star.hujan-star-1 { top: 20%; left: 15%; animation-delay: 0s; }
.hujan-hero-star.hujan-star-2 { top: 35%; right: 20%; font-size: 16px; animation-delay: 0.5s; }
.hujan-hero-star.hujan-star-3 { bottom: 30%; left: 25%; font-size: 14px; animation-delay: 1s; }

.hujan-hero-planet {
  position: absolute;
  font-size: clamp(28px, 5vw, 42px);
  opacity: 0.85;
}

.hujan-hero-planet.hujan-planet-1 { top: 45%; left: 8%; animation: hujan-float 8s ease-in-out infinite; }
.hujan-hero-planet.hujan-planet-2 { bottom: 25%; right: 12%; animation: hujan-float 7s ease-in-out infinite reverse; }

@keyframes hujan-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hujan-hero-title {
  position: relative;
  z-index: 2;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 40%, #38bdf8 70%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

.hujan-falak-badge {
  display: inline-block;
  padding: 2px 10px;
  margin-left: 4px;
  background: rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(147, 197, 253, 0.5);
  border-radius: 8px;
  -webkit-text-fill-color: #93c5fd;
}

.hujan-hero-desc {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto 24px;
  font-size: 16px;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.6;
}

.hujan-quick-nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hujan-quick-nav a {
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 999px;
  color: #93c5fd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.hujan-quick-nav a:hover {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

/* Main content overlay on stars */
.hujan-main {
  position: relative;
  z-index: 2;
}

/* Sains & hitungan: subheads + extended formula row */
.hujan-sains-card {
  margin-bottom: 1.25rem;
}

.hujan-sains-card + .hujan-math-ext {
  margin-top: 0.5rem;
}

.hujan-math-ext + .hujan-sains-card {
  margin-top: 1.5rem;
}

.hujan-subhead {
  font-size: 1.1rem;
  font-weight: 700;
  color: #c4b5fd;
  margin: 1.35rem 0 0.65rem;
  letter-spacing: 0.02em;
}

.hujan-sains-card .hujan-subhead:first-child {
  margin-top: 0;
}

.hujan-sains-sources .hujan-subhead {
  margin-top: 0;
}

.hujan-sources-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hujan-sources-list li {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.9);
}

.hujan-sources-list a {
  color: #93c5fd;
  font-weight: 600;
  text-decoration: none;
  margin-inline-end: 0.15em;
}

.hujan-sources-list a:hover {
  text-decoration: underline;
  color: #bfdbfe;
}

/* APOD card styling on dark background */
.hujan-apod-card .falak-apod-img {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Mobile */
@media (max-width: 640px) {
  .hujan-hero {
    padding: 60px 16px 48px;
    min-height: 240px;
  }

  .hujan-hero-moon {
    font-size: 42px;
    right: 8%;
  }

  .hujan-hero-planet {
    font-size: 24px;
  }

  .hujan-quick-nav {
    gap: 8px;
  }

  .hujan-quick-nav a {
    padding: 6px 12px;
    font-size: 13px;
  }
}
