/* ============================================================
   飞流 AI 工具导航站 - 公共样式
   ------------------------------------------------------------
   设计参考：ai-bot.cn 风格
   颜色主题：紫色系 + 蓝色点缀
   布局：左固定分类栏 + 右侧主内容
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #ede9fe;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --bg: #f7f8fa;
  --card-bg: #ffffff;
  --border: #eef0f3;
  --border-strong: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --accent: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 64px;
  --sidebar-w: 220px;
  --content-max: 1280px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 12px 28px rgba(17, 24, 39, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   Header - 顶部导航（全局 sticky）
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  flex-shrink: 0;
}

.site-header-inner {
  height: var(--header-h);
  padding: 0 20px 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 100%;
  margin: 0 auto;
}

/* 首页（带左侧栏）的 header 为 sidebar 预留空间 */
.body-hp .site-header-inner {
  padding-left: 24px;
}

.body-hp .site-header {
  left: var(--sidebar-w);
  right: 0;
  width: calc(100% - var(--sidebar-w));
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.site-logo-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.site-logo-sub {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.1;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all 0.15s;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.nav-dropdown {
  position: relative;
  cursor: pointer;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-arrow {
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 160px;
  z-index: 500;
}

.nav-subitem {
  display: block;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-subitem:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-subitem.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.site-search {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  gap: 8px;
  width: 260px;
  flex-shrink: 0;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.site-search:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
  width: 300px;
}

.site-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text);
  min-width: 0;
}

.site-search input::placeholder {
  color: var(--text-soft);
}

.site-search button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   左侧分类栏 Sidebar（仅首页和列表页）
   ============================================================ */
.hp-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  z-index: 150;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hp-sidebar-brand {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.hp-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.hp-sidebar-logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.hp-sidebar-header {
  display: none;
}

.hp-sidebar-inner {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.hp-sidebar-inner::-webkit-scrollbar {
  width: 4px;
}

.hp-sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

.hp-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hp-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  line-height: 1.5;
}

.hp-sidebar-item:hover,
.hp-sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.hp-sidebar-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.hp-sidebar-item:hover .hp-sidebar-icon,
.hp-sidebar-item.active .hp-sidebar-icon {
  color: var(--primary-dark);
}

.hp-sidebar-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-sidebar-arrow {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

.hp-sidebar-item:hover .hp-sidebar-arrow,
.hp-sidebar-item.active .hp-sidebar-arrow {
  color: var(--primary);
}

/* ============================================================
   首页 Banner 搜索区
   ============================================================ */
.hp-banner {
  background: linear-gradient(180deg, #f5f3ff 0%, #eff6ff 55%, #f7f8fa 100%);
  padding: 40px 0 32px;
  margin-left: var(--sidebar-w);
}

.hp-banner-inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.hp-banner-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}

.hp-banner-accent {
  color: var(--primary);
}

.hp-banner-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hp-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  max-width: 560px;
  margin: 0 auto 12px;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hp-search:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.hp-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  padding: 10px 0;
  min-width: 0;
}

.hp-search input::placeholder {
  color: var(--text-soft);
}

.hp-search button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.05);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hp-search button:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary);
}

.hp-search:focus-within button {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary);
}

.hp-engines {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hp-engine {
  border: none;
  background: transparent;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.hp-engine:hover {
  background: #fff;
  color: var(--text);
}

.hp-engine.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   右侧主内容区 - 首页和列表页
   ============================================================ */
.hp-main {
  flex: 1;
  min-height: 0;
}

.hp-content {
  margin-left: var(--sidebar-w);
  padding: 24px 32px 48px;
  max-width: none;
}

.hp-section {
  margin-bottom: 32px;
}

.hp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hp-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-title-mark {
  font-size: 18px;
  line-height: 1;
}

.hp-more-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.hp-more-link:hover {
  color: var(--primary);
}

/* ------- 热门推荐：横向滚动大卡片 ------- */
.hp-hot-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 4px 4px 12px;
}

.hp-hot-scroller::-webkit-scrollbar {
  height: 6px;
}

.hp-hot-scroller::-webkit-scrollbar-track {
  background: transparent;
}

.hp-hot-scroller::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.hp-hot-track {
  display: flex;
  gap: 14px;
}

.hp-hot-card {
  flex: 0 0 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: var(--shadow-sm);
}

.hp-hot-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.hp-hot-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-hot-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-hot-cover-ph {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}

.hp-hot-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-hot-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-hot-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.hp-hot-tag {
  align-self: flex-start;
  font-size: 11px;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 4px;
  font-weight: 500;
  margin-top: 4px;
}

/* ------- 工具卡片（网格） ------- */
.hp-tool-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hp-tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hp-tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.hp-tool-cover,
.hp-card-cover {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-tool-cover img,
.hp-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-tool-cover-ph,
.hp-card-cover-ph {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.hp-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hp-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.hp-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-card-tags {
  margin-top: 4px;
}

.hp-card-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 4px;
  font-weight: 500;
}

/* ------- 最新资讯 ------- */
.hp-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hp-news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}

.hp-news-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.hp-news-cover {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-news-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-news-cover-ph {
  font-size: 22px;
  font-weight: 700;
  color: #d97706;
}

.hp-news-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-news-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-news-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   普通页面主内容区（无左侧栏）
   ============================================================ */
.page-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  gap: 8px;
}

.section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ------- 通用按钮 ------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
  color: #fff;
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================================
   筛选和分页
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
  background: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.filter-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
  font-weight: 600;
}

.filter-pill {
  padding: 6px 14px;
  font-size: 13px;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   Loading & Empty 状态
   ============================================================ */
.loading-state,
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-soft);
}

.loading-state .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state.error {
  color: #dc2626;
}

/* ============================================================
   文章列表
   ============================================================ */
.article-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 14px;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}

.article-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.article-cover {
  width: 120px;
  height: 90px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 24px;
  overflow: hidden;
  font-weight: 700;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-soft);
}

.article-meta-tag {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================================
   面包屑导航
   ============================================================ */
.bc-nav {
  margin-bottom: 16px;
}

.bc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.bc-item {
  font-size: 13px;
  color: var(--text-muted);
}

.bc-link {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

.bc-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.bc-current {
  color: var(--text);
  font-weight: 600;
}

.bc-sep {
  color: var(--text-muted);
  font-size: 13px;
  padding: 0 4px;
  user-select: none;
}

/* ============================================================
   产品详情页
   ============================================================ */
.detail-wrap {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.detail-back:hover {
  color: var(--primary-dark);
}

.detail-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.detail-header {
  display: flex;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  align-items: flex-start;
}

.detail-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag {
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}

.detail-summary {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-left: 4px solid #f59e0b;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  color: #78350f;
  line-height: 1.7;
  margin-bottom: 24px;
}

.detail-content {
  font-size: 14.5px;
  line-height: 1.85;
  color: #374151;
}

.detail-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text);
}

.detail-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--text);
}

.detail-content p {
  margin: 0 0 14px;
}

.detail-content img {
  border-radius: var(--radius);
  margin: 12px 0;
  max-width: 100%;
}

.detail-content a {
  color: var(--primary);
}

.detail-content ul,
.detail-content ol {
  padding-left: 24px;
  margin: 12px 0;
}

.detail-content li {
  margin: 4px 0;
}

.detail-content blockquote {
  border-left: 3px solid var(--border-strong);
  padding-left: 12px;
  color: var(--text-muted);
  margin: 12px 0;
}

.detail-content pre,
.detail-content code {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 2px 6px;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 13px;
}

.detail-content pre {
  padding: 12px;
  overflow-x: auto;
  margin: 12px 0;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.detail-stats-inline {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ------- 详情页下方内容相关工具 ------- */
.detail-related {
  margin-top: 32px;
}

.detail-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.detail-related-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.detail-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.detail-related-grid .hp-tool-card {
  padding: 16px 14px;
}

#related-section {
  margin-top: 24px;
  padding: 32px;
}

/* 详情页底部栏统计条 */
.detail-stats-bar,
.detail-stats {
  margin-top: 24px;
  padding: 16px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.detail-desc-html {
  line-height: 1.75;
  color: var(--text);
  font-size: 14px;
}

.detail-desc-html p {
  margin: 0 0 12px;
}

.detail-desc-html h1,
.detail-desc-html h2,
.detail-desc-html h3,
.detail-desc-html h4 {
  margin: 20px 0 10px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.detail-desc-html h2 { font-size: 18px; }
.detail-desc-html h3 { font-size: 16px; }

.detail-desc-html ul,
.detail-desc-html ol {
  padding-left: 20px;
  margin: 10px 0;
}

.detail-desc-html li {
  margin: 6px 0;
  color: var(--text);
}

.detail-desc-html code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #dc2626;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.detail-desc-html pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
}

.detail-desc-html img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 10px 0;
}

.detail-desc-html blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--primary);
  background: #fff;
  color: var(--text-muted);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-desc-html a {
  color: var(--primary);
  text-decoration: underline;
}

.detail-stats-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-stats-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* ============================================================
   Footer 页脚
   ============================================================ */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
  z-index: 100;
}

/* 带左侧栏页面的 footer 也要留出空间 */
.body-hp .site-footer {
  margin-left: var(--sidebar-w);
}

.site-footer-inner {
  width: 100%;
  padding: 40px 32px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 24px;
}

.footer-external-links-section {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.footer-brand-sub {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 340px;
}

.footer-external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.footer-external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.footer-external-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.footer-external-link::after {
  content: "↗";
  font-size: 11px;
  opacity: 0.7;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-link {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.15s;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
}

.footer-bottom div {
  line-height: 1.6;
}

.about-rich-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.about-rich-content h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
}

.about-rich-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.about-rich-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
}

.about-rich-content p {
  margin: 12px 0;
  color: var(--text-muted);
}

.about-rich-content ul,
.about-rich-content ol {
  padding-left: 24px;
  margin: 12px 0;
}

.about-rich-content li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.about-rich-content a {
  color: var(--primary);
  text-decoration: underline;
}

.about-rich-content a:hover {
  color: var(--primary-dark);
}

.about-rich-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 12px 0;
}

.about-rich-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1400px) {
  .hp-tool-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1200px) {
  .hp-tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hp-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 24px;
  }
  .footer-grid > *:last-child {
    grid-column: span 3;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-w: 0px;
  }

  /* 移动端：收起左侧固定栏 */
  .hp-sidebar {
    position: static;
    width: 100%;
    height: auto;
    z-index: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .hp-sidebar-inner {
    padding: 10px 12px 12px;
    overflow: visible;
    height: auto;
  }

  .hp-sidebar-list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
  }

  .hp-sidebar-item {
    flex-shrink: 0;
    padding: 6px 12px;
  }

  .hp-sidebar-brand,
  .hp-sidebar-header,
  .hp-sidebar-arrow {
    display: none;
  }

  .hp-banner {
    margin-left: 0;
    padding: 28px 0 22px;
  }

  .hp-content {
    margin-left: 0;
    padding: 16px 14px 32px;
  }

  .body-hp .site-header-inner {
    padding-left: 16px;
  }

  .hp-tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hp-news-grid {
    grid-template-columns: 1fr;
  }

  .hp-hot-card {
    flex: 0 0 220px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-grid > *:first-child {
    grid-column: span 2;
  }

  .body-hp .site-footer {
    margin-left: 0;
  }

  .site-footer-inner {
    padding: 32px 16px 16px;
  }

  .site-search {
    width: auto;
    flex: 1;
  }

  .site-search:focus-within {
    width: auto;
    flex: 1;
  }

  .page-main {
    padding: 20px 14px 32px;
  }

  .detail-wrap {
    padding: 20px 14px 32px;
  }

  .detail-card {
    padding: 20px;
  }

  #related-section {
    padding: 20px;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-title {
    font-size: 22px;
  }

  .detail-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  .article-cover {
    width: 100px;
    height: 75px;
  }
}

@media (max-width: 640px) {
  .hp-banner-title {
    font-size: 22px;
  }

  .hp-tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-content {
    padding: 12px 10px 24px;
  }

  .hp-section-title {
    font-size: 16px;
  }

  .detail-related-grid {
    grid-template-columns: 1fr;
  }

  .site-logo-title,
  .site-logo-sub {
    display: none;
  }

  .site-header-inner {
    gap: 10px;
    padding: 0 12px;
  }

  .nav-item span:not(.nav-icon) {
    display: none;
  }

  .nav-item {
    padding: 8px 8px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-grid > *:first-child {
    grid-column: span 1;
  }
}

@media (max-width: 420px) {
  .hp-tool-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 广告位样式 ========== */
.ad-slot {
  margin: 16px 0;
  min-height: 60px;
  border-radius: 8px;
  overflow: hidden;
}

.ad-slot:empty,
.ad-slot.is-hidden {
  display: none;
  margin: 0;
  min-height: 0;
}

.ad-slot-sidebar {
  margin: 12px 0;
  min-height: 100px;
}

.ad-slot-sidebar:empty,
.ad-slot-sidebar.is-hidden {
  margin: 0;
  min-height: 0;
}

#ad-hero-bottom, #ad-home-hero-bottom {
  margin-left: var(--sidebar-w);
  padding: 0 32px;
}

#ad-footer, #ad-home-footer {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* ========== 名人堂样式 ========== */
.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.hall-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

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

.hall-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hall-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.hall-avatar span {
  position: relative;
  z-index: 1;
}

.hall-avatar img + span {
  display: none;
}

.hall-name {
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.hall-role {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
}

.hall-desc {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hall-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hall-card {
    padding: 16px 10px;
  }

  .hall-avatar {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
}

/* ========== 页面顶部介绍内容 ========== */
.page-intro {
  max-width: 100%;
  margin-top: 12px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
}

.page-intro p {
  margin: 0 0 10px;
}

.page-intro p:last-child {
  margin-bottom: 0;
}
