/* ── AI 导航 自定义样式 ─────────────────────────────── */

/* 导航链接 */
.nav-link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.8125rem;
  color: #4b5563;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link:hover { color: #4f46e5; background-color: #eef2ff; }
.nav-link.active { color: #4f46e5; background-color: #eef2ff; }

.mobile-nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: #4b5563;
  border-radius: 0.5rem;
  text-decoration: none;
}
.mobile-nav-link:hover { background-color: #eef2ff; color: #4f46e5; }

/* 章节标题 */
.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
}

/* 徽章 */
.badge-hot { font-size: 0.75rem; background: #fef2f2; color: #ef4444; padding: 2px 6px; border-radius: 4px; font-weight: 500; }
.badge-new { font-size: 0.75rem; background: #f0fdf4; color: #22c55e; padding: 2px 6px; border-radius: 4px; font-weight: 500; }
.badge-featured { font-size: 0.75rem; background: #fefce8; color: #ca8a04; padding: 2px 6px; border-radius: 4px; font-weight: 500; }
.badge-cn { font-size: 0.75rem; background: #fef2f2; color: #dc2626; padding: 2px 6px; border-radius: 4px; font-weight: 500; }

/* 分页 */
.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  transition: all 0.2s;
  text-decoration: none;
}
.pagination-btn:hover { border-color: #a5b4fc; color: #4f46e5; }
.pagination-btn.active { background-color: #4f46e5; color: white; border-color: #4f46e5; }

/* 后台侧边栏 */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: #4b5563;
  border-radius: 0.5rem;
  transition: all 0.2s;
  margin-bottom: 2px;
  text-decoration: none;
}
.sidebar-link:hover { background-color: #eef2ff; color: #4f46e5; }
.sidebar-link.active { background-color: #eef2ff; color: #4f46e5; font-weight: 500; }

/* Toggle 按钮 */
.toggle-btn {
  font-size: 1.125rem;
  transition: color 0.2s, transform 0.15s;
  cursor: pointer;
  background: none;
  border: none;
}
.toggle-btn:hover { transform: scale(1.1); }

/* 文字裁剪 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 动画 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 搜索引擎选择器 */
.engine-radio {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.875rem;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}
.engine-radio:hover {
  color: #4f46e5;
  background: #eef2ff;
  border-color: #c7d2fe;
}
.engine-radio.active {
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-color: #6366f1;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* 搜索引擎标签页 */
.search-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.search-tab:hover { color: #4f46e5; }
.search-tab.active { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 500; }

/* 搜索引擎卡片 */
.engine-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.engine-card:hover { border-color: #a5b4fc; background: #f8f9ff; box-shadow: 0 2px 8px rgba(99,102,241,0.08); }

/* 搜索建议 */
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 0.875rem;
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.suggest-item:hover { background: #eef2ff; }

/* 隐藏导航滚动条 */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* 文章内容排版 */
.article-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eef2ff;
}
.article-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.article-content p {
  margin-bottom: 0.75rem;
  line-height: 1.8;
}
.article-content ul, .article-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li {
  margin-bottom: 0.35rem;
  line-height: 1.7;
}
.article-content strong {
  color: #1f2937;
  font-weight: 600;
}
.article-content a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content a:hover { color: #4338ca; }
.article-content blockquote {
  border-left: 3px solid #a5b4fc;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: #f8f9ff;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #4b5563;
}
.article-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
