/* Google Fonts 引入现代中文字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@200;300;400;500&display=swap');

/* 基础重置与字体设定 */
:root {
  --theme-text: #1a1a1a;
  --theme-bg: #ffffff;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--theme-bg);
  color: var(--theme-text);
  scroll-behavior: smooth;
  overflow-x: hidden; /* 防止横向滚动 */
}

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

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

::-webkit-scrollbar-thumb {
  background-color: #e5e5e5;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a3a3a3;
}

/* 文本选中样式 */
::selection {
  background-color: #f3f4f6;
  color: #000;
}

/* 辅助类：图片容器溢出隐藏 (用于配合缩放特效) */
.overflow-hidden-container {
  overflow: hidden;
  display: block;
  position: relative;
}

/* 辅助类：图片悬停缩放与亮度微调 */
.img-hover-effect {
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), filter 0.5s ease;
  will-change: transform;
}

.group:hover .img-hover-effect {
  transform: scale(1.03);
  filter: brightness(1.05);
}

/* 辅助类：链接下划线展开动画 */
.link-underline {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 辅助类：文字上浮淡入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 延迟类，用于交错动画 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* 视差滚动辅助 */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* 移动端优化：禁用固定背景以提升性能 */
@media (max-width: 768px) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* 加载状态覆盖层 */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

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