html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* 为所有section设置最小高度，确保滚动检测正常工作 */
section[id] {
  min-height: 70vh; /* 调整为更合理的70vh，而不是整个视口高度 */
  padding-top: 80px; /* 为固定导航条留出空间 */
  padding-bottom: 40px; /* 底部留出一些空间 */
  position: relative;
  overflow: hidden;
  /* 添加flex布局使内容垂直居中 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直居中内容 */
}

/* section内容容器居中对齐 */
section[id] > div.max-w-6xl,
section[id] > div.max-w-3xl,
section[id] > div.max-w-4xl {
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
}

/* 英雄区块特殊处理不需要垂直居中 */
section.bg-gray-900.pt-32.pb-20 {
  display: block; /* 移除flex布局 */
}

/* 根据内容和功能为不同区块设置不同的高度 */
#intro {
  min-height: 60vh; /* 介绍部分可以更紧凑 */
  justify-content: flex-start; /* 顶部对齐 */
  padding-top: 100px; /* 增加顶部间距 */
}

#features {
  min-height: auto; /* 核心功能部分根据内容自动调整高度 */
  padding-bottom: 60px; /* 增加底部间距 */
}

#cases {
  min-height: 80vh; /* 工作流程部分需要一定高度展示动画 */
}

/* 最后一个区块(contact)特殊处理，确保它始终能被正确检测到 */
#contact {
  min-height: 50vh; /* 联系我们部分可以更紧凑 */
  margin-bottom: 0;
  padding-bottom: 60px;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
}

/* 添加以下背景样式 */
.hero-bg {
  background-image: url("/images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.25;
  z-index: 0;
  filter: saturate(1.2) brightness(0.8);
}

/* 各部分背景定制 */
#features {
  background-image: url("/images/features-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

#features::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(249, 250, 251, 0.92);
  z-index: 0;
}

#features > div {
  position: relative;
  z-index: 1;
}

#contact {
  background-image: linear-gradient(
      rgba(59, 130, 246, 0.9),
      rgba(37, 99, 235, 0.9)
    ),
    url("/images/contact-bg.jpg");
  background-size: cover;
  background-position: center;
}

/* 添加案例部分背景 */
#cases {
  position: relative;
  background-color: #1f2937; /* 深色背景 */
  color: white;
}

#cases::before {
  content: "";
  background-image: url("/images/cases-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.15; /* 将透明度从0改为0.15 */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#cases > div {
  position: relative;
  z-index: 1;
}

/* 案例部分文字颜色调整 */
#cases h2 {
  color: white;
}

#cases .bg-white {
  background-color: rgba(17, 24, 39, 0.7); /* 深色半透明背景 */
  border: 1px solid rgba(75, 85, 99, 0.3);
}

#cases h3 {
  color: white;
}

#cases p {
  color: #d1d5db;
}

#cases .font-semibold {
  color: #93c5fd;
}

/* 添加介绍部分背景 */
#intro {
  position: relative;
}

#intro::before {
  content: "";
  background-image: url("/images/intro-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#intro > div {
  position: relative;
  z-index: 1;
}

/* 适应移动端菜单 */
@media (max-width: 1023px) {
  .mobile-menu-open {
    overflow: hidden;
  }
}

/* 添加触摸菜单样式 */
.menu-link {
  position: relative;
}

.menu-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #67e8f9;
  transition: width 0.3s ease;
}

.menu-link.active::after,
.menu-link:hover::after {
  width: 100%;
}

/* 雷达扫描动画 - 改进版 */
@keyframes radar-scan {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes radar-glow {
  0%,
  100% {
    box-shadow: 0 0 4px 1px rgba(34, 211, 238, 0.4);
  }
  50% {
    box-shadow: 0 0 8px 2px rgba(34, 211, 238, 0.6);
  }
}

.radar-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
}

.radar-icon {
  position: relative;
  z-index: 2;
  color: #22d3ee;
  filter: drop-shadow(0 0 2px rgba(34, 211, 238, 0.4));
}

.radar-circle {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.3);
  z-index: 1;
  animation: radar-glow 2s ease-in-out infinite;
}

.radar-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  animation: radar-scan 3s linear infinite;
}

.radar-beam::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.8),
    rgba(34, 211, 238, 0)
  );
  transform-origin: 0 0;
}

.radar-beam::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 50%;
  background: conic-gradient(
    from 90deg,
    rgba(34, 211, 238, 0.1) 0%,
    transparent 20%
  );
  transform-origin: 0 0;
  border-radius: 0 100% 0 0;
}

/* 关于我们部分样式 */
#about {
  position: relative;
  background-color: #f9fafb;
  z-index: 1;
}

#about::before {
  content: "";
  background-image: url("/images/about-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.05;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  animation: subtle-float 20s ease-in-out infinite alternate;
}

#about > div {
  position: relative;
  z-index: 2;
}

/* 添加卡片悬停效果 */
#about .bg-white.p-4.rounded-lg.shadow-md {
  transition: all 0.3s ease;
}

#about .bg-white.p-4.rounded-lg.shadow-md:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.1);
}

/* 添加渐变边框效果 */
#about .bg-gradient-to-br {
  position: relative;
  transition: all 0.3s ease;
}

#about .bg-gradient-to-br:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

#about .bg-gradient-to-br::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #3b82f6, #06b6d4);
  border-radius: 0.75rem;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#about .bg-gradient-to-br:hover::before {
  opacity: 1;
}

/* 添加数字动画效果 */
@keyframes count-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#about .text-2xl.font-bold.text-blue-500 {
  animation: count-up 0.8s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

/* 关于我们部分图片样式 */
#about .w-20.h-20.flex-shrink-0 {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#about .w-20.h-20.flex-shrink-0 img {
  transition: all 0.5s ease;
}

#about .w-20.h-20.flex-shrink-0:hover img {
  transform: scale(1.1);
}

#about .bg-white.p-4.rounded-lg.shadow-md:hover .w-20.h-20.flex-shrink-0 img {
  transform: scale(1.1);
}

/* 添加卡片中背景图片的效果 */
#about .bg-gradient-to-br .absolute.inset-0 img {
  transition: all 0.5s ease;
  filter: grayscale(40%);
}

#about .bg-gradient-to-br:hover .absolute.inset-0 img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* 添加图片边框效果 */
#about .w-20.h-20.flex-shrink-0::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.5rem;
  pointer-events: none;
}

/* 移动设备适配 */
@media (max-width: 768px) {
  section[id] {
    min-height: 60vh;
    padding-top: 60px;
  }

  #contact {
    min-height: 40vh;
  }

  #about .w-20.h-20.flex-shrink-0 {
    width: 60px;
    height: 60px;
  }

  #about .bg-white.p-4.rounded-lg.shadow-md {
    padding: 0.75rem;
  }

  #about .text-2xl.font-bold.text-blue-500 {
    font-size: 1.25rem;
  }
}

@keyframes subtle-float {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.05) translate(1%, 1%);
  }
}

[x-cloak] {
  display: none !important;
}

/* 文字扫描效果 */
@keyframes text-scan {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.hero-title {
  position: relative;
  display: inline-block;
  color: rgba(103, 232, 249, 0.8); /* 基础文字颜色 */
  background: linear-gradient(
    90deg,
    rgba(103, 232, 249, 0.8) 0%,
    rgba(255, 255, 255, 1) 15%,
    rgba(139, 250, 255, 1) 25%,
    rgba(103, 232, 249, 0.8) 35%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-scan 3s linear infinite;
}

/* 保持原有的fadeInDown动画 */
.animate__fadeInDown.hero-title {
  animation: animate__fadeInDown 1s, text-scan 3s 1s linear infinite;
}
