/* ================================================================
   AITools - 完整样式表
   基于设计图像素级还原
   ================================================================ */

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

:root {
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --green-600: #16A34A;
  --green-50: #F0FDF4;
  --red-600: #DC2626;
  --red-50: #FEF2F2;
  --orange-600: #EA580C;
  --orange-50: #FFF7ED;
  --purple-600: #9333EA;
  --purple-50: #FAF5FF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --header-h: 64px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 通用按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--blue-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--blue-700);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* ===== Tag ===== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

/* ===== Badge ===== */
.tool-badge {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  flex-shrink: 0;
}

.badge-paid {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-freemium {
  background: var(--blue-50);
  color: var(--blue-600);
}

.badge-free {
  background: var(--green-50);
  color: var(--green-600);
}

/* ================================================================
   Header
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 40px;
}

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

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}

.nav-link.active {
  color: var(--blue-600);
  font-weight: 600;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ================================================================
   Hero (首页)
   ================================================================ */
.hero-section {
  background: #FFFFFF;
  padding: 80px 0 64px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 44px;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.hero-highlight {
  color: var(--blue-600);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 40px;
}

/* 搜索栏 */
.hero-search {
  max-width: 520px;
  margin: 0 auto 20px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 50px;
  padding: 5px 5px 5px 20px;
  border: 1px solid var(--gray-200);
  height: 52px;
}

.search-input-wrap:focus-within {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.search-icon {
  flex-shrink: 0;
  color: var(--gray-400);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--gray-800);
  padding: 0 12px;
  background: transparent;
  min-width: 0;
  height: 100%;
}

.search-input::placeholder {
  color: var(--gray-400);
}

.search-btn {
  padding: 0 28px;
  height: 42px;
  background: var(--blue-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.search-btn:hover {
  background: var(--blue-700);
}

/* 热门搜索标签 */
.hero-hot-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hot-label {
  font-size: 13px;
  color: var(--gray-400);
}

.hot-tag {
  padding: 0;
  background: none;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 400;
  transition: color 0.15s;
}

.hot-tag:hover {
  color: var(--blue-600);
}

.hot-sep {
  color: var(--gray-300);
  font-size: 13px;
}

/* ================================================================
   Section 通用
   ================================================================ */
.section {
  padding: 56px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-header-left {}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: 4px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.3;
}

.section-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-600);
  flex-shrink: 0;
  transition: color 0.15s;
}

.section-more:hover {
  color: var(--blue-700);
}

/* ================================================================
   Tool Card
   ================================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tools-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 180px;
}

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

.tool-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-card-icon span {
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}

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

.tool-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}

.tool-card-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ================================================================
   Video Banner 大屏 (首页)
   ================================================================ */
.video-section {
  padding: 0 0 56px;
}

.video-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #0f172a;
  height: 420px;
}

.video-banner-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(15,23,42,0.7) 0%, rgba(30,41,59,0.5) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-banner-content {
  text-align: center;
  padding: 48px 24px;
  max-width: 600px;
}

.video-banner-tag {
  display: inline-block;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  background: rgba(37,99,235,0.2);
  border: 1px solid rgba(37,99,235,0.3);
  color: #93C5FD;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.video-banner-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.video-banner-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  line-height: 1.75;
}

.video-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.promo-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.promo-btn-outline:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
}

/* ================================================================
   Articles (首页)
   ================================================================ */
.articles-section {
  padding: 56px 0 72px;
  background: var(--gray-50);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.article-card-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-cover-placeholder {
  width: 100%;
  height: 100%;
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.article-category {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.cat-blue { background: var(--blue-50); color: var(--blue-600); }
.cat-purple { background: var(--purple-50); color: var(--purple-600); }
.cat-orange { background: var(--orange-50); color: var(--orange-600); }

.article-date {
  font-size: 12px;
  color: var(--gray-400);
}

.article-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-excerpt {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================================
   Footer
   ================================================================ */
.site-footer {
  background: var(--gray-900);
  border-top: 1px solid var(--gray-800);
  padding: 0;
  color: var(--gray-400);
}

/* 上部三栏 */
.footer-top {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 56px;
  padding: 56px 0 40px;
}

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

.footer-brand .logo {
  margin-bottom: 14px;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand .logo-icon path {
  fill: #60A5FA;
}

.footer-logo-img {
  height: 28px;
  width: auto;
}

.footer-brand-desc {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.7;
}

/* 导航列 */
.footer-categories {
  display: flex;
  gap: 48px;
  flex: 1;
}

.footer-cat-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-cat-link {
  font-size: 14px;
  color: var(--gray-400);
  transition: color 0.15s;
  white-space: nowrap;
}

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

/* 联系方式 */
.footer-contact {
  flex-shrink: 0;
}

.footer-contact-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  transition: color 0.15s;
  margin-bottom: 10px;
}

.footer-contact-link:hover {
  color: #60A5FA;
}

.footer-contact-link svg {
  flex-shrink: 0;
}

/* 分隔线 */
.footer-divider {
  height: 1px;
  background: var(--gray-800);
}

/* 下部版权 */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.footer-copyright {
  font-size: 13px;
  color: var(--gray-500);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.footer-bottom-links a {
  color: var(--gray-500);
  transition: color 0.15s;
}

.footer-bottom-links a:hover {
  color: var(--white);
}

.footer-bottom-sep {
  color: var(--gray-600);
}

/* 圆形 icon 变体（设计图中部分工具使用圆形头像） */
.icon-rounded {
  border-radius: 50%;
}

/* 文章 meta 分隔点 */
.article-meta-dot {
  color: var(--gray-300);
  font-size: 12px;
}

/* ================================================================
   Category Page
   ================================================================ */
.category-main {
  padding-top: 0;
}

.category-hero {
  padding: 40px 0 32px;
}

.category-page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.category-page-desc {
  font-size: 15px;
  color: var(--gray-500);
}

.category-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding-bottom: 64px;
}

/* Sidebar */
.category-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-nav {
  margin-bottom: 28px;
}

.sidebar-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-600);
}

.sidebar-group {
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: color 0.15s;
  text-align: left;
}

.sidebar-group-title:hover {
  color: var(--blue-600);
}

.sidebar-group.active .sidebar-group-title {
  color: var(--blue-600);
}

.sidebar-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.sidebar-group.active .sidebar-arrow {
  transform: rotate(180deg);
}

.sidebar-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.sidebar-group.active .sidebar-sub {
  max-height: 1000px;
}

.sidebar-link {
  display: block;
  padding: 8px 0 8px 16px;
  font-size: 13px;
  color: var(--gray-500);
  transition: color 0.15s;
}

.sidebar-link:hover {
  color: var(--blue-600);
}

.sidebar-link.active {
  color: var(--blue-600);
  font-weight: 600;
}

/* 无子分类的直接链接（无箭头） */
.sidebar-group--plain .sidebar-group-title--link {
  color: var(--gray-700);
  font-weight: 600;
  font-size: 14px;
  display: block;
  padding: 12px 0;
  transition: color 0.15s;
}

.sidebar-group--plain .sidebar-group-title--link:hover,
.sidebar-group--plain .sidebar-group-title--link.active {
  color: var(--blue-600);
}

.sidebar-block {
  margin-top: 0;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 13px;
  color: var(--gray-600);
  transition: all 0.15s;
}

.sidebar-tag:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
  background: var(--blue-50);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.15s;
}

.page-link:hover {
  border-color: var(--blue-600);
  color: var(--blue-600);
  background: var(--blue-50);
}

.page-link.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
}

.page-dots {
  padding: 0 4px;
  color: var(--gray-400);
  font-size: 14px;
}

.page-prev, .page-next {
  font-size: 13px;
}

/* ================================================================
   Detail Page
   ================================================================ */
.detail-main {
  padding-top: 0;
  padding-bottom: 56px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 20px 0;
  font-size: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--gray-500);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--blue-600);
}

.breadcrumb-sep {
  color: var(--gray-300);
}

.breadcrumb-current {
  color: var(--gray-600);
}

/* Detail Hero */
.detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0 40px;
}

.detail-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-hero-icon span {
  color: var(--white);
  font-size: 28px;
  font-weight: 800;
}

.detail-hero-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.detail-hero-desc {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 600px;
}

.detail-visit-btn {
  display: inline-flex;
}

/* Detail Layout */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  margin-bottom: 56px;
}

.detail-section {
  margin-bottom: 36px;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
}

/* Video placeholder */
.detail-video {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.detail-video-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e293b, #475569);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-btn--large {
  width: 72px;
  height: 72px;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.5;
}

.feature-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Pros & Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pros-card {
  background: var(--green-50);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.pros-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--green-600);
  margin-bottom: 14px;
}

.pros-list li {
  padding: 4px 0;
  font-size: 14px;
  color: var(--gray-700);
  position: relative;
  padding-left: 16px;
}

.pros-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--green-600);
  font-weight: 700;
}

.cons-card {
  background: var(--red-50);
  border: 1px solid #FECACA;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.cons-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--red-600);
  margin-bottom: 14px;
}

.cons-list li {
  padding: 4px 0;
  font-size: 14px;
  color: var(--gray-700);
  position: relative;
  padding-left: 16px;
}

.cons-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--red-600);
  font-weight: 700;
}

/* Detail Sidebar */
.detail-sidebar-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.detail-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 14px;
}

.detail-sidebar-text {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 14px;
}

.detail-sidebar-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
  margin-top: 20px;
}

/* 详情页文章内容 */
.detail-article-content {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.8;
}

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

.detail-article-content h2,
.detail-article-content h3 {
  font-weight: 700;
  color: var(--gray-900);
  margin: 24px 0 12px;
}

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

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

.detail-article-content a {
  color: var(--blue-600);
}

.detail-article-content img {
  border-radius: var(--radius-md);
  margin: 16px 0;
}

/* 侧栏信息表格 */
.detail-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.detail-info-table tr {
  border-bottom: 1px solid var(--gray-100);
}

.detail-info-table tr:last-child {
  border-bottom: none;
}

.detail-info-table td {
  padding: 10px 0;
  font-size: 14px;
  color: var(--gray-700);
  vertical-align: top;
}

.detail-info-table .info-label {
  color: var(--gray-400);
  width: 60px;
  font-size: 13px;
}

.detail-steps {
  padding-left: 20px;
  list-style: decimal;
  margin-bottom: 16px;
}

.detail-steps li {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  padding: 3px 0;
}

/* Related tools */
.related-section {
  border-top: 1px solid var(--gray-200);
  padding-top: 40px;
  margin-bottom: 0;
}

.related-section .section-title {
  margin-bottom: 24px;
}

/* ================================================================
   Mobile Overlay
   ================================================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================================================================
   Responsive <= 1024px
   ================================================================ */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .category-layout {
    grid-template-columns: 180px 1fr;
    gap: 28px;
  }

  .detail-layout {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-categories {
    gap: 40px;
  }
}

/* ================================================================
   Responsive <= 768px
   ================================================================ */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .container {
    padding: 0 16px;
  }

  /* Header mobile */
  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 72px 20px 20px;
    gap: 2px;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
  }

  .header-nav.open {
    transform: translateX(0);
  }

  .header-nav .nav-link {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
  }

  .hamburger {
    display: flex;
  }

  /* Hero mobile */
  .hero-section {
    padding: 52px 0 48px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .search-input-wrap {
    flex-direction: column;
    padding: 10px;
    gap: 8px;
    border-radius: var(--radius-lg);
    height: auto;
  }

  .search-icon { display: none; }

  .search-input {
    width: 100%;
    text-align: center;
    padding: 10px 8px;
  }

  .search-btn {
    width: 100%;
    height: 42px;
    border-radius: var(--radius-lg);
  }

  /* Grids mobile */
  .tools-grid,
  .tools-grid--4 {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  /* Category mobile */
  .category-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .category-sidebar {
    position: static;
  }

  .category-page-title {
    font-size: 24px;
  }

  /* Detail mobile */
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .detail-hero-icon {
    width: 56px;
    height: 56px;
  }

  .detail-hero-icon span {
    font-size: 22px;
  }

  .detail-hero-name {
    font-size: 22px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .pros-cons-grid {
    grid-template-columns: 1fr;
  }

  /* Video banner */
  .video-banner {
    height: 300px;
  }

  .video-banner-title {
    font-size: 22px;
  }

  .video-banner-actions {
    flex-direction: column;
    gap: 12px;
  }

  .video-banner-actions .btn-primary,
  .video-banner-actions .promo-btn-outline {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-categories {
    flex-wrap: wrap;
    gap: 24px;
  }

  .footer-cat-col {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  /* Section */
  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 20px;
  }

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

/* ================================================================
   Responsive <= 480px
   ================================================================ */
@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .tool-card {
    padding: 18px;
  }

  .tool-card-icon {
    width: 36px;
    height: 36px;
  }

  .tool-card-icon span {
    font-size: 15px;
  }

  .tool-card-name {
    font-size: 15px;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

/* ================================================================
   WordPress 增强样式
   ================================================================ */

/* 顶部导航条（top_menu） */
.top-bar {
  background: var(--gray-900);
  padding: 6px 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}

.top-nav .nav-link {
  color: var(--gray-400);
  font-size: 12px;
  padding: 2px 8px;
}

.top-nav .nav-link:hover {
  color: var(--white);
  background: none;
}

/* 推荐工具卡片边框高亮 */
/* 推荐工具不再加边框高亮，统一样式 */
.tool-card--featured {}

/* article-card 链接包裹重置 */
.article-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* WordPress 文章内容通用样式 */
.detail-sidebar-text p { margin-bottom: 14px; }
.detail-sidebar-text h2, .detail-sidebar-text h3, .detail-sidebar-text h4 {
  margin: 20px 0 10px;
  color: var(--gray-900);
}
.detail-sidebar-text ul, .detail-sidebar-text ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.detail-sidebar-text li {
  margin-bottom: 6px;
  line-height: 1.7;
}
.detail-sidebar-text a {
  color: var(--blue-600);
}
.detail-sidebar-text a:hover {
  text-decoration: underline;
}
.detail-sidebar-text img {
  border-radius: var(--radius-md);
  margin: 12px 0;
}

/* 搜索结果页 article 样式 */
.articles-grid a {
  text-decoration: none;
  color: inherit;
}

/* 分页活跃状态覆写 WordPress */
.page-link.active,
.page-link.active:hover {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
}

/* ================================================================
   排行榜页面
   ================================================================ */
.ranking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 60px;
}

.ranking-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ranking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

.ranking-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-card-icon { font-size: 20px; line-height: 1; }

.ranking-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.ranking-card-meta { font-size: 12px; color: var(--gray-400); }
.ranking-source a { color: var(--blue-600); }
.ranking-source a:hover { text-decoration: underline; }

.ranking-table-wrap { overflow-x: auto; }
.ranking-table { width: 100%; border-collapse: collapse; table-layout: fixed; }

.ranking-table thead th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}

.ranking-th-rank { width: 50px; text-align: center !important; }
.ranking-th-name { }
.ranking-th-score { width: 120px; text-align: right !important; }
.ranking-th-extra { width: 110px; text-align: right !important; }

.ranking-row { transition: background 0.12s; }
.ranking-row:hover { background: #F0F7FF; }

.ranking-row td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50);
  font-size: 14px;
  color: var(--gray-700);
  vertical-align: middle;
}
.ranking-row:last-child td { border-bottom: none; }

.ranking-td-rank { text-align: center; width: 50px; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px; height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 13px; font-weight: 700;
  background: var(--gray-100);
  color: var(--gray-500);
}

.rank-badge.rank-gold {
  background: linear-gradient(135deg, #FCD34D, #F59E0B);
  color: #fff;
  box-shadow: 0 1px 4px rgba(245,158,11,0.3);
}

.rank-badge.rank-silver {
  background: linear-gradient(135deg, #E5E7EB, #9CA3AF);
  color: #fff;
}

.rank-badge.rank-bronze {
  background: linear-gradient(135deg, #FDBA74, #EA580C);
  color: #fff;
}

.ranking-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-icon-dot {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
}

.ranking-name-link {
  font-size: 14px;
  font-weight: 600; color: var(--gray-900);
  line-height: 1.2;
}
.ranking-name-link:hover { color: var(--blue-600); }

.ranking-domain {
  font-size: 12px; color: var(--gray-400); margin-top: 1px;
}

.ranking-td-score { text-align: right; font-weight: 600; font-size: 14px; color: var(--gray-700); }
.ranking-td-extra { text-align: right; font-size: 13px; color: var(--gray-500); }

.ranking-trend { text-align: right; }
.trend-up { color: #16A34A; font-weight: 700; font-size: 15px; }
.trend-down { color: #DC2626; font-weight: 700; font-size: 15px; }
.trend-flat { color: var(--gray-400); font-size: 15px; }

@media (max-width: 768px) {
  .ranking-card-header { flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; }
  .ranking-th-extra, .ranking-td-extra { display: none; }
  .ranking-table thead th, .ranking-row td { padding: 10px 12px; }
  .ranking-icon-dot { width: 28px; height: 28px; font-size: 11px; border-radius: 6px; }
  .ranking-th-score { width: 90px; }
}
