/* AI助手浮动按钮样式 */
.ai-assistant-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  border: none;
  cursor: pointer;
}

.ai-assistant-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.ai-assistant-float svg {
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 2;
}

/* AI脉冲动画 */
.ai-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.3);
  animation: ai-pulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes ai-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .ai-assistant-float {
    bottom: 5rem; /* 避免与移动端底部导航重叠 */
    right: 1rem;
    width: 56px;
    height: 56px;
  }
  
  .ai-assistant-float svg {
    width: 24px;
    height: 24px;
  }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
  .ai-assistant-float {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* 确保在返回顶部按钮之上 */
.ai-assistant-float {
  z-index: 1001;
}

/* 当返回顶部按钮显示时，调整AI助手位置 */
.back-to-top.show ~ .ai-assistant-float {
  bottom: 8rem;
}

@media (max-width: 768px) {
  .back-to-top.show ~ .ai-assistant-float {
    bottom: 11rem; /* 移动端需要更多空间 */
  }
}