/* CSS重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* 防止水平滚动 */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* 变量定义 - 颜色方案 */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sidebar-width: 280px;
    --header-height: 60px;
}

/* 顶部导航栏 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    z-index: 1100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding: 0;
}

.top-header.scrolled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 65px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    gap: 30px;
}

/* AI导航标题区域 */
.sidebar-header {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 90px; /* 增加高度以容纳图片 */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-right: 1px solid var(--border-color);
    z-index: 1101; /* 低于footer的z-index */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 确保左对齐 */
    padding: 0; /* 移除内边距，让图片填满整个区域 */
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 改为左对齐 */
    gap: 0; /* 移除gap */
    font-size: 20px;
    font-weight: 700;
    color: white;
    width: 100%; /* 占满容器宽度 */
    height: 100%; /* 占满容器高度 */
}

.header-logo a {
    display: block;
    line-height: 0; /* 移除链接的行高 */
    width: 100%; /* 占满容器宽度 */
    height: 100%; /* 占满容器高度 */
}

/* 添加logo图片样式 */
.header-logo img {
    width: 100%; /* 填满容器宽度 */
    height: 100%; /* 填满容器高度 */
    object-fit: contain; /* 保持图片完整性，不裁剪 */
    object-position: left center; /* 图片左对齐居中 */
    display: block;
    margin: 0; /* 移除margin */
    padding: 0; /* 移除padding */
}

.logo-icon {
    font-size: 24px;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(248, 250, 252, 0.6);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    backdrop-filter: blur(10px);
}

/* 平板设备适配 */
@media (max-width: 1024px) {
    .top-nav {
        gap: 6px;
        padding: 4px;
    }
    
    .top-nav-link {
        padding: 8px 14px;
        font-size: 13px;
    }
}

.top-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 14px;
    letter-spacing: -0.01em;
    background: transparent;
    border: 1px solid transparent;
}

.top-nav-link:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.top-nav-link.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* 常用链接下拉菜单 */
.quick-links {
    position: relative;
    margin-left: auto; /* 推到右侧 */
}

.quick-links-dropdown {
    position: relative;
}

.quick-links-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-links-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 键盘导航支持 */
.quick-links-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.quick-links-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.quick-links-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1200; /* 确保在下拉层级 */
}

.quick-links-dropdown.open .quick-links-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-link:last-child {
    border-bottom: none;
}

.quick-link:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

.quick-link:first-child {
    border-radius: 12px 12px 0 0;
}

.quick-link:last-child {
    border-radius: 0 0 12px 12px;
}

.quick-link-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* 移动端侧边栏遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1190; /* 确保在侧边栏下方 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* 侧边栏关闭按钮 */
.sidebar-close {
    display: none; /* 默认隐藏，只在移动端显示 */
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.sidebar-close span {
    font-size: 16px;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 80px; /* 将位置调整到顶部导航下方 */
    left: 15px;
    z-index: 1300; /* 提高z-index确保在最上层 */
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 左侧导航栏 */
.sidebar {
    position: fixed;
    top: 90px; /* 调整为新的头部高度 */
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 180px); /* 减去新的头部高度 */
    background: var(--background-white);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1300; /* 提高z-index使其高于footer */
    overflow-y: auto;
    transition: transform 0.3s ease;
}

/* 左侧导航栏菜单 */
.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.nav-link.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* 2级菜单样式 */
.has-submenu > .nav-link {
    cursor: pointer;
}

.submenu-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.has-submenu.open .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    border-left: 3px solid var(--primary-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-submenu.open .submenu {
    max-height: 300px; /* 根据子菜单数量调整 */
}

.submenu-link {
    display: block;
    padding: 12px 25px 12px 45px; /* 左侧缩进更多 */
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.submenu-link:hover {
    background: #e2e8f0;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    transform: translateX(3px);
}

.submenu-link.active {
    background: #dbeafe;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* 主内容区域 */
.main-content {
    min-height: 100vh;
    padding: 0;
    margin-top: 90px; /* 调整为新的头部高度 */
    padding-bottom: 80px; /* 为悬浮的footer留出空间 */
    display: flex;
    flex-direction: column;
}

/* 普通页面的布局 */
.main-content:not(.article-page) {
    margin-left: var(--sidebar-width);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 20px;
    box-sizing: border-box;
    width: calc(100% - var(--sidebar-width));
}

/* 文章页面的居中布局 */
.main-content.article-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* padding: 20px; */
    margin-left: var(--sidebar-width); /* 为侧边栏留出空间 */
    min-height: calc(100vh - 90px); /* 确保最小高度 */
    position: relative;
    box-sizing: border-box;
}

/* 带右侧边栏的文章页面布局 */
.main-content.article-page.with-sidebar {
    display: block; /* 改为flex容器 */
    margin-left: var(--sidebar-width);
    margin-top: 90px; /* 为顶部导航留出空间 */
    padding: 40px 20px 100px 20px;
    min-height: calc(100vh - 90px);
    max-width: 1400px; /* 增加最大宽度以容纳右侧边栏 */
    width: calc(100% - var(--sidebar-width) - 40px);
    box-sizing: border-box;
}

/* 内容包装器 - 使用flex布局实现居中 */
.content-wrapper {
    display: flex;
    justify-content: center; /* 根据内存规范实现水平居中 */
    gap: 30px;
    align-items: stretch; /* 让子元素高度一致 */
    max-width: 1600px; /* 增大最大宽度以配合搜索结果宽度 */
    margin: 0 auto;
    width: 100%;
}

/* 主文章区域 */
.content-wrapper .article-detail {
    flex: 1;
    min-width: 0; /* 防止flex项目超出 */
}

/* 右侧文章列表边栏 */
.article-list-sidebar {
    width: 300px; /* 略微增大宽度 */
    flex-shrink: 0;
    background: #f8f9fa;
    border-radius: 16px; /* 增大圆角 */
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 增强阴影 */
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border: 1px solid #e9ecef; /* 添加边框 */
}

.sidebar-content {
    padding: 20px; /* 减小内边距 */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 18px; /* 增大标题字体 */
    font-weight: 700; /* 增强字重 */
    color: #333;
    margin: 0 0 16px 0; /* 减小底部间距 */
    padding-bottom: 10px; /* 减小底部内边距 */
    border-bottom: 3px solid #2ED8C5; /* 增强底边框 */
    text-align: center; /* 居中显示 */
    background: linear-gradient(135deg, #2ED8C5, #00D4AA); /* 添加渐变背景 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.article-item {
    display: flex;
    align-items: flex-start;
    gap: 8px; /* 减小间距 */
    padding: 8px 0; /* 减小上下内边距 */
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    border-radius: 6px; /* 添加圆角 */
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    background: linear-gradient(135deg, rgba(46, 216, 197, 0.08), rgba(0, 212, 170, 0.05)); /* 渐变背景 */
    border-radius: 8px;
    padding-left: 8px; /* 减小左内边距 */
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    transform: translateX(2px); /* 添加微妙的位移效果 */
    box-shadow: 0 2px 8px rgba(46, 216, 197, 0.2); /* 添加阴影 */
}

.article-number {
    background: linear-gradient(135deg, #2ED8C5, #00D4AA);
    color: white;
    font-weight: 700; /* 增强字重 */
    font-size: 11px; /* 略微减小字体 */
    padding: 3px 6px; /* 减小内边距 */
    border-radius: 10px; /* 减小圆角 */
    min-width: 20px; /* 减小最小宽度 */
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(46, 216, 197, 0.3); /* 添加阴影 */
}

.article-title {
    color: #333;
    text-decoration: none;
    font-size: 12px; /* 减小字体 */
    line-height: 1.3; /* 减小行高 */
    font-weight: 500; /* 增强字重 */
    transition: color 0.3s ease;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-title:hover {
    color: #2ED8C5;
}

/* 搜索页面专用样式 - 适应article-page结构 */
.main-content.article-page .search-header-section {
    width: 100%;
    background: linear-gradient(135deg, #2ED8C5, #00D4AA);
    color: white;
    padding: 40px 20px 60px 20px;
    text-align: center;
    position: relative;
    margin: -30px -30px 30px -30px; /* 负 margin让搜索区域突破容器边界 */
    border-radius: 12px 12px 0 0;
}

.search-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.search-page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* 搜索容器 */
.search-header-section .search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 搜索框样式 */
.search-header-section .search-box-wrapper {
    display: flex;
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    align-items: center;
}

.search-header-section .search-input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #333;
}

.search-header-section .search-input::placeholder {
    color: #999;
}

.search-header-section .search-btn {
    background: #FF5722;
    border: none;
    padding: 14px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.search-header-section .search-btn:hover {
    background: #E64A19;
}

/* 搜索过滤器 */
.search-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.filter-select {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    outline: none;
    min-width: 100px;
}

.filter-select:focus {
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 搜索内容区域 */
.search-content-section {
    width: 100%;
    padding: 0;
    background: transparent;
    display: block;
}

/* 搜索结果列表样式 - 适应article-page结构 */
.search-content-section .search-results-container {
    max-width: none;
    width: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2ED8C5;
}

.results-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.results-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.results-count strong {
    color: var(--primary-color);
    font-weight: 600;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-result-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.search-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.search-result-item:hover::before {
    transform: scaleY(1);
}

.result-icon {
    flex-shrink: 0;
    width: 48px; /* 进一步减小 */
    height: 48px;
    border-radius: 10px; /* 减小圆角 */
    overflow: hidden;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* 减小阴影 */
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.result-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: var(--primary-color);
}

.result-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.result-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.result-date,
.result-views {
    color: var(--text-secondary);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.visit-btn {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.visit-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.favorite-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.favorite-btn span {
    font-size: 16px;
    color: #999;
    transition: color 0.3s ease;
}

.favorite-btn:hover span {
    color: #ff6b6b;
}

.favorite-btn.active span {
    color: #ff6b6b;
}

/* 分页导航样式 */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background-white);
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.page-btn:hover {
    background: var(--background-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.prev-btn,
.next-btn {
    font-size: 18px;
    font-weight: bold;
}

.page-dots {
    color: var(--text-secondary);
    padding: 0 8px;
    font-weight: bold;
}

/* 搜索页面移动端样式 - 适应article-page结构 */


@media (max-width: 480px) {
    .main-content.article-page .search-header-section {
        margin: -15px -10px 15px -10px;
        padding: 25px 10px 30px 10px;
    }
    
    .search-page-title {
        font-size: 18px;
    }
    
    .search-page-subtitle {
        font-size: 13px;
    }
    
    /* 针对480px以下设备的优化 */
    .tool-grid {
        grid-template-columns: 1fr; /* 在最小屏幕上改为单列 */
        gap: 10px;
    }
    
    .tool-card {
        padding: 12px;
    }
    
    .tool-card h3 {
        font-size: 16px;
    }
    
    .tool-card p {
        font-size: 12px;
    }
    
    /* 确保搜索框在移动端完全可见 */
    .search-container {
        width: 100%;
        padding: 0;
    }
    
    .search-input {
        width: 100%;
    }
    
    /* 修复移动端菜单问题 */
    .sidebar {
        width: 85%; /* 在小屏幕上占据更多空间 */
        transform: translateX(-100%);
    }
    
    /* 确保页脚在移动端正确显示 */
    .footer {
        padding: 15px 10px;
        font-size: 12px;
    }
    
    /* 禁用移动端不必要的动画 */
    .tool-card {
        animation: none !important;
        transition: none !important;
    }
    
    /* 确保移动设备上的图片正确显示 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 禁用移动端的横向滚动条 */
    body {
        overflow-x: hidden;
    }
    
    .results-title {
        font-size: 18px;
    }
    
    .result-title {
        font-size: 16px;
    }
    
    .result-description {
        font-size: 13px;
    }
    
    .visit-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .filter-group {
        max-width: none;
        padding: 4px 8px;
    }
    
    .filter-select {
        min-width: 80px;
        font-size: 12px;
    }
}
.hero-section {
    background: linear-gradient(135deg, #2ED8C5, #00D4AA);
    color: white;
    padding: 60px 40px 80px 40px; /* 上方减少padding，下方保持 */
    text-align: center;
    position: relative;
    margin: 0; /* 确保没有额外的margin */
    width: 100%; /* 确保占据右侧100%宽度 */
    box-sizing: border-box;
}

.hero-section h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

.hero-section p {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 搜索容器 */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 搜索标签页 */
.search-tabs {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 4px;
    backdrop-filter: blur(10px);
}

.search-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.search-tab.active {
    background: rgba(255, 255, 255, 0.9);
    color: #2ED8C5;
    font-weight: 600;
}

.search-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* 搜索框 */
.search-box-wrapper {
    display: flex;
    width: 100%;
    max-width: 650px;
    position: relative;
    background: white;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    align-items: center;
}

.search-input {
    flex: 1;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #333;
}

.search-input::placeholder {
    color: #999;
    font-size: 15px;
}

/* 平台指示器 */
.platform-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    margin-right: 8px;
    animation: slideInRight 0.3s ease;
}

.indicator-text {
    white-space: nowrap;
}

.clear-platform {
    background: none;
    border: none;
    color: #1976d2;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-platform:hover {
    background: #1976d2;
    color: white;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.search-btn {
    background: #FF5722;
    border: none;
    padding: 16px 24px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #E64A19;
    transform: scale(1.05);
}

/* STL搜索状态样式 */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-loading span {
    font-size: 16px;
    font-weight: 500;
}

/* 无搜索结果样式 */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.6;
}

.search-no-results h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.search-no-results p {
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 400px;
}

.search-suggestions {
    background: var(--background-light);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 500px;
    text-align: left;
}

.search-suggestions h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.search-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggestions li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.search-suggestions li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 快捷平台链接 */
.quick-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 650px;
}

.platform-link {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.platform-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.platform-link.selected {
    background: rgba(255, 255, 255, 0.9);
    color: #2ED8C5;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* 工具部分 */
.tool-section {
    padding: 60px 40px;
    border-bottom: 1px solid var(--border-color);
}

.tool-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.tool-category {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 工具列表 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

.tool-card {
    background: var(--background-white);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: #fafbff; /* 轻微背景变化 */
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 32px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 8px;
    flex-shrink: 0;
}

.tool-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    line-height: 1.4;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.4;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 工具链接样式已集成到tool-card中 */

/* 页脚 - 左右通栏样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--text-primary) !important; /* 加强背景色 */
    color: white !important; /* 加强文字颜色 */
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin: 0;
    border: none;
    clear: both;
    overflow: hidden;
    z-index: 1200; /* 确保footer在其他内容之上 */
}

.footer-content {
    width: 100%;
    color: white !important;
}

.footer-content p {
    font-size: 16px;
    opacity: 0.9; /* 提高透明度以提高可读性 */
    margin: 0; /* 修正margin问题 */
    color: white !important; /* 确保文字是白色 */
    font-weight: 400; /* 确保文字清晰 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 添加文字阴影提高可读性 */
}
.footer-content img {
  height: 25px;
}
/* 确保 footer 内所有链接都是白色 */
.footer a {
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #e0e0e0 !important;
    text-decoration: underline;
}

.footer a:visited {
    color: white !important;
}

.footer a:focus {
    color: white !important;
    outline: 1px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* footer 内所有文本元素 */
.footer *:not(a) {
    color: white;
}

/* footer 内所有元素的文本颜色 */
.footer,
.footer-content,
.footer-content *,
.footer * {
    color: white;
}

/* 确保 footer 在高对比度模式下也显示清晰 */
@media (prefers-contrast: high) {
    .footer {
        background: #000000; /* 高对比度下使用纯黑色背景 */
    }
    
    .footer,
    .footer *,
    .footer a {
        color: #ffffff !important; /* 高对比度下使用纯白色文字 */
    }
}

/* 黑暗模式支持 */
@media (prefers-color-scheme: dark) {
    .footer {
        background: #1a1a1a;
    }
    
    .footer,
    .footer *,
    .footer a {
        color: white !important;
    }
}

/* 更多链接样式 */
.more-link-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    padding: 0 20px;
}

.more-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.more-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .more-link-container {
        justify-content: center;
        padding: 0 10px;
    }
    
    .more-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 90px; /* 调整位置，避免被footer遮挡 */
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1300; /* 高于footer，确保可见 */
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .tool-card {
        padding: 14px;
    }
    
    .tool-section {
        padding: 50px 30px;
    }
    
    .hero-section {
        padding: 60px 30px;
    }
    
    .hero-section h1 {
        font-size: 40px;
    }
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
    
    /* 全局移动端布局修复 */
    html, body {
        width: 100%;
        overflow-x: hidden;
        position: relative;
    }
    
    body {
        margin: 0;
        padding: 0;
        min-width: 320px;
    }
    
    .mobile-menu-toggle {
        display: block; /* 确保移动端显示 */
        top: 15px;
        left: 15px;
        z-index: 1300; /* 最高优先级 */
    }
    
    .sidebar-close {
        display: block; /* 移动端显示关闭按钮 */
        z-index: 1301; /* 在侧边栏内部最高 */
    }
    
    .sidebar {
        top: 0;
        left: 0;
        height: 100vh;
        width: var(--sidebar-width);
        transform: translateX(-100%);
        z-index: 1250; /* 高于遮罩层，低于菜单按钮 */
        background: var(--background-white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); /* 添加阴影 */
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
        z-index: 1250;
    }
    
    .top-header {
        position: fixed;
        top: 0;
        left: 0;
        height: 70px;
        margin: 0;
        padding: 0;
        width: 100%; /* 确保宽度100% */
        z-index: 1200; /* 低于菜单按钮 */
        box-sizing: border-box;
    }
    
    .sidebar-header {
        position: relative;
        width: 100%;
        height: 80px; /* 移动端适当减小高度 */
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border: none;
        z-index: auto;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* 保持左对齐 */
        padding: 0 45px 0 0; /* 只在右侧保留空间给关闭按钮 */
    }
    
    .header-logo {
        background: none;
        color: white;
        padding: 0;
        border-radius: 0;
        font-size: 18px;
        display: flex;
        gap: 0; /* 移除gap */
        justify-content: flex-start; /* 保持左对齐 */
        flex: 1; /* 让logo区域占据剩余空间 */
        height: 100%; /* 填满高度 */
    }
    
    .header-logo a {
        display: block;
        line-height: 0;
        width: 100%;
        height: 100%;
    }
    
    /* 移动端图片样式 */
    .header-logo img {
        width: 100%; /* 填满容器 */
        height: 100%; /* 填满容器 */
        object-fit: contain; /* 保持图片完整性 */
        object-position: left center; /* 图片左对齐居中 */
        margin: 0;
        padding: 0;
    }
    
    .header-content {
        margin-left: 70px; /* 为汉堡菜单按钮留出更多空间 */
        padding: 0 15px;
        justify-content: flex-end; /* 移动端将常用链接靠右 */
        width: calc(100% - 70px); /* 确保宽度正确 */
    }
    
    .top-nav {
        display: none;
    }
    
    .quick-links-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-top: 70px; /* 移动端适当减小 */
        padding: 0 15px; /* 增加左右内边距 */
        width: 100% !important;
        box-sizing: border-box;
        display: block;
        min-height: calc(100vh - 70px); /* 确保内容区域高度正确 */
        overflow-x: hidden; /* 防止水平滚动 */
        position: relative;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
    }
    
    .main-content.article-page {
        margin-left: 0; /* 移动端移除侧边栏边距 */
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 优化移动端工具卡片布局 */
    .tool-grid {
        grid-template-columns: repeat(2, 1fr); /* 在小屏幕上改为2列 */
        gap: 12px;
        padding: 0;
    }
    
    /* 确保工具卡片在移动端正确显示 */
    .tool-card {
        padding: 15px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: flex-start;
    }
    
    /* 移动端带右侧边栏的文章页面 */
    .main-content.article-page.with-sidebar {
        margin-left: 0;
        margin-top: 70px; /* 移动端顶部导航高度 */
        padding: 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .content-wrapper {
        flex-direction: column;
        gap: 15px; /* 进一步减小间距 */
    }
    
    .article-list-sidebar {
        width: 100%;
        position: static;
        margin-top: 15px;
        border-radius: 12px;
        order: 2; /* 在移动端将侧边栏放在文章下方 */
    }
    
    .sidebar-content {
        padding: 14px; /* 移动端减小内边距 */
    }
    
    .sidebar-title {
        font-size: 16px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .article-item {
        padding: 5px 0; /* 移动端进一步减小 */
        gap: 6px;
    }
    
    .article-number {
        font-size: 9px;
        padding: 2px 4px;
        min-width: 16px;
        border-radius: 8px;
    }
    
    .article-title {
        font-size: 11px;
        line-height: 1.2;
    }
    

    .footer {
        left: 0;
        padding: 15px 20px;
        color: white; /* 确保移动端文字也是白色 */
    }
    
    /* 移动端 footer 链接样式 */
    .footer a {
        color: white !important;
    }
    
    .hero-section {
        padding: 30px 20px 40px 20px; /* 上方减少padding */
        margin-top: 0; /* 移除上方margin */
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%; /* 确保移动端宽度100% */
        box-sizing: border-box;
    }
    
    .hero-section h1 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .search-container {
        gap: 16px;
        padding: 0 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 600px; /* 限制最大宽度 */
    }
    
    .search-box-wrapper {
        max-width: none;
        border-radius: 20px;
        width: 100%;
        display: flex;
        align-items: center;
        position: relative;
        margin: 0 auto;
    }
    
    .search-input {
        padding: 14px 20px;
        font-size: 15px;
        width: 100%;
        flex: 1;
    }
    
    .search-btn {
        padding: 14px 20px;
        flex-shrink: 0;
    }
    
    .search-tabs {
        padding: 3px;
    }
    
    .search-tab {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .quick-platforms {
        gap: 8px;
        max-width: none;
    }
    
    .platform-link {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 16px;
    }
    
    .hero-section p {
        font-size: 18px;
    }
    
    .tool-section {
        padding: 40px 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    /* 统一的工具网格样式 */
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 10px;
    }
    
    /* 统一的工具卡片样式 */
    .tool-card {
        padding: 12px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: auto;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .tool-icon img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    
    .tool-content h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .tool-content p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .back-to-top {
        bottom: 75px; /* 移动端调整位置 */
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .footer {
        padding: 30px 20px;
        color: white; /* 确保超小屏幕文字也是白色 */
    }
    
    /* 超小屏幕 footer 链接样式 */
    .footer a {
        color: white !important;
        font-size: 14px; /* 超小屏幕链接字体大小 */
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .hero-section {
        padding: 20px 10px 30px 10px;
    }
    
    .hero-section h1 {
        font-size: 22px;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .hero-section p {
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .search-container {
        padding: 0 5px;
    }
    
    .search-box-wrapper {
        border-radius: 16px;
    }
    
    .search-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 12px 16px;
    }
    
    .quick-platforms {
        gap: 6px;
    }
    
    .platform-link {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* 小屏幕上单列显示工具卡片 */
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 10px;
    }
    
    .tool-card {
        padding: 12px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: auto;
    }
    
    .tool-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
        font-size: 32px;
    }
    
    .tool-icon img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    
    .tool-content h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .tool-content p {
        font-size: 13px;
        line-height: 1.4;
    }
    
    /* 禁止横向滚动 */
    html, body {
        overflow-x: hidden;
    }
    
    /* 确保所有图片自适应 */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* 页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease-out;
}

.tool-card:nth-child(2) {
    animation-delay: 0.1s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* 搜索高亮样式 */
.tool-card.search-highlight {
    border-color: #FF5722 !important;
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.3) !important;
    background: #fff5f2 !important;
    transform: scale(1.02);
    position: relative;
}

.tool-card.search-highlight::before {
    transform: scaleX(1);
    background: #FF5722;
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 焦点样式优化 */
.nav-link:focus,
.tool-link:focus,
.mobile-menu-toggle:focus,
.back-to-top:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #333;
        --text-secondary: #333;
    }
    
    .tool-card {
        border-width: 2px;
    }
}

/* 文章明细页面样式 */
.article-detail {
    padding: 0;
    max-width: 1000px; /* 限制最大宽度以保证可读性 */
    width: 100%;
    flex-shrink: 0; /* 防止在flex容器中被压缩 */
    box-sizing: border-box;
}

.article-container {
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 20px 30px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-secondary);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* 文章头部 */
.article-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.header-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.visit-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.visit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.button-icon {
    font-size: 16px;
}

.button-text {
    font-weight: 500;
}

.article-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.article-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.article-meta span {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.article-meta .category {
    background: var(--primary-color);
    color: white;
}

.article-meta .date,
.article-meta .views {
    background: #f1f5f9;
    color: var(--text-secondary);
}

/* 文章内容 */
.article-content {
    padding: 30px;
}

.article-content section {
    margin-bottom: 40px;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.article-content p {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* 功能网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: white;
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 使用指南步骤 */
.guide-steps {
    margin-top: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 价格卡片 */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured::before {
    content: '推荐';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.pricing-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
}

.features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid #f1f5f9;
}

.features li:last-child {
    border-bottom: none;
}

.features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 8px;
}

/* 相关链接 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.link-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.link-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.link-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-detail {
        padding: 0;
        max-width: 100%;
    }
    
    .article-header,
    .article-content {
        padding: 20px;
    }
    
    .header-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .visit-button {
        align-self: stretch;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .features-grid,
    .pricing-cards,
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
}

/* 搜索结果页面样式 */
.search-results {
    width: 100%;
    max-width: 1600px; /* 增大最大宽度 */
    margin: 0 auto;
    padding: 18px; /* 进一步减小内边距 */
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    /* 使用flex布局实现居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.search-container {
    width: 100%; /* 改为100%以匹配列表宽度 */
    max-width: 1200px; /* 设置合理的最大宽度 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 使用flex布局实现居中 */
    justify-content: center; /* 遵循项目居中布局规范 */
}

/* 搜索头部 */
.search-header {
    display: flex;
    flex-direction: column;
    align-items: center; /* 使用flex布局实现居中 */
    justify-content: center; /* 遵循项目居中布局规范 */
    margin-bottom: 20px;
    padding: 12px 15px; /* 大幅减小内边距 */
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    width: 100%; /* 占满搜索容器的全部宽度 */
}

.search-box {
    display: flex;
    gap: 8px; /* 减小间距 */
    margin-bottom: 8px; /* 减小下边距 */
    width: 95%; /* 增加到95%以更好地对齐列表 */
    max-width: 1000px; /* 增大最大宽度 */
    align-items: center;
    justify-content: center; /* 遵循居中布局规范 */
}

.search-input {
    flex: 1;
    padding: 6px 10px; /* 进一步减小内边距 */
    border: 1px solid var(--border-color); /* 减小边框 */
    border-radius: 6px; /* 进一步减小圆角 */
    font-size: 13px; /* 进一步减小字体 */
    outline: none;
    transition: all 0.3s ease;
    background: #fafbfc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    height: 30px; /* 进一步减小高度 */
    box-sizing: border-box;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), inset 0 1px 3px rgba(0, 0, 0, 0.1); /* 减小焦点阴影 */
    background: white;
    transform: translateY(-1px);
}

.search-button {
    padding: 6px 12px; /* 进一步减小内边距 */
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
    border-radius: 6px; /* 进一步减小圆角 */
    font-weight: 600;
    font-size: 13px; /* 进一步减小字体 */
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px; /* 进一步减小最小宽度 */
    height: 30px; /* 与输入框高度一致 */
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-button:hover::before {
    left: 100%; /* 添加闪光效果 */
}

.search-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #3730a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.search-stats {
    color: var(--text-secondary);
    font-size: 11px; /* 进一步减小字体 */
    margin-top: 0px; /* 移除上边距 */
    background: rgba(59, 130, 246, 0.04);
    padding: 2px 6px; /* 进一步减小内边距 */
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.08);
    display: inline-block;
    text-align: center;
}

.search-stats strong {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 12px; /* 进一步减小字体 */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索结果列表 */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 进一步减小间距 */
    margin-bottom: 25px; /* 减小下边距 */
    width: 100%;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 14px; /* 减小间距 */
    padding: 12px 16px; /* 大幅减小内边距 */
    background: var(--background-white);
    border: 2px solid var(--border-color);
    border-radius: 10px; /* 减小圆角 */
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); /* 减小阴影 */
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.result-item:hover::before {
    transform: scaleY(1); /* 添加左侧指示条 */
}

.result-item:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #fafbfc, #ffffff);
}

.result-icon {
    flex-shrink: 0;
    width: 56px; /* 进一步减小 */
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); /* 减小阴影 */
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.result-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-item:hover .result-icon::after {
    opacity: 1; /* 悬停时显示渐变边框 */
}

.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    margin: 0 0 4px 0; /* 进一步减小下边距 */
    font-size: 15px; /* 减小字体 */
    font-weight: 700;
    line-height: 1.2; /* 减小行高 */
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.result-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
}

.result-title a:hover {
    background-size: 100% 2px; /* 添加下划线动画 */
    color: var(--primary-color);
}

.result-description {
    margin: 0 0 6px 0; /* 减小下边距 */
    color: var(--text-secondary);
    font-size: 12px; /* 减小字体 */
    line-height: 1.3; /* 减小行高 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 12px; /* 减小间距 */
    font-size: 11px; /* 减小字体 */
}

.result-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3px 8px; /* 减小内边距 */
    border-radius: 6px; /* 减小圆角 */
    font-weight: 600;
    font-size: 10px; /* 减小字体 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(46, 216, 197, 0.25); /* 减小阴影 */
    position: relative;
    overflow: hidden;
}

.result-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.result-item:hover .result-category::before {
    left: 100%; /* 添加闪光效果 */
}

.result-date {
    color: var(--text-secondary);
    font-weight: 500;
}

/* 分页组件 - 优化样式与网站风格保持一致 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 25px;
    margin-top: 25px;
    background: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pagination:hover {
    box-shadow: var(--shadow-md);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
}

.pagination-info:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 分页按钮样式 - 与网站按钮风格一致 */
.pagination-btn {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: var(--background-white);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    box-shadow: var(--shadow-sm);
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px;
}

/* 分页页码样式 - 与网站卡片风格一致 */
.pagination-page {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--background-white);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.pagination-page:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.pagination-page.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
}

.pagination-ellipsis {
    padding: 0 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

/* 栏目页面传统分页样式 - 与网站风格保持一致 */
.tool-grid ~ table {
    width: 100% !important;
    max-width: 600px !important;
    margin: 40px auto 20px !important;
    border-collapse: collapse;
    background: var(--background-white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: table !important;
    table-layout: fixed !important;
    white-space: nowrap;
}

.tool-grid ~ table tbody tr {
    background: transparent;
    display: table-row !important;
}

.tool-grid ~ table td {
    padding: 15px 10px !important;
    text-align: center !important;
    border: none !important;
    font-size: 14px;
    color: var(--text-secondary);
    display: table-cell !important;
    white-space: nowrap;
    vertical-align: middle;
}

.tool-grid ~ table td a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 3px;
    background: var(--background-white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    min-width: 40px;
    text-align: center;
}

.tool-grid ~ table td a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 当前页样式 */
.tool-grid ~ table td a[href*="javascript"] {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
    font-weight: 600;
}

/* 页码链接样式 */
.tool-grid ~ table td a[href*="channels"] {
    background: var(--background-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.tool-grid ~ table td a[href*="channels"]:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

/* 强制所有单元格居中显示 */
.tool-grid ~ table td:first-child,
.tool-grid ~ table td:last-child {
    text-align: center !important;
    width: auto !important;
}

/* 分页分隔符样式 */
.tool-grid ~ table td {
    color: var(--text-secondary);
}

/* 确保表格内容在一行显示 */
.tool-grid ~ table td {
    white-space: nowrap;
}

/* 移动端传统分页样式适配 */
@media (max-width: 768px) {
    .tool-grid ~ table {
        margin: 30px auto 15px !important;
        border-radius: 12px;
        width: 95% !important;
        max-width: 500px !important;
    }
    
    .tool-grid ~ table td {
        padding: 12px 8px !important;
        display: table-cell !important;
        text-align: center !important;
        font-size: 13px;
    }
    
    .tool-grid ~ table td:first-child,
    .tool-grid ~ table td:last-child {
        text-align: center !important;
    }
    
    .tool-grid ~ table td a {
        padding: 6px 12px !important;
        margin: 2px !important;
        font-size: 13px !important;
        min-width: 35px !important;
    }
}

@media (max-width: 480px) {
    .tool-grid ~ table {
        margin: 20px auto 10px !important;
        border-radius: 10px;
        width: 98% !important;
        max-width: 400px !important;
    }
    
    .tool-grid ~ table td {
        padding: 10px 6px !important;
        display: table-cell !important;
        text-align: center !important;
        font-size: 12px;
    }
    
    .tool-grid ~ table td:first-child,
    .tool-grid ~ table td:last-child {
        text-align: center !important;
    }
    
    .tool-grid ~ table td a {
        padding: 5px 10px !important;
        margin: 1px !important;
        font-size: 12px !important;
        min-width: 30px !important;
    }
}

/* 搜索结果页面响应式设计 */
@media (max-width: 768px) {
    .search-results {
        padding: 12px; /* 进一步减小 */
        margin: 8px;
        border-radius: 10px;
    }
    
    .search-header {
        padding: 10px 12px;
        margin-bottom: 15px;
        width: 100%; /* 保持全宽度 */
    }
    
    .search-container {
        width: 100%; /* 改为100%以匹配列表宽度 */
    }
    
    .search-box {
        flex-direction: column;
        gap: 6px; /* 减小间距 */
        max-width: none;
        width: 95%; /* 保持95%宽度与桌面端一致 */
    }
    
    .search-input {
        padding: 6px 10px; /* 与桌面端保持一致 */
        font-size: 13px;
        height: 30px;
    }
    
    .search-button {
        align-self: stretch; /* 全宽度 */
        padding: 6px 12px; /* 与桌面端保持一致 */
        font-size: 13px;
        height: 30px;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 10px; /* 减小间距 */
        padding: 12px; /* 减小内边距 */
    }
    
    .result-icon {
        align-self: center;
        width: 48px; /* 与桌面端保持一致 */
        height: 48px;
    }
    
    .result-title {
        font-size: 15px;
    }
    
    .result-description {
        font-size: 12px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px;
        margin-top: 20px;
        border-radius: 12px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        order: 1;
    }
    
    .pagination-info {
        order: 2;
        margin-top: 8px;
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .pagination-pages {
        margin: 0 8px;
        gap: 4px;
    }
    
    .pagination-page {
        width: 36px;
        height: 36px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .pagination-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 70px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .search-results {
        padding: 12px;
        margin: 8px;
    }
    
    .result-item {
        padding: 12px;
    }
    
    .result-icon {
        width: 40px;
        height: 40px;
    }
    
    .pagination {
        padding: 16px;
        gap: 12px;
        margin-top: 16px;
    }
    
    .pagination-pages {
        margin: 0 4px;
        gap: 2px;
    }
    
    .pagination-page {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 60px;
        border-radius: 6px;
    }
    
    .pagination-info {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .result-title {
        font-size: 15px;
    }
    
    .result-description {
        font-size: 13px;
    }
    
    .result-meta {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* 分页包装器 */
.pagination-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    clear: both;
    position: relative;
    z-index: 1000; /* 确保在底部之上 */
    margin-bottom: 100px; /* 为底部留出足够空间 */
}

/* 分页样式 - 精美水平居中布局 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    margin: 5px auto; /* 进一步减少上方间距 */
    padding: 8px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(226, 232, 240, 0.8);
    gap: 20px;
    flex-wrap: nowrap;
    backdrop-filter: blur(8px);
    height: auto;
    min-height: 50px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-width: 60px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    height: 36px;
}

.pagination-link:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(148, 163, 184, 0.08);
    color: #64748b;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.15);
    min-width: 60px;
    cursor: not-allowed;
    white-space: nowrap;
    height: 36px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.current-page {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(59, 130, 246, 0.15);
    height: 32px;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}

.page-link.current {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    cursor: default;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* 移动端分页样式 */
@media (max-width: 768px) {
    .pagination-wrapper {
        margin-bottom: 80px; /* 移动端减少底部间距 */
    }
    
    .pagination-container {
        width: 95%;
        margin: 15px auto;
        padding: 12px 16px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        border-radius: 10px;
        backdrop-filter: blur(4px);
        min-height: 50px;
    }
    
    .pagination-nav {
        justify-content: center;
        gap: 6px;
    }
    
    .pagination-info {
        justify-content: center;
        gap: 12px;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 50px;
        border-radius: 5px;
        height: 32px;
    }
    
    .page-link {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 5px;
    }
    
    .current-page {
        font-size: 12px;
        padding: 5px 8px;
        border-radius: 5px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .pagination-wrapper {
        margin-bottom: 70px;
    }
    
    .pagination-container {
        width: 98%;
        margin: 10px auto;
        padding: 10px 12px;
        gap: 8px;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 8px;
        min-height: 45px;
    }
    
    .pagination-nav {
        gap: 4px;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 40px;
        border-radius: 4px;
        height: 28px;
    }
    
    .page-link {
        width: 28px;
        height: 28px;
        font-size: 11px;
        border-radius: 4px;
    }
    
    .current-page {
        font-size: 11px;
        padding: 4px 6px;
        border-radius: 4px;
        height: 26px;
    }
}