/* ==========================================================================
   博客底部壁纸 —— 复刻 B 站首页 banner
   多层 PNG 叠加 + 鼠标水平视差
   图层数据由 dashboard-archive/scripts/grab-bili-banner.py 生成：
     source/_data/bili-banner.json
     source/images/bili-banner/*.png
   ========================================================================== */

#footer {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0f1420;          /* 图片加载前的底色，避免闪白 */
}

/* ---------------------------- 多层壁纸 ---------------------------- */

.bili-banner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;         /* 不拦截下方文字选择 / 点击 */
  z-index: 0;
}

.bili-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  width: auto;
  min-width: 100%;
  /* 居中 → 视差位移 → 缩放（位移/缩放由 JS 写入 CSS 变量）
     translate3d 强制 GPU 层，避免闪屏 */
  transform: translate3d(calc(-50% + var(--px, 0px)), -50%, 0)
             scale(var(--ps, 1));
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  /* 图片未加载前透明，加载完成后淡入，避免「从无到有」的闪烁 */
  opacity: 0;
  transition: opacity .25s ease;
}
.bili-layer[data-loaded="true"] {
  opacity: 1;
}

/* 渐变遮罩：让版权文字在浅色壁纸上也清晰 */
#footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(8, 16, 24, .16) 0%,
    rgba(8, 16, 24, .40) 55%,
    rgba(8, 16, 24, .62) 100%);
  pointer-events: none;
}

#footer-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, .92);
}
#footer-wrap .copyright,
#footer-wrap .framework-info,
#footer-wrap .footer_custom_text {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
#footer-wrap a { color: #fff; }
#footer-wrap .framework-info span { color: rgba(255, 255, 255, .8); }

/* 窄屏压缩高度；触摸设备没有鼠标视差，静态展示即可 */
@media (max-width: 768px) {
  #footer { min-height: 160px; }
}
