/* 全站基础样式：统一暖色背景、细腻层次和图像的 Memory Bloom 过渡效果。 */
body {
    letter-spacing: 0.01em;
}

/* 所有链接和按钮统一采用柔和过渡，避免传统后台系统的生硬切换感。 */
a,
button {
    transition: all 220ms ease;
}

/* 统一输入控件的文字颜色，确保在浅色背景下保持良好可读性。 */
input,
textarea,
select {
    color: #1c1c19;
}

/* 让图片 hover 时更有“记忆绽放”的轻盈感。 */
img {
    transition: transform 0.7s ease, border-radius 0.45s ease, opacity 0.45s ease;
}

/* 幻灯片的每一帧都采用叠放方案，通过透明度过渡实现淡入淡出。 */
.slideshow-root .slideshow-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.slideshow-root .slideshow-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* 内嵌区域和全屏区域都为幻灯片提供最小高度，防止切换时布局塌陷。 */
.slideshow-root .relative.overflow-hidden {
    min-height: 26rem;
}

.slideshow-fullscreen-stage {
    position: relative;
    width: min(100vw, 1400px);
    height: 100vh;
    margin: 0 auto;
}

/* 幻灯片左右切换按钮保持轻盈圆润，不做传统厚重控制条。 */
.slideshow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 3.25rem;
    height: 3.25rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.78);
    color: #78555e;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

/* 缩略图用于快速跳转到指定照片，激活项会有更明显的描边与轻微上浮。 */
.slideshow-thumb {
    border: 0;
    background: transparent;
    border-radius: 1.4rem;
    cursor: pointer;
    padding: 0;
    opacity: 0.62;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.slideshow-thumb.active {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(120, 85, 94, 0.12);
}

/* 全屏幻灯层采用固定定位和深色背景，提供沉浸式浏览效果。 */
.slideshow-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(12px);
}

.slideshow-fullscreen.active {
    display: block;
}

.slideshow-fullscreen-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.slideshow-fullscreen-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 2rem 2.25rem 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22), transparent);
}

.slideshow-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 6;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.82);
    color: #78555e;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* 单图放大查看层用于独立展示全图，支持点击空白关闭。 */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(10px);
    padding: 2rem;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-stage {
    position: relative;
    width: min(96vw, 1400px);
    max-height: 92vh;
}

.lightbox-image {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 1.75rem;
}

.lightbox-caption {
    margin-top: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 3;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    color: #78555e;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

/* 针对更偏好减少动画的用户，主动关闭大部分过渡效果。 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
