/* ============================================
   forasp.cn - 自定义样式
   支持白色 / 蓝色 / 暗色 三套主题
   ============================================ */

/* ===== 白色主题（默认） ===== */
:root, [data-theme="white"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-body: #24292f;
  --accent-blue: #0969da;
  --accent-purple: #8250df;
  --accent-cyan: #1b7c83;
  --accent-green: #1a7f37;
  --accent-orange: #9a6700;
  --accent-red: #cf222e;
  --accent-pink: #c21e56;
  --accent-yellow: #9a6700;
  --border-color: #d0d7de;
  --border-hover: #afb8c1;
  --gradient-hero: linear-gradient(135deg, #ffffff 0%, #f6f8fa 50%, #ddf4ff 100%);
  --gradient-accent: linear-gradient(135deg, #0969da, #8250df);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --navbar-bg: rgba(255, 255, 255, 0.9);
  --hover-bg: rgba(0,0,0,0.04);
  --cat-bar-bg: #f6f8fa;
  --input-bg: #ffffff;
}

/* ===== 蓝色主题 ===== */
[data-theme="blue"] {
  --bg-primary: #eef4ff;
  --bg-secondary: #e0ebff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f5ff;
  --text-primary: #0b1d3a;
  --text-secondary: #4a5b7a;
  --text-body: #1a2a4a;
  --accent-blue: #1a73e8;
  --accent-purple: #7c3aed;
  --accent-cyan: #0891b2;
  --accent-green: #059669;
  --accent-orange: #d97706;
  --accent-red: #dc2626;
  --accent-pink: #db2777;
  --accent-yellow: #d97706;
  --border-color: #b8cbe0;
  --border-hover: #8ba3c0;
  --gradient-hero: linear-gradient(135deg, #eef4ff 0%, #dce8ff 50%, #c7d9ff 100%);
  --gradient-accent: linear-gradient(135deg, #1a73e8, #7c3aed);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f0f5ff 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --navbar-bg: rgba(238, 244, 255, 0.9);
  --hover-bg: rgba(26, 115, 232, 0.06);
  --cat-bar-bg: #e0ebff;
  --input-bg: #ffffff;
}

/* ===== 橙色主题 ===== */
[data-theme="orange"] {
  --bg-primary: #fff8f0;
  --bg-secondary: #fff0e0;
  --bg-card: #ffffff;
  --bg-card-hover: #fff5eb;
  --text-primary: #2d1b00;
  --text-secondary: #7a5a3a;
  --text-body: #3d2b15;
  --accent-blue: #ff5a00;
  --accent-purple: #cc5500;
  --accent-cyan: #e67e22;
  --accent-green: #2e7d32;
  --accent-orange: #ff5a00;
  --accent-red: #e63900;
  --accent-pink: #ff6b35;
  --accent-yellow: #f59e0b;
  --border-color: #f0dcc8;
  --border-hover: #d4b898;
  --gradient-hero: linear-gradient(135deg, #fff8f0 0%, #ffe8d0 50%, #ffd4b0 100%);
  --gradient-accent: linear-gradient(135deg, #ff5a00, #cc5500);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #fff5eb 100%);
  --shadow-sm: 0 1px 3px rgba(255, 90, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(255, 90, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(255, 90, 0, 0.12);
  --navbar-bg: rgba(255, 248, 240, 0.9);
  --hover-bg: rgba(255, 90, 0, 0.06);
  --cat-bar-bg: #fff0e0;
  --input-bg: #ffffff;
}

/* ===== 暗色主题 ===== */
[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-card-hover: #222a35;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-body: #c9d1d9;
  --accent-blue: #58a6ff;
  --accent-purple: #8250df;
  --accent-cyan: #39d2c0;
  --accent-green: #3fb950;
  --accent-orange: #d29922;
  --accent-red: #f85149;
  --accent-pink: #f778ba;
  --accent-yellow: #e3b341;
  --border-color: #30363d;
  --border-hover: #484f58;
  --gradient-hero: linear-gradient(135deg, #0d1117 0%, #161b22 40%, #1c2128 70%, #8250df08 100%);
  --gradient-accent: linear-gradient(135deg, #58a6ff, #8250df);
  --gradient-card: linear-gradient(180deg, #1c2128 0%, #161b22 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --navbar-bg: rgba(13, 17, 23, 0.85);
  --hover-bg: rgba(255,255,255,0.05);
  --cat-bar-bg: #161b22;
  --input-bg: #161b22;
}

/* 全局基础样式 */
body {
  background-color: var(--bg-primary);
  color: var(--text-body);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
  padding-top: 98px;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

::selection {
  background: var(--accent-blue);
  color: #fff;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===== 顶部导航 ===== */
.navbar-forasp {
  background: var(--navbar-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

.navbar-forasp .navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.navbar-forasp .navbar-brand span {
  font-weight: 400;
  font-size: 0.75rem;
  -webkit-text-fill-color: var(--text-secondary);
  letter-spacing: 0;
}

.navbar-forasp .nav-link {
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  padding: 0.5rem 0.8rem !important;
  transition: color 0.2s, background 0.2s;
  border-radius: 6px;
}

.navbar-forasp .nav-link:hover,
.navbar-forasp .nav-link.active {
  color: var(--text-primary) !important;
  background: var(--hover-bg);
}

.navbar-forasp .nav-link.active {
  color: var(--accent-blue) !important;
}

/* ===== 主题切换按钮 ===== */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 0.5rem;
}
.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
}
.theme-btn:hover {
  transform: scale(1.15);
}
.theme-btn.active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.2);
}
.theme-btn-white {
  background: #ffffff;
}
.theme-btn-blue {
  background: #1a73e8;
}
.theme-btn-dark {
  background: #0d1117;
}
.theme-btn-orange {
  background: #ff5a00;
}

/* ===== 搜索栏（导航下方，长条形） ===== */
.search-strip {
  background: var(--cat-bar-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 0;
  transition: background 0.3s;
}
.search-strip .search-input {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-strip .search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
}
.search-strip .search-input::placeholder {
  color: var(--text-secondary);
}

/* ===== 水平分类栏 ===== */
.category-bar-wrap {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 1030;
  background: var(--cat-bar-bg);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}
.category-bar {
  display: flex;
  align-items: center;
  height: 42px;
  overflow: hidden;
  position: relative;
}
.category-bar .cat-item {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.category-bar .cat-item:hover {
  color: var(--accent-blue);
  background: var(--hover-bg);
  text-decoration: none;
}
.category-bar .cat-item.active {
  color: var(--accent-blue);
  font-weight: 600;
}
.category-bar .cat-item .cat-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.category-bar .cat-more-btn {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  background: none;
  display: none;
}
.category-bar .cat-more-btn:hover {
  color: var(--accent-blue);
  background: var(--hover-bg);
}
.category-bar .cat-more-btn.show {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* 更多分类下拉 */
.cat-dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  min-width: 160px;
}
.cat-dropdown-menu .cat-dropdown-item {
  display: block;
  padding: 0.4rem 0.8rem;
  color: var(--text-body);
  font-size: 0.85rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.cat-dropdown-menu .cat-dropdown-item:hover {
  background: var(--hover-bg);
  color: var(--accent-blue);
  text-decoration: none;
}

/* ===== Footer ===== */
.footer-forasp {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: background 0.3s;
}
.footer-forasp a {
  color: var(--text-secondary);
}
.footer-forasp a:hover {
  color: var(--accent-blue);
}

/* ===== Hero 区域 ===== */
.hero-section {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: 4rem 0 2.5rem;
  transition: background 0.3s;
}

.hero-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(9, 105, 218, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 105, 218, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-section .hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-section .hero-glow-1 {
  width: 400px;
  height: 400px;
  background: rgba(9, 105, 218, 0.06);
  top: -100px;
  right: -100px;
}
.hero-section .hero-glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(130, 80, 223, 0.06);
  bottom: -80px;
  left: -80px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-title .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero-stats .stat-item { text-align: center; }
.hero-stats .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
.hero-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== 卡片通用 ===== */
.card-forasp {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}
.card-forasp:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ===== 分类卡片 ===== */
.category-card {
  text-align: center;
  padding: 1.8rem 1rem;
  cursor: pointer;
}
.category-card .cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.category-card:hover .cat-icon {
  border-color: currentColor;
  transform: scale(1.1);
}
.category-card .cat-name { font-weight: 600; color: var(--text-primary); margin-bottom: 0.3rem; }
.category-card .cat-count { font-size: 0.8rem; color: var(--text-secondary); }

.cat-asp { color: var(--accent-red); }
.cat-php { color: var(--accent-purple); }
.cat-python { color: var(--accent-blue); }
.cat-ai { color: var(--accent-cyan); }
.cat-js { color: var(--accent-yellow); }
.cat-seo { color: var(--accent-green); }
.cat-linux { color: var(--accent-orange); }
.cat-database { color: var(--accent-pink); }
.cat-divcss { color: #7ee787; }
.cat-photoshop { color: #79b8ff; }
.cat-server { color: #ffa657; }
.cat-resource { color: #d2a8ff; }

/* ===== 文章卡片 ===== */
.article-card { padding: 1.5rem; height: 100%; }
.article-card .article-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.article-card .article-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin: 0.5rem 0;
  line-height: 1.4;
  transition: color 0.2s;
}
.article-card:hover .article-title { color: var(--accent-blue); }
.article-card .article-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* ===== 列表页 ===== */
.page-header {
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}
.page-header h1 { color: var(--text-primary); font-weight: 700; }

.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}
.filter-bar .form-select,
.filter-bar .form-control {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  font-size: 0.875rem;
}
.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

/* 文章列表项 */
.list-item {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}
.list-item:first-child { border-top-left-radius: 10px; border-top-right-radius: 10px; }
.list-item:last-child { border-bottom: none; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; }
.list-item:hover { background: var(--hover-bg); }
.list-item .list-date {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
  min-width: 80px;
}
.list-item .list-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s;
}
.list-item:hover .list-title { color: var(--accent-blue); }
.list-item .list-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-item .list-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

/* 分页 */
.pagination-forasp .page-link {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.pagination-forasp .page-link:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.pagination-forasp .page-item.active .page-link {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}
.pagination-forasp .page-item.disabled .page-link {
  background: var(--bg-primary);
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ===== 侧边栏 ===== */
.sidebar-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card .sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-card .sidebar-title i { color: var(--accent-blue); margin-right: 0.3rem; }

.hot-list { list-style: none; padding: 0; margin: 0; }
.hot-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.15);
}
.hot-list li:last-child { border-bottom: none; }
.hot-list .hot-index {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: var(--bg-primary); color: var(--text-secondary);
  flex-shrink: 0;
}
.hot-list li:nth-child(1) .hot-index,
.hot-list li:nth-child(2) .hot-index,
.hot-list li:nth-child(3) .hot-index {
  background: var(--gradient-accent); color: #fff;
}
.hot-list .hot-title {
  font-size: 0.88rem; color: var(--text-body);
  line-height: 1.4; transition: color 0.2s;
}
.hot-list li:hover .hot-title { color: var(--accent-blue); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud .tag-item {
  display: inline-block; padding: 0.2rem 0.7rem;
  font-size: 0.8rem; border: 1px solid var(--border-color);
  border-radius: 20px; color: var(--text-secondary);
  transition: all 0.2s;
}
.tag-cloud .tag-item:hover {
  border-color: var(--accent-blue); color: var(--accent-blue); text-decoration: none;
}

.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.15);
}
.archive-list li:last-child { border-bottom: none; }
.archive-list a { color: var(--text-body); font-size: 0.88rem; }
.archive-list a:hover { color: var(--accent-blue); }
.archive-list .archive-count { color: var(--text-secondary); font-size: 0.78rem; }

/* ===== 详情页 ===== */
.breadcrumb-forasp { padding: 1rem 0 0.3rem; }
.breadcrumb-forasp .breadcrumb { margin: 0; }
.breadcrumb-forasp .breadcrumb-item { font-size: 0.85rem; }
.breadcrumb-forasp .breadcrumb-item + .breadcrumb-item::before { color: var(--text-secondary); }
.breadcrumb-forasp .breadcrumb-item a { color: var(--text-secondary); }
.breadcrumb-forasp .breadcrumb-item a:hover { color: var(--accent-blue); }
.breadcrumb-forasp .breadcrumb-item.active { color: var(--text-body); }

.article-content {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2.5rem;
}
.article-content .article-title-detail {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--text-primary);
  line-height: 1.3; margin-bottom: 0.8rem;
}
.article-content .article-meta {
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  color: var(--text-secondary); font-size: 0.85rem;
  padding-bottom: 1.2rem; border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.8rem;
}

.article-body h2 {
  font-size: 1.5rem; font-weight: 600; color: var(--text-primary);
  margin-top: 2rem; margin-bottom: 1rem; padding-left: 0.8rem;
  border-left: 3px solid transparent;
  border-image: var(--gradient-accent); border-image-slice: 1;
}
.article-body h3 {
  font-size: 1.2rem; font-weight: 600; color: var(--text-primary);
  margin-top: 1.5rem; margin-bottom: 0.8rem;
}
.article-body p { line-height: 1.8; margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { line-height: 1.7; margin-bottom: 0.3rem; }

.article-body pre {
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 8px; padding: 1.2rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: 0.85rem;
  line-height: 1.6; color: #e6edf3;
  position: relative; margin: 1.2rem 0;
}
.article-body code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: rgba(9, 105, 218, 0.08);
  padding: 0.15em 0.35em; border-radius: 4px; color: var(--accent-cyan);
}
.article-body pre code { background: none; padding: 0; color: #e6edf3; font-size: inherit; }
.article-body pre::before {
  content: attr(data-lang);
  position: absolute; top: 0.5rem; right: 0.8rem;
  font-size: 0.7rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 1px;
}

.article-body blockquote {
  border-left: 4px solid;
  border-image: var(--gradient-accent); border-image-slice: 1;
  padding: 0.8rem 1.2rem; margin: 1.2rem 0;
  background: rgba(9, 105, 218, 0.04);
  border-radius: 0 8px 8px 0; color: var(--text-secondary); font-style: italic;
}

.article-body .alert-forasp { border-radius: 8px; padding: 1rem 1.2rem; margin: 1rem 0; border: 1px solid; font-size: 0.9rem; }
.article-body .alert-forasp-info { background: rgba(9, 105, 218, 0.06); border-color: rgba(9, 105, 218, 0.2); color: var(--accent-blue); }
.article-body .alert-forasp-warning { background: rgba(154, 103, 0, 0.06); border-color: rgba(154, 103, 0, 0.2); color: var(--accent-orange); }
.article-body .alert-forasp-success { background: rgba(26, 127, 55, 0.06); border-color: rgba(26, 127, 55, 0.2); color: var(--accent-green); }

.article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.article-body th, .article-body td { padding: 0.6rem 1rem; border: 1px solid var(--border-color); text-align: left; }
.article-body th { background: var(--bg-secondary); color: var(--text-primary); font-weight: 600; }
.article-body td { color: var(--text-body); }

.article-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color);
}
.article-nav a {
  flex: 1; padding: 1rem; background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: 8px;
  transition: all 0.2s; color: var(--text-body);
  display: flex; flex-direction: column; gap: 0.3rem;
}
.article-nav a:hover { border-color: var(--accent-blue); text-decoration: none; color: var(--text-primary); }
.article-nav .nav-label { font-size: 0.78rem; color: var(--text-secondary); }
.article-nav .nav-title { font-weight: 500; }
.article-nav .nav-next { text-align: right; }

.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { padding: 0.3rem 0; border-bottom: 1px solid rgba(48, 54, 61, 0.15); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a { font-size: 0.85rem; color: var(--text-body); display: block; transition: color 0.2s; }
.toc-list a:hover { color: var(--accent-blue); }
.toc-list .toc-h2 { padding-left: 0; }
.toc-list .toc-h3 { padding-left: 1rem; font-size: 0.8rem; }

.related-card { padding: 0.8rem 0; border-bottom: 1px solid rgba(48, 54, 61, 0.15); }
.related-card:last-child { border-bottom: none; }
.related-card .related-title {
  font-size: 0.9rem; color: var(--text-body);
  display: block; margin-bottom: 0.2rem; line-height: 1.4; transition: color 0.2s;
}
.related-card:hover .related-title { color: var(--accent-blue); }
.related-card .related-date { font-size: 0.75rem; color: var(--text-secondary); }

/* ===== 按钮 ===== */
.btn-forasp-primary {
  background: var(--gradient-accent); border: none; color: #fff;
  padding: 0.5rem 1.5rem; border-radius: 8px; font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-forasp-primary:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }
.btn-forasp-outline {
  background: transparent; border: 1px solid var(--border-color);
  color: var(--text-body); padding: 0.5rem 1.5rem; border-radius: 8px; font-weight: 500;
  transition: all 0.2s;
}
.btn-forasp-outline:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* 回到顶部 */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  color: var(--text-secondary); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: all 0.3s;
  z-index: 1040; opacity: 0; visibility: hidden;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* Section 标题 */
.section-title {
  font-size: 1.3rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.section-title i { color: var(--accent-blue); }

.divider-forasp { border-color: var(--border-color); opacity: 0.6; margin: 1.5rem 0; }

/* ===== Cookie 同意提示 ===== */
.cookie-consent-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  padding: 0.8rem 0;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-consent-bar.show {
  transform: translateY(0);
}
.cookie-consent-bar .cookie-text {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.6;
}
.cookie-consent-bar .cookie-text i {
  color: var(--accent-orange);
  font-size: 1.1rem;
}
.cookie-consent-bar .btn-cookie-accept {
  background: var(--gradient-accent);
  border: none;
  color: #fff;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.cookie-consent-bar .btn-cookie-accept:hover { opacity: 0.85; }
.cookie-consent-bar .btn-cookie-decline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cookie-consent-bar .btn-cookie-decline:hover {
  border-color: var(--text-secondary);
  color: var(--text-body);
}

/* ===== 响应式 ===== */
@media (max-width: 991.98px) {
  .hero-section { min-height: auto; padding: 5rem 0 3rem; }
  .article-content { padding: 1.5rem; }
  .category-bar { height: auto; flex-wrap: wrap; padding: 0.3rem 0; }
  .category-bar .cat-more-btn.show { display: none; }
}

@media (max-width: 767.98px) {
  .hero-section { padding: 4.5rem 0 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stats .stat-number { font-size: 1.4rem; }
  .list-item { padding: 1rem; }
  .list-item .list-date { min-width: 60px; font-size: 0.75rem; }
  .article-content { padding: 1rem; }
  .article-nav { flex-direction: column; }
  .filter-bar .row > div { margin-bottom: 0.5rem; }
  .theme-switcher { margin-left: 0; margin-top: 0.5rem; }
}

/* ===== 加载动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.5s ease forwards; }
.animate-fade-in-d1 { animation-delay: 0.1s; }
.animate-fade-in-d2 { animation-delay: 0.2s; }
.animate-fade-in-d3 { animation-delay: 0.3s; }
.animate-fade-in-d4 { animation-delay: 0.4s; }

/* ============================================
   Tool 工具页专用样式
   ============================================ */

/* ===== 工具分类栏（静态定位） ===== */
.tool-cat-bar-wrap {
  position: static;
  background: var(--cat-bar-bg);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
  margin-top: 56px;
}
.tool-cat-bar {
  display: flex;
  align-items: center;
  height: 42px;
  overflow: hidden;
  position: relative;
}
.tool-cat-bar .tool-cat-item {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
  text-decoration: none;
}
.tool-cat-bar .tool-cat-item:hover {
  color: var(--accent-blue);
  background: var(--hover-bg);
  text-decoration: none;
}
.tool-cat-bar .tool-cat-item.active {
  color: var(--accent-blue);
  font-weight: 600;
}
.tool-cat-bar .tool-cat-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* ===== Hero（工具首页） ===== */
.tool-hero {
  min-height: 220px;
}

/* ===== 工具卡片 ===== */
.tool-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s ease;
  padding: 1.5rem;
  height: 100%;
  text-align: center;
}
.tool-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.tool-card .tool-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  color: var(--accent-blue);
}
.tool-card:hover .tool-icon {
  border-color: currentColor;
  transform: scale(1.1);
}
.tool-card .tool-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.tool-card:hover .tool-name { color: var(--accent-blue); }
.tool-card .tool-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 工具详情页 - 工具界面卡片 ===== */
.tool-workbench {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
}
.tool-workbench .tool-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.tool-workbench .tool-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}
.tool-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-body);
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
}
.tool-textarea::placeholder { color: var(--text-secondary); font-style: italic; }
.tool-textarea[readonly] {
  background: var(--bg-secondary);
  cursor: default;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.tool-status {
  font-size: 0.85rem;
  padding: 0.4rem 0;
  min-height: 1.5rem;
}

/* ===== 工具侧边栏 ===== */
.tool-list-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--text-body);
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.15);
  transition: color 0.2s;
  text-decoration: none;
}
.tool-list-sidebar a:last-child { border-bottom: none; }
.tool-list-sidebar a:hover { color: var(--accent-blue); }
.tool-list-sidebar a i { font-size: 1rem; width: 1.2rem; text-align: center; }

/* ===== 工具响应式 ===== */
@media (max-width: 991.98px) {
  .tool-cat-bar { height: auto; flex-wrap: wrap; padding: 0.3rem 0; }
  .tool-workbench { padding: 1.2rem; }
}
@media (max-width: 767.98px) {
  .tool-workbench { padding: 1rem; }
  .tool-actions .btn { flex: 1; }
}