/* 漂浮数字人助手样式 */

.floating-assistant {
  position: fixed;
  bottom: 80px;
  right: 30px;
  z-index: 9999;
  cursor: pointer;
  transition: all 0.3s ease;
}

.floating-assistant:hover {
  transform: translateY(-5px);
}

.assistant-avatar {
  width: 120px;
  height: 200px;
  border-radius: 50%;
  /* background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%); */
  /* box-shadow: 0 8px 25px rgba(14, 69, 138, 0.25); */
  padding: 8px;
  position: relative;
  animation: floatUpDown 3s ease-in-out infinite;
}

.assistant-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* 呼吸光圈效果 */
.assistant-avatar::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  /* border-radius: 50%; */
  /* background: linear-gradient(135deg, rgba(14, 69, 138, 0.3), rgba(26, 93, 173, 0.3)); */
  z-index: -1;
  animation: pulse 2s ease-in-out infinite;
}

/* 提示气泡 */
.assistant-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #0e458a 0%, #1a5dad 100%);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  white-space: nowrap;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(14, 69, 138, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(10px);
}

.assistant-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 30px;
  border: 8px solid transparent;
  border-top-color: #1a5dad;
}

.floating-assistant:hover .assistant-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 上下浮动动画 */
@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1);
  }
}

/* 点击波纹效果 */
.floating-assistant.clicked .assistant-avatar::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(14, 69, 138, 0.4);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* 响应式适配 */
@media (max-width: 991px) {
  .floating-assistant {
    bottom: 60px;
    right: 20px;
  }

  .assistant-avatar {
    width: 100px;
    height: 150px;
  }

  .assistant-tooltip {
    font-size: 13px;
    padding: 8px 15px;
  }
}

@media (max-width: 767px) {
  .floating-assistant {
    bottom: 50px;
    right: 15px;
  }

  .assistant-avatar {
    width: 80px;
    height: 130px;
    padding: 6px;
  }

  .assistant-tooltip {
    font-size: 12px;
    padding: 6px 12px;
    margin-bottom: 10px;
  }

  .assistant-tooltip::after {
    border-width: 6px;
    right: 20px;
  }
}

/* 隐藏在小屏幕上（可选） */
@media (max-width: 480px) {
  .assistant-tooltip {
    display: none;
  }
}
