/* AI 客服浮动组件样式 */
.ai-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chat-toggle {
  background: linear-gradient(135deg, #1a73e8, #4285f4);
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  transition: transform 0.2s;
}

.chat-toggle:hover {
  transform: scale(1.05);
}

.chat-icon {
  font-size: 24px;
}

.chat-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
}

.chat-header {
  background: linear-gradient(135deg, #1a73e8, #4285f4);
  color: white;
  padding: 16px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.close-btn {
  cursor: pointer;
  font-size: 24px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8f9fa;
}

.chat-input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid #eee;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
}

.chat-input-area button {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
}

.chat-ad {
  padding: 8px 16px;
  background: #fff3cd;
  font-size: 12px;
  border-radius: 0 0 16px 16px;
}

.chat-ad a {
  color: #1a73e8;
  text-decoration: none;
}

.message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
}

.user-message {
  background: #1a73e8;
  color: white;
  margin-left: auto;
}

.ai-message {
  background: white;
  border: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  .chat-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    bottom: 0;
    right: 0;
    position: fixed;
  }
  .chat-header {
    border-radius: 0;
  }
  .chat-ad {
    border-radius: 0;
  }
}