/* 整屏下滑翻页的过渡与底部提示样式 */

/* 当前页向上滑出，进入下一场景 */
body.slide-leaving {
  animation: slide-exit 220ms cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes slide-exit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-4%); }
}

/* 下一页入场淡入，掩盖重载硬弹出 */
body.page-enter {
  animation: page-enter 220ms ease-out both;
}

@keyframes page-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 底部下一页提示（可点击按钮，不挡内容） */
.slide-hint {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: inherit;
  color: currentColor;
  background: transparent;
  border: 0;
  padding: 8px 12px;
  opacity: .55;
  pointer-events: auto;
  cursor: pointer;
  animation: hint-bob 2.4s ease-in-out infinite;
}

/* 上一页：顶部居中，箭头朝上 */
.slide-hint--prev {
  bottom: auto;
  top: max(14px, env(safe-area-inset-top));
}

.slide-hint:hover,
.slide-hint:focus-visible { opacity: .95; }

.slide-hint:focus-visible {
  outline: 1px solid currentColor;
  border-radius: 8px;
}

.slide-hint__text {
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.slide-hint__arrow {
  font-size: 15px;
  line-height: 1;
}

@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
  body.slide-leaving { animation: none; }
  body.page-enter { animation: none; }
  .slide-hint { animation: none; }
}
