/* 全局样式 */
body {
  /* 移除了为固定导航栏留出的空间 */
}

/* 内容区域底部内边距，为底部导航栏留出空间 */
.content-container {
  padding-bottom: 56px;
}

.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.floating-animation {
  animation: floating 3s ease-in-out infinite;
  animation-delay: 1s; /* 延迟1秒开始动画，避免初始抖动 */
  will-change: transform; /* 提示浏览器优化transform属性 */
  backface-visibility: hidden; /* 隐藏背面，减少渲染问题 */
  transform: translateZ(0); /* 强制硬件加速 */
}

@keyframes floating {
  0%, 100% { transform: translateY(0px) translateZ(0); }
  50% { transform: translateY(-10px) translateZ(0); }
}

/* 禁用fade-in动画，避免初始闪烁 */
.fade-in {
  /* animation: fadeIn 0.8s ease-in-out; */
}

/* @keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
} */

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.pulse-green {
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0%, 100% { background-color: #10b981; }
  50% { background-color: #059669; }
}

.pulse-blue {
  animation: pulseBlue 2s infinite;
}

@keyframes pulseBlue {
  0%, 100% { background-color: #3b82f6; }
  50% { background-color: #2563eb; }
}

.pulse-purple {
  animation: pulsePurple 2s infinite;
}

@keyframes pulsePurple {
  0%, 100% { background-color: #8b5cf6; }
  50% { background-color: #7c3aed; }
}

.status-badge {
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: white !important;
}

.service-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--card-gradient-start), var(--card-gradient-end));
}

.service-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
  border-color: #cbd5e1;
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--icon-gradient-start), var(--icon-gradient-end));
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

/* 最基础的底部导航 */
.basic-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #f1f5f9;
  z-index: 50;
  box-shadow: 0 -10px 20px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}

.basic-nav-container {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 56px;
}

.basic-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.basic-nav-item:hover {
  transform: translateY(-3px);
  background-color: #f8fafc;
  border-radius: 8px;
}

.basic-nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.basic-nav-text {
  font-size: 10px;
  font-weight: 500;
}

.basic-nav-item.active {
  color: #00BFFF;
  font-weight: bold;
}

/* 波纹效果 */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(0, 191, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 底部导航栏样式 */
.basic-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4000; /* 确保在知识库模态框下方 */
  background: white;
  border-top: 1px solid #f1f5f9;
  box-shadow: 0 -10px 20px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  height: 56px;
}

/* 底部导航图标颜色扩展 */
.text-navYellow {
  color: #FBBF24; /* 添加黄色用于知识库图标 */
}

.text-navYellow:hover,
.basic-nav-item.active .text-navYellow {
  color: #F59E0B; /* 黄色悬停和激活状态 */
}

.basic-nav-container {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
}

/* 确保页面内容不被固定底部导航栏遮挡 */
body.has-bottom-nav {
  padding-bottom: 56px; /* 等于底部导航高度 */
}

.content-container {
  padding-top: 0; /* 移除额外的顶部内边距 */
  padding-bottom: 2rem; /* 防止内容紧贴底部 */
}

/* 顶部导航样式 */
#top-navbar {
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.nav-item {
  transition: all 0.3s ease;
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00BFFF, #4ECDC4);
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

/* 移动端菜单按钮样式 */
#mobile-menu-button {
  transition: all 0.3s ease;
}

#mobile-menu-button:hover {
  background-color: #f3f4f6;
}

/* 联系电话按钮样式 */
.bg-taobao {
  background-color: #FFB800;
}

/* 当导航栏滚动时的变化 */
.nav-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.98);
}

/* 知识库样式 */
#knowledge-search {
  transition: all 0.3s ease;
}

#knowledge-search:focus {
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.2);
}

.article-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 标签样式 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 滚动条样式 */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 左对齐分类标题样式 */
.border-gradient-to-r {
  border-image: linear-gradient(90deg, var(--tw-gradient-stops)) 1;
}

/* 文字渐变样式 */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.text-transparent {
  color: transparent;
}

/* 底部导航彩色文本定义 */
.text-navBlue {
  color: #3B82F6;
}

.text-navBlue:hover,
.basic-nav-item.active .text-navBlue {
  color: #1D4ED8;
}

.text-navOrange {
  color: #F97316;
}

.text-navOrange:hover,
.basic-nav-item.active .text-navOrange {
  color: #EA580C;
}

.text-navPurple {
  color: #8B5CF6;
}

.text-navPurple:hover,
.basic-nav-item.active .text-navPurple {
  color: #7C3AED;
}

.text-navYellow {
  color: #FBBF24;
}

.text-navYellow:hover,
.basic-nav-item.active .text-navYellow {
  color: #F59E0B;
}

.text-navGreen {
  color: #10B981;
}

.text-navGreen:hover,
.basic-nav-item.active .text-navGreen {
  color: #059669;
}