/* 3D科技网格背景 */
.tech-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
  perspective: 1000px;
  z-index: -1;
  overflow: hidden;
}

/* 3D网格线 */
.tech-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(45, 105, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 105, 184, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: rotateX(60deg) scale(2) translateY(-30%);
  animation: gridMove 20s linear infinite;
}

/* 3D网格动态效果 */
@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 100px;
  }
}

/* 3D网格第二层 */
.tech-grid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(45, 105, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 105, 184, 0.05) 1px, transparent 1px);
  background-size: 25px 25px;
  transform: rotateX(60deg) scale(1.5) translateY(-20%);
  animation: gridMove 15s linear infinite reverse;
}

/* 3D光晕效果 */
.grid-glow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 153, 225, 0.3) 0%, rgba(66, 153, 225, 0) 70%);
  filter: blur(40px);
  animation: glowPulse 8s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* 科技感粒子效果容器 */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* 代码录入动画容器 */
.code-animation-container {
  position: relative;
  background-color: rgba(26, 32, 44, 0.95);
  border-radius: 8px;
  padding: 24px;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(156, 163, 175, 0.2);
}

/* 代码编辑器头部 */
.code-editor-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.code-editor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-editor-dot.red {
  background-color: #ff5f56;
}

.code-editor-dot.yellow {
  background-color: #ffbd2e;
}

.code-editor-dot.green {
  background-color: #27c93f;
}

/* 代码高亮样式 */
.code-block {
  position: relative;
  color: #e2e8f0;
  line-height: 1.6;
  font-size: 14px;
  overflow: auto;
  max-height: 400px;
}

.code-block::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-block::-webkit-scrollbar-track {
  background: rgba(156, 163, 175, 0.1);
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.7);
}

/* 代码高亮颜色 */
.code-keyword {
  color: #79c0ff;
}

.code-string {
  color: #a5d6a7;
}

.code-comment {
  color: #718096;
  font-style: italic;
}

.code-number {
  color: #ffab70;
}

.code-function {
  color: #b392f0;
}

.code-property {
  color: #63e6e6;
}

/* 光标闪烁效果 */
.cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background-color: #e2e8f0;
  margin-left: 2px;
  animation: cursor-blink 1.2s infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 科技感渐变按钮 */
.tech-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-orange) 100%);
  background-size: 200% auto;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.tech-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
  z-index: -1;
}

.tech-btn:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 136, 229, 0.3);
}

.tech-btn:hover::before {
  left: 100%;
}

/* 数字计数器动画 */
.counter {
  font-size: 32px;
  font-weight: 700;
  color: #1e88e5;
  transition: all 0.3s ease;
}

/* 科技感卡片 */
.tech-card {
  position: relative;
  background-color: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #1e88e5, #0d47a1);
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* 淡入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 交错淡入动画 */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 粒子元素 */
.particle {
  position: absolute;
  background-color: rgba(30, 136, 229, 0.3);
  border-radius: 50%;
  pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .code-block {
    font-size: 12px;
  }
  
  .tech-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* 技术按钮样式 */
.tech-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
}

.tech-btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1D5AB8, #1976d2);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.tech-btn:hover:before {
  opacity: 1;
}

/* 卡片悬停效果 */
.hover-card {
  transition: all 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* 标题渐入动画 */
.fade-in-title {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 服务卡片脉动效果 */
.pulse-card {
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(30, 136, 229, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(30, 136, 229, 0);
  }
}

/* 滚动触发动画 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 数字计数器动画 */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter {
  animation: countUp 0.8s ease-out forwards;
}

/* 技术优势图表动画 */
.chart-animate {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s ease;
}

.chart-animate.active {
  opacity: 1;
  transform: scale(1);
}

/* 按钮波纹效果 */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 10%, rgba(255,255,255,0) 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.ripple-btn:active:after {
  transform: scale(4);
  opacity: 1;
}

/* 图标旋转动画 */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-icon {
  animation: rotate 20s linear infinite;
}

/* 脉冲图标效果 */
@keyframes pulseIcon {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.pulse-icon {
  animation: pulseIcon 2s ease-in-out infinite;
}

/* 波浪背景动画 */
@keyframes wave {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.wave-bg {
  background: linear-gradient(270deg, #1D5AB8, #1976d2, #1565c0);
  background-size: 600% 600%;
  animation: wave 15s ease infinite;
}

/* 技术栈标签动画 */
@keyframes tagAppear {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tech-tag {
  animation: tagAppear 0.5s ease-out forwards;
}

.tech-tag:nth-child(2) {
  animation-delay: 0.1s;
}

.tech-tag:nth-child(3) {
  animation-delay: 0.2s;
}

.tech-tag:nth-child(4) {
  animation-delay: 0.3s;
}

.tech-tag:nth-child(5) {
  animation-delay: 0.4s;
}

/* 滚动进度条动画 */
@keyframes progress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.progress-bar {
  animation: progress 1.5s ease-out forwards;
}

/* 闪光效果 */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  animation: shine 6s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 产品特性悬停效果 */
.feature-hover {
  transition: all 0.3s ease;
}

.feature-hover:hover {
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.05), rgba(30, 136, 229, 0.1));
  border-left: 4px solid #1D5AB8;
  padding-left: 20px;
}

/* 平滑滚动 */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* 移动端菜单滑入动画 */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.mobile-menu.slide-in {
  animation: slideIn 0.5s ease forwards;
}

.mobile-menu.slide-out {
  animation: slideOut 0.5s ease forwards;
}

/* 加载动画 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* 导航栏滚动效果 */
@keyframes navScroll {
  from {
    height: 85px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
  to {
    height: 70px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }
}

.header.scrolled {
  animation: navScroll 0.3s ease forwards;
}

/* 图表增长动画 */
@keyframes chartGrow {
  from {
    height: 0;
  }
  to {
    height: 100%;
  }
}

.chart-bar {
  animation: chartGrow 1s ease-out forwards;
}

.chart-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.chart-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.chart-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.chart-bar:nth-child(5) {
  animation-delay: 0.4s;
}

/* 3D卡片翻转效果 */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
}

.flip-card-back {
  background-color: #1D5AB8;
  color: white;
  transform: rotateY(180deg);
}

/* 案例展示轮播动画 */
@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.case-carousel {
  display: flex;
  animation: slide 20s linear infinite;
}

.case-carousel:hover {
  animation-play-state: paused;
}

/* 标签云动画 */
@keyframes rotateTags {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.tag-cloud {
  animation: rotateTags 20s linear infinite;
  transform-style: preserve-3d;
}

/* 呼吸灯效果 */
@keyframes breathe {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(30, 136, 229, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(30, 136, 229, 0);
  }
}

.breathing-light {
  animation: breathe 2s infinite;
}

/* 页面转场动画 */
.page-transition {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.page-transition.loaded {
  opacity: 1;
}

/* 技术指标动画 */
@keyframes gaugeFill {
  from {
    stroke-dashoffset: 283;
  }
  to {
    stroke-dashoffset: var(--offset);
  }
}

.gauge {
  animation: gaugeFill 1.5s ease-out forwards;
}

/* 悬停时的阴影变化 */
.shadow-hover {
  transition: all 0.3s ease;
}

.shadow-hover:hover {
  box-shadow: 0 10px 25px rgba(30, 136, 229, 0.2);
}

/* 文本渐变色动画 */
.text-gradient {
  background: linear-gradient(90deg, #1D5AB8, #1976d2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: textGradient 5s ease infinite;
}

@keyframes textGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}