:root {
    --primary-color: #2196F3;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --text-color: #333333;
    --sidebar-width: 200px;
    --logo-color: #1565C0;
    --subtitle-color: #1565C0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

.container {
    display: flex;
    min-height: 100vh;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-background);
    padding: 0 0 2rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* 添加顶部渐变装饰 */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(33, 150, 243, 0.08) 0%, transparent 100%);
    pointer-events: none;
}

/* 修改侧边栏导航样式 */
.sidebar nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.sidebar ul {
    list-style: none;
    width: 100%;
    padding: 0;  /* 移除默认内边距 */
}

.sidebar li {
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;  /* 文本居中 */
    width: 100%;  /* 确保宽度占满 */
}

/* 修改悬停指示器的位置 */
.sidebar li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    transition: transform 0.3s ease;
}

.sidebar li:hover::before,
.sidebar li.active::before {
    transform: translateY(-50%) scaleX(1);
}

.sidebar li:hover, .sidebar li.active {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--primary-color);
}

/* 主要内容区样式 */
.main-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: auto !important;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    overflow: hidden;
}

/* 搜索区域样式 */
.search-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;  /* 从3rem减小到2rem */
    text-align: center;
    padding: 1.5rem 2rem;  /* 从3rem减小到1.5rem */
    background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.2);
    backdrop-filter: blur(10px);
    pointer-events: auto !important;
    position: relative;
    z-index: 2;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#searchInput {
    width: 100%;
    max-width: 600px;
    padding: 0.8rem 1.2rem;  /* 从1.2rem 1.5rem减小到0.8rem 1.2rem */
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.15);
    font-size: 1rem;  /* 从1.1rem减小到1rem */
    transition: all 0.3s ease;
    color: #2C3E50;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#searchInput::placeholder {
    color: #95A5A6;
}

#searchInput:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.15);
}

/* 修改智能体卡片网格样式 */
.agents-grid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 1rem; /* 增加上下内边距 */
    position: relative;
    z-index: 1;
    margin-bottom: 120px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* 修改滚动条样式，确保美观 */
.agents-grid::-webkit-scrollbar {
    width: 6px;
}

.agents-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.agents-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.agents-grid::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 修改智能体卡片样式 */
.agent-card {
    background-color: var(--card-background);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: auto !important;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.6s ease backwards;
    overflow: visible;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    height: 200px; /* 调整卡片高度为200px */
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片依次延迟出现 */
.agent-card:nth-child(1) { animation-delay: 0.1s; }
.agent-card:nth-child(2) { animation-delay: 0.2s; }
.agent-card:nth-child(3) { animation-delay: 0.3s; }
.agent-card:nth-child(4) { animation-delay: 0.4s; }

/* 添加顶部装饰条 */
.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2196F3, #42A5F5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-card:hover::before {
    opacity: 1;
}

/* 头部容器：包含图片和标题 */
.agent-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;  /* 从0.6rem减小到0.5rem */
    padding-bottom: 0.5rem; /* 从0.6rem减小到0.5rem */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    flex-shrink: 0;
}

.agent-card img {
    width: 80px;     /* 从85px减小到80px */
    height: 80px;    /* 从85px减小到80px */
    object-fit: contain;
    border-radius: 12px;
    padding: 8px;
    background-color: rgba(33, 150, 243, 0.1);
    margin-right: 1rem;
    flex-shrink: 0;
}

.agent-card .title-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.agent-card h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
}

.agent-card p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    padding: 0 0.6rem;
    text-align: left;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;  /* 从5行减少到4行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* 悬停效果 */
.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(33, 150, 243, 0.2);
}

.agent-card:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-container {
        padding: 2rem 1rem;
        margin: 1rem;
    }

    #searchInput {
        font-size: 1rem;
        padding: 1rem;
    }

    .agents-grid {
        padding: 1rem;
        margin-bottom: 150px;
    }
}

/* 修改聊天界面容器样式 */
#chatWindow {
    display: none;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: transparent;  /* 改回透明背景 */
    pointer-events: none;
    outline: none;
    user-select: none;
    height: 100vh;
    height: -webkit-fill-available;
    height: fill-available;
}

#chatWindow.active {
    display: block;
    pointer-events: auto;
}

/* 确保聊天窗口内的内容也是全屏的并且可交互 */
#chatWindow > div {
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto !important;
}

/* 确保 iframe 和其内容可以点击 */
#chatWindow iframe {
    z-index: 2001 !important;
    pointer-events: auto !important;
}

/* 确保 iframe 内的所有元素都可以点击 */
#chatWindow iframe * {
    pointer-events: auto !important;
}

/* 添加图片预览相关样式 */
.semi-image-preview,
.semi-image-preview-image,
.semi-image-preview-header,
.semi-image-preview-footer,
.semi-image-preview-footer-wrapper,
.semi-image-preview-footer-content,
.semi-image-preview-hide {
    z-index: 9999 !important;
    pointer-events: auto !important;
}

/* 确保图片预览显示在最上层 */
.semi-portal,
.semi-image-preview {
    z-index: 9999 !important;
}

/* 添加全局样式，确保图片预览在最上层 */
body .semi-portal,
body .semi-image-preview,
body .semi-image-preview-image {
    z-index: 9999 !important;
}

/* 移除不需要的容器样式 */
.chat-container {
    display: none;
}

/* 修改返回按钮基础样式 */
.back-button {
    position: fixed;
    top: 15px;
    right: 15px;  /* 改为右对齐 */
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2001;  /* 确保返回按钮在聊天窗口之上 */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* 修改返回按钮的X图标样式 */
.back-button::before,
.back-button::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.back-button::before {
    transform: rotate(45deg);
}

.back-button::after {
    transform: rotate(-45deg);
}

.back-button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: rotate(90deg);
}

/* 移动端返回按钮适配 */
@media screen and (max-width: 768px) {
    .back-button {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 2001;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    #chatWindow {
        left: 0;  /* 移动端时占满全屏 */
    }
}

/* App加载动画样式 */
.app-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    z-index: 10;
    transition: opacity 0s;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid rgba(33, 150, 243, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-content p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
}

/* 添加logo容器样式 */
.logo-container {
    padding: 1.5rem 1.2rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    background: linear-gradient(180deg, rgba(33, 150, 243, 0.08) 0%, transparent 100%);
}

.logo-container h1 {
    color: var(--logo-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.logo-container p {
    color: var(--subtitle-color);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    /* 侧边栏适配 */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 80%;
        max-width: 300px;
    }

    .sidebar.active {
        left: 0;
    }

    /* 主内容区适配 */
    .container {
        padding-left: 0;
    }

    .main-content {
        padding: 4rem 1rem 1rem 1rem;
        width: 100%;
    }

    /* 搜索框适配 */
    .search-container {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    #searchInput {
        padding: 1rem;
        font-size: 1rem;
        width: 90%;
    }

    /* 卡片网格适配 */
    .agents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
        margin-bottom: 150px;
        height: auto;
        overflow-y: auto;
    }

    .agent-card {
        margin: 0.5rem 0;
    }

    /* Logo容器适配 */
    .logo-container {
        padding: 1.2rem 1rem;
    }

    .logo-container h1 {
        font-size: 1.2rem;
    }

    .logo-container p {
        font-size: 0.9rem;
    }

    /* 遮罩层 */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .overlay.active {
        display: block;
        opacity: 1;
    }

    /* 菜单按钮 */
    .menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
        background: var(--card-background);
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        cursor: pointer;
        padding: 8px;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--logo-color);
        margin: 6px 0;
        transition: 0.3s;
    }

    /* 菜单按钮动画 */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* 底部适配 */
    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    /* 确保内容不被底部遮挡 */
    body {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* 移动端导航项目 */
    .sidebar li {
        text-align: center;
        padding: 1rem;
    }

    .mobile-logout {
        text-align: center;
        width: 100%;
    }
}

/* 修改网站标题区域样式 */
.site-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 20px;
    color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.site-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    padding-right: 1rem;
    border-right: 2px solid rgba(33, 150, 243, 0.2);
    color: var(--logo-color);
}

.site-header p {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
    color: #1565C0;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .site-header {
        margin: 1rem;
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .site-header h1 {
        font-size: 1.5rem;
        padding-right: 0;
        border-right: none;
        border-bottom: 2px solid rgba(33, 150, 243, 0.2);
        padding-bottom: 0.5rem;
    }

    .site-header p {
        font-size: 1rem;
    }

    .search-container {
        margin: 1rem;
        padding: 2rem 1rem;
    }
}

/* 修改 footer 样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    color: #666;
    z-index: 100;  /* 恢复到较低的z-index */
    backdrop-filter: blur(5px);
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* 聊天窗口激活时的 footer 样式 */
/* body.chat-active .footer {
    opacity: 0;
    pointer-events: none;
} */

.footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 8px 12px;  /* 增加可点击区域 */
    border-radius: 4px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.footer a:hover {
    color: var(--primary-color);
    background: rgba(33, 150, 243, 0.1);  /* 添加悬停背景 */
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .footer {
        padding: 12px 0;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.1);
    }
    
    .footer a {
        display: inline-block;
        padding: 8px 15px;
    }
    
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .footer {
            padding-bottom: calc(12px + env(safe-area-inset-bottom));
        }
    }
}

/* 微信网页适配 */
body {
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* 适配微信顶部状态栏 */
@supports (padding-top: constant(safe-area-inset-top)) {
    body {
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top);
    }
}

/* 适配微信底部导航栏 */
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(12px + constant(safe-area-inset-bottom));
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* 禁用微信字体缩放 */
* {
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 微信网页中的滚动优化 */
.main-content {
    -webkit-overflow-scrolling: touch;
}

/* 适配微信的点击高亮 */
.agent-card,
.sidebar li,
.footer a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 微信中的输入框优 */
#searchInput {
    -webkit-appearance: none;
    appearance: none;
}

/* 微信中的聊天窗口适配 */
#chatWindow {
    height: 100vh;
    height: -webkit-fill-available;
    height: fill-available;
}

/* 修改退出按钮样式 */
.logout-button {
    position: fixed;
    bottom: 80px;
    left: 20px;  /* 与侧边栏内边距对齐 */
    width: calc(var(--sidebar-width) - 40px);  /* 宽度等于侧边栏宽度减去两边的内边距 */
    padding: 8px 16px;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;  /* 确保文字居中 */
}

.logout-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .logout-button {
        display: none;  /* 隐藏固定退出按钮 */
    }

    .mobile-logout {
        display: block !important;
        margin-top: auto !important;  /* 将退出选项推到菜单底部 */
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        color: #dc3545 !important;  /* 使用红色突出显示 */
    }

    /* 默认隐藏移动端退出选项 */
    .mobile-logout {
        display: none;
    }
}

/* 确保PC端不显示移动端退出选项 */
@media screen and (min-width: 769px) {
    .mobile-logout {
        display: none !important;
    }
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-links img {
    height: 16px;
    width: auto;
    margin-right: 4px;
    vertical-align: middle;
}

.footer-links a {
    display: flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.footer-divider {
    color: #666;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-divider {
        display: none;
    }
}

/* 在移动端为主内容区添加底部内边距，为 footer 留出空间 */
@media screen and (max-width: 768px) {
    .main-content {
        padding-bottom: 150px; /* 从120px增加到150px */
    }

    /* 移动端 footer 样式调整 */
    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    /* 移动端 footer 链接样式调整 */
    .footer-links {
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-links a {
        margin: 2px 5px;
    }

    .footer-divider {
        margin: 0 5px;
    }
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .sidebar li {
        text-align: center;  /* 确保移动端也居中 */
        padding: 1rem;
    }
    
    /* 移动端退出选项也居中 */
    .mobile-logout {
        text-align: center;
        width: 100%;
    }
}

/* 在 .auth-toggle 样式后添加 */
.auth-toggle span {
    color: #666;
}

/* 修改密码表单特定样式 */
#changePasswordForm {
    margin-top: 1rem;
}

#changePasswordForm input {
    margin-bottom: 1rem;
}

/* 成功消息样式 */
.message.success-message {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .main-content {
        padding: 1rem 1rem 0 1rem; /* 减少顶部内边距 */
        height: auto; /* 移除固定高度限制 */
        min-height: 100vh; /* 确保最小高度占满屏幕 */
        overflow: visible; /* 允许内容自然流动 */
    }

    .agents-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        margin-bottom: 150px;
        overflow-y: visible; /* 移除滚动限制 */
        height: auto; /* 允许自然高度 */
    }

    /* 调整搜索容器在移动端的样式 */
    .search-container {
        margin: 1rem 0 2rem 0;
        padding: 1.5rem 1rem;
    }

    /* 确保底部有足够的空间 */
    body {
        min-height: 100vh;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}
