/* 在原有 mobile.css 末尾添加以下修复样式 */

/* 修复重复显示"没有更多了"问题 */
.no-more-message {
    position: relative;
    z-index: 10;
}

/* 确保只有一个"没有更多了"提示显示 */
.job-list .no-more-message:not(:last-child) {
    display: none !important;
}

.hot-job-list + .hot-no-more-message:not(:first-child) {
    display: none !important;
}

/* 防止加载提示重复 */
.loading-more.loading + .loading-more.loading {
    display: none !important;
}

.loading-more.no-more + .loading-more.no-more {
    display: none !important;
}

/* 热门职位特殊处理 */
.hot-no-more-message {
    margin-top: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
}

/* 加载按钮防重复点击状态 */
.load-more-hot.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

/* 主加载区域防重复容器 */
.job-list {
    position: relative;
}

/* 防止滚动时重复触发 */
.scroll-lock {
    overflow: hidden !important;
}

/* 修复动画效果，避免重复元素闪烁 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* 确保加载提示有足够间距 */
.job-list > .loading-more {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 热门职位列表间距 */
.hot-job-list > .job-card:last-child {
    margin-bottom: 15px;
}

/* 移除重复元素的通用规则 */
[id^="currentLoading"] + [id^="currentLoading"],
[class*="no-more"] + [class*="no-more"] {
    display: none !important;
}

/* 滚动防抖视觉提示 */
.scroll-indicator {
    position: fixed;
    bottom: 70px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(24, 144, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.scroll-indicator.visible {
    opacity: 1;
}

/* 修复移动端滚动性能 */
.mobile-device .job-list {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* 确保内容区域正确显示 */
.main-content {
    min-height: calc(100vh - 120px);
}

/* 修复底部导航遮挡问题 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

/* 修复热门职位区域滚动 */
.hot-job-section {
    overflow: hidden;
}

.hot-job-list {
    max-height: none;
    overflow: visible;
}

/* 加载状态样式 */
#currentLoading {
    position: relative;
    background: linear-gradient(90deg, #f0f7ff 0%, #e6f7ff 100%);
    border: 1px solid #91d5ff;
    color: #1890ff;
    font-weight: 500;
}

#currentLoading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #1890ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
}

/* 没有更多时的样式 */
.no-more-message {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    color: #6c757d;
    font-size: 14px;
}

.no-more-message::before {
    content: '✓ ';
    color: #52c41a;
    margin-right: 5px;
}

/* 错误状态样式 */
.no-more-message.error {
    background: #fff2f0;
    border: 1px dashed #ffccc7;
    color: #ff4d4f;
}

.no-more-message.error::before {
    content: '✗ ';
    color: #ff4d4f;
}

/* 加载动画 */
@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spin {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #1890ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
/* 在原有 mobile.css 末尾添加以下修复样式 */

/* 修复重复显示"没有更多了"问题 - 核心修复 */
.no-more-message {
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.5s ease-out;
    margin-top: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 14px;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
}

/* 确保只有一个"没有更多了"提示显示 */
.job-list .no-more-message:not(:last-child) {
    display: none !important;
}

.job-list .loading-more.loading:not(:last-child) {
    display: none !important;
}

/* 防止加载提示重复 */
#loading_ + #loading_,
[id^="loading_"] + [id^="loading_"] {
    display: none !important;
}

/* 热门职位特殊处理 */
.hot-no-more-message {
    margin-top: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

/* 加载按钮防重复点击状态 */
.load-more-hot.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

/* 主加载区域防重复容器 */
.job-list {
    position: relative;
    min-height: 100px;
}

/* 防止滚动时重复触发 */
.scroll-lock {
    overflow: hidden !important;
}

/* 修复动画效果，避免重复元素闪烁 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* 确保加载提示有足够间距 */
.job-list > .loading-more {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 热门职位列表间距 */
.hot-job-list > .job-card:last-child {
    margin-bottom: 15px;
}

/* 移除重复元素的通用规则 */
[class*="no-more"] + [class*="no-more"],
[class*="loading"] + [class*="loading"] {
    display: none !important;
}

/* 滚动防抖视觉提示 */
.scroll-indicator {
    position: fixed;
    bottom: 70px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(24, 144, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-indicator.visible {
    opacity: 1;
}

/* 修复移动端滚动性能 */
.mobile-device .job-list {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* 确保内容区域正确显示 */
.main-content {
    min-height: calc(100vh - 120px);
}

/* 修复底部导航遮挡问题 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

/* 修复热门职位区域滚动 */
.hot-job-section {
    overflow: hidden;
}

.hot-job-list {
    max-height: none;
    overflow: visible;
}

/* 加载状态样式 */
.loading-more.loading {
    position: relative;
    background: linear-gradient(90deg, #f0f7ff 0%, #e6f7ff 100%);
    border: 1px solid #91d5ff;
    color: #1890ff;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spin {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #1890ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 没有更多时的样式 */
.no-more-message::before {
    content: '✓ ';
    color: #52c41a;
    margin-right: 5px;
}

/* 错误状态样式 */
.no-more-message.error {
    background: #fff2f0;
    border: 1px dashed #ffccc7;
    color: #ff4d4f;
}

.no-more-message.error::before {
    content: '✗ ';
    color: #ff4d4f;
}

/* 加载动画 */
@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 防止页面闪烁 */
.job-list::after {
    content: '';
    display: block;
    height: 1px;
    clear: both;
}

/* 修复筛选条件改变时的状态 */
.filter-box:has(select:focus, button:focus) ~ .job-list {
    opacity: 0.9;
    transition: opacity 0.3s;
}

/* 增强选择器特异性，确保样式优先级 */
body .job-list .no-more-message {
    display: block !important;
}

body .job-list .no-more-message ~ .no-more-message {
    display: none !important;
}

/* 强制隐藏重复元素 */
[style*="display: none"] + [style*="display: none"] {
    display: none !important;
}

/* 确保最后一个加载提示显示 */
.job-list > *:last-child.loading-more {
    display: block !important;
}

.job-list > *:last-child.no-more-message {
    display: block !important;
}

/* 修复滚动监听器冲突 */
html.scroll-disabled {
    overflow: hidden;
}

html.scroll-disabled body {
    overflow: hidden;
    height: 100%;
}

/* 修复移动端触摸事件 */
.touch-device .job-card {
    -webkit-tap-highlight-color: transparent;
}

.touch-device .job-card:active {
    background-color: #f8f9fa;
}