/* 赛博网格动态背景 — 源自 cyber.html（Uiverse · sunn_2633）；fixed 全屏垫底 */
html {
  background-color: #050505;
}

.page-cyber-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-cyber-bg .cyber-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background-color: #050505;
  background-image:
    radial-gradient(circle at center, transparent 30%, #000 90%),
    linear-gradient(rgba(3, 233, 244, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3, 233, 244, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(217, 3, 244, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 3, 244, 0.05) 1px, transparent 1px);
  background-size:
    100% 100%,
    60px 60px,
    60px 60px,
    20px 20px,
    20px 20px;
  animation: cyber-move 10s linear infinite;
}

@keyframes cyber-move {
  0% {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0,
      0 0;
  }
  100% {
    background-position:
      0 0,
      60px 60px,
      60px 60px,
      40px 40px,
      40px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-cyber-bg .cyber-pattern {
    animation: none;
  }
}

/* 正文压在动态底图之上（避免改每个页面根节点类名） */
body {
  position: relative;
}

/* 正文压在动态底图之上；勿对 nav/header/fixed 层强制 relative，否则会破坏吸顶、抽屉与回到顶部 */
body > *:not(.page-cyber-bg):not(.skip-link):not(nav):not(header):not(.drawer):not(.drawer-overlay):not(.back-to-top) {
  position: relative;
  z-index: 1;
}
