/* 
 * AI工具导航站 - 主样式表
 * 作者：AI工具导航站团队
 * 版本：1.0.0
 */

/* ===== 基础样式 ===== */
:root {
    /* 颜色变量 */
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --accent-color: #ff6b6b;
    --background-color: #ffffff;
    --text-color: #333;
    --light-text: #6c757d;
    --border-color: #e9ecef;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #343a40;
    --footer-text: #f8f9fa;
    
    /* 背景圆形颜色 */
    --circle-green-color: rgba(92, 250, 219, 0.05);
    --circle-purple-color: rgba(146.48, 92, 250, 0.05);
    
    /* 间距变量 */
    --spacing-xs: 8px;   /* 极小间距 */
    --spacing-sm: 16px;  /* 小间距 */
    --spacing-md: 24px;  /* 中间距 */
    --spacing-lg: 32px;  /* 大间距 */
    --spacing-xl: 48px;  /* 极大间距 */
    
    /* 边框变量 */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* 阴影变量 */
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.15);
    
    /* 过渡变量 */
    --transition-speed: 0.3s;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    position: relative;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== 装饰性背景 ===== */
.decorative-background {
    width: 1920px;
    height: 800px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
    background-color: #ffffff;
}

.circle {
    width: 997px;
    height: 997px;
    position: absolute;
    border-radius: 9999px;
    filter: blur(300px);
}

.circle-green {
    left: 503px;
    top: -640px;
    background-color: rgba(92, 250, 219, 0.05);
}

.circle-purple {
    left: -201px;
    top: -741px;
    background-color: rgba(146.48, 92, 250, 0.05);
}

/* 通用容器 */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    box-sizing: border-box;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bd9;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.9rem;
}

/* ===== 头部样式 ===== */
.header {
    width: 100%;
    height: 70px;
    background-color: rgba(255, 255, 255, 0); /* 初始透明背景 */
    position: fixed; /* 改为固定定位，使其始终在顶部 */
    top: 0;
    left: 0;
    z-index: 9999; /* 增加z-index值，确保在最上层 */
    transition: background-color 0.3s ease; /* 添加过渡效果 */
}

/* 滚动时的头部样式 */
.header.scrolled {
    background-color: rgba(255, 255, 255, 1); /* 滚动时不透明 */
    box-shadow: none !important; /* 确保移除投影效果 */
}

/* 详情页导航栏样式 */
body.detail-page .header,
body.detail-page .header.scrolled {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: none !important;
}

/* 确保滚动时登录按钮背景保持透明 */
.header.scrolled .login-btn {
    background-color: transparent !important;
}

.nav-container {
    width: 100%;
    max-width: 1440px; /* 与其他容器一致 */
    height: 70px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止在小屏幕上被压缩 */
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 42px; /* 从36px增加到42px */
    width: auto; /* 保持宽高比 */
    display: block;
    max-width: 100%; /* 确保不会溢出 */
    object-fit: contain; /* 确保图片完整显示 */
}

.logo h1 {
    font-size: 30px;
    font-weight: 700;
    line-height: 100%;
    color: rgba(17, 24, 39, 1);
    margin: 0;
}

.main-nav {
    display: flex;
    justify-content: center;
    flex-grow: 1; /* 占据中间所有空间 */
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 52px;
    justify-content: center; /* 在可用空间内居中 */
}

.main-nav li {
    list-style: none;
}

.nav-link {
    font-size: 15px;
    line-height: 100%;
    text-align: center;
    color: rgba(17, 24, 39, 1);
    text-decoration: none;
    transition: font-weight 0.3s ease;
}

.nav-link:hover {
    color: rgba(17, 24, 39, 1);
    font-weight: 700;
}

.nav-link.active {
    font-weight: 700;
}

.login-btn {
    width: 96px;
    height: 40px;
    background-color: transparent !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 防止在小屏幕上被压缩 */
    transition: color 0.3s ease;
}

.login-btn:hover {
    background-color: transparent !important;
}

.login-btn:active {
    background-color: transparent !important;
}

.header.scrolled .login-btn {
    background-color: transparent !important;
}

.btn-login {
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    color: #111827 !important;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 头部分隔线 */
.header-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(242.48, 242.24, 242.24, 0); /* 初始透明背景 */
    transition: background-color 0.3s ease; /* 添加过渡效果 */
}

/* 滚动时的分隔线样式 */
.header.scrolled .header-divider {
    background-color: rgba(242.48, 242.24, 242.24, 1); /* 滚动时不透明 */
}

/* 首页强制显示分隔线 */
body.home-page .header-divider {
    background-color: rgba(242.48, 242.24, 242.24, 1);
}

/* 响应式调整 */
@media (max-width: 1600px) {
    .nav-container {
        padding: 15px 30px; /* 保持固定的左右内边距30px，从20px增加到30px */
    }
    
    .main-nav ul {
        gap: 40px;
    }
}

@media (max-width: 1200px) {
    .nav-container {
        padding: 15px 30px; /* 保持固定的左右内边距30px，从20px增加到30px */
    }
    
    .main-nav ul {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        /* 中等屏幕上调整间距 */
        --spacing-md: 20px;
    }
    
    .nav-container {
        padding: 10px 30px;
    }
    
    .header {
        height: 60px;
    }
    
    .main-nav {
        display: none; /* 在移动设备上隐藏导航菜单，后续可以添加汉堡菜单 */
    }
    
    .login-btn {
        position: relative; /* 保持相对定位 */
        right: 0; /* 保持没有右侧定位 */
        background-color: transparent !important;
    }
    
    .logo {
        position: relative; /* 保持相对定位 */
        left: 0; /* 保持没有左侧定位 */
    }
    
    .hero-titles {
        padding: 0 20px;
    }
    
    .main-title {
        font-size: 30px;
        line-height: 1.2;
        margin-bottom: 10px;
        padding: 0 10px;
    }
    
    .sub-title {
        font-size: 18px;
        padding: 0 10px;
    }
    
    .decorative-background {
        height: 300px;
    }
    
    .circle {
        transform: scale(0.7);
    }
    
    .search-box {
        width: 90%;
        max-width: 590px;
    }
    
    .category-row {
        max-width: 100%;
        padding: 0 10px;
        gap: 6px; /* 从8px减小到6px */
    }
    
    .category-tag {
        height: 34px; /* 从38px减小到34px */
        padding: 1px 6px 1px 4px; /* 上下内边距从3px减少到1px */
    }
    
    .icon-container {
        width: 24px; /* 小屏幕下的图标容器宽度从28px减小到24px */
        height: 24px; /* 小屏幕下的图标容器高度从28px减小到24px */
    }
    
    .icon-container i,
    .icon-container svg {
        font-size: 14px; /* 小屏幕下的图标字体大小从16px减小到14px */
        color: white;
    }
    
    .icon-container svg {
        width: 14px;
        height: 14px;
    }
    
    .category-name {
        font-size: 16px; /* 恢复从13px到原来的16px */
        font-weight: 700;
        line-height: 100%;
        color: rgba(17, 24, 39, 1);
        white-space: nowrap;
    }
    
    .logo-image {
        height: 36px; /* 从30px增加到36px */
    }
    
    /* 移动设备下调整主内容区域边距 */
    .main-content {
        margin-top: 60px; /* 从40px修改为60px，保持与PC端同比例增加 */
        padding-top: 10px; /* 减少顶部内边距 */
        padding-left: 12px; /* 手机端首页左右间距，与详情页保持一致 */
        padding-right: 12px; /* 手机端首页左右间距，与详情页保持一致 */
    }
    
    /* 调整欢迎区域顶部内边距 */
    .hero-section {
        padding-top: 0;
    }
    
    /* 减少categories-container顶部间距 */
    .categories-container {
        margin-top: 15px;
    }
    
    /* 调整搜索框边距 */
    .search-container {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    :root {
        --spacing-xs: 5px;
        --spacing-sm: 10px;
        --spacing-md: 12px; /* 改为12px，与手机端首页保持一致 */
        --spacing-lg: 20px;
        --spacing-xl: 30px;
    }
    
    .container {
        padding-left: 0; /* 移除左右间距，由.main-content提供统一的12px间距 */
        padding-right: 0;
    }
    
    .nav-container {
        height: 60px;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    .logo {
        font-size: 20px;
        line-height: 22px;
    }
    
    .login-btn {
        font-size: 14px;
        padding: 6px 12px;
        font-weight: 500;
    }
    
    .category-grid,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .main-title {
        font-size: 20px;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .hero-titles {
        margin-bottom: var(--spacing-md);
    }
    
    .welcome-message {
        font-size: 12px;
        margin: 0 auto 12px auto;
        padding: 6px 12px;
        max-width: 280px;
    }
    
    .sub-title {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .circle {
        width: 150px;
        height: 150px;
    }
    
    .search-box {
        width: 100%;
        height: 44px;
        margin-bottom: 5px;
    }
    
    .search-button {
        padding: 0;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-input {
        font-size: 14px;
        padding: 0 15px;
    }
    
    .search-input::placeholder {
        font-size: 14px;
    }
    
    .search-box:focus-within {
        transform: none;
    }
    
    .category-select-btn {
        display: flex;
        align-items: center;
        padding: 8px 12px;
        background-color: #f0f0f0;
        border-radius: 8px;
        margin-bottom: 15px;
        font-size: 14px;
        font-weight: 500;
    }
    
    .category-row {
        gap: 8px;
        margin-bottom: 24px;
        padding-bottom: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .category-row::-webkit-scrollbar {
        height: 0;
    }
    
    .category-tag {
        padding: 8px 10px;
        font-size: 14px;
        gap: 6px;
        min-width: auto;
        scroll-snap-align: start;
    }
    
    .icon-container {
        width: 16px;
        height: 16px;
        margin-right: 4px;
    }
    
    .icon-container i,
    .icon-container .category-icon {
        font-size: 16px;
        line-height: 16px;
    }
    
    .icon-container svg {
        width: 16px;
        height: 16px;
    }
    
    .category-name {
        font-size: 16px; /* 恢复从13px到原来的16px */
        font-weight: 700;
        line-height: 100%;
        color: rgba(17, 24, 39, 1);
        white-space: nowrap;
    }
    
    .logo-image {
        height: 36px;
        margin-right: 0;
    }
    
    .tools-grid {
        grid-template-columns: 1fr; /* 1列布局 */
        gap: 16px;
        width: 100% !important; /* 从98%改为100%，完全占满屏幕 */
        margin: 0; /* 移除外边距 */
    }
    
    .tool-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        /* 移除所有padding */
        border-radius: 0;
        box-shadow: none !important; /* 添加!important确保投影被移除 */
        border-bottom: 1px solid #f0f0f0;
        transition: none !important; /* 禁用所有过渡效果 */
        position: relative; /* 添加相对定位，作为按钮的定位参考 */
        overflow: visible !important; /* 确保内容不会被截断 */
    }
    
    .tool-card:hover {
        box-shadow: none !important; /* 确保悬停时也没有投影 */
        transform: none !important; /* 移除可能的变换效果 */
    }
    
    .tool-card__image {
        width: 100%;
        min-height: 160px;
        background-color: transparent; /* 移除移动端灰色背景，用户要求直接显示图片 */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        margin-bottom: 5px; /* 修改：将间距从10px调整为5px */
    }
    
    .tool-card__placeholder {
        border-radius: 8px; /* 添加圆角 */
    }
    
    .tool-card__content {
        padding: 0;
    }
    
    .tool-card__title {
        font-size: 16px;
        padding: 0;
        margin-bottom: 6px;
    }
    
    .tool-card__description {
        font-size: 14px; /* 从13px改为14px */
        padding: 0;
        margin-bottom: 10px; /* 从8px改为10px，保持与普通视图一致 */
        color: #111827;
        height: auto; /* 添加自适应高度 */
        overflow: visible; /* 改为可见溢出 */
        display: block; /* 使用块级显示 */
        line-height: 1.5; /* 增加行高 */
    }
    
    /* 移动端首页工具卡片描述 - 减小与标签的间距 */
    .main-content .tools-grid:not(#recommended-tools-container):not(#featured-tools-container) .tool-card__description {
        margin-bottom: 5px !important; /* 首页工具卡片使用较小的5px间距 */
        height: auto !important; /* 确保自适应高度 */
        overflow: visible !important; /* 确保可见溢出 */
    }
    
    .tool-card__tags {
        padding: 0;
        gap: 8px;
        margin-bottom: 0;
        max-width: 70%; /* 限制标签区域宽度 */
        overflow-x: auto; /* 允许水平滚动 */
        flex-wrap: nowrap; /* 禁止换行 */
        scrollbar-width: none; /* 隐藏滚动条 */
        -ms-overflow-style: none; /* IE和Edge隐藏滚动条 */
    }
    
    .tool-card__tags::-webkit-scrollbar {
        display: none; /* Chrome、Safari和Opera隐藏滚动条 */
    }
    
    .tool-tag {
        font-size: 13px; /* 从14px改为13px */
        padding: 4px 10px; /* 调整内边距 */
        border-radius: 6px;
        white-space: nowrap;
        /* 移除高度设置，由tag-height-fix.css提供 */
        display: flex;
        align-items: center;
        font-weight: 500; /* 加粗字体，与访问按钮保持一致 */
        color: #111827; /* 文字颜色与访问按钮保持一致 */
    }
    
    .tool-card__footer {
        padding: 10px 0 0;
        flex-direction: row; /* 改为横向排列 */
        align-items: center; /* 居中对齐 */
        justify-content: space-between; /* 两端对齐 */
        gap: 8px; /* 减小间距 */
    }
    
    .tool-views-count {
        top: 6px;
        left: 6px;
        padding: 3px 6px;
        font-size: 11px;
        border-radius: 10px;
    }
    
    .view-icon {
        width: 12px;
        height: 12px;
    }
    
    .tool-card__like {
        display: none; /* 移除点赞按钮 */
    }
    
    .tool-card__visit {
        font-size: 14px;
        height: 28px;
        width: auto;
        padding: 4px 10px; /* 与标签保持一致的内边距 */
    }
    
    .tool-card__actions {
        gap: 8px;
        justify-content: flex-end; /* 让访问按钮靠右对齐 */
        width: auto; /* 自适应宽度 */
        position: absolute; /* 固定定位 */
        bottom: 15px; /* 距离底部15px */
        right: 16px; /* 距离右侧16px */
    }
    
    .tool-card__visit {
        font-size: 14px;
        height: 28px;
        width: auto;
        padding: 4px 10px; /* 与标签保持一致的内边距 */
        border-radius: 6px !important; /* 从4px改为6px，与其他访问按钮保持一致 */
    }
    
    .load-more-container {
        margin-top: 30px;
        margin-bottom: 30px;
        padding: 0 16px;
    }
    
    .load-more-btn {
        width: 108px; /* 从120px改为108px */
        height: 48px;
    }
    
    /* 调整搜索容器 */
    .search-container {
        width: 100%;
        padding: 0;
        margin: calc(var(--spacing-md) - 22px) auto;
    }
    
    .search-box {
        width: 100%;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: rgba(255, 254.75, 254.75, 1);
        border-radius: 28px;
        padding: 6px 6px 6px 24px;
        border: 1px solid rgba(17, 24, 39, 1);
        transition: border-color 0.3s ease;
    }
    
    .search-box:hover, 
    .search-box:focus-within {
        border-color: #AD54EA;
    }
    
    .search-input {
        flex: 1;
        height: 100%;
        border: none;
        outline: none;
        background: transparent;
        font-size: 16px; /* 保持字体大小不变 */
        color: rgba(17, 24, 39, 1);
        font-weight: 400;
    }
    
    .search-input::placeholder {
        color: rgba(17, 24, 39, 0.30);
    }
    
    .search-button {
        padding: 0;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-icon {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
}

/* ===== 主内容区样式 ===== */
.main-content {
    padding: 0; /* 从var(--spacing-xl) 0 改为 0，移除顶部内边距 */
    position: relative; /* 为背景定位提供参考 */
    margin-top: 100px; /* 从70px增加到100px，增加与导航栏的间距 */
}

/* 欢迎区域 */
.hero-section {
    text-align: center;
    padding: 0; /* 从10px 0 0 0改为0，移除顶部内边距 */
    margin-bottom: 0; /* 保持为0 */
    position: relative; /* 确保内容在背景之上 */
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 主标题和副标题容器 */
.hero-titles {
    width: 100%;
    max-width: 700px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 主标题样式 */
.main-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 50px;
    text-align: center;
    color: rgba(17, 24, 39, 1);
    margin: 0 0 12px 0;
    white-space: nowrap;
}

/* 欢迎信息样式 */
.welcome-message {
    font-size: 14px;
    line-height: 1.4;
    color: #111827;
    text-align: center;
    margin: 0 auto 16px auto;
    padding: 4px 10px;
    font-weight: 400;
    border: 1px solid #DFDFDF;
    border-radius: 16px;
    max-width: 300px;
    display: block;
    width: fit-content;
}

/* 副标题样式 */
.sub-title {
    font-size: 18px;
    line-height: 1.5;
    color: var(--light-text);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

/* 工具分类区域 */
.tools-section {
    padding: var(--spacing-md) 0 var(--spacing-lg) 0;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.tools-section h2,
.popular-tools h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.category-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 分类卡片悬停效果 */
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f5f5f5;
}

.category-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.category-card p {
    color: var(--light-text);
    margin-bottom: var(--spacing-md);
}

.category-card .tool-tags {
    margin-top: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

/* 筛选导航样式 */
.tools-filter {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    border-top: none; /* 确保没有顶部边框 */
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    margin-right: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
}

.filter-btn.active {
    background-color: rgba(165, 244, 103, 1);
    font-weight: 700;
}

.tools-count {
    display: inline-block;
    margin-left: auto;
    font-size: 14px;
    color: rgba(17, 24, 39, 0.6);
}

/* 无工具提示信息 */
.no-tools-message {
    width: 100%;
    padding: 60px 0;
    text-align: center;
    border-radius: 10px;
    background-color: #f9fafb;
    margin: 20px 0;
}

.no-tools-message p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 20px;
}

.reset-filter-btn {
    padding: 10px 20px;
    background-color: #5D5FEF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reset-filter-btn:hover {
    background-color: #4A4DE3;
}

/* 工具网格布局 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4列布局 */
    gap: 24px;
    width: 100%;
    margin-top: 24px;
}

/* 首页模块内容样式 */
.module-content {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 24px !important;
    width: 100% !important;
    overflow: hidden !important; /* 防止内容溢出 */
}

/* 首页模块样式响应式调整 */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr); /* 3列布局 */
        gap: 20px;
    }
    
    /* 确保首页分类模块在小屏幕上也是一行四个 */
    .module-content {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
        overflow-x: auto !important; /* 在平板上允许水平滚动 */
        padding-bottom: 10px !important; /* 留出滚动条空间 */
    }
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列布局 */
        gap: 16px;
    }
    
    /* 平板上保持4列布局 */
    .module-content {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 576px) {
    .tools-grid {
        grid-template-columns: 1fr; /* 1列布局 */
        gap: 16px;
        width: 100% !important; /* 从98%改为100%，完全占满屏幕 */
        margin: 0; /* 移除外边距 */
    }
    
    /* 手机上调整为2列布局 */
    .module-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* 卡片基本样式 */
.tool-card {
    width: 100%;
    height: auto; /* 改为自适应高度 */
    min-height: 294px; /* 设置最小高度 */
    background-color: #FFFFFF;
    border-radius: 8px; /* 从12px减小到8px */
    overflow: visible; /* 修改为visible，允许内容溢出 */
    position: relative;
    /* 移除卡片描边 */
    /* border: 1px solid #EEEEEE; */
    box-sizing: border-box;
    min-width: 0; /* 防止内容溢出 */
    /* 移除所有投影 */
    box-shadow: none !important; /* 确保PC端也无投影 */
    display: flex;
    flex-direction: column;
}

/* 卡片悬停效果 */
.tool-card:hover {
    /* 移除悬停时的边框 */
    /* border: 1px solid #E0E0E0; */
    /* 移除悬停时的投影 */
    box-shadow: none !important; /* 确保悬停时也无投影 */
    /* 移除悬停时的transform变换 */
    transform: none !important;
}

/* 恢复卡片悬停时的图片缩放效果 */
.tool-card:hover .tool-card__image img {
    transform: scale(1.15); /* 保持1.15倍缩放 */
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 访问量显示样式 */
.tool-views-count {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    flex-direction: row-reverse; /* 反转flex方向，使数字在左，图标在右 */
}

.view-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* 卡片图片区域 */
.tool-card__image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: transparent; /* 移除灰色背景，用户要求直接显示图片 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 5px; /* 修改：将间距从10px调整为5px */
}

.tool-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 10 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: transform 0.5s ease;
    /* 移除边框，改为应用在容器上 */
}

/* 分类筛选状态下的工具卡片图片描边 */
body:not(.pure-home) .tool-card__image img,
[data-category-filtered="true"] .tool-card__image img {
    border: 1px solid #EEF2F6;
    border-radius: 8px;
}

/* 移除loading状态占位符效果 - 用户要求直接显示图片 */
.tool-card__image.loading::before {
    display: none; /* 完全隐藏loading占位符 */
}

.tool-card__featured {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(165, 244, 103, 1);
    color: rgba(17, 24, 39, 1);
    font-size: 14px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 20px;
}

/* 卡片内容区域 */
.tool-card__content {
    padding: 0; /* 左右内边距为0px */
    position: relative;
    background-color: #FFFFFF;
    margin-top: 0; /* 移除负边距 */
    border-radius: 8px; /* 从12px减小到8px */
}

/* 卡片标题 */
.tool-card__title {
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    color: #111827;
    margin: 0 0 8px 0; /* 底部间距：8px */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* 卡片描述 */
.tool-card__description {
    font-size: 14px; /* 从13px改为14px */
    padding: 0;
    margin-bottom: 10px; /* 从8px改为10px，保持与普通视图一致 */
    color: #111827;
    height: auto; /* 添加自适应高度 */
    overflow: visible; /* 改为可见溢出 */
    display: block; /* 使用块级显示 */
    line-height: 1.5; /* 增加行高 */
}

/* 移动端首页工具卡片描述 - 减小与标签的间距 */
.main-content .tools-grid:not(#recommended-tools-container):not(#featured-tools-container) .tool-card__description {
    margin-bottom: 10px !important; /* 首页工具卡片使用较小的5px间距 */
    height: auto !important; /* 确保自适应高度 */
    overflow: hidden !important; /* 确保可见溢出 */
}

/* 卡片底部区域 */
.tool-card__footer {
    padding: 0 0 16px; /* 左右内边距改为0px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FFFFFF;
    position: relative;
}

.tool-card__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 60%;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* 标签样式 */
.tool-tag {
    font-size: 13px; /* 从14px改为13px */
    padding: 4px 10px; /* 调整内边距 */
    border-radius: 6px;
    white-space: nowrap;
    /* 移除高度设置，由tag-height-fix.css提供 */
    display: flex;
    align-items: center;
    font-weight: 500; /* 加粗字体，与访问按钮保持一致 */
    color: #111827; /* 文字颜色与访问按钮保持一致 */
}

/* 标签悬停效果 */
.tool-tag:hover {
    background-color: #111827;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* 分类标签样式 - 主要分类 */
.tool-tag.category {
    background-color: #EEF2F7; /* 从EBEBEB改为EEF2F7 */
    color: #111827; /* 恢复为黑色文字 */
    border: none; /* 移除描边 */
}

.tool-tag.category:hover {
    background-color: #111827; /* 悬停时背景色为黑色 */
    color: #FFFFFF; /* 悬停时文字为白色 */
    border-color: #111827; /* 悬停时边框为黑色 */
}

/* 标签样式 - 普通标签 */
.tool-tag.tag {
    background-color: #EEF2F7; /* 从EBEBEB改为EEF2F7 */
    color: #111827; /* 恢复为黑色文字 */
    border: none; /* 移除描边 */
}

.tool-tag.tag:hover {
    background-color: #111827; /* 悬停时背景色为黑色 */
    color: #FFFFFF; /* 悬停时文字为白色 */
    border-color: #111827; /* 悬停时边框为黑色 */
}

/* 默认标签样式 */
.tool-tag.default {
    background-color: #F6F8FA;
    color: #626772;
    border: none; /* 移除描边 */
}

.tool-tag.default:hover {
    background-color: #626772;
    color: #FFFFFF;
    border-color: #626772;
}

/* 操作区域 */
.tool-card__actions {
    display: flex;
    gap: 8px;
}

/* 收藏按钮 */
.tool-card__like {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    padding: 6px 8px;
    /* 移除高度设置，由tag-height-fix.css提供 */
    background-color: transparent;
    border-radius: 6px; /* 统一修改为6px */
    border: 1px solid #C9C9C9;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #111827;
    transition: all 0.2s ease;
}

/* 点赞按钮悬停效果和选中效果 */
.tool-card__like:hover,
.tool-card__like.active {
    background-color: rgba(165, 244, 103, 1);
    border-color: rgba(165, 244, 103, 1);
    color: #111827;
}

/* 点赞按钮悬停和选中时图标颜色也改变 */
.tool-card__like:hover .like-icon,
.tool-card__like.active .like-icon {
    color: #111827;
}

.like-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    color: #333;
    transition: color 0.3s ease;
}

/* 访问按钮 */
.tool-card__visit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto; /* 取消固定宽度 */
    padding: 6px 8px; /* 上下6px，左右8px */
    /* 移除高度设置，由tag-height-fix.css提供 */
    /* 移除背景色，添加描边 */
    background-color: transparent;
    border-radius: 6px; /* 统一修改为6px */
    border: 1px solid #C9C9C9;
    font-size: 13px;
    font-weight: 500; /* 添加加粗效果 */
    text-decoration: none;
    color: #111827;
    transition: all 0.2s ease;
}

/* 访问按钮悬停效果 */
.tool-card__visit:hover {
    background-color: rgba(165, 244, 103, 1);
    border-color: rgba(165, 244, 103, 1);
    color: #111827; /* 悬停时文字颜色改为111827 */
}

/* 访问按钮悬停时图标颜色也改变 */
.tool-card__visit:hover .arrow-icon {
    color: #111827;
    stroke: currentColor;
}

.arrow-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    color: #333;
    transition: color 0.3s ease, stroke 0.3s ease;
}

/* ===== 页脚样式 ===== */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo h2 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.footer-logo p {
    color: #adb5bd;
}

.footer-links h3,
.footer-contact h3 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.footer-links ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: #adb5bd;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
}

.social-icon {
    color: #adb5bd;
    margin-right: var(--spacing-md);
}

.social-icon:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
}

/* ===== 搜索框样式 ===== */
.search-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: calc(var(--spacing-md) - 22px) 0; /* 再减少上下边距10px，总共减少22px */
}

.search-box {
    width: 550px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 254.75, 254.75, 1);
    border-radius: 28px;
    padding: 6px 6px 6px 24px;
    border: 1px solid rgba(17, 24, 39, 1);
    transition: border-color 0.3s ease;
}

.search-box:hover, 
.search-box:focus-within {
    border-color: #AD54EA;
}

.search-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px; /* 保持字体大小不变 */
    color: rgba(17, 24, 39, 1);
    font-weight: 400;
}

.search-input::placeholder {
    color: rgba(17, 24, 39, 0.30);
}

.search-button {
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ===== 分类标签样式 ===== */
.categories-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0 0 0; /* 从24px增加到30px */
    gap: calc(var(--spacing-xs) / 2); /* 行间距 */
    overflow: visible; /* 修改为visible，允许内容溢出 */
    padding-top: 2px; /* 添加上内边距，为悬停效果预留空间 */
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px; /* 标签间距从8px缩小到6px */
    max-width: 1440px; /* 增加最大宽度，确保第二行能容纳所有标签 */
}

.category-tag {
    height: 40px; /* 从44px减小到40px，适应更小的上下内边距 */
    background-color: rgba(255, 255, 255, 0); /* 白色透明背景 */
    border-radius: 8px; /* 从12px减小到8px */
    padding: 4px 10px 4px 8px; /* 上下内边距从6px减少到4px */
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    border: 1px solid transparent; /* 默认透明边框 */
}

/* 分类标签悬停效果 */
.category-tag:hover {
    background-color: rgba(188, 198, 206, 0.18); /* 填充效果：#BCC6CE，透明度从20%改为18% */
    color: #111827;
    border: 1px solid transparent; /* 移除边框 */
    box-shadow: none;
    transition: all 0.2s ease;
}

/* 分类标签激活状态 */
.category-tag.active {
    background-color: rgba(188, 198, 206, 0.3); /* 增强背景色深度，使其比hover状态更明显 */
    color: #111827;
    border: 1px solid rgba(188, 198, 206, 0.4); /* 添加轻微边框增强视觉效果 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* 添加轻微阴影增强立体感 */
    font-weight: 700; /* 增加字体粗细 */
}

/* 激活标签中的分类名称加粗显示 */
.category-tag.active .category-name {
    font-weight: 700;
}

.icon-container {
    width: 28px; /* 图标容器宽度从32px减小到28px */
    height: 28px; /* 图标容器高度从32px减小到28px */
    border-radius: 6px; /* 从8px减小到6px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px; /* 从8px(var(--spacing-xs))减小到6px */
    flex-shrink: 0; /* 防止图标容器被压缩 */
}

.icon-container i,
.icon-container svg {
    font-size: 16px; /* 图标字体大小从18px减小到16px */
    color: white;
}

.icon-container svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.category-name {
    font-size: 16px; /* 恢复从13px到原来的16px */
    font-weight: 700;
    line-height: 100%;
    color: rgba(17, 24, 39, 1);
    white-space: nowrap;
}

/* 响应式调整 */
@media (min-width: 1201px) {
    .category-row {
        gap: 6px; /* 标签间距从8px缩小到6px */
    }
}

@media (max-width: 1200px) {
    .category-row {
        max-width: 100%;
        gap: 6px; /* 标签间距从8px缩小到6px */
    }
}

/* 防止页面水平滚动 */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* 加载更多按钮样式 */
.load-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px; /* 从120px改为108px */
    height: 48px;
    padding: 10px 14px;
    background-color: rgba(92, 250, 219, 1);
    border-radius: 8px; /* 从12px减小到8px */
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
    color: rgba(11, 17, 31, 1);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap; /* 添加不换行属性 */
    overflow: hidden; /* 防止内容溢出 */
    text-overflow: ellipsis; /* 溢出时显示省略号 */
}

.load-more-btn:hover {
    background-color: rgba(72, 230, 199, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}



/* 工具数量显示 */
.tools-count-display {
    margin-left: 10px;
    color: #8F52DA;
    font-weight: 500;
    display: inline-block;
    font-size: 18px;
}

/* 搜索加载状态样式 */
.loading-state {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
    width: 100%;
    grid-column: 1 / -1;
    background-color: #f5f5f5;
    border-radius: 12px;
    margin: 30px 0;
}

/* 搜索无结果样式 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 无数据消息样式 */
.no-data-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.no-data-message h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.no-data-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.no-data-message .retry-btn,
.no-data-message .reset-filter-btn {
    background-color: rgba(92, 250, 219, 1);
    color: #111827;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.no-data-message .retry-btn:hover,
.no-data-message .reset-filter-btn:hover {
    background-color: rgba(80, 220, 190, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 简洁版无结果样式 */
.no-results-simple {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 20px; /* 从44px减少到24px, 整体上移20px */
    margin: 60px auto;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.no-results-simple h2 {
    font-size: 22px;
    font-weight: 600;
    color: #101010;
    margin-bottom: 14px; /* 从16px减小到14px，描述文字上移2px */
}

.no-results-simple p {
    font-size: 16px;
    color: #606060;
    line-height: 1.5;
}

.no-results-simple .no-results-icon {
    font-size: 60px;
    color: #8F52DA;
    margin-bottom: 20px;
}

.no-results p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.reset-search {
    background-color: rgba(92, 250, 219, 1);
    color: #111827;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-search:hover {
    background-color: rgba(80, 220, 190, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 登录弹窗样式 */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.login-modal.active {
  opacity: 1;
  visibility: visible;
}

.login-modal-container {
  width: 360px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.login-modal-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}

.login-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
}

.login-modal-body {
  padding: 30px 20px;
  text-align: center;
}

.login-instruction {
  margin-bottom: 20px;
}

.login-instruction p {
  font-size: 15px;
  color: #4b5563;
}

.qrcode-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  background-color: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e5e7eb;
}

.qrcode-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
}

.qrcode-loading i {
  font-size: 32px;
  color: #AD54EA;
  margin-bottom: 10px;
}

.qrcode-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-wrapper img {
  max-width: 90%;
  max-height: 90%;
}

.qrcode-expired {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
}

.refresh-qrcode-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #AD54EA;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.refresh-qrcode-btn:hover {
  background-color: #8B44BC;
}

.login-modal-footer {
  padding: 15px 20px;
  background-color: #f9fafb;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

.login-tips {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* 错误信息和重试按钮样式 */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #e74c3c;
}

.retry-btn {
    background-color: rgba(92, 250, 219, 1);
    color: #111827;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background-color: rgba(72, 230, 199, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* API错误提示样式 */
.api-error-message {
    background-color: #fff5f5;
    border: 1px solid #ffecec;
    border-left: 4px solid #e74c3c;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
}

.api-error-message h3 {
    color: #e74c3c;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.api-error-message ol {
    margin-left: 20px;
    padding-left: 0;
}

.api-error-message li {
    margin-bottom: 5px;
}

/* 响应式调整 - 移动端工具卡片样式 */
@media (max-width: 576px) {
    /* 手机端主内容区域左右间距 */
    body .main-content,
    body[data-view="all"] .main-content,
    body[data-category-active="true"] .main-content,
    body:not(.pure-home) .main-content {
        padding-left: 12px !important; /* 手机端首页左右间距，与详情页保持一致 */
        padding-right: 12px !important; /* 手机端首页左右间距，与详情页保持一致 */
        max-width: 100% !important; /* 确保容器不会超出屏幕 */
        box-sizing: border-box !important; /* 确保padding包含在宽度内 */
    }
    
    .tool-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        /* 移除所有padding */
        border-radius: 0;
        box-shadow: none !important; /* 添加!important确保投影被移除 */
        border-bottom: 1px solid #f0f0f0;
        transition: none !important; /* 禁用所有过渡效果 */
        position: relative; /* 添加相对定位，作为按钮的定位参考 */
        overflow: visible !important; /* 确保内容不会被截断 */
    }
    
    .tool-card:hover {
        box-shadow: none !important; /* 确保悬停时也没有投影 */
        transform: none !important; /* 移除可能的变换效果 */
    }
    
    .tool-card__image {
        width: 100%;
        min-height: 160px;
        background-color: transparent; /* 移除移动端灰色背景，用户要求直接显示图片 */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        margin-bottom: 5px; /* 修改：将间距从10px调整为5px */
    }
    
    .tool-card__placeholder {
        border-radius: 8px; /* 添加圆角 */
    }
    
    .tool-card__content {
        padding: 0;
    }
    
    .tool-card__title {
        font-size: 16px;
        padding: 0;
        margin-bottom: 6px;
    }
    
    .tool-card__description {
        font-size: 14px; /* 从13px改为14px */
        padding: 0;
        margin-bottom: 10px; /* 从8px改为10px，保持与普通视图一致 */
        color: #111827;
        height: auto; /* 添加自适应高度 */
        overflow: visible; /* 改为可见溢出 */
        display: block; /* 使用块级显示 */
        line-height: 1.5; /* 增加行高 */
    }
    
    /* 移动端首页工具卡片描述 - 减小与标签的间距 */
    .main-content .tools-grid:not(#recommended-tools-container):not(#featured-tools-container) .tool-card__description {
        margin-bottom: 5px !important; /* 首页工具卡片使用较小的5px间距 */
        height: auto !important; /* 确保自适应高度 */
        overflow: visible !important; /* 确保可见溢出 */
    }
    
    .tool-card__tags {
        padding: 0;
        gap: 8px;
        margin-bottom: 0;
        max-width: 70%; /* 限制标签区域宽度 */
        overflow-x: auto; /* 允许水平滚动 */
        flex-wrap: nowrap; /* 禁止换行 */
        scrollbar-width: none; /* 隐藏滚动条 */
        -ms-overflow-style: none; /* IE和Edge隐藏滚动条 */
    }
    
    .tool-card__tags::-webkit-scrollbar {
        display: none; /* Chrome、Safari和Opera隐藏滚动条 */
    }
    
    .tool-tag {
        font-size: 13px; /* 从14px改为13px */
        padding: 4px 10px; /* 调整内边距 */
        border-radius: 6px;
        white-space: nowrap;
        /* 移除高度设置，由tag-height-fix.css提供 */
        display: flex;
        align-items: center;
        font-weight: 500; /* 加粗字体，与访问按钮保持一致 */
        color: #111827; /* 文字颜色与访问按钮保持一致 */
    }
    
    .tool-card__footer {
        padding: 10px 0 0;
        flex-direction: row; /* 改为横向排列 */
        align-items: center; /* 居中对齐 */
        justify-content: space-between; /* 两端对齐 */
        gap: 8px; /* 减小间距 */
    }
    
    .tool-views-count {
        top: 6px;
        left: 6px;
        padding: 3px 6px;
        font-size: 11px;
        border-radius: 10px;
    }
    
    .view-icon {
        width: 12px;
        height: 12px;
    }
    
    .tool-card__like {
        display: none; /* 移除点赞按钮 */
    }
    
    .tool-card__visit {
        font-size: 14px;
        height: 28px;
        width: auto;
        padding: 4px 10px; /* 与标签保持一致的内边距 */
    }
    
    .tool-card__actions {
        gap: 8px;
        justify-content: flex-end; /* 让访问按钮靠右对齐 */
        width: auto; /* 自适应宽度 */
        position: absolute; /* 固定定位 */
        bottom: 15px; /* 距离底部15px */
        right: 16px; /* 距离右侧16px */
    }
    
    .tool-card__visit {
        font-size: 14px;
        height: 28px;
        width: auto;
        padding: 4px 10px; /* 与标签保持一致的内边距 */
        border-radius: 6px !important; /* 从4px改为6px，与其他访问按钮保持一致 */
    }
    
    .load-more-container {
        margin-top: 30px;
        margin-bottom: 30px;
        padding: 0 16px;
    }
    
    .load-more-btn {
        width: 108px; /* 从120px改为108px */
        height: 48px;
    }
    
    /* 调整搜索容器 */
    .search-container {
        width: 100%;
        padding: 0;
        margin: calc(var(--spacing-md) - 22px) auto;
    }
    
    /* 底部导航优化 */
    .footer {
        background-color: var(--footer-bg) !important; /* 确保手机端页脚有背景色 */
        color: var(--footer-text) !important; /* 确保手机端页脚文字颜色正确 */
        padding-top: 40px;
        padding-bottom: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links h3, 
    .footer-contact h3,
    .footer-logo h2 {
        margin-bottom: 12px;
        font-size: 18px;
    }
    
    .footer-links ul li {
        margin-bottom: 8px;
    }
    
    .footer-bottom {
        font-size: 12px;
        padding: 0 12px;
        text-align: center; /* 确保PC端底部栏居中 */
    }
    
    /* 移动设备样式优化 - 手机端访问按钮位置修复 */
    .tool-card {
        position: relative;
        padding-bottom: 15px !important; /* 减小底部内边距 */
    }
    
    /* 访问按钮样式 */
    .tool-card__actions {
        position: static !important; /* 移除绝对定位 */
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    
    /* 访问按钮本身样式 */
    .tool-card__visit {
        background-color: transparent !important;
        color: #111827 !important;
        border: 1px solid #C9C9C9 !important;
        padding: 4px 8px !important;
        width: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        white-space: nowrap !important;
        overflow: visible !important;
        height: 32px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        font-size: 14px !important;
        border-radius: 4px !important;
    }
    
    /* 访问按钮内部图标样式 */
    .tool-card__visit .arrow-icon {
        width: 14px !important;
        height: 14px !important;
        stroke-width: 2 !important;
    }
    
    /* 工具标签区域限制宽度，避免与按钮重叠 */
    .tool-card__tags {
        max-width: 65% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 确保移动端也能正常工作的图片缩放效果 */
    .tool-card:hover .tool-card__image img {
        transform: scale(1.15);
    }
    
    /* 移动端分类筛选状态下的工具卡片图片描边 */
    body:not(.pure-home) .tool-card__image img,
    [data-category-filtered="true"] .tool-card__image img {
        border: 1px solid #EEF2F6;
        border-radius: 8px;
    }
} 

/* 工具标签和访问按钮容器 */
.tool-card__footer {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    /* padding: 10px 16px 0 !important; */
    width: 100% !important;
}

/* 工具标签区域限制宽度，避免与按钮重叠 */
.tool-card__tags {
    max-width: 65% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 访问按钮容器 */
.tool-card__actions {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

/* 手机端卡片描述样式调整 */
@media (max-width: 768px) {
    .tool-card__description {
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 限制为两行 */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}