/* 全局基础设置 */
:root {
  --font-primary: 'Noto Sans SC', sans-serif;
  --color-bg: #F8F9FA;
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --transition-base: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

html {
  scroll-behavior: smooth;
}

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

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db; /* Tailwind gray-300 */
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af; /* Tailwind gray-400 */
}

/* 功能类：隐藏滚动条但允许滚动 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 动画关键帧定义 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 动画工具类 */
.animate-fade-in {
  animation: fadeIn 1.2s ease-out forwards;
}

.animate-slide-up {
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-500 { animation-delay: 500ms; }
.delay-700 { animation-delay: 700ms; }

/* 交互组件样式 */
.img-hover-zoom {
  overflow: hidden;
  position: relative;
}
.img-hover-zoom img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.img-hover-zoom:hover img {
  transform: scale(1.05);
}

.nav-link {
  position: relative;
  display: inline-block;
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* 轮播图过渡 */
.carousel-item {
  transition: opacity 1.5s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
}
.carousel-item.active {
  opacity: 1;
  z-index: 10;
}

/* 视频背景容器 */
.video-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.video-wrapper video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* 排版微调 */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.03em;
}
::selection {
  background: #2C3E50;
  color: #ffffff;
}