/* 平滑过渡 */
body { transition: background-color 0.5s ease, color 0.5s ease; }

/* 背景层可见性控制，不依赖 Tailwind CDN，防止加载闪烁 */
#light-bg { opacity: 1; transition: opacity 0.7s; }
#star-bg  { opacity: 0; transition: opacity 0.7s; }
html.dark #light-bg { opacity: 0; }
html.dark #star-bg  { opacity: 1; }

/* 星空动画 */
@keyframes starMove {
  from { transform: translateY(0); }
  to   { transform: translateY(-2000px); }
}
.star-layer {
  position: absolute;
  top: 0; left: 0;
  height: 2000px; width: 100%;
}
.star-layer-1 { animation: starMove 50s  linear infinite; }
.star-layer-2 { animation: starMove 100s linear infinite; }
.star-layer-3 { animation: starMove 150s linear infinite; }

/* 玻璃导航栏 */
.glass-nav {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(199, 210, 254, 0.3);
}
.dark .glass-nav {
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
