/* 페이지 전환 오버레이 */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--content-background-color);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* 확장 애니메이션용 */
.page-transition-overlay .expanding-box {
  position: absolute;
  background-color: var(--content-background-color);
  border: 2px solid var(--border-color-dark);
  opacity: 0;
  transform: scale(1);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition-overlay.animating .expanding-box {
  opacity: 1;
  transform: scale(1);
}

/* 서브페이지 진입 애니메이션 */
body.page-enter {
  animation: pageEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.6s;
}

::view-transition-old(root) {
  animation-name: fadeOut;
}

::view-transition-new(root) {
  animation-name: fadeIn;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1);
  }
}