/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 主色调 - 参考 bimiseek 的蓝紫渐变 */
  --primary: #4f6ef7;
  --primary-dark: #3d55d9;
  --primary-light: #eef1ff;
  --primary-soft: #f5f7ff;
  --accent: #7c5cfc;
  --accent-light: #f3f0ff;
  --accent-soft: #faf8ff;

  /* 背景 */
  --bg: #f7f8fc;
  --bg-secondary: #f0f2f8;
  --card-bg: #ffffff;

  /* 文字 */
  --text: #1a1d2e;
  --text-secondary: #5b6173;
  --text-muted: #9298aa;

  /* 边框 */
  --border: #e4e7f0;
  --border-light: #f0f1f6;

  /* 功能色 */
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;

  /* 圆角 */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-lg: 20px;

  /* 阴影 - 更柔和精致 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.02);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.02);
  --shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.09), 0 8px 24px rgba(0,0,0,0.05);

  /* 过渡 */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* 布局 */
  --sidebar-w: 240px;
  --header-h: 64px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景装饰 */
body::before {
  content: '';
  position: fixed; top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(79,110,247,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none; z-index: 0;
}

body::after {
  content: '';
  position: fixed; bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,92,252,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none; z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ========== Header ========== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 32px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-inner {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.top-nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: flex-start;
  margin-left: calc(var(--sidebar-w) - 140px);
  transition: margin-left var(--transition-slow);
}
.app-layout.sidebar-collapsed ~ .header .top-nav,
.top-nav.sidebar-collapsed {
  margin-left: 40px;
}

.top-nav-item {
  padding: 6px 16px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  transition: all var(--transition);
  white-space: nowrap;
}

.top-nav-item:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

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

.header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,110,247,0.3), rgba(124,92,252,0.3), transparent);
  opacity: 0.5;
}

.header-left {
  display: flex; align-items: center; gap: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition);
}
.header-left:hover {
  opacity: 0.85;
}

.logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  box-shadow: 0 2px 8px rgba(79,110,247,0.12);
  transition: transform var(--transition);
  overflow: hidden;
}

.logo-icon img {
  width: 100%; height: 100%; object-fit: contain;
  display: block; padding: 2px;
}

.logo-icon:hover {
  transform: scale(1.05) rotate(-3deg);
}

.logo {
  font-size: 21px; font-weight: 700; letter-spacing: -0.4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex; align-items: center; gap: 10px;
}

/* ========== 语言切换按钮 ========== */
.lang-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 4px;
  border-radius: 5px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 10px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.lang-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* 折叠时隐藏网站标题，仅保留logo */
.header-left.collapsed .logo {
  display: none;
}

/* ========== Header 折叠按钮 ========== */
.sidebar-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-right: 12px;
}
.sidebar-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ========== 侧边栏折叠状态 ========== */
.sidebar.collapsed {
  width: 64px;
}
.sidebar.collapsed .sidebar-nav li a {
  justify-content: center;
  padding: 10px 0;
}
.sidebar.collapsed .sidebar-nav li a > span:not(.cat-icon) {
  display: none;
}
.sidebar.collapsed .sidebar-title {
  display: none;
}
.sidebar.collapsed .sidebar-divider {
  margin: 8px 12px;
}
.sidebar.collapsed ~ .main-content {
  margin-left: 64px;
  max-width: calc(100vw - 64px);
}
.app-layout.sidebar-collapsed .main-content {
  margin-left: 64px;
  max-width: calc(100vw - 64px);
}
@media (max-width: 768px) {
  .sidebar-toggle-btn { display: none; }
  .top-nav { margin-left: calc(64px - 32px); }
}
@media (max-width: 480px) {
  .lang-toggle-btn { min-width: 32px; height: 28px; padding: 0 8px; font-size: 12px; }
  .top-nav { margin-left: calc(48px - 32px); }
}

/* ========== Search Engine Switch (通用) ========== */
.search-engine-switch {
  display: flex; gap: 24px; justify-content: center;
  margin-bottom: 0;
}

.se-option {
  position: relative;
  padding: 6px 2px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.45); cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.se-option:hover {
  color: rgba(255,255,255,0.75);
}

.se-option.active {
  color: #fff;
  font-weight: 600;
}

.btn {
  padding: 9px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 7px;
  letter-spacing: -0.1px; position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 2px 10px rgba(79,110,247,0.22);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,110,247,0.32);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(79,110,247,0.2);
}

.btn-outline {
  background: linear-gradient(135deg, rgba(79,110,247,0.08), rgba(124,92,252,0.06));
  border: 1.5px solid rgba(79,110,247,0.2);
  color: var(--primary);
  font-weight: 500;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 14px rgba(79,110,247,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 10px; }
.btn-xs { padding: 5px 12px; font-size: 11.5px; border-radius: 8px; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; box-shadow: 0 2px 10px rgba(239,68,68,0.25); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; box-shadow: 0 2px 10px rgba(16,185,129,0.25); }

.user-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--primary); font-weight: 600;
  border: 2px solid rgba(79,110,247,0.08);
  cursor: pointer;
  transition: all var(--transition);
}
.user-avatar:hover {
  border-color: rgba(79,110,247,0.25);
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(79,110,247,0.12);
}

/* ========== Layout ========== */
.app-layout {
  display: flex; padding-top: var(--header-h); min-height: 100vh;
  position: relative; z-index: 1;
}

/* ========== Sidebar ========== */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(0,0,0,0.04);
  overflow-y: auto; padding: 24px 0; z-index: 50;
}

.sidebar-title {
  padding: 0 24px 16px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

.sidebar-nav { list-style: none; padding: 0 10px; }

.sidebar-nav li a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; margin: 2px 0;
  font-size: 14px; color: var(--text-secondary);
  border-radius: 10px;
  transition: all var(--transition);
  font-weight: 450;
  position: relative;
}

.sidebar-nav li a:hover {
  background: var(--primary-soft);
  color: var(--text);
}

.sidebar-nav li a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 550;
}

.sidebar-nav li a.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 3px 3px 0;
}

.sidebar-nav .cat-icon {
  font-size: 18px; width: 28px; text-align: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.sidebar-nav li a:hover .cat-icon {
  transform: scale(1.1);
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 10px 16px;
}

.workspace-nav-item {
  font-weight: 600 !important;
  color: var(--primary) !important;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)) !important;
  border: 1px solid rgba(79,110,247,0.1) !important;
  border-radius: 12px !important;
  margin-bottom: 2px !important;
}

.workspace-nav-item:hover {
  background: linear-gradient(135deg, var(--primary-light), #f0ebff) !important;
  border-color: rgba(79,110,247,0.2) !important;
  box-shadow: 0 2px 8px rgba(79,110,247,0.08);
}

/* ========== Main Content ========== */
.main-content {
  margin-left: var(--sidebar-w); flex: 1;
  padding: 32px 36px 48px;
  max-width: calc(100vw - var(--sidebar-w));
  transition: margin-right var(--transition-slow);
}

/* ========== Hero Banner ========== */
.hero-banner {
  margin: -32px -36px 28px;
  padding: 40px 48px 36px;
  background: linear-gradient(160deg, #1a2548 0%, #1e2a55 30%, #1a2450 55%, #241e56 100%);
  position: relative;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}

/* 科技感网格纹理 */
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,110,247,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,110,247,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.hero-banner::after {
  content: '';
  position: absolute; top: -80px; right: -60px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(79,110,247,0.2) 0%, rgba(124,92,252,0.08) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* 左侧光晕 */
.hero-content::before {
  content: '';
  position: absolute; bottom: -120px; left: 5%;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(124,92,252,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 32px; font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.8px;
  margin-bottom: 18px;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 16px; color: rgba(255,255,255,0.55);
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-search {
  position: relative;
  max-width: 560px; margin: 0 auto 20px;
  display: flex; flex-direction: column; align-items: center;
}

.hero-search-input-wrap {
  position: relative;
  width: 100%;
}

.hero-search input {
  width: 100%; height: 52px;
  padding: 0 56px 0 24px;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px; outline: none;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.hero-search input::placeholder {
  color: rgba(255,255,255,0.35);
}

.hero-search input:focus {
  border-color: rgba(79,110,247,0.6);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 4px rgba(79,110,247,0.1), 0 0 20px rgba(79,110,247,0.08);
}

.hero-search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(79,110,247,0.3);
}

.hero-search-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 14px rgba(79,110,247,0.4);
}

.hero-search-btn svg {
  display: block;
}

.hero-tags {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}

.hero-tag {
  padding: 6px 16px; border-radius: 20px;
  font-size: 13px; color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 450;
}

.hero-tag:hover {
  background: rgba(79,110,247,0.2);
  border-color: rgba(79,110,247,0.3);
  color: #fff;
}

.category-section {
  margin-bottom: 48px;
  animation: fadeInUp 0.45s ease;
  position: relative;
}

/* 防止切换分类时 footer 跳动 */
#toolsContainer {
  min-height: 400px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.category-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.category-header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.category-header .cat-icon {
  font-size: 24px; width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(79,110,247,0.06);
}

.category-header .cat-name {
  font-size: 18px; font-weight: 650; letter-spacing: -0.3px;
}

.category-header .cat-count {
  font-size: 12.5px; color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 3px 12px; border-radius: 12px;
  font-weight: 500;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  padding: 16px 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  text-decoration: none;
  transition: all var(--transition);
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
}
.pagination a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}
.pagination .page-current {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79,110,247,0.2);
}
.pagination .page-dots {
  background: none;
  border: none;
  color: var(--text-muted);
  min-width: 24px;
  padding: 0;
}
.pagination .page-prev,
.pagination .page-next {
  font-weight: 600;
}
.pagination .page-info {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

/* 分类区域折叠渐变遮罩 */
.grid-fade-overlay {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  z-index: 10;
  border-radius: 0 0 var(--radius) var(--radius);
}
.grid-fade-overlay.visible {
  display: block;
}

/* 分类查看更多按钮 */
.category-expand-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all var(--transition);
  text-decoration: none;
  margin-left: auto;
  white-space: nowrap;
}
.category-expand-btn:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.category-expand-btn .expand-icon {
  font-size: 10px;
  transition: transform var(--transition);
}

/* ========== Tool Card ========== */
.tool-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column; gap: 10px;
  overflow: visible;
  z-index: 1;
}

.tool-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(79,110,247,0.025) 0%, rgba(124,92,252,0.025) 100%);
  opacity: 0; transition: opacity var(--transition-slow);
  pointer-events: none;
}

.tool-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0; transition: opacity var(--transition-slow);
  border-radius: var(--radius) var(--radius) 0 0;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(79,110,247,0.08), 0 4px 10px rgba(0,0,0,0.04);
  border-color: rgba(79,110,247,0.18);
  z-index: 20;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover::after {
  opacity: 1;
}

.tool-card-header {
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}

.tool-card-icon {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  border: 1px solid rgba(79,110,247,0.06);
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.tool-card-icon-img {
  width: 28px; height: 28px; border-radius: 6px;
  object-fit: contain;
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(79,110,247,0.15);
  background: linear-gradient(135deg, var(--primary-light), #ede8ff);
}

.tool-card-name {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.tool-card-desc {
  font-size: 12.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.5;
  position: relative; z-index: 1;
}

.tool-card-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  position: relative; z-index: 1;
  margin-top: auto;
}

.tag {
  font-size: 11px; padding: 4px 10px; border-radius: 8px;
  background: var(--bg-secondary); color: var(--text-muted);
  font-weight: 450; transition: all var(--transition);
}

.tool-card:hover .tag {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ========== 工具卡片悬浮提示框 ========== */
.tool-card-tooltip {
  display: none;
}
/* 全局 tooltip */
.global-tooltip {
  position: fixed;
  z-index: 99999;
  background: #1a1d2e;
  color: #e8eaf0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
  min-width: 200px;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
}
.global-tooltip.show {
  opacity: 1;
  visibility: visible;
}
.global-tooltip::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #1a1d2e;
  border-radius: 2px;
}

.add-to-workspace-btn {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 500;
  opacity: 0; transition: all var(--transition-slow);
  border: 1px solid transparent; cursor: pointer;
  z-index: 2;
}

.tool-card:hover .add-to-workspace-btn, .module-card:hover .add-to-workspace-btn { opacity: 1; }
.add-to-workspace-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 3px 12px rgba(79,110,247,0.3);
  transform: scale(1.08);
}

.tool-actions-hint {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 2px; position: relative; z-index: 1;
}

/* ========== Workspace Full Page ========== */
.workspace-page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 28px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.workspace-page-header-left {
  display: flex; align-items: center; gap: 12px;
}

.workspace-page-title {
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.3px;
}

.workspace-page-header-right {
  display: flex; align-items: center; gap: 8px;
}

#wsPageSelector {
  font-size: 13px; padding: 7px 12px;
  border-radius: 10px; border: 1.5px solid var(--border);
  background: #fff; color: var(--text);
  min-width: 150px; outline: none;
  cursor: pointer;
}

.workspace-module-section {
  margin-bottom: 40px;
  animation: fadeInUp 0.4s ease;
}

.workspace-module-section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  cursor: grab;
}

.workspace-module-section-header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0;
  width: 36px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.workspace-module-section-header:active { cursor: grabbing; }

.workspace-module-section-icon {
  font-size: 22px; width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(79,110,247,0.06);
}

.workspace-module-section-name {
  font-size: 17px; font-weight: 650;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.2px;
}

.workspace-module-section-name .edit-icon {
  font-size: 11px; color: var(--text-muted);
  cursor: pointer; opacity: 0; transition: opacity var(--transition);
}

.workspace-module-section-name:hover .edit-icon {
  opacity: 1;
}

.workspace-module-section-actions {
  margin-left: auto; display: flex; gap: 6px;
  opacity: 0; transition: opacity var(--transition);
}

.workspace-module-section-header:hover .workspace-module-section-actions {
  opacity: 1;
}

.workspace-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.workspace-tool-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition-slow);
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  overflow: hidden;
}

.workspace-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79,110,247,0.15);
}

.workspace-tool-card .wt-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  overflow: hidden;
}

.workspace-tool-card .wt-icon img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
}

.workspace-tool-card .wt-info {
  flex: 1; min-width: 0;
}

.workspace-tool-card .wt-name {
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.workspace-tool-card .wt-desc {
  font-size: 11.5px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

.workspace-tool-card .wt-remove {
  opacity: 0; color: var(--danger); cursor: pointer;
  font-size: 14px; transition: all var(--transition);
  width: 24px; height: 24px; display: flex;
  align-items: center; justify-content: center;
  border-radius: 7px; flex-shrink: 0;
}

.workspace-tool-card:hover .wt-remove { opacity: 1; }
.workspace-tool-card .wt-remove:hover {
  background: var(--danger-light);
  transform: scale(1.1);
}

.workspace-add-module {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px; text-align: center;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
  font-size: 14px; font-weight: 500;
  margin-bottom: 40px;
}

.workspace-add-module:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Drag ghost */
.sortable-ghost {
  opacity: 0.35;
  background: var(--primary-soft) !important;
  border: 2px dashed var(--primary) !important;
  border-radius: var(--radius-sm);
}

.sortable-ghost.workspace-module-section {
  opacity: 0.3;
  background: var(--primary-soft) !important;
  border: 2px dashed var(--primary) !important;
  border-radius: var(--radius);
}

/* ========== 自定义工具卡片 ========== */
.custom-item-card {
  border-left: 3px solid var(--accent);
}

.custom-item-card:hover {
  border-left-color: var(--primary);
}

.custom-item-icon {
  background: linear-gradient(135deg, var(--accent-soft), #f0ebff) !important;
}

/* ========== 自定义工具类型切换 ========== */
.custom-item-type-switch {
  display: flex; gap: 0;
  background: var(--bg-secondary);
  border-radius: 10px; padding: 3px;
  border: 1px solid var(--border-light);
}

.cit-option {
  flex: 1; padding: 9px 16px; text-align: center;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition);
  user-select: none;
}

.cit-option:hover {
  color: var(--text-secondary);
}

.cit-option.active {
  background: var(--card-bg);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,12,24,0.5);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 32px; width: 480px; max-width: 92vw; max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), var(--shadow-xl);
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(28px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-lg { width: 1100px; max-width: 95vw; }

.auth-modal {
  min-height: 440px;
}

.modal h2 {
  font-size: 21px; font-weight: 700; margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
  letter-spacing: -0.4px;
}

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.modal-close:hover {
  background: #e5e7eb;
  color: var(--text);
  transform: scale(1.05);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block; font-size: 13.5px; font-weight: 550;
  margin-bottom: 8px; color: var(--text-secondary);
  letter-spacing: -0.1px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; outline: none;
  transition: all var(--transition);
  background: var(--bg-secondary);
  color: var(--text);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #d0d4e0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79,110,247,0.06);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-actions {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 28px;
}

.form-error {
  color: var(--danger); font-size: 13px;
  margin-top: 6px; font-weight: 450;
}

.form-tip {
  color: var(--text-muted); font-size: 12.5px;
  margin-top: 6px; line-height: 1.5;
}

/* ========== Toast ========== */
.toast-container {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 420px;
  border: 1px solid;
  letter-spacing: -0.1px;
  pointer-events: auto;
}

.toast-success { background: var(--success-light); color: #065f46; border-color: #a7f3d0; }
.toast-error { background: var(--danger-light); color: #991b1b; border-color: #fecaca; }
.toast-info { background: var(--primary-soft); color: var(--primary-dark); border-color: #c7d2fe; }
.toast-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

@keyframes toastFadeIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ========== Admin Table ========== */
.admin-table-wrap { overflow-x: auto; border-radius: var(--radius); }

.admin-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  table-layout: auto;
}

.admin-table th, .admin-table td {
  padding: 10px 10px; text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.admin-table td {
  white-space: normal;
  word-break: break-all;
}

.admin-table th {
  font-weight: 600; color: var(--text-secondary);
  background: var(--bg-secondary);
  position: sticky; top: 0; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.4px;
  white-space: nowrap;
}

.admin-table tr:hover td { background: var(--primary-soft); }

.admin-table td:last-child {
  white-space: nowrap;
}

.admin-table .btn-xs {
  padding: 4px 8px; font-size: 11px; border-radius: 6px;
}

.status-badge {
  padding: 4px 12px; border-radius: 10px;
  font-size: 11.5px; font-weight: 550;
}

.status-approved { background: var(--success-light); color: #065f46; }
.status-pending { background: var(--warning-light); color: #92400e; }
.status-featured { background: var(--primary-light); color: var(--primary); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar-nav li a span { display: none; }
  .sidebar-title { display: none; }
  .sidebar-nav li a { padding: 10px; justify-content: center; margin: 2px 4px; }
  .sidebar-nav li a.active::before { display: none; }
  .main-content { margin-left: 64px; padding: 20px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .workspace-tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .hero-banner { margin: -20px -20px 24px; padding: 40px 24px 36px; border-radius: 0 0 16px 16px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 14px; }
  .hero-search input { height: 44px; font-size: 14px; padding-right: 52px; }
  .hero-search-btn { width: 34px; height: 34px; }
  .se-option { padding: 5px 2px; font-size: 12px; }
  .search-engine-switch { gap: 18px; }
  .header { padding: 0 16px; }
  .header-right { gap: 6px; }
  .header-right .btn { padding: 6px 12px; font-size: 12px; }
  .workspace-page-header { flex-direction: column; align-items: flex-start; }
  .workspace-page-header-right { width: 100%; flex-wrap: wrap; }
  #wsPageSelector { flex: 1; min-width: 120px; }
  .modal { padding: 24px; width: 95vw; }
  .modal-lg { width: 95vw; }
}

@media (max-width: 480px) {
  .sidebar { width: 48px; }
  .main-content { margin-left: 48px; padding: 14px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .workspace-tool-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .tool-card { padding: 14px; border-radius: var(--radius-sm); }
  .tool-card-header { gap: 10px; }
  .tool-card-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
  .tool-card-name { font-size: 13px; }
  .tool-card-desc { font-size: 11.5px; }
  .workspace-tool-card { padding: 12px; gap: 10px; }
  .workspace-tool-card .wt-icon { width: 30px; height: 30px; font-size: 14px; }
  .workspace-tool-card .wt-name { font-size: 12.5px; }
  .hero-banner { margin: -14px -14px 20px; padding: 32px 16px 28px; border-radius: 0 0 12px 12px; }
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 12.5px; margin-bottom: 20px; }
  .hero-search input { height: 40px; font-size: 13px; padding: 0 48px 0 16px; border-radius: 12px; }
  .hero-search-btn { width: 30px; height: 30px; border-radius: 10px; }
  .hero-search-btn svg { width: 16px; height: 16px; }
  .se-option { padding: 4px 2px; font-size: 11px; }
  .search-engine-switch { gap: 14px; }
  .hero-tags { gap: 6px; }
  .hero-tag { padding: 4px 10px; font-size: 11.5px; }
  .header { padding: 0 10px; }
  .header-left { gap: 8px; }
  .logo-icon { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
  .logo { font-size: 16px; }
  .header-right .btn { padding: 5px 10px; font-size: 11.5px; border-radius: 8px; }
  .user-avatar { width: 30px; height: 30px; font-size: 13px; border-radius: 10px; }
  .category-header { gap: 10px; margin-bottom: 16px; }
  .category-header .cat-icon { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
  .category-header .cat-name { font-size: 16px; }
  .workspace-page-title { font-size: 18px; }
  .workspace-module-section-name { font-size: 15px; }
  .workspace-module-section-icon { width: 34px; height: 34px; font-size: 18px; }
  .workspace-add-module { padding: 20px; font-size: 13px; }
  .footer-inner { padding: 0 16px; }
  .footer-col { flex: 1 1 100%; min-width: 100%; }
  .toast-container { top: 70px; left: 50%; transform: translateX(-50%); }
  .toast { padding: 10px 16px; font-size: 12.5px; max-width: 90vw; }
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d8e4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b0b6c8; }

/* ========== Empty State ========== */
.empty-state {
  text-align: center; padding: 80px 24px; color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.45; }

/* ========== Tabs ========== */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}

.tab {
  padding: 11px 24px; font-size: 14.5px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition);
  border-radius: 10px 10px 0 0;
  letter-spacing: -0.1px;
}

.tab:hover { color: var(--text); background: var(--bg-secondary); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
}

/* ========== Dropdown Menu ========== */
.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 220px; padding: 8px;
  z-index: 150; display: none;
  animation: slideUp 0.2s ease;
}

.dropdown-menu.show { display: block; }

.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 16px; font-size: 13.5px; color: var(--text);
  border-radius: 10px; transition: all var(--transition);
  background: none; border: none; text-align: left;
  font-weight: 450;
}

.dropdown-menu a:hover, .dropdown-menu button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.dropdown-divider {
  height: 1px; background: var(--border-light);
  margin: 6px 10px;
}

/* Tooltip workspace selector */
.workspace-select-tooltip {
  position: absolute; top: 100%; left: 0; margin-top: 6px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  padding: 10px; min-width: 220px; z-index: 70; display: none;
}

.workspace-select-tooltip.show { display: block; }

.workspace-select-tooltip .ws-option {
  padding: 10px 14px; border-radius: 10px; font-size: 13.5px;
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: all var(--transition);
}

.workspace-select-tooltip .ws-option:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ========== Section title ========== */
.section-title {
  font-size: 20px; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
  letter-spacing: -0.3px;
}

/* ========== Footer ========== */
.site-footer {
  background: linear-gradient(180deg, #1a2548 0%, #141a38 100%);
  color: rgba(255,255,255,0.65);
  padding: 32px 36px 0;
  margin-top: 48px;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0;
}

.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
  flex-shrink: 0;
}

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0;
  text-decoration: none;
}

.footer-desc {
  font-size: 12.5px; line-height: 1.6;
  color: rgba(255,255,255,0.45);
  max-width: 300px;
}

/* 横排导航链接 */
.footer-links-horizontal {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

.footer-links-horizontal a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  padding: 4px 10px;
  border-radius: 8px;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.footer-links-horizontal a:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.08);
}

.footer-sep {
  color: rgba(255,255,255,0.2);
  font-size: 12px;
  user-select: none;
}

.footer-links-group {
  flex: 2 1 500px;
  display: flex; gap: 28px; flex-wrap: wrap;
  justify-content: space-between;
}

.footer-col h4 {
  font-size: 12.5px; font-weight: 650;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.footer-col a {
  display: block; font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  padding: 3px 0;
  transition: all var(--transition);
  text-decoration: none;
}

.footer-col a:hover {
  color: rgba(255,255,255,0.85);
  padding-left: 4px;
}

.footer-bottom {
  padding: 14px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: rgba(255,255,255,0.6);
}

/* 友情链接区域 */
.footer-friend-links {
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.friend-links-title {
  font-size: 12.5px; font-weight: 650;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.friend-links-list {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
}

.friend-link-item {
  display: inline-flex; align-items: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.friend-link-item:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

.friend-link-item::before {
  content: '🔗';
  font-size: 10px;
  margin-right: 5px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .footer-top {
    flex-direction: column; gap: 16px; align-items: flex-start;
  }
  .footer-links-horizontal {
    gap: 4px;
  }
  .footer-links-horizontal a {
    padding: 3px 8px; font-size: 12px;
  }
  .footer-sep { display: none; }
  .footer-links-group {
    gap: 20px;
  }
  .footer-col {
    flex: 1 1 40%;
    min-width: 120px;
  }
}

/* ========== 广告位 ========== */
.ad-slot {
  position: relative;
  margin: 0 auto 32px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.ad-slot:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ad-slot img {
  width: 100%; display: block;
  object-fit: cover;
}

.ad-label {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.7);
  font-size: 10px; padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
}

/* 首页 小编推荐上方横幅 (728x90 标准排行榜横幅) */
.ad-slot-editor_top {
  max-width: 728px;
  margin: 0 auto 16px;
}

/* 分类中间横幅 (728x90) */
.ad-slot-category_mid {
  max-width: 728px;
  margin: 32px auto;
}

/* 工作台页头下方 (728x90) */
.ad-slot-workspace_top {
  max-width: 728px;
  margin: 16px auto 24px;
}

/* 工作台底部 (728x90) */
.ad-slot-workspace_bottom {
  max-width: 728px;
  margin: 24px auto 0;
}

/* 侧边栏底部 (300x250 中矩形） */
.ad-slot-sidebar {
  margin: 16px 10px 8px;
  border-radius: 10px;
}

.ad-slot-sidebar .ad-label {
  bottom: 4px; right: 4px;
  font-size: 9px; padding: 1px 6px;
}

/* ========== 文章页左右侧广告 (160x600 宽摩天大楼，竖版标准尺寸) ========== */
.article-ad-side {
  position: fixed;
  top: calc(var(--header-h) + 24px);
  width: 160px;
  display: none;
  z-index: 10;
}
.article-ad-left { left: 16px; }
.article-ad-right { right: 16px; }
.article-ad-side .ad-slot {
  margin: 0;
  max-width: 100%;
}
.article-ad-side .ad-slot img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (min-width: 1440px) {
  .article-ad-side { display: block; }
}
@media (max-width: 768px) {
  .ad-slot { max-width: 100% !important; margin: 0 auto 20px; border-radius: 10px; }
  .ad-slot-sidebar { display: none; }
  .article-ad-side { display: none !important; }
}

/* ========== 新增公共类（替代内联 style） ========== */
.dropdown-user-email {
  padding: 10px 14px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
  word-break: break-all;
}
.modal-subtitle {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 16px;
}
.admin-cat-add-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.admin-cat-add-row input {
  border: 2px solid var(--border); border-radius: 8px; padding: 8px 12px;
  background: var(--bg-secondary); color: var(--text); outline: none;
}
.admin-cat-add-row input:first-child { flex: 1; }
.admin-cat-add-row input:last-of-type { width: 80px; }
.footer-logo-icon {
  width: 36px; height: 36px; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; overflow: hidden;
}
.footer-logo-icon img {
  width: 100%; height: 100%; object-fit: contain; display: block; padding: 2px;
}
.footer-logo-text { font-size: 18px; }

/* SSR 分类标题链接 */
.category-header .cat-icon-link {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  color: inherit;
}
.category-header .cat-name-link {
  font-size: 18px; font-weight: 650; letter-spacing: -0.3px;
  color: var(--text); text-decoration: none; transition: color var(--transition);
}
.category-header .cat-name-link:hover { color: var(--primary); }

/* 详情页 404 */

/* ========== 详情页图标图片 ========== */
.detail-tool-icon-img {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: contain;
}

/* ========== 详情页内容区块 ========== */
.detail-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.detail-content h2 {
  font-size: 18px; font-weight: 650;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.detail-content h2::after {
  content: '';
  position: absolute; bottom: -1px; left: 0;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.detail-content-body {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  word-break: break-word;
}

.detail-content-body p { margin-bottom: 14px; }
.detail-content-body h2 { font-size: 18px; font-weight: 650; margin: 24px 0 12px; color: var(--text); }
.detail-content-body h3 { font-size: 16px; font-weight: 600; margin: 20px 0 10px; color: var(--text); border: none; padding: 0; }
.detail-content-body h3::after { display: none; }
.detail-content-body ul, .detail-content-body ol { margin: 12px 0; padding-left: 24px; }
.detail-content-body li { margin-bottom: 6px; }
.detail-content-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 16px 0; }
.detail-content-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 8px 20px;
  margin: 16px 0;
  background: var(--primary-soft);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-secondary);
  font-size: 14px;
}
.detail-content-body code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--accent);
}
.detail-content-body pre {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.6;
}

/* 详情页截图区块 */
.detail-screenshots {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.detail-screenshots h2 {
  font-size: 18px; font-weight: 650;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.detail-screenshots h2::after {
  content: '';
  position: absolute; bottom: -1px; left: 0;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.detail-page .empty-state a { color: var(--primary); }

/* ========== Logo 上传区域 ========== */
.logo-upload-area {
  display: inline-block;
  cursor: pointer;
}

.logo-upload-preview {
  width: 72px; height: 72px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  transition: all var(--transition);
  background: var(--bg-secondary);
}

.logo-upload-area:hover .logo-upload-preview {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.logo-upload-placeholder {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.logo-upload-placeholder small {
  font-size: 9px;
  color: var(--text-muted);
}

/* ========== 详情图上传组件 ========== */
.detail-images-upload-area {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 80px;
}
.detail-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-image-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
.detail-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.detail-image-item:hover .detail-image-remove {
  opacity: 1;
}
.detail-image-new {
  border-style: dashed;
  border-color: var(--primary);
}
.detail-image-add-btn {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1.5px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  color: var(--text-muted);
  background: transparent;
  font-size: 12px;
}
.detail-image-add-btn span {
  font-size: 22px;
  line-height: 1;
}
.detail-image-add-btn small {
  font-size: 10px;
}
.detail-image-add-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
@media (max-width: 480px) {
  .detail-image-item { width: 60px; height: 60px; }
  .detail-image-add-btn { width: 60px; height: 60px; }
}

/* ========== 首页推荐模块（小编推荐/最近访问 + 最新收录/热门推荐） ========== */
.home-modules {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.home-module {
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,249,253,0.7) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: visible;
}
.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}
.module-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 3px;
}
.module-tab {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  white-space: nowrap;
  user-select: none;
}
.module-tab:hover {
  color: var(--text);
}
.module-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,110,247,0.2);
}
.module-expand-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all var(--transition);
}
.module-expand-btn:hover {
  background: var(--primary-soft);
}
.module-expand-btn .expand-icon {
  font-size: 10px;
  transition: transform var(--transition);
}
.module-expand-btn.expanded .expand-icon {
  transform: rotate(180deg);
}
.module-body {
  padding: 16px 0;
  max-height: 350px;
  overflow: hidden;
  transition: max-height var(--transition-slow);
  position: relative;
}
.module-body.expanded {
  max-height: none;
}
/* 渐变遮罩 */
.module-body:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--card-bg));
  pointer-events: none;
  z-index: 10;
}
.module-tab-content {
  display: none;
  position: relative;
}
.module-tab-content.active {
  display: block;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.module-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-slow);
  position: relative;
  overflow: visible;
  cursor: pointer;
  z-index: 1;
}
.module-card:hover {
  z-index: 20;
  border-color: rgba(79,110,247,0.18);
  box-shadow: 0 4px 16px rgba(79,110,247,0.08);
  transform: translateY(-2px);
}
.module-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(79,110,247,0.025) 0%, rgba(124,92,252,0.025) 100%);
  opacity: 0; transition: opacity var(--transition-slow);
  pointer-events: none;
}
.module-card:hover::before {
  opacity: 1;
}
.module-card:hover .module-card-icon {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(79,110,247,0.15);
  background: linear-gradient(135deg, var(--primary-light), #ede8ff);
}
.module-card .tool-card-header {
  position: relative; z-index: 1;
}
.module-card-icon {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  border: 1px solid rgba(79,110,247,0.06);
  overflow: hidden;
}
.module-card-icon .tool-card-icon-img {
  width: 28px; height: 28px; border-radius: 6px;
  object-fit: contain;
}
.module-card-name {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.2px;
}
.module-card-desc {
  font-size: 12.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.5;
  flex: 1;
}
/* 模块卡片悬浮提示框 */
.module-card .tool-card-tooltip {
  top: 100%; left: 50%;
}
.module-card:hover .tool-card-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}
.module-card-cat {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.module-card-cat::before {
  content: '📂';
  font-size: 10px;
}

/* 点赞按钮 */
.like-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
  z-index: 2;
}
.like-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255,255,255,1);
}
.like-btn.liked {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
}
.like-btn .like-icon {
  font-size: 14px;
  line-height: 1;
}
.like-btn .like-count {
  font-size: 12px;
  font-weight: 600;
}

/* 空状态 */
.module-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.module-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.module-empty p {
  font-size: 14px;
  margin: 0;
}
.module-empty .module-empty-sub {
  font-size: 12px;
  margin-top: 4px;
  color: var(--text-muted);
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 768px) {
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .module-header { padding: 12px 16px; }
  .module-body { padding: 12px 0; max-height: 340px; }
  .module-tab { padding: 5px 12px; font-size: 13px; }
  .module-card { padding: 14px; border-radius: var(--radius-sm); }
  .module-card-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
  .module-card-name { font-size: 13px; }
  .module-card-desc { font-size: 11.5px; }
}
@media (max-width: 480px) {
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .module-header { padding: 10px 12px; }
  .module-body { padding: 10px 12px; max-height: 300px; }
  .module-tab { padding: 4px 10px; font-size: 12px; }
  .module-card { padding: 14px; border-radius: var(--radius-sm); }
  .module-card-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
  .module-card-name { font-size: 13px; }
  .module-card-desc { font-size: 11.5px; }
  .like-btn { padding: 3px 8px; font-size: 12px; bottom: 8px; right: 8px; }
}

/* ========== 悬浮按钮（半透明，右下角） ========== */
.float-buttons {
  position: fixed;
  right: 20px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
}

.float-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(79, 110, 247, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(79, 110, 247, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.65;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.float-btn:hover {
  opacity: 1;
  background: rgba(79, 110, 247, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(79, 110, 247, 0.2);
}

.float-btn:active {
  transform: translateY(0);
}

/* 滚动隐藏效果：距顶部不足100px时隐藏"回到顶部"按钮 */
.float-buttons.hide-top .float-btn-top {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}
/* 距底部不足100px时隐藏"跳到底部"按钮 */
.float-buttons.hide-bottom .float-btn-bottom {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

@media (max-width: 768px) {
  .float-buttons {
    right: 14px;
    bottom: 18px;
  }
  .float-btn {
    width: 32px;
    height: 32px;
  }
}

/* ========== 文章页面布局（无侧边栏，全宽居中） ========== */
.article-page {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 40px) 24px 48px;
  min-height: 70vh;
}

.article-page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.article-page-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.article-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.article-page-desc {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

/* 文章列表网格 */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.article-card {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-slow);
}

.article-card:hover {
  border-color: rgba(79, 110, 247, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.article-card-cover {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
}

.article-card-body {
  padding: 20px 22px;
}

.article-card-title {
  font-size: 17px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-summary {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.article-author {
  font-weight: 500;
  color: var(--text-secondary);
}

.article-date {
  color: var(--text-muted);
}

.article-views {
  color: var(--text-muted);
  margin-left: auto;
}

/* 文章空状态 */
.article-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

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

.article-empty p {
  font-size: 15px;
  margin: 0;
}

.article-empty .article-empty-sub {
  font-size: 13px;
  margin-top: 6px;
  opacity: 0.7;
}

/* ========== 文章详情页 ========== */
.article-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.article-detail-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.article-detail-breadcrumb a:hover {
  color: var(--primary);
}

.article-detail-breadcrumb .sep {
  color: var(--border);
}

.article-detail {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.article-detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.article-detail-content {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
  word-break: break-word;
}

.article-detail-content h2 {
  font-size: 20px;
  font-weight: 650;
  margin: 28px 0 14px;
  color: var(--text);
}

.article-detail-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--text);
}

.article-detail-content p {
  margin-bottom: 16px;
}

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

.article-detail-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 8px 20px;
  margin: 16px 0;
  background: var(--primary-soft);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.article-detail-content code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--accent);
}

.article-detail-content pre {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.article-detail-content ul,
.article-detail-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.article-detail-content li {
  margin-bottom: 6px;
}

/* 相关文章 */
.article-related {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.article-related h3 {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  position: relative;
}

.article-related h3::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.article-related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-related-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  background: var(--bg-secondary);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.article-related-item:hover {
  background: var(--primary-soft);
  transform: translateX(4px);
}

.article-related-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-related-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .article-page { padding: calc(var(--header-h) + 24px) 16px 36px; }
  .article-page-header h1 { font-size: 24px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card-body { padding: 16px 18px; }
  .article-card-title { font-size: 16px; }
  .article-detail { padding: 24px 20px; }
  .article-detail-title { font-size: 22px; }
  .article-detail-content { font-size: 15px; }
  .article-related { padding: 20px; }
}

@media (max-width: 480px) {
  .article-page-header h1 { font-size: 22px; }
  .article-card-title { font-size: 15px; }
  .article-detail-title { font-size: 20px; }
  .article-detail { padding: 20px 16px; }
}

/* ========== 文章自助发布入口栏 ========== */
.article-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  border: 1px solid rgba(79, 110, 247, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 28px;
}

.article-submit-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-submit-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.article-submit-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.article-submit-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ========== 文章分区标题 ========== */
.article-section {
  margin-bottom: 32px;
}

.article-section-title {
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.article-section-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

/* 用户投稿文章卡片标识 */
.article-card-user {
  border-color: rgba(124, 92, 252, 0.15);
}

.article-user-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .article-submit-bar {
    flex-direction: column;
    text-align: center;
    padding: 14px 16px;
  }
  .article-submit-info {
    flex-direction: column;
    gap: 8px;
  }
}

/* ========== OPC 子分类 Tab ========== */
.opc-sub-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.opc-sub-tab {
  padding: 7px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.opc-sub-tab:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.opc-sub-tab.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 2px 8px rgba(79, 110, 247, 0.22);
}

/* OPC 子分类标签 */
.opc-sub-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Tab 切换时隐藏不匹配的卡片 */
.opc-sub-item.opc-hidden {
  display: none;
}

@media (max-width: 768px) {
  .opc-sub-tabs {
    gap: 2px;
  }
  .opc-sub-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ========== OPC 专区顶部搜索与发布 ========== */
.opc-header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.opc-search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 16px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.opc-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,110,247,0.08), var(--shadow-sm);
}

.opc-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.opc-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
}

.opc-search-box input::placeholder {
  color: var(--text-muted);
}

.opc-search-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,110,247,0.25);
}

.opc-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79,110,247,0.35);
}

.opc-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 550;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(79,110,247,0.25);
}

.opc-publish-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,110,247,0.35);
}

/* ========== OPC 政策类型筛选 Tab ========== */
.opc-policy-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.opc-policy-tab {
  padding: 7px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.opc-policy-tab:hover {
  color: var(--primary);
  background: var(--card-bg);
}

.opc-policy-tab.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 2px 8px rgba(79, 110, 247, 0.25);
}

/* ========== AI学习 频道样式 ========== */
.ai-learning-level-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}
.ai-learning-level-tab {
  padding: 7px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.ai-learning-level-tab:hover {
  color: var(--primary);
  background: var(--card-bg);
}
.ai-learning-level-tab.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 2px 8px rgba(79, 110, 247, 0.25);
}
/* AI学习 子分类徽章 */
.ai-learning-sub-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
  margin-right: 4px;
}
/* AI学习 难度徽章 */
.ai-learning-level-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}
.ai-learning-level-beginner {
  color: #16a34a;
  background: #dcfce7;
}
.ai-learning-level-intermediate {
  color: #ea580c;
  background: #fed7aa;
}
.ai-learning-level-advanced {
  color: #dc2626;
  background: #fecaca;
}

/* ========== OPC 城市筛选 ========== */
.opc-city-filter {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.opc-city-filter-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 7px;
  flex-shrink: 0;
}

.opc-city-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.opc-city-tag {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 450;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.opc-city-tag:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.opc-city-tag.active {
  color: #fff;
  font-weight: 550;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79, 110, 247, 0.25);
}

.opc-city-tag.opc-city-more {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.opc-city-tag.opc-city-more:hover {
  background: var(--primary);
  color: #fff;
}

.opc-city-tag.opc-city-clear {
  color: var(--text-muted);
  border-style: dashed;
}

.opc-city-tag.opc-city-clear:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
}

/* ========== 合作发布入口栏 ========== */
.opc-coop-publish-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(79, 110, 247, 0.08) 0%, rgba(168, 92, 249, 0.08) 100%);
  border-radius: 12px;
  border: 1px solid rgba(79, 110, 247, 0.15);
}

.opc-coop-publish-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.opc-coop-publish-icon {
  font-size: 32px;
  line-height: 1;
}

.opc-coop-publish-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.opc-coop-publish-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.opc-coop-publish-bottom {
  margin-top: 24px;
  justify-content: center;
}

/* ========== 文章卡片标签组 ========== */
.article-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.article-city-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 550;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 6px;
}

.article-policy-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 550;
  color: var(--success);
  background: var(--success-light);
  padding: 2px 8px;
  border-radius: 6px;
}

/* ========== 城市选择弹窗 ========== */
.city-selector-modal {
  overflow: hidden;
  max-height: 75vh;
}

.city-selector-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}

.city-selector-body {
  display: flex;
  max-height: calc(75vh - 65px);
}

.city-selector-provinces {
  width: 130px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  background: var(--bg-secondary);
}

.city-province-item {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  font-weight: 450;
}

.city-province-item:hover {
  color: var(--primary);
  background: var(--card-bg);
}

.city-province-item.active {
  color: var(--primary);
  background: var(--card-bg);
  border-left-color: var(--primary);
  font-weight: 600;
}

.city-selector-cities {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.city-group {
  animation: fadeIn 0.2s ease;
}

.city-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.city-grid-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-grid-item:hover {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* 合作表单城市选择器 */
.coop-city-selector {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.coop-city-selector select {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
}

.coop-city-selector select:hover {
  border-color: #d0d4e0;
}

.coop-city-selector select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79,110,247,0.06);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .opc-header-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .opc-publish-btn {
    justify-content: center;
  }

  .opc-policy-tabs {
    padding: 6px 8px;
    gap: 4px;
  }

  .opc-policy-tab {
    padding: 6px 12px;
    font-size: 12.5px;
  }

  .opc-city-filter {
    flex-direction: column;
    gap: 8px;
  }

  .opc-city-filter-label {
    padding-top: 0;
  }

  .city-selector-body {
    max-height: calc(75vh - 65px);
  }

  .city-selector-provinces {
    width: 100px;
  }

  .city-province-item {
    padding: 10px 12px;
    font-size: 12.5px;
  }

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

  .city-grid-item {
    padding: 6px 8px;
    font-size: 12px;
  }

  .opc-coop-publish-bar {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .opc-coop-publish-info {
    gap: 10px;
  }

  .opc-coop-publish-icon {
    font-size: 28px;
  }

  .opc-coop-publish-bar .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .opc-search-box {
    padding: 3px 3px 3px 12px;
  }

  .opc-search-box input {
    padding: 8px 10px;
    font-size: 13px;
  }

  .opc-search-btn {
    padding: 7px 14px;
    font-size: 12px;
  }

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

/* ==================== OPC 合作详情卡片 ==================== */
.opc-coop-detail-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  color: #fff;
}
.opc-coop-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.opc-coop-detail-badge {
  font-size: 16px;
  font-weight: 600;
}
.opc-coop-detail-city {
  font-size: 14px;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
}
.opc-coop-detail-grid {
  display: grid;
  gap: 16px;
}
.opc-coop-detail-item {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
}
.opc-coop-detail-label {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.opc-coop-detail-value {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}
.opc-coop-contact {
  font-family: monospace;
  background: rgba(255,255,255,0.15);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .opc-coop-detail-card {
    padding: 18px;
    border-radius: 12px;
  }
  .opc-coop-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ========== OPC 工具导航 ========== */
.opc-nav-section {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 22px 26px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(79, 110, 247, 0.06);
  overflow: hidden;
}
.opc-nav-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 16px 16px 0 0;
}

.opc-nav-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.opc-nav-header .opc-nav-title {
  margin-bottom: 0;
}

.opc-nav-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.opc-nav-cat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.opc-nav-cat-title {
  flex-shrink: 0;
  width: 110px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 7px;
}

.opc-nav-cat-icon {
  font-size: 15px;
}

.opc-nav-links {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0;
}

.opc-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid var(--border-light);
}

.opc-nav-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 110, 247, 0.3);
}

.opc-nav-link-icon-img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
}

/* 响应式 */
@media (max-width: 768px) {
  .opc-nav-section {
    padding: 18px 16px;
  }
  .opc-nav-cat {
    flex-direction: column;
    gap: 8px;
  }
  .opc-nav-cat-title {
    width: auto;
    padding-top: 0;
    font-size: 13px;
  }
  .opc-nav-links {
    width: 100%;
  }
  .opc-nav-link {
    font-size: 12.5px;
    padding: 6px 12px;
  }
}

/* ===== OPC导航 - 搜索 + 标签页（大量分类） ===== */
.opc-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.opc-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  max-width: 340px;
  transition: all 0.2s ease;
}
.opc-nav-search:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.1);
}
.opc-nav-search svg {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s;
}
.opc-nav-search:focus-within svg {
  color: var(--primary);
}
.opc-nav-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  font-family: inherit;
}
.opc-nav-search input::placeholder {
  color: var(--text-muted);
}

.opc-nav-tabs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.opc-nav-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  flex: 1;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.opc-nav-tabs::-webkit-scrollbar {
  display: none;
}
.opc-nav-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.opc-nav-scroll-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(79, 110, 247, 0.35);
}
.opc-nav-scroll-left {
  left: -6px;
}
.opc-nav-scroll-right {
  right: -6px;
}
.opc-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
}
.opc-nav-tab:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}
.opc-nav-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(79, 110, 247, 0.3);
}
.opc-nav-tab-icon {
  font-size: 14px;
}

.opc-nav-content {
  min-height: 40px;
}
.opc-nav-panel {
  display: none;
}
.opc-nav-panel.active {
  display: block;
}

/* "全部"面板折叠：默认只显示前3个分类组 */
#opcNavAllPanel:not(.expanded) .opc-nav-group:nth-child(n+4) {
  display: none;
}
#opcNavAllPanel.expanded .opc-nav-more-bar {
  margin-top: 4px;
}

.opc-nav-group {
  margin-bottom: 18px;
}
.opc-nav-group:last-child {
  margin-bottom: 0;
}
.opc-nav-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.opc-nav-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin-left: 4px;
}

/* 单分类面板：网格布局 */
.opc-nav-panel:not([data-panel="all"]) .opc-nav-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.opc-nav-panel:not([data-panel="all"]) .opc-nav-link {
  justify-content: flex-start;
  padding: 10px 14px;
  border-radius: 10px;
}

/* 查看更多按钮 */
.opc-nav-more-bar {
  text-align: center;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
}
.opc-nav-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--primary-light);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.opc-nav-more-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(79, 110, 247, 0.3);
}
.opc-nav-more-icon {
  transition: transform 0.3s ease;
}

.opc-nav-no-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  color: var(--text-muted);
  gap: 8px;
}
.opc-nav-no-result-icon {
  font-size: 28px;
}
.opc-nav-no-result p {
  font-size: 14px;
  margin: 0;
}

@media (max-width: 768px) {
  .opc-nav-search {
    max-width: 100%;
  }
  .opc-nav-panel:not([data-panel="all"]) .opc-nav-links {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* ========== OPC导航管理后台样式 ========== */
.admin-opcnav-section {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 16px;
}

.admin-opcnav-filter {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.admin-opcnav-filter select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  min-width: 160px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  margin-bottom: 0;
}