/* Google Fonts 引入 */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&family=Noto+Serif+SC:wght@300;400;500;700&family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* 基础设置 */
:root {
  --color-clay: #E6B8A2;
  --color-slate: #2C3E50;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #ffffff;
  color: #2C3E50;
}

/* 字体工具类补充 */
.font-playfair {
  font-family: 'Playfair Display', serif;
}

.font-song {
  font-family: 'Noto Serif SC', "SimSun", serif;
}

/* 页面过渡与动画 */
.page-enter {
  opacity: 0;
  transform: translateY(10px);
  animation: pageFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动显现动画 */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 图片加载效果 */
.img-loading {
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.6s ease-out, filter 0.6s ease-out;
}

.img-loaded {
  opacity: 1;
  filter: blur(0);
}

/* 极简滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #E5E7EB;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #D1D5DB;
}

/* 文本选中样式 */
::selection {
  background-color: var(--color-clay);
  color: white;
}

/* 磁性吸附轮播 (如果未使用JS库) */
.snap-x-mandatory {
  scroll-snap-type: x mandatory;
}

.snap-center {
  scroll-snap-align: center;
}

/* 链接下划线动画 */
.hover-underline-animation {
  display: inline-block;
  position: relative;
}

.hover-underline-animation::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: currentColor;
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}