/* ========== 全局变量 - 蓝白主题增强版 ========== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #0ea5e9;
  --accent: #3b82f6;
  --dark: #1e293b;
  --gray: #64748b;
  --light-bg: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.08), 0 6px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 35px -10px rgba(0,0,0,0.2);
  --shadow-hover: 0 25px 35px -12px rgba(37,99,235,0.3);
  --border-radius: 24px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-attachment: fixed;
  color: var(--dark);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* 炫彩动态背景光效 - GPU加速 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(37,99,235,0.1), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(14,165,233,0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: bgPulse 6s ease-in-out infinite;
  will-change: opacity;
}

@keyframes bgPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 去除所有超链接下划线 */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 预加载器 - GPU加速 */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f0c29, #302b63);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity var(--transition-slow);
  will-change: opacity;
}
.preloader.hide {
  opacity: 0;
  pointer-events: none;
}
.preloader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(37,99,235,0.2);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 头部 - 使用transform优化 */
.header {
  position: sticky;
  top: 0;
  background: rgba(15, 12, 41, 0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(37,99,235,0.2);
  transform: translateZ(0);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(37,99,235,0.3));
}
.logo-img:hover {
  transform: scale(1.05);
}
.nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-link {
  font-weight: 600;
  color: var(--white);
  position: relative;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--transition-base);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link:hover, .nav-link.active {
  opacity: 1;
  color: var(--primary);
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--white);
}

/* 英雄区域 */
.hero {
  padding: 80px 0 60px;
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 550px;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
}
.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 420px;
}
.hero-content {
  max-width: 700px;
}
.hero-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(37,99,235,0.3);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(37,99,235,0.3); }
  50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(37,99,235,0.5); }
}
h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.accent-text {
  background: linear-gradient(135deg, #facc15, #ff8c00);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  display: inline-block;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}
.btn:hover::before {
  left: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(37,99,235,0.4);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37,99,235,0.5);
}
.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

/* 服务卡片 - GPU加速 */
.services {
  padding: 80px 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}
.section-header h2 {
  font-size: 2.5rem;
  margin: 16px 0 8px;
  background: linear-gradient(135deg, var(--dark), var(--primary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.service-card {
  background: white;
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  text-align: center;
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.05), transparent);
  transition: left 0.5s ease;
}
.service-card:hover::before {
  left: 100%;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.service-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 20px;
  transition: transform var(--transition-fast);
}
.service-card:hover .service-icon {
  transform: scale(1.1);
}
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark);
}

/* 关于我们 */
.about-showcase {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.about-grid {
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
}
.about-text {
  flex: 1;
}
.about-text p {
  color: var(--gray);
  line-height: 1.6;
}
.feature-list div {
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  transition: transform var(--transition-fast);
}
.feature-list div:hover {
  transform: translateX(5px);
}
.feature-list i {
  color: var(--primary);
  font-size: 1.2rem;
}
.about-icons {
  flex: 1;
  text-align: center;
}
.icon-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.icon-wall img {
  width: 100%;
  max-width: 120px;
  border-radius: 20px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  will-change: transform;
}
.icon-wall img:hover {
  transform: scale(1.05) rotate(3deg);
  box-shadow: var(--shadow-md);
}

/* 优势卡片 */
.advantages {
  padding: 80px 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
}
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.advantage-card {
  background: white;
  border-radius: 28px;
  padding: 32px 24px;
  position: relative;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}
.advantage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.05), transparent);
  transition: left 0.5s ease;
}
.advantage-card:hover::before {
  left: 100%;
}
.advantage-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.advantage-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, white, #eff6ff);
}
.popular-tag {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: bold;
  animation: tagPulse 1.5s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.advantage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 24px;
}
.advantage-card ul {
  list-style: none;
}
.advantage-card li {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.advantage-card li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
}

/* 轮播区 */
.testimonials {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.testimonial-slider {
  position: relative;
  overflow: hidden;
  margin: 40px 0 20px;
  padding: 0 40px;
}
.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.testimonial-item {
  flex: 0 0 100%;
  padding: 32px;
  background: white;
  border-radius: 32px;
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.testimonial-avatar img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 3px solid var(--primary);
}
.testimonial-item p {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-item h4 {
  color: var(--primary);
  font-weight: 600;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  z-index: 10;
  color: var(--primary);
}
.slider-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}
.prev { left: 0; }
.next { right: 0; }
.dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dot:hover {
  background: var(--primary);
  transform: scale(1.2);
}
.dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 12px;
}

/* 页脚 */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 60px 0 30px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo img {
  height: 40px;
  width: auto;
}
.footer-contact h4, .footer-links h4 {
  color: white;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-contact p {
  margin: 12px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.footer-contact a {
  color: #cbd5e1;
  transition: color var(--transition-fast);
}
.footer-contact a:hover {
  color: var(--primary);
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin: 10px 0;
}
.footer-links li a {
  color: #94a3b8;
  transition: all var(--transition-fast);
  display: inline-block;
}
.footer-links li a:hover {
  color: var(--primary);
  transform: translateX(4px);
}
.copyright {
  text-align: center;
  border-top: 1px solid #1e293b;
  padding-top: 24px;
}
.copyright a {
  color: #94a3b8;
}
.copyright a:hover {
  color: var(--primary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.modal-content {
  background: white;
  padding: 32px;
  border-radius: 32px;
  max-width: 400px;
  text-align: center;
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-content img {
  width: 100%;
  border-radius: 16px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
  transition: all var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal-close:hover {
  background: rgba(0,0,0,0.05);
  color: var(--primary);
  transform: rotate(90deg);
}

/* 动画特效类 - GPU加速 */
.wow-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.wow-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.wow-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.wow-scale.visible {
  opacity: 1;
  transform: scale(1);
}
.wow-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.wow-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.wow-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.wow-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 自定义炫酷光标 - 使用transform优化 */
.cursor {
  width: 24px;
  height: 24px;
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary), var(--secondary));
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  z-index: 9999;
  mix-blend-mode: difference;
  box-shadow: 0 0 20px rgba(37,99,235,0.5);
  will-change: left, top;
}

/* 响应式 - 移动端优化 */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 72px;
    left: -100%;
    width: 70%;
    height: calc(100vh - 72px);
    background: rgba(15,12,41,0.95);
    backdrop-filter: blur(12px);
    transition: left var(--transition-base);
    z-index: 99;
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-list {
    flex-direction: column;
    padding: 32px;
    gap: 24px;
  }
  .nav-link {
    color: white;
  }
  h1 {
    font-size: 1.8rem;
  }
  .about-grid {
    flex-direction: column;
  }
  .icon-wall {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-header h2 {
    font-size: 1.8rem;
  }
  /* 移动端禁用光标效果 */
  .cursor {
    display: none;
  }
  /* 移动端减少动画，提升性能 */
  .service-card:hover,
  .advantage-card:hover {
    transform: none;
  }
  .wow-fade-up,
  .wow-scale,
  .wow-slide-left,
  .wow-slide-right {
    opacity: 1;
    transform: none;
  }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}