/* 全局排版、背景场景、滚动条 */
body {
  font-family: var(--font-body);
  color: var(--text-1);
  background: var(--bg-base) fixed;
  overflow: hidden; /* 应用级滚动由各区域自行管理 */
  transition: background 0.6s var(--ease-smooth), color 0.4s var(--ease-smooth);
}

/* ===== 极光背景场景：漂浮光球 + 颗粒噪点 ===== */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: var(--orb-opacity);
  filter: blur(90px);
  will-change: transform;
}

.orb-1 {
  width: 46vmax;
  height: 46vmax;
  top: -14%;
  left: -10%;
  background: radial-gradient(circle at 35% 35%, var(--orb-1), transparent 68%);
  animation: orb-drift-a 64s var(--ease-smooth) infinite alternate;
}

.orb-2 {
  width: 40vmax;
  height: 40vmax;
  bottom: -16%;
  right: -8%;
  background: radial-gradient(circle at 60% 40%, var(--orb-2), transparent 68%);
  animation: orb-drift-b 72s var(--ease-smooth) infinite alternate;
}

.orb-3 {
  width: 34vmax;
  height: 34vmax;
  top: 32%;
  right: 14%;
  background: radial-gradient(circle at 40% 60%, var(--orb-3), transparent 66%);
  animation: orb-drift-c 58s var(--ease-smooth) infinite alternate;
}

.orb-4 {
  width: 26vmax;
  height: 26vmax;
  bottom: 18%;
  left: 22%;
  background: radial-gradient(circle at 50% 50%, var(--orb-4), transparent 64%);
  animation: orb-drift-a 80s var(--ease-smooth) infinite alternate-reverse;
}

/* 颗粒噪点（SVG feTurbulence，内联无外部依赖） */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* 火狐 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

::selection {
  background: var(--accent-glow);
  color: var(--text-1);
}

/* 工具类 */
.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.text-muted {
  color: var(--text-2);
}
