/* 字体定义：优先使用现代无衬线字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500&display=swap');

:root {
  --font-main: 'PingFang SC', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --color-bg: #F9F9F7;
  --color-text: #2C2C2C;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 页面过渡动画 */
.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

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

/* 图片容器交互效果 */
.img-card {
  overflow: hidden;
  position: relative;
  /* 解决Safari圆角溢出问题 */
  transform: translateZ(0); 
}

.img-zoom {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.img-card:hover .img-zoom {
  transform: scale(1.03);
}

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

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

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* 辅助工具类 */
.text-balance {
  text-wrap: balance;
}

.mask-gradient {
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
}

[x-cloak] { 
    display: none !important; 
}