/* AI对话悬浮按钮样式 */
.ai-chat-float {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 9999;
}

.ai-chat-btn {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  padding: 15px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  transition: var(--transition);
  font-weight: 500;
  color: #fff;
  font-size: 24rpx;
}

.ai-chat-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.6);
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--secondary-color)
  );
}

.ai-chat-icon {
  font-size: 1.4rem;
}

.ai-chat-text {
  display: none;
}

@media (min-width: 768px) {
  .ai-chat-text {
    display: block;
  }
}

/* AI对话弹窗样式 */
.ai-chat-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.ai-chat-modal.active {
  display: flex;
}

.ai-chat-container {
  width: 90%;
  max-width: 800px;
  height: 80vh;
  max-height: 700px;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 1.5rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
  color: #333;
}

.ai-chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.ai-chat-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.ai-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.ai-chat-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.ai-chat-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 媒体查询中的动画调整 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* AI对话弹窗动画 */
.ai-chat-modal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ai-chat-modal.active {
  opacity: 1;
  visibility: visible;
}

.ai-chat-container {
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.ai-chat-modal.active .ai-chat-container {
  transform: scale(1);
}
