/* 动态背景效果样式文件 */

/* 全局背景动画 */
body {
  background: 
    radial-gradient(2000px 800px at 20% 20%, rgba(79, 209, 197, 0.08), transparent 60%),
    radial-gradient(1500px 600px at 80% 80%, rgba(122, 162, 247, 0.06), transparent 50%),
    radial-gradient(1000px 400px at 50% 50%, rgba(168, 85, 247, 0.04), transparent 40%),
    linear-gradient(135deg, #0a0b0f 0%, #11131a 50%, #0a0b0f 100%);
  background-attachment: fixed;
  animation: globalBackgroundShift 20s ease-in-out infinite;
  position: relative;
  overflow-x: hidden;
}

@keyframes globalBackgroundShift {
  0%, 100% { 
    background: 
      radial-gradient(2000px 800px at 20% 20%, rgba(79, 209, 197, 0.08), transparent 60%),
      radial-gradient(1500px 600px at 80% 80%, rgba(122, 162, 247, 0.06), transparent 50%),
      radial-gradient(1000px 400px at 50% 50%, rgba(168, 85, 247, 0.04), transparent 40%),
      linear-gradient(135deg, #0a0b0f 0%, #11131a 50%, #0a0b0f 100%);
  }
  25% { 
    background: 
      radial-gradient(2000px 800px at 80% 20%, rgba(122, 162, 247, 0.08), transparent 60%),
      radial-gradient(1500px 600px at 20% 80%, rgba(168, 85, 247, 0.06), transparent 50%),
      radial-gradient(1000px 400px at 80% 50%, rgba(79, 209, 197, 0.04), transparent 40%),
      linear-gradient(135deg, #11131a 0%, #0a0b0f 50%, #11131a 100%);
  }
  50% { 
    background: 
      radial-gradient(2000px 800px at 50% 80%, rgba(168, 85, 247, 0.08), transparent 60%),
      radial-gradient(1500px 600px at 50% 20%, rgba(79, 209, 197, 0.06), transparent 50%),
      radial-gradient(1000px 400px at 20% 20%, rgba(122, 162, 247, 0.04), transparent 40%),
      linear-gradient(135deg, #0a0b0f 0%, #11131a 30%, #0a0b0f 70%, #11131a 100%);
  }
  75% { 
    background: 
      radial-gradient(2000px 800px at 30% 60%, rgba(236, 72, 153, 0.08), transparent 60%),
      radial-gradient(1500px 600px at 70% 40%, rgba(246, 173, 85, 0.06), transparent 50%),
      radial-gradient(1000px 400px at 60% 80%, rgba(79, 209, 197, 0.04), transparent 40%),
      linear-gradient(135deg, #11131a 0%, #0a0b0f 40%, #11131a 80%, #0a0b0f 100%);
  }
}

/* 动态粒子背景 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(79, 209, 197, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(122, 162, 247, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(168, 85, 247, 0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(236, 72, 153, 0.3), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(246, 173, 85, 0.2), transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: particleMove 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes particleMove {
  0% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-50px) translateX(25px); }
  50% { transform: translateY(-100px) translateX(0px); }
  75% { transform: translateY(-50px) translateX(-25px); }
  100% { transform: translateY(0px) translateX(0px); }
}

/* 动态网格背景 */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(79, 209, 197, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 209, 197, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 15s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Hero区域增强背景 */
.hero {
  background: 
    radial-gradient(1400px 500px at 30% -20%, rgba(127, 156, 245, .15), transparent 70%), 
    radial-gradient(1200px 400px at 70% 10%, rgba(79, 209, 197, .12), transparent 60%),
    radial-gradient(800px 300px at 50% 80%, rgba(168, 85, 247, .08), transparent 50%),
    linear-gradient(135deg, rgba(10,11,15,0.95), rgba(15,18,32,0.8));
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { 
    background: 
      radial-gradient(1400px 500px at 30% -20%, rgba(127, 156, 245, .15), transparent 70%), 
      radial-gradient(1200px 400px at 70% 10%, rgba(79, 209, 197, .12), transparent 60%),
      radial-gradient(800px 300px at 50% 80%, rgba(168, 85, 247, .08), transparent 50%),
      linear-gradient(135deg, rgba(10,11,15,0.95), rgba(15,18,32,0.8));
  }
  50% { 
    background: 
      radial-gradient(1400px 500px at 70% -20%, rgba(79, 209, 197, .15), transparent 70%), 
      radial-gradient(1200px 400px at 30% 10%, rgba(168, 85, 247, .12), transparent 60%),
      radial-gradient(800px 300px at 80% 80%, rgba(127, 156, 245, .08), transparent 50%),
      linear-gradient(135deg, rgba(15,18,32,0.95), rgba(10,11,15,0.8));
  }
}

/* 增强的浮动元素 */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
  filter: blur(1px);
}

.floating-circle:nth-child(1) { 
  width: 100px; 
  height: 100px; 
  top: 20%; 
  left: 10%; 
  animation-delay: 0s; 
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.floating-circle:nth-child(2) { 
  width: 60px; 
  height: 60px; 
  top: 60%; 
  right: 15%; 
  animation-delay: 2s; 
  background: linear-gradient(135deg, var(--brand-2), var(--purple));
}
.floating-circle:nth-child(3) { 
  width: 80px; 
  height: 80px; 
  bottom: 20%; 
  left: 20%; 
  animation-delay: 4s; 
  background: linear-gradient(135deg, var(--purple), var(--pink));
}
.floating-circle:nth-child(4) { 
  width: 40px; 
  height: 40px; 
  top: 40%; 
  right: 30%; 
  animation-delay: 1s; 
  background: linear-gradient(135deg, var(--accent), var(--pink));
}
.floating-circle:nth-child(5) { 
  width: 120px; 
  height: 120px; 
  top: 10%; 
  right: 40%; 
  animation-delay: 3s; 
  background: linear-gradient(135deg, var(--brand-2), var(--purple));
}
.floating-circle:nth-child(6) { 
  width: 30px; 
  height: 30px; 
  bottom: 40%; 
  right: 20%; 
  animation-delay: 5s; 
  background: linear-gradient(135deg, var(--accent), var(--pink));
}

@keyframes float { 
  0%, 100% { 
    transform: translateY(0px) rotate(0deg) scale(1); 
    opacity: 0.1;
  }
  25% { 
    transform: translateY(-15px) rotate(90deg) scale(1.1); 
    opacity: 0.2;
  }
  50% { 
    transform: translateY(-30px) rotate(180deg) scale(0.9); 
    opacity: 0.15;
  }
  75% { 
    transform: translateY(-15px) rotate(270deg) scale(1.05); 
    opacity: 0.25;
  }
}

/* 动态粒子效果 */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--brand);
  border-radius: 50%;
  animation: particleFloat 8s linear infinite;
  opacity: 0.6;
  z-index: 3;
}

.particle:nth-child(odd) { 
  background: var(--brand-2); 
  animation-duration: 12s; 
}
.particle:nth-child(3n) { 
  background: var(--purple); 
  animation-duration: 10s; 
}
.particle:nth-child(4n) { 
  background: var(--pink); 
  animation-duration: 14s; 
}
.particle:nth-child(5n) { 
  background: var(--accent); 
  animation-duration: 16s; 
}

@keyframes particleFloat {
  0% { 
    transform: translateY(100vh) translateX(0px) scale(0); 
    opacity: 0; 
  }
  10% { 
    opacity: 0.6; 
    transform: scale(1); 
  }
  90% { 
    opacity: 0.6; 
  }
  100% { 
    transform: translateY(-100px) translateX(100px) scale(0); 
    opacity: 0; 
  }
}

/* Section背景增强 */
.section {
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(800px 400px at 20% 20%, rgba(79, 209, 197, 0.03), transparent 50%),
    radial-gradient(600px 300px at 80% 80%, rgba(122, 162, 247, 0.03), transparent 50%);
  pointer-events: none;
  animation: sectionGlow 10s ease-in-out infinite;
  z-index: 1;
}

@keyframes sectionGlow {
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.6; 
    transform: scale(1.05);
  }
}

/* 交替section背景 */
.section:nth-child(even) {
  background: 
    linear-gradient(135deg, rgba(15,18,32,0.3), rgba(10,11,15,0.1)),
    radial-gradient(1000px 500px at 50% 50%, rgba(168, 85, 247, 0.02), transparent 60%);
}

.section:nth-child(odd) {
  background: 
    linear-gradient(135deg, rgba(10,11,15,0.2), rgba(15,18,32,0.1)),
    radial-gradient(1000px 500px at 50% 50%, rgba(79, 209, 197, 0.02), transparent 60%);
}

/* 卡片悬停增强效果 */
.card {
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.02), rgba(122, 162, 247, 0.02));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover::after {
  opacity: 1;
}

/* 文字发光效果 */
h1, h2, h3 {
  position: relative;
}

h1::after, h2::after, h3::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  opacity: 0;
  filter: blur(20px);
  z-index: -1;
  transition: opacity 0.3s ease;
}

h1:hover::after, h2:hover::after, h3:hover::after {
  opacity: 0.1;
}

/* 移动端优化 */
@media (max-width: 960px) {
  body::before,
  body::after {
    display: none;
  }
  
  .floating-circle {
    display: none;
  }
  
  .particle {
    display: none;
  }
  
  .hero {
    animation: none;
  }
  
  .section::before {
    animation: none;
  }
  
  body {
    animation: none;
  }
}

/* 性能优化 - 减少动画在低端设备上 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
