/* 
 * fixes-bundle.css
 * 合并自 nav-fix.css、category-fix.css、mobile-category-drawer.css、
 * search-fix-improved.css、search-layout-fix.css、title-spacing-fix.css。
 * 更新任一来源文件后请记得重新打包。
 */

/* 导航栏修复样式
 * 用于解决导航菜单居中问题
 */

/* 导航容器样式 */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 15px 0px;
    box-sizing: border-box;
}

/* 增加头部样式，确保固定在顶部和最高层级 */
.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 10000 !important; /* 确保导航栏在最上层 */
    background-color: rgba(255, 255, 255, 1) !important; /* 确保背景不透明 */
    box-shadow: none !important; /* 确保移除投影效果 */
}

/* 导航菜单居中样式 */
.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
}

/* 确保超小屏幕上导航正常显示 */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
} /**
 * 分类页面样式修复
 * 确保所有分类标签及按钮高度统一为28px
 */

/* 分类标签高度修复 */
.category-tag,
.tool-tag,
.tool-card__tag,
.tool-card__tags .tool-tag {
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    line-height: 28px !important; /* 确保行高与高度一致 */
}

/* 首页卡片分类标签字体样式 */
.tool-card__tag {
    font-weight: 500 !important;
    color: #111827 !important; /* 设置字体颜色为深灰色 */
    padding: 4px 8px !important; /* 确保内边距一致 */
}

/* 工具标签通用颜色设置 */
.tool-tag {
    color: #111827 !important; /* 统一设置工具标签字体颜色 */
}

/* 确保首页卡片的分类标签高度统一 */
.tool-card .tool-tag,
.recommended-section .tool-tag,
#recommended-tools-container .tool-tag {
    height: 28px !important;
    min-height: 28px !important;
}

/* 确保点赞和访问按钮高度一致 */
.tool-card__like,
.tool-card__visit {
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* 首页分类标签样式修复 */

/* 增加首页分类标签的上下内间距 */
.category-tag {
    height: auto !important;
    padding: 4px 10px 4px 8px !important; /* 修改：将上下内边距从12px减少到4px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: rgba(255, 255, 255, 0) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* 确保分类名称垂直居中 */
.category-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 100% !important;
    color: rgba(17, 24, 39, 1) !important;
    white-space: nowrap !important;
}

/* 图标容器样式 */
.icon-container {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 6px !important;
    flex-shrink: 0 !important;
}

/* 分类标签悬停效果 */
.category-tag:hover {
    background-color: rgba(188, 198, 206, 0.18) !important;
    color: #111827 !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

/* 分类标签激活状态 */
.category-tag.active {
    background-color: rgba(188, 198, 206, 0.3) !important;
    color: #111827 !important;
    border: 1px solid rgba(188, 198, 206, 0.4) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    font-weight: 700 !important;
}

/* 移动端样式适配 */
@media (max-width: 768px) {
    .category-tag {
        padding: 4px 8px !important; /* 修改：将上下内边距从12px减少到4px */
    }
    
} /**
 * 手机端分类抽屉样式
 * 参考theresanaiforthat.com的分类抽屉设计
 */

/* 手机端分类按钮容器 */
.mobile-category-button-container {
    display: none; /* 默认隐藏，只在移动端显示 */
    width: 100%;
    margin: 20px 0;
    padding: 0 0px;
}

/* 手机端分类按钮 */
.mobile-category-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.mobile-category-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.mobile-category-button:active {
    transform: translateY(0);
}

.mobile-category-button .button-text {
    flex: 1;
    text-align: left;
    font-size: 14px;
}

.mobile-category-button .button-icon {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.mobile-category-button.active .button-icon {
    transform: rotate(90deg);
}

/* 分类抽屉 */
.mobile-category-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

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

/* 抽屉遮罩层 */
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* 抽屉内容 */
.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-category-drawer.active .drawer-content {
    transform: translateX(0);
}

/* 抽屉头部 */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #E5E7EB;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F3F4F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-close:hover {
    background: #E5E7EB;
}

.drawer-close i {
    font-size: 14px;
    color: #6B7280;
}

/* 抽屉主体 */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* 分类列表 */
.drawer-category-list {
    padding: 0;
}

/* 分类项 */
.drawer-category-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.drawer-category-item:hover {
    background: #F9FAFB;
}

.drawer-category-item.active {
    background: #EEF2FF;
    border-right: 3px solid #8B5CF6;
}

/* 分类图标容器 */
.drawer-category-item .icon-container {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.drawer-category-item .icon-container i,
.drawer-category-item .icon-container svg {
    font-size: 16px;
    color: white;
}

/* 分类名称 */
.drawer-category-item .category-name {
    font-size: 16px;
    font-weight: 500;
    color: #111827;
    line-height: 1.2;
}

.drawer-category-item.active .category-name {
    font-weight: 600;
    color: #8B5CF6;
}

/* 移动端显示规则 */
@media (max-width: 768px) {
    /* 显示手机端分类按钮 */
    .mobile-category-button-container {
        display: block;
    }
    
    /* 隐藏桌面端分类标签 */
    .desktop-categories {
        display: none !important;
    }
}

/* 桌面端隐藏手机端组件 */
@media (min-width: 769px) {
    .mobile-category-button-container,
    .mobile-category-drawer {
        display: none !important;
    }
}

/* 防止页面滚动（当抽屉打开时） */
body.drawer-open {
    overflow: hidden;
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    .drawer-content {
        width: 280px;
        max-width: 90vw;
    }
    
    .drawer-header {
        padding: 16px 16px 12px;
    }
    
    .drawer-category-item {
        padding: 10px 16px;
    }
    
    .drawer-category-item .icon-container {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
    
    .drawer-category-item .category-name {
        font-size: 15px;
    }
}
/* 
 * 搜索结果样式修复 - 改进版
 * 用于确保所有页面的搜索结果显示一致
 * 与首页、分类页和详情页的卡片样式保持一致
 */

/* 搜索结果工具卡片布局 */
body[data-search-mode="true"] .tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

/* 搜索图标大小修复 */
body[data-search-mode="true"] .search-icon {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    stroke-width: 1.5 !important;
    color: rgba(17, 24, 39, 1) !important;
}

/* 确保搜索结果与首页卡片样式一致 */
body[data-search-mode="true"] .tool-card {
    background-color: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: none !important;
    transition: none !important;
    position: relative !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 294px !important;
    border: none !important;
}

/* 搜索卡片悬停效果与首页保持一致 */
body[data-search-mode="true"] .tool-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 搜索卡片图片样式 */
body[data-search-mode="true"] .tool-card__image {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    min-height: 180px !important;
    height: 180px !important;
    border-radius: 8px !important;
    margin-bottom: 0 !important;
}

/* 搜索卡片图片内部样式 */
body[data-search-mode="true"] .tool-card__image img {
    position: relative !important;
    z-index: 10 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: transform 0.5s ease !important;
}

/* 搜索卡片悬停时图片缩放效果 */
body[data-search-mode="true"] .tool-card:hover .tool-card__image img {
    transform: scale(1.15) !important;
}

/* 搜索结果访问量显示 */
body[data-search-mode="true"] .tool-views-count {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    z-index: 20 !important;
    flex-direction: row-reverse !important;
}

/* 精选标签 */
body[data-search-mode="true"] .tool-card__featured {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background-color: rgba(165, 244, 103, 1) !important;
    color: rgba(17, 24, 39, 1) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    line-height: 20px !important;
    z-index: 20 !important;
}

/* 搜索卡片内容区域 */
body[data-search-mode="true"] .tool-card__content {
    padding: 12px 0 8px !important;
    position: relative !important;
    background-color: #FFFFFF !important;
    margin-top: 0 !important;
}

/* 搜索卡片标题 */
body[data-search-mode="true"] .tool-card__title {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    color: #111827 !important;
    margin: 0 0 8px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
}

/* 搜索卡片描述 */
body[data-search-mode="true"] .tool-card__description {
    font-size: 14px !important;
    line-height: 20px !important;
    color: #6B7280 !important;
    margin: 0 0 8px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    max-height: 40px !important;
}

/* 搜索卡片底部区域 */
body[data-search-mode="true"] .tool-card__footer {
    padding: 0 0 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #FFFFFF !important;
    position: relative !important;
    margin-top: auto !important;
}

/* 搜索卡片标签容器 */
body[data-search-mode="true"] .tool-card__tags {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    max-width: 60% !important;
}

/* 搜索卡片标签 */
body[data-search-mode="true"] .tool-tag {
    background-color: #EEF2F7 !important;
    color: #303747 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 120px !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

/* 搜索卡片标签悬停效果 */
body[data-search-mode="true"] .tool-tag:hover {
    background-color: #111827 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
}

/* 搜索卡片访问按钮容器 */
body[data-search-mode="true"] .tool-card__actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* 搜索卡片访问按钮 */
body[data-search-mode="true"] .tool-card__visit {
    background-color: transparent !important;
    color: #111827 !important;
    border: 1px solid #C9C9C9 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    transition: all 0.2s ease !important;
}

/* 搜索卡片访问按钮悬停效果 */
body[data-search-mode="true"] .tool-card__visit:hover {
    background-color: rgba(165, 244, 103, 1) !important;
    border-color: rgba(165, 244, 103, 1) !important;
    color: #111827 !important;
}

/* 搜索卡片访问按钮图标 */
body[data-search-mode="true"] .tool-card__visit .arrow-icon {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.5 !important;
}

/* 无搜索结果提示样式 */
body[data-search-mode="true"] .no-results-simple {
    width: 100% !important;
    text-align: center !important;
    padding: 40px 20px !important;
    box-sizing: border-box !important;
}

body[data-search-mode="true"] .no-results-simple h2 {
    font-size: 20px !important;
    margin: 15px 0 !important;
    color: #333 !important;
}

body[data-search-mode="true"] .no-results-simple p {
    font-size: 16px !important;
    color: #666 !important;
    margin-bottom: 20px !important;
}

body[data-search-mode="true"] .no-results-icon {
    font-size: 48px !important;
    color: #ccc !important;
    margin-bottom: 15px !important;
}

/* 确保非移动端搜索结果卡片有适当的宽度 */
@media (min-width: 577px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(25% - 18px) !important;
        max-width: 320px !important;
    }
    
    /* 在平板设备上显示三列 */
    @media (max-width: 992px) {
        body[data-search-mode="true"] .tool-card {
            width: calc(33.333% - 16px) !important;
        }
    }
    
    /* 在小平板设备上显示两列 */
    @media (max-width: 768px) {
        body[data-search-mode="true"] .tool-card {
            width: calc(50% - 12px) !important;
        }
    }
}

/* 移动端搜索结果样式 */
@media (max-width: 576px) {
    /* 移动端搜索容器 */
    body[data-search-mode="true"] .tools-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 16px !important;
    }
    
    /* 移动端搜索卡片 */
    body[data-search-mode="true"] .tool-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    body[data-search-mode="true"] .search-icon {
        font-size: 24px !important;
        width: 24px !important;
        height: 24px !important;
        stroke-width: 1.5 !important;
    }
} /* 
 * 搜索结果布局修复
 * 确保搜索结果始终横向排列，而不是竖列
 */

/* 恢复搜索结果的横向排列 */
body[data-search-mode="true"] .tools-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 24px !important;
}

/* 确保在各种屏幕尺寸下保持横向排列 */
@media (max-width: 576px) {
    body[data-search-mode="true"] .tools-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 16px !important;
    }
    
    /* 在小屏幕上调整卡片宽度为100%，但保持横向排列布局 */
    body[data-search-mode="true"] .tool-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }
}

/* 确保搜索卡片有统一的最小高度 */
body[data-search-mode="true"] .tool-card {
    min-height: 294px !important;
}

/* 确保卡片宽度适应不同尺寸的屏幕 */
@media (min-width: 1200px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(25% - 18px) !important;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(33.333% - 16px) !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(50% - 12px) !important;
    }
} 
 * 搜索结果布局修复
 * 确保搜索结果始终横向排列，而不是竖列
 */

/* 恢复搜索结果的横向排列 */
body[data-search-mode="true"] .tools-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 24px !important;
}

/* 确保在各种屏幕尺寸下保持横向排列 */
@media (max-width: 576px) {
    body[data-search-mode="true"] .tools-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 16px !important;
    }
    
    /* 在小屏幕上调整卡片宽度为100%，但保持横向排列布局 */
    body[data-search-mode="true"] .tool-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }
}

/* 确保搜索卡片有统一的最小高度 */
body[data-search-mode="true"] .tool-card {
    min-height: 294px !important;
}

/* 确保卡片宽度适应不同尺寸的屏幕 */
@media (min-width: 1200px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(25% - 18px) !important;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(33.333% - 16px) !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(50% - 12px) !important;
    }
} /* 
 * 标题间距调整
 * 增加首页和分类状态下大标题与顶部栏之间的间距
 */

/* 增加主内容区与顶部的间距 */
.main-content {
    margin-top: 100px !important; /* 原来是90px，增加10px */
}

/* 确保分类状态下也有相同的间距 */
body[data-category-active="true"] .main-content {
    margin-top: 100px !important;
}

/* 首页欢迎区域上方间距调整 */
.hero-section {
    padding-top: 10px !important; /* 添加额外的顶部内边距 */
}

/* 分类页面中的主标题与顶部间距 */
body[data-category-active="true"] .hero-section,
body[data-view="category"] .hero-section {
    padding-top: 10px !important;
}

/* 确保在各种屏幕尺寸下保持一致的间距 */
@media (max-width: 768px) {
    .main-content {
        margin-top: 100px !important;
    }
    
    .hero-section {
        padding-top: 10px !important;
    }
}

/* 特定查询参数页面的间距调整 */
body[data-view="all"] .main-content,
body[data-tag] .main-content {
    margin-top: 100px !important;
} 
 * 标题间距调整
 * 增加首页和分类状态下大标题与顶部栏之间的间距
 */

/* 增加主内容区与顶部的间距 */
.main-content {
    margin-top: 100px !important; /* 原来是90px，增加10px */
}

/* 确保分类状态下也有相同的间距 */
body[data-category-active="true"] .main-content {
    margin-top: 100px !important;
}

/* 首页欢迎区域上方间距调整 */
.hero-section {
    padding-top: 10px !important; /* 添加额外的顶部内边距 */
}

/* 分类页面中的主标题与顶部间距 */
body[data-category-active="true"] .hero-section,
body[data-view="category"] .hero-section {
    padding-top: 10px !important;
}

/* 确保在各种屏幕尺寸下保持一致的间距 */
@media (max-width: 768px) {
    .main-content {
        margin-top: 100px !important;
    }
    
    .hero-section {
        padding-top: 10px !important;
    }
}

/* 特定查询参数页面的间距调整 */
body[data-view="all"] .main-content,
body[data-tag] .main-content {
    margin-top: 100px !important;
} 
/* 
 * fixes-bundle.css
 * 组合了 nav-fix.css、category-fix.css、mobile-category-drawer.css、
 * search-fix-improved.css、search-layout-fix.css、title-spacing-fix.css。
 * 修改任一来源文件后请手动重新打包以保持同步。
 */
