/* 在chat.css中添加 */
#chatWidget {
    -webkit-transform: translateZ(0); /* Chrome渲染优化 */
    transform: translateZ(0);
}

.chat-icon {
    -webkit-user-select: none; /* 防止文本选中 */
    user-select: none;
}

/* 添加Edge专属样式 */
@supports (-ms-ime-align:auto) {
    .chat-window {
        border: 1px solid #ddd; /* Edge阴影渲染补丁 */
    }
}



/* 基础布局 */
#chatWidget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* 悬浮按钮 */
.chat-icon {
    width: 60px;
    height: 60px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}
.chat-icon:hover {
    transform: scale(1.1);
}

/* 聊天窗口 */
.chat-window {
    width: 380px;
    height: 560px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: none;
}

/* 消息样式 */
.message {
    margin: 12px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
}
.message.user {
    background: #e3f2fd;
    margin-left: auto;
}
.message.bot {
    background: #f5f5f5;
    margin-right: auto;
}

/* 锹甲卡片样式 */
.species-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    background: #f8f9fa;
}
.species-card a {
    color: #2c3e50;
    text-decoration: none;
}
.highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 在 chat.css 中添加 */
.species-card {
  display: block !important; /* 覆盖潜在隐藏样式 */
  opacity: 1 !important;
  transition: opacity 0.3s;
}

.loading {
  color: #666;
  font-size: 0.9em;
  padding: 10px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fa-spinner {
  animation: spin 1s linear infinite;
  margin-right: 8px;
}