﻿/*
  style.css - 完整移动端适配版本（修复导航问题）
*/
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-color: #334155;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
  --white: #ffffff;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #1e40af;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --container: 1200px;
  --glass: rgba(0, 0, 0, 0.02);
  --glass-2: rgba(0, 0, 0, 0.01);
}

/* Reset & sensible defaults */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 移动端导航栏适配 ===== */

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.3rem;
  letter-spacing: 0.4px;
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Nav */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--primary-color);
  background: var(--light-bg);
  outline: none;
}

/* Dropdown - 修复版本 */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: max-content; /* 根据内容自动调整宽度 */
  min-width: auto; /* 移除最小宽度限制 */
  background: var(--white);
  border-radius: var(--radius);
  padding: 4px 0; /* 减少内边距，让菜单更紧凑 */
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.22s cubic-bezier(0.2, 0.9, 0.22, 1);
  display: block !important;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu li {
  padding: 0; /* 移除内边距 */
  display: block;
  width: 100%;
  margin: 0;
}

.dropdown-menu a {
  display: block;
  color: var(--text-color);
  font-weight: 500;
  width: 100%;
  white-space: nowrap;
  padding: 8px 16px; /* 调整内边距 */
  border-radius: 0; /* 移除圆角 */
  transition: color 0.2s ease, text-decoration 0.2s ease; /* 添加过渡效果 */
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color); /* 添加分隔线 */
  text-decoration: none; /* 默认无下划线 */
}

/* 移除最后一个菜单项的分隔线 */
.dropdown-menu li:last-child a {
  border-bottom: none;
}

/* 为网页端二级导航添加hover效果 - 文字变蓝色+下划线 */
.dropdown-menu a:hover {
  color: var(--primary-color); /* 文字变成蓝色 */
  background: transparent;
  text-decoration: underline; /* 添加下划线 */
  text-underline-offset: 3px; /* 下划线偏移，更美观 */
}

/* Main layout */
.knowledge-base-layout {
  padding: 36px 0 30px;
}

.kb-main-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.kb-welcome h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.2px;
  color: #1e293b;
}

.kb-subtitle {
  color: var(--muted);
  margin-top: 6px;
}

/* Category grid */
.kb-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.kb-category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.kb-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.kb-category-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  color: #1e293b;
  position: relative;
  padding-bottom: 6px;
}

.kb-category-card h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 40px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.category-main-link {
  text-decoration: none;
  color: var(--primary-color);
}

.kb-category-card p {
  color: var(--muted);
  margin: 0 0 12px;
}

.category-links h3,
.category-featured h3 {
  margin: 10px 0 8px;
  font-size: 0.95rem;
  color: #1e293b;
}

.category-links ul,
.category-featured ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-links li {
  margin: 6px 0;
}

.category-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Featured links */
.category-featured li a {
  display: block;
  padding: 6px;
  border-radius: 6px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-featured li a:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

/* Quick nav */
.kb-quick-nav {
  margin-top: 22px;
}

.kb-quick-nav h2 {
  color: #1e293b;
  margin-bottom: 15px;
}

.quick-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-link {
  background: var(--white);
  padding: 12px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.quick-icon {
  font-size: 1.25rem;
}

.quick-text {
  font-weight: 700;
  color: var(--text-color);
}

/* Footer */
.simple-footer {
  margin-top: 48px;
  padding: 30px 0;
  background: transparent;
  border-top: 1px solid var(--border-color);
}

/* 频道传送门 */
.footer-nav {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.9rem;
  color: #64748b;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--primary-color);
}

/* 友情链接 */
.footer-links {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-links span {
  font-weight: bold;
  margin-right: 10px;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  margin-right: 15px;
  transition: color 0.2s;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 品牌宣言 */
.footer-desc {
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: #64748b;
}

.footer-desc p {
  margin: 0;
}

.footer-desc strong {
  color: var(--foreground);
}

/* 版权与备案 */
.footer-copyright {
  font-size: 0.8rem;
  color: #64748b;
}

.footer-copyright p {
  margin: 0;
}

.footer-copyright a {
  color: var(--muted);
  text-decoration: none;
}

.footer-copyright a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.mobile-break {
  display: none;
}

/* 移动端页脚适配 */
@media (max-width: 480px) {
  .footer-nav {
    text-align: center;
    line-height: 2;
  }
  
  .footer-links {
    text-align: center;
    line-height: 2;
  }
  
  .footer-links span {
    display: block;
    margin-bottom: 5px;
  }
  
  .footer-desc {
    text-align: center;
  }
  
  .footer-copyright {
    text-align: center;
  }
  
  .mobile-break {
    display: block;
  }
}

/* Accessibility focus */
a:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 3px;
}

/* Welcome section styling */
.kb-welcome {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.04), rgba(30, 64, 175, 0.02));
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

/* ===== 响应式设计 ===== */

/* 平板及以下尺寸的导航栏适配 */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: auto; /* 改为自动宽度，参考网页端设置 */
        min-width: auto; /* 移除最小宽度限制 */
        background: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        padding: 80px 20px 20px;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: stretch; /* 改为拉伸对齐 */
        gap: 0;
        width: 100%;
    }
    
    .main-nav li {
        width: 100%;
        margin: 0;
    }
    
    .main-nav a {
        display: block;
        width: 100%;
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
        margin: 0;
        /* 移除移动端导航的交互效果 */
        transition: none;
        border-radius: 0;
        color: var(--text-color);
        white-space: nowrap; /* 防止文字换行 */
    }
    
    /* 移除移动端导航的hover效果 */
    .main-nav a:hover {
        background: transparent;
        color: var(--text-color);
    }
    
    /* 移动端下拉菜单调整 */
    .dropdown {
        position: relative;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
        width: 100%; /* 移动端下拉菜单宽度100% */
        display: none;
        min-width: auto;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu li {
        padding: 0;
    }
    
    .dropdown-menu a {
        padding-left: 30px;
        font-size: 0.9rem;
        color: var(--muted);
        border-bottom: 1px solid var(--border-color);
        /* 移除移动端二级导航的交互效果 */
        transition: none;
        width: 100%; /* 确保宽度100% */
        text-decoration: none; /* 移动端无下划线 */
    }
    
    /* 移除移动端二级导航的hover效果 */
    .dropdown-menu a:hover {
        background: transparent;
        color: var(--muted);
        text-decoration: none; /* 移动端保持无下划线 */
    }
    
    .dropdown > a {
        position: relative;
        /* 确保下拉箭头可点击 */
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .dropdown > a::after {
        content: "▼";
        font-size: 0.7rem;
        margin-left: 8px;
        display: inline-block;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    /* 修复移动端下拉菜单的点击区域 */
    .dropdown > a {
        position: relative;
        z-index: 1; /* 确保点击区域覆盖整个链接 */
    }
}

/* 中等屏幕 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .kb-category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .container {
    padding: 0 20px;
  }
}

/* 小屏幕平板 (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 0 18px;
  }
  
  .kb-category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .kb-welcome h1 {
    font-size: 1.8rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .main-nav a {
    padding: 9px 11px;
    font-size: 0.9rem;
  }
  
  .quick-links {
    gap: 12px;
  }
  
  .quick-link {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 120px;
  }
}

/* 超小屏幕手机 (小于480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .logo {
    font-size: 1.4rem;
    padding: 8px 12px;
  }
  
  .main-nav {
    width: auto; /* 改为自动宽度 */
    min-width: auto; /* 移除最小宽度限制 */
    right: -100%;
  }
  
  .header-content {
    position: relative;
  }
  
  .mobile-menu-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .logo {
    padding-right: 50px;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    width: 100%;
  }
  
  .main-nav a {
    padding: 10px 14px;
    font-size: 0.95rem;
    margin: 2px 0;
  }
  
  .kb-welcome {
    padding: 20px 15px;
    margin: 0 -15px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .kb-welcome h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }
  
  .kb-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .kb-category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }
  
  .kb-category-card {
    padding: 18px;
    margin: 0 -5px;
  }
  
  .kb-category-card h2 {
    font-size: 1.3rem;
  }
  
  .category-links h3,
  .category-featured h3 {
    font-size: 1.1rem;
  }
  
  .quick-links {
    gap: 10px;
    justify-content: center;
  }
  
  .quick-link {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
    padding: 14px 12px;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .quick-icon {
    font-size: 1.5rem;
  }
  
  .quick-text {
    font-size: 0.9rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .footer-links {
    order: -1;
  }
}

/* 响应式行为 */
@media (max-width: 1100px) {
  .kb-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .kb-category-grid {
    grid-template-columns: 1fr;
  }
  
  .kb-welcome h1 {
    font-size: 1.4rem;
  }
  
  .quick-links {
    justify-content: flex-start;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding-left: 20px;
    margin-top: 10px;
  }
  
  .dropdown:hover .dropdown-menu {
    transform: none;
  }
  
  .kb-category-card:hover {
    transform: none;
  }
  
  .quick-link:hover {
    transform: none;
  }
  
  .dropdown > a {
    min-height: 50px;
    display: flex;
    align-items: center;
  }
  
  .mobile-menu-toggle {
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
  }
  
  .main-nav a,
  .dropdown-menu a,
  .quick-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* 菜单遮罩层 */
.main-nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: -1;
}

.main-nav.active::before {
    opacity: 1;
    visibility: visible;
}

/* 高性能设备优化 */
@media (prefers-reduced-motion: reduce) {
  .kb-category-card,
  .quick-link,
  .dropdown-menu {
    transition: none;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e2e8f0;
    --light-bg: #1e293b;
    --white: #0f172a;
    --border-color: #334155;
    --muted: #94a3b8;
  }
  
  body {
    background-color: #0f172a;
    color: #e2e8f0;
  }
}

/* 打印优化 */
@media print {
  .kb-quick-nav,
  .category-featured,
  .dropdown-menu {
    display: none !important;
  }
  
  .kb-category-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

        /* 针对移动端菜单的CSS优化 */
        @media (max-width: 1024px) {
            .dropdown.active > .dropdown-menu {
                display: block;
                max-height: 500px;
                opacity: 1;
                transition: max-height 0.3s ease, opacity 0.3s ease;
            }
            
            .dropdown > .dropdown-menu {
                display: none;
                max-height: 0;
                opacity: 0;
                overflow: hidden;
                transition: max-height 0.3s ease, opacity 0.3s ease;
            }
            
            .dropdown > a {
                position: relative;
                padding-right: 30px;
            }
            
            .dropdown > a::after {
                content: '+';
                position: absolute;
                right: 10px;
                top: 50%;
                transform: translateY(-50%);
                font-size: 18px;
                transition: transform 0.3s ease;
            }
            
            .dropdown.active > a::after {
                content: '-';
            }
        }


        /* 文章页面特定样式 */
        .article-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        .breadcrumb {
            font-size: 14px;
            color: #666;
            margin: 20px 0;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        
        .breadcrumb a {
            color: #2563eb;
            text-decoration: none;
        }
        
        .breadcrumb a:hover {
            text-decoration: underline;
        }
        
        .article-header {
            margin-bottom: 30px;
        }
        
        .article-title {
            font-size: 2.2rem;
            line-height: 1.3;
            margin-bottom: 15px;
            color: #1e293b;
        }
        
        .article-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            color: #64748b;
            font-size: 14px;
            margin-bottom: 20px;
        }
        
        .article-content {
            line-height: 1.7;
            font-size: 16px;
            color: #334155;
        }
        
        .article-content h2 {
            font-size: 1.6rem;
            margin: 30px 0 15px;
            color: #1e293b;
            border-left: 4px solid #2563eb;
            padding-left: 10px;
        }
        
        .article-content h3 {
            font-size: 1.3rem;
            margin: 25px 0 12px;
            color: #1e293b;
        }
        
        .article-content p {
            margin-bottom: 18px;
            text-align: justify;
        }
        
        .article-content ul, .article-content ol {
            margin-bottom: 18px;
            padding-left: 20px;
        }
        
        .article-content li {
            margin-bottom: 8px;
        }
        
        /* ===== shadcn 风格文章图片 ===== */
        .article-content img {
            max-width: 100%;
            max-height: 480px;
            height: auto;
            display: block;
            margin-left: auto;
            margin-right: auto;
            margin-top: 24px;
            margin-bottom: 24px;
            border-radius: 8px;
            border: 1px solid hsl(240 5.9% 90%);
            background-color: hsl(0 0% 98%);
            object-fit: contain;
            transition: opacity 0.2s ease;
        }
        
        .article-content img:hover {
            opacity: 0.95;
        }
        
        /* 图片说明文字 - shadcn muted style */
        .article-content figure {
            margin: 24px auto;
            text-align: center;
            display: block;
        }
        
        .article-content figure img {
            margin: 0 auto 10px;
        }
        
        .article-content figcaption {
            font-size: 0.875rem;
            color: hsl(240 3.8% 46.1%);
            line-height: 1.5;
            text-align: center;
        }
        
        /* 图片容器 - 简洁无边框 */
        .image-wrapper {
            margin: 28px auto;
            text-align: center;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            display: block;
            max-width: 100%;
        }
        
        .image-wrapper img {
            margin: 0 auto !important;
            display: block !important;
            border: none !important;
            background: none !important;
        }
        
        .image-caption {
            margin-top: 12px;
            font-size: 0.875rem;
            color: hsl(240 3.8% 46.1%);
            text-align: center;
        }
        
        /* ===== shadcn 风格表格 ===== */
        .article-content table {
            width: 100%;
            border-collapse: collapse;
            margin: 24px 0;
            font-size: 0.875rem;
            caption-side: bottom;
        }
        
        .article-content caption {
            margin-top: 16px;
            font-size: 0.875rem;
            color: hsl(240 3.8% 46.1%);
        }
        
        .article-content thead {
            border-bottom: 1px solid hsl(240 5.9% 90%);
        }
        
        .article-content th {
            height: 48px;
            padding: 0 16px;
            text-align: left;
            vertical-align: middle;
            font-weight: 500;
            color: hsl(240 3.8% 46.1%);
            background-color: hsl(0 0% 98%);
        }
        
        .article-content td {
            padding: 12px 16px;
            vertical-align: middle;
            color: hsl(240 10% 3.9%);
        }
        
        .article-content tbody tr {
            border-bottom: 1px solid hsl(240 5.9% 90%);
            transition: background-color 0.15s ease;
        }
        
        .article-content tbody tr:last-child {
            border-bottom: none;
        }
        
        .article-content tbody tr:hover {
            background-color: hsl(240 4.8% 95.9%);
        }
        
        /* 表格响应式容器 */
        .table-wrapper {
            overflow-x: auto;
            margin: 24px 0;
            border: 1px solid hsl(240 5.9% 90%);
            border-radius: 8px;
        }
        
        .table-wrapper table {
            margin: 0;
        }
        
        /* ===== shadcn 风格引用块 ===== */
        .article-content blockquote {
            margin: 24px 0;
            padding-left: 16px;
            border-left: 2px solid hsl(240 5.9% 90%);
            color: hsl(240 3.8% 46.1%);
            font-style: italic;
        }
        
        .article-content blockquote p {
            margin-bottom: 0;
        }
        
        .article-content blockquote cite {
            display: block;
            margin-top: 8px;
            font-size: 0.875rem;
            font-style: normal;
        }
        
        /* ===== shadcn 风格代码 ===== */
        .article-content code {
            font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
            font-size: 0.875rem;
            background-color: hsl(240 4.8% 95.9%);
            padding: 0.2em 0.4em;
            border-radius: 6px;
            font-weight: 500;
        }
        
        .article-content pre {
            margin: 24px 0;
            padding: 16px;
            background-color: hsl(240 10% 3.9%);
            border-radius: 8px;
            overflow-x: auto;
        }
        
        .article-content pre code {
            background: none;
            padding: 0;
            color: hsl(0 0% 98%);
            font-size: 0.875rem;
            line-height: 1.7;
            font-weight: 400;
        }
        
        /* ===== shadcn 风格提示框 (Alert) ===== */
        .article-content .info-box,
        .article-content .tip-box,
        .article-content .warning-box,
        .article-content .alert {
            margin: 24px 0;
            padding: 16px;
            border-radius: 8px;
            border: 1px solid;
        }
        
        .article-content .info-box {
            background-color: hsl(0 0% 100%);
            border-color: hsl(240 5.9% 90%);
            color: hsl(240 10% 3.9%);
        }
        
        .article-content .tip-box {
            background-color: hsl(142.1 76.2% 97%);
            border-color: hsl(142.1 76.2% 73.2%);
            color: hsl(142.1 76.2% 26.2%);
        }
        
        .article-content .warning-box {
            background-color: hsl(47.9 95.8% 97%);
            border-color: hsl(47.9 95.8% 53.1%);
            color: hsl(25.5 95% 33.1%);
        }
        
        /* Alert 标题 */
        .article-content .alert-title,
        .article-content .info-box strong,
        .article-content .tip-box strong,
        .article-content .warning-box strong {
            display: block;
            margin-bottom: 4px;
            font-weight: 500;
            line-height: 1.5;
            letter-spacing: -0.01em;
        }
        
        /* ===== shadcn 风格分隔线 ===== */
        .article-content hr {
            margin: 32px 0;
            border: none;
            height: 1px;
            background-color: hsl(240 5.9% 90%);
            flex-shrink: 0;
        }
        
        /* ===== shadcn 风格链接 ===== */
        .article-content a {
            color: hsl(240 10% 3.9%);
            text-decoration: underline;
            text-underline-offset: 4px;
            transition: color 0.15s ease;
        }
        
        .article-content a:hover {
            color: hsl(240 5.9% 10%);
        }
        
        /* ===== shadcn 风格列表 ===== */
        .article-content ul {
            list-style: none;
            padding-left: 0;
        }
        
        .article-content ul li {
            position: relative;
            padding-left: 24px;
        }
        
        .article-content ul li::before {
            content: "";
            position: absolute;
            left: 8px;
            top: 10px;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: hsl(240 5.9% 90%);
        }
        
        .article-content ol {
            padding-left: 24px;
        }
        
        .article-content ol li {
            padding-left: 8px;
        }
        
        .article-content ol li::marker {
            color: hsl(240 3.8% 46.1%);
            font-weight: 500;
        }
        
        /* ===== shadcn 风格 Badge/Tag ===== */
        .keyword-highlight {
            display: inline-flex;
            align-items: center;
            height: 22px;
            padding: 0 8px;
            font-size: 0.75rem;
            font-weight: 500;
            color: hsl(240 10% 3.9%);
            background-color: hsl(240 4.8% 95.9%);
            border-radius: 9999px;
            border: 1px solid transparent;
            transition: background-color 0.15s ease;
            padding: 2px 4px;
            border-radius: 3px;
        }
        
        .image-container {
            margin: 25px 0;
            text-align: center;
        }
        
        figure {
            margin: 0;
            display: inline-block;
            max-width: 100%;
        }
        
        .article-image {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            border: none;
            box-shadow: none;
        }
        
        figcaption {
            margin-top: 10px;
            font-size: 14px;
            color: #64748b;
            font-style: italic;
        }
        
        /* 关键词区域 - shadcn 风格 */
        .keywords-section {
            margin: 32px 0;
            padding: 20px 24px;
            background-color: #fafafa;
            border: 1px solid #e4e4e7;
            border-radius: 8px;
        }
        
        .keywords-section h3 {
            font-size: 0.875rem;
            font-weight: 500;
            color: #71717a;
            margin: 0 0 14px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .keywords-section h3::before {
            content: "#";
            color: #a1a1aa;
        }
        
        .keywords-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .keyword-tag {
            display: inline-flex;
            align-items: center;
            height: 28px;
            padding: 0 12px;
            font-size: 0.8125rem;
            font-weight: 500;
            color: #3f3f46;
            background-color: #ffffff;
            border: 1px solid #e4e4e7;
            border-radius: 6px;
            transition: all 0.15s ease;
        }
        
        .keyword-tag:hover {
            background-color: hsl(var(--accent));
            border-color: hsl(var(--border));
        }
        
        /* shadcn 相关文章推荐 */
        .related-articles {
            background-color: hsl(var(--card));
            border: 1px solid hsl(var(--border));
            padding: 24px;
            border-radius: 12px;
            margin: 32px 0;
        }
        
        .related-articles h3 {
            font-size: 1.125rem;
            font-weight: 600;
            color: hsl(var(--foreground));
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .related-articles h3::before {
            content: "";
            display: inline-block;
            width: 4px;
            height: 20px;
            background: hsl(var(--primary));
            border-radius: 2px;
        }
        
        .related-articles ul {
            list-style: none;
            padding-left: 0;
            margin: 0;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 12px;
        }
        
        .related-articles li {
            margin: 0;
            padding: 0;
        }
        
        .related-articles a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            background: hsl(var(--background));
            border: 1px solid hsl(var(--border));
            border-radius: 8px;
            color: hsl(var(--foreground));
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            line-height: 1.5;
            transition: all 0.2s ease;
        }
        
        .related-articles a::before {
            content: "→";
            flex-shrink: 0;
            font-size: 0.875rem;
            color: hsl(var(--muted-foreground));
            transition: transform 0.2s ease, color 0.2s ease;
        }
        
        .related-articles a:hover {
            background: hsl(var(--accent));
            border-color: hsl(var(--primary) / 0.3);
            color: hsl(var(--primary));
            text-decoration: none;
        }
        
        .related-articles a:hover::before {
            transform: translateX(4px);
            color: hsl(var(--primary));
        }
        
        /* shadcn 免责声明样式 */
        .disclaimer-box {
            background-color: hsl(var(--muted));
            border: 1px solid hsl(var(--border));
            border-left: 4px solid hsl(var(--muted-foreground));
            padding: 16px 20px;
            margin: 48px 0 24px 0;
            border-radius: 0 8px 8px 0;
        }
        
        .disclaimer-box p {
            margin: 0;
            font-size: 0.875rem;
            line-height: 1.6;
            color: hsl(var(--muted-foreground));
        }
        
        .disclaimer-box strong {
            color: hsl(var(--foreground));
            font-weight: 600;
        }
        
        .back-to-list {
            display: inline-block;
            margin-top: 15px;
            color: hsl(var(--primary));
            text-decoration: none;
            font-weight: 500;
            padding: 8px 16px;
            border: 1px solid hsl(var(--primary));
            border-radius: 6px;
            transition: all 0.2s ease;
        }
        
        .back-to-list:hover {
            background-color: #2563eb;
            color: white;
        }
        
        @media (max-width: 768px) {
            .article-title {
                font-size: 1.6rem;
                letter-spacing: -0.02em;
            }
            
            .article-content h2 {
                font-size: 1.3rem;
            }
            
            .article-content h3 {
                font-size: 1.1rem;
            }
            
            .related-articles ul {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .related-articles {
                padding: 16px;
                margin: 24px 0;
            }
            
            .related-articles a {
                padding: 10px 12px;
                font-size: 0.875rem;
            }
            
            /* shadcn 移动端图片 */
            .article-content img {
                max-height: 280px;
                border-radius: 6px;
                margin: 16px auto;
            }
            
            .image-wrapper {
                padding: 12px;
                margin: 20px 0;
            }
            
            /* shadcn 移动端表格 */
            .article-content table {
                font-size: 0.8125rem;
            }
            
            .table-wrapper {
                margin: 20px -16px;
                border-radius: 0;
                border-left: none;
                border-right: none;
            }
            
            .article-content th {
                height: 40px;
                padding: 0 12px;
            }
            
            .article-content td {
                padding: 10px 12px;
            }
            
            /* shadcn 移动端引用块 */
            .article-content blockquote {
                padding-left: 12px;
                margin: 16px 0;
            }
            
            /* shadcn 移动端代码块 */
            .article-content pre {
                padding: 12px;
                margin: 16px -16px;
                border-radius: 0;
                font-size: 0.8125rem;
            }
            
            /* 移动端列表 */
            .article-content ul li {
                padding-left: 20px;
            }
            
            .article-content ul li::before {
                left: 6px;
                width: 5px;
                height: 5px;
            }
        }



/* =========================================
   List Page Styles (新增列表页样式)
   ========================================= */

.list-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.list-header h1 {
    font-size: 2rem;
    color: #1e293b;
    margin: 10px 0;
}

/* 文章列表容器 */
.kb-article-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 空列表提示 */
.empty-list {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    background: var(--light-bg);
    border-radius: var(--radius);
    border: 1px dashed var(--border-color);
}

.empty-list p {
    font-size: 1.1rem;
    margin: 0;
}

/* 单个文章卡片 */
.kb-article-item {
    display: flex;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 180px; /* 固定高度 */
}

.kb-article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* 缩略图区域 */
.kb-article-thumb {
    flex: 0 0 260px; /* 固定宽度 */
    height: 100%; /* 填满父容器高度 */
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
}

.kb-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证图片填满且不变形 */
    transition: transform 0.3s ease;
    display: block;
}

.kb-article-item:hover .kb-article-thumb img {
    transform: scale(1.05); /* 鼠标悬停轻微放大 */
}

/* 内容区域 */
.kb-article-info {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    min-width: 0; /* 允许 flex 子元素收缩 */
}

/* Meta 信息 (标签/时间) */
.item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--muted);
    flex-shrink: 0;
}

.meta-tag {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* 标题 */
.kb-article-info h2 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 0 0 8px 0;
    flex-shrink: 0;
    max-height: 3.6em; /* 2行 * 1.4行高 + 一点余量 */
    /* 限制显示2行并显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kb-article-info h2 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.kb-article-info h2 a:hover {
    color: var(--primary-color);
}

/* 摘要 */
.kb-article-info p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    max-height: 3em; /* 2行 * 1.5行高 */
    /* 限制显示2行并显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a, 
.pagination span {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    font-weight: 500;
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .dots {
    border: none;
    padding: 10px 6px;
}

/* 响应式适配 (手机端) */
@media (max-width: 768px) {
    .kb-article-item {
        flex-direction: column; /* 上下排列 */
        height: auto; /* 移动端自适应高度 */
    }

    .kb-article-thumb {
        flex: 0 0 180px; /* 固定高度 */
        width: 100%;
        height: 180px;
    }

    .kb-article-info {
        padding: 18px;
    }

    .kb-article-info h2 {
        font-size: 1.25rem;
    }

    .list-header h1 {
        font-size: 1.6rem;
    }
}

/* ===== 静态页面样式 ===== */

/* 确保 footer 始终在底部 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.knowledge-base-layout {
    flex: 1;
}

/* 静态页面通用样式 */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

.static-page-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.static-page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.static-page-header .subtitle {
    font-size: 1.125rem;
    color: var(--muted);
    margin: 0;
}

.static-page-content {
    font-size: 1rem;
    line-height: 1.8;
}

/* 内容区块 */
.content-section {
    margin-bottom: 36px;
}

.content-section h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.content-section p {
    color: var(--text-color);
    margin: 0 0 16px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.content-section a:hover {
    border-bottom-color: var(--primary-color);
}

/* 列表样式 */
.content-section ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.content-section ul li {
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 12px 16px;
    background: var(--light-bg);
    border-radius: var(--radius);
    margin-bottom: 10px;
    border-left: 3px solid var(--primary-color);
}

.feature-list li strong {
    color: var(--primary-color);
}

/* 联系信息样式 */
.contact-info {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-weight: 600;
    color: #1e293b;
    min-width: 100px;
    flex-shrink: 0;
}

.contact-value {
    color: var(--text-color);
}

/* 社交链接 */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ===== 团队成员页面 ===== */
.team-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0 60px;
}

.team-header {
    text-align: center;
    margin-bottom: 48px;
}

.team-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    color: var(--primary-color);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 16px;
}

.team-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.team-desc {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.team-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.team-card-inner {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover .team-card-inner {
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.15);
    transform: translateY(-6px);
}

.team-avatar {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.team-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.team-avatar-placeholder span {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.team-avatar-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.team-card:hover .team-avatar-ring {
    border-color: var(--primary-color);
    transform: rotate(45deg);
}

.team-content {
    flex: 1;
    text-align: center;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.team-role {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 12px;
}

.team-bio {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.team-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.team-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.team-stat svg {
    color: var(--muted);
}

.team-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--muted);
    transition: all 0.3s ease;
}

.team-card:hover .team-arrow {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.team-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}

.team-empty svg {
    margin-bottom: 20px;
    opacity: 0.4;
}

.team-empty p {
    font-size: 1.125rem;
    font-weight: 500;
    color: #475569;
    margin: 0 0 8px;
}

.team-empty span {
    font-size: 0.875rem;
}

/* 响应式 - 团队页面 */
@media (max-width: 768px) {
    .team-page {
        padding: 24px 0 40px;
    }
    
    .team-header h1 {
        font-size: 1.875rem;
    }
    
    .team-desc {
        font-size: 1rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team-card-inner {
        padding: 24px;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

/* 响应式 - 静态页面 */
@media (max-width: 768px) {
    .static-page {
        padding: 16px 0 40px;
    }

    .static-page-header {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .static-page-header h1 {
        font-size: 1.75rem;
    }

    .static-page-header .subtitle {
        font-size: 1rem;
    }

    .content-section h2 {
        font-size: 1.25rem;
    }

    .contact-item {
        flex-direction: column;
    }

    .contact-label {
        margin-bottom: 4px;
    }

    .authors-grid {
        grid-template-columns: 1fr;
    }
}

/* End of file */