/* Nebula + Deep Space Effects for 人生探微 */
/* Inspired by GalaxyJS nebula/wormhole animations */

.nebula-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* Three rotating nebula clouds */
.nebula-cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.12;
  animation: nebulaDrift var(--drift-dur, 30s) ease-in-out infinite;
}

.nebula-cloud:nth-child(1) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7C3AED 0%, transparent 70%);
  top: -100px; left: 10%;
  --drift-dur: 28s;
  animation-delay: 0s;
}

.nebula-cloud:nth-child(2) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #C9A96E 0%, transparent 70%);
  top: 30%; right: -80px;
  --drift-dur: 35s;
  animation-delay: -10s;
}

.nebula-cloud:nth-child(3) {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #5A9E8F 0%, transparent 70%);
  bottom: -60px; left: 30%;
  --drift-dur: 32s;
  animation-delay: -20s;
}

.nebula-cloud:nth-child(4) {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #8B5CF6 0%, #3B82F6 40%, transparent 70%);
  top: 50%; left: 50%;
  --drift-dur: 40s;
  animation-delay: -5s;
}

@keyframes nebulaDrift {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(40px, -30px) scale(1.15) rotate(5deg); }
  50% { transform: translate(-20px, -60px) scale(0.9) rotate(-3deg); }
  75% { transform: translate(-50px, -10px) scale(1.1) rotate(2deg); }
}

/* Cosmic dust particles - CSS only */
.cosmic-dust {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

.dust-particle {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: dustFloat var(--dust-dur, 20s) linear infinite;
  animation-delay: var(--dust-delay, 0s);
  opacity: 0;
}

@keyframes dustFloat {
  0% { opacity: 0; transform: translateY(100vh) translateX(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) translateX(var(--dust-drift, 50px)); }
}

/* Shooting star */
.shooting-star {
  position: fixed; z-index: 1; pointer-events: none;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(201,169,110,0.6);
  animation: shoot 4s ease-in infinite;
  animation-delay: var(--star-delay, 0s);
  opacity: 0;
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px; height: 1px;
  background: linear-gradient(90deg, rgba(201,169,110,0.8), transparent);
}

@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(-35deg); }
  5% { opacity: 1; }
  15% { opacity: 0; transform: translate(-400px, 300px) rotate(-35deg); }
  100% { opacity: 0; transform: translate(-400px, 300px) rotate(-35deg); }
}
