/**
 * Full-moon star twinkle (option B) — production site header.
 * Shown when Marabah or Trigael phase_class is full (moon_sparkle_icon.html).
 */

@keyframes ao-moon-sparkle-star-twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.75);
  }

  45% {
    opacity: 1;
    transform: scale(1);
  }
}

.ao-moon-sparkle-host {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.ao-moon-sparkle-host .ao-moon-phase-icon {
  position: relative;
  z-index: 1;
}

.ao-moon-sparkle-stars {
  position: absolute;
  inset: -6px;
  z-index: 2;
  pointer-events: none;
}

.ao-moon-sparkle-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8dc 0%, #e8c454 55%, transparent 100%);
  box-shadow: 0 0 6px rgba(232, 196, 84, 0.85);
  animation: ao-moon-sparkle-star-twinkle 2.4s ease-in-out infinite;
}

.ao-moon-sparkle-star--1 {
  top: 2px;
  right: 4px;
  animation-delay: 0s;
}

.ao-moon-sparkle-star--2 {
  top: 50%;
  left: -2px;
  margin-top: -2px;
  animation-delay: 0.6s;
}

.ao-moon-sparkle-star--3 {
  bottom: 4px;
  right: 10px;
  animation-delay: 1.1s;
}

.ao-moon-sparkle-star--4 {
  top: 8px;
  left: 10px;
  width: 4px;
  height: 4px;
  animation-delay: 1.7s;
}

html[data-ao-theme="dark"] .ao-moon-sparkle-star {
  background: radial-gradient(circle, #fff4c8 0%, #d4af37 50%, transparent 100%);
  box-shadow: 0 0 8px rgba(232, 196, 84, 0.95);
}

.ao-header-ambient.ao-time-phase-night .ao-moon-sparkle-star {
  box-shadow: 0 0 8px rgba(255, 220, 120, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .ao-moon-sparkle-star {
    animation: none !important;
    opacity: 0.85;
  }
}
