/* 全局样式 - 与Tailwind CSS配合使用 */

/* 重置和基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* 导航栏样式 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* 首页动态背景 */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: relative;
  z-index: 1;
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  border: 2px solid #3b82f6;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-2px);
}

/* 卡片样式 */
.service-card,
.case-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.service-card:hover,
.case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

/* 图片悬停效果 */
.image-zoom {
  overflow: hidden;
  position: relative;
}

.image-zoom img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-zoom:hover img {
  transform: scale(1.08);
}

/* 分隔线装饰 */
.title-underline {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  margin: 0 auto;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* 粒子背景动画 */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.particle {
  animation: float 6s ease-in-out infinite;
}

/* 渐变文字 */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 网格背景 */
.grid-background {
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* 图标动画 */
.icon-float {
  transition: transform 0.3s ease;
}

.icon-float:hover {
  transform: translateY(-5px) rotate(5deg);
}

/* 响应式断点 */
@media (max-width: 768px) {
  .nav-link::after {
    display: none;
  }
  
  .service-card,
  .case-card {
    margin-bottom: 1.5rem;
  }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

/* 页脚样式 */
footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 4rem;
}