/**
 * 页面切换：仅水平切割线从左向右划过，底层为整页半透明遮罩 + 模糊。
 */
#page-flip-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: none;
}

#page-flip-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-flip-inner.cut-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 切割线：从左向右 scaleX 拉长，位于视口垂直中线 */
.cut-line-wrap {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 6px;
  margin-top: -3px;
  z-index: 2;
  pointer-events: none;
}

.cut-line {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 3px;
  margin-top: -1.5px;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.95) 0%,
    rgba(165, 243, 252, 1) 35%,
    rgba(56, 189, 248, 0.95) 70%,
    rgba(99, 102, 241, 0.85) 100%
  );
  box-shadow:
    0 0 12px 3px rgba(34, 211, 238, 0.55),
    0 0 36px 8px rgba(59, 130, 246, 0.25);
}

.cut-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  margin-right: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(165, 243, 252, 0.9) 40%, transparent 70%);
  opacity: 0;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
}

#page-flip-overlay.is-flipping .cut-line {
  animation: cutLineSweep 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

#page-flip-overlay.is-flipping .cut-line::after {
  animation: cutTipFade 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes cutLineSweep {
  0% {
    transform: scaleX(0);
    opacity: 0.85;
  }
  55% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0.35;
  }
}

@keyframes cutTipFade {
  0%,
  8% {
    opacity: 0;
  }
  15%,
  55% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* 右侧角标：仅图标，悬停看 title */
.page-corner-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-height: 3.25rem;
  padding: 0.65rem 0.5rem 0.65rem 0.6rem;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-right: none;
}

.page-corner-tab:hover {
  transform: translateY(-50%) translateX(-4px);
  box-shadow: -8px 6px 28px rgba(0, 0, 0, 0.16);
  filter: brightness(1.03);
}

.page-corner-tab .corner-icon {
  font-size: 1.15rem;
  opacity: 0.95;
}

.page-corner-tab--to-personal {
  background: linear-gradient(145deg, #36cfc9, #08979c);
  color: #fff;
}

.page-corner-tab--to-merchant {
  background: linear-gradient(145deg, #ff7a45, #fa541c);
  color: #fff;
}
