 /* 基础样式 */
 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 隐藏轮播图指示器 */
.layui-carousel-ind {
    display: none !important;
}

/* 轮播图优化样式 */
.layui-carousel {
    overflow: hidden;
}

.layui-carousel img {
    transition: opacity 0.3s ease;
    will-change: opacity;
}

/* 防止轮播图重复加载 */
.layui-carousel-item {
    position: relative;
}

.layui-carousel-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 导航容器样式 */
.nav-container {
    position: relative;
    overflow: hidden;
}

/* 快捷导航标题样式 */
.nav-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 0;
}

.nav-title-bar {
    width: 4px;
    height: 20px;
    background-color: #ff4d4f;
    margin-right: 8px;
    border-radius: 2px;
}

.nav-title-text {
    font-size: 18px;
    font-weight: bold;
    color: #ff4d4f;
    white-space: nowrap;
}

.nav-title-line {
    flex-grow: 1;
    height: 1px;
    background-color: #ff4d4f;
    opacity: 0.3;
    margin-left: 10px;
}

.nav-grid-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    overflow: hidden;
}

.nav-page {
    flex: 0 0 100%;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform, opacity;
}

.nav-page.active {
    transform: translateX(0);
    opacity: 1;
    position: relative;
}

.nav-page.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.nav-page.next {
    transform: translateX(100%);
    opacity: 0;
}

/* 防止页面闪烁 */
.nav-container {
    position: relative;
    overflow: hidden;
}

/* 优化动画性能 */
.nav-page {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.nav-row {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.nav-row:last-child {
    margin-bottom: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-item.empty {
    display: none;
    pointer-events: none;
}

.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0; /* 备用背景色 */
}

.nav-icon:hover {
    transform: scale(1.05);
}

/* 图片加载失败时的样式 */
.nav-icon[data-image]:not([style*="background-image"]) {
    background-color: #f0f0f0;
}


.nav-text {
    font-size: 12px;
    color: #ff9933;
    font-weight: normal;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 分页指示器样式 */
.nav-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    gap: 8px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background-color: #007aff;
    transform: scale(1.2);
}

.nav-dot:hover {
    background-color: #007aff;
    transform: scale(1.1);
}

html,
body {
    font-family: -apple-system-font, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background-color: #f8f8f8;
    color: #666;
    overflow-x: hidden;
    background: #fff !important;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

img {
    border: 0;
    object-fit: cover;
}

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 640px;
    z-index: 100;
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.35);
    padding: 0 15px;
    height: 40px;
    display: flex;
    align-items: center;
    transition: background 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    border-bottom: none;
}

.header.header-bgimg {
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header.scrolled {
    background: #fff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e0e0e0;
}

.search-form {
    width: 100%;
    height: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: rgb(245, 245, 245);
    border-radius: 20px;
    padding: 0 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e0e0e0;
}

.search-icon {
    color: #ff9933;
    font-size: 16px;
    margin-right: 2px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 0 4px;
    height: 32px;
    line-height: 32px;
}

.search-btn {
    background: #ff9933;
    color: #fff;
    border: none;
    padding: 0 16px;
    height: 32px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 32px;
    display: flex;
    align-items: center;
    margin-right: 0;
}

/* 让内容不被顶栏遮挡 */
.main-content {
    padding-top: 20px;
    max-width: 640px;
    margin: 0 auto;
    box-sizing: border-box;
    background: #fff;
    min-height: calc(var(--vh, 1vh) * 100 - 50px);
}

/* 轮播图样式 */
.swipe {
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

.swipe-wrap {
    display: flex;
    transition: transform 0.3s;
}

.swipe-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-item {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #777;
    cursor: pointer;
    position: relative;
}

.nav-item.active {
    color: #ff9933;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #ff9933;
}

/* 筛选面板样式 */
.filter-panel {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    display: none;
}

.filter-panel.show {
    display: block;
}

.filter-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-item {
    padding: 8px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

.filter-item.active {
    background: #ff9933;
    color: white;
    border-color: #ff9933;
}

/* 名片卡片样式 */
.card-list {
    padding: 10px;
}

.card-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 确保带有data-click-bound属性的卡片也显示手型光标 */
.card-item[data-click-bound="true"] {
    cursor: pointer !important;
}

.card-item[data-click-bound="true"]:hover {
    cursor: pointer !important;
}

/* 强制所有卡片显示手型光标 */
.card-item,
.card-item * {
    cursor: pointer !important;
}

/* 确保卡片内的所有元素都继承手型光标 */
.card-item *:hover {
    cursor: pointer !important;
}

/* 使用更高优先级的选择器 */
body .card-item,
html body .card-item,
.card-item[data-click-bound],
.card-item[data-processed] {
    cursor: pointer !important;
}

/* 确保所有状态下的卡片都显示手型光标 */
.card-item:hover,
.card-item:active,
.card-item:focus,
.card-item[data-click-bound]:hover,
.card-item[data-processed]:hover {
    cursor: pointer !important;
}

.card-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #2080f7;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0 8px 0 8px;
    padding: 2px 10px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(32,128,247,0.08);
    line-height: 20px;
    display: inline-block;
}

/* 不同状态的徽章样式 */
.card-badge.approved {
    background: #52c41a;
    box-shadow: 0 2px 8px rgba(82,196,26,0.08);
}

.card-badge.pending {
    background: #ffa500;
    box-shadow: 0 2px 8px rgba(255,165,0,0.08);
}

.card-badge.own-task {
    background: #ccc;
    color: #fff;
    box-shadow: 0 2px 8px rgba(204,204,204,0.08);
}

.card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ec6ff 0%, #409eff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    z-index: 1;
}

.avatar.female {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
}

.user-info {
    flex: 1;
    margin-left: 55px;
}

.username {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.user-desc {
    font-size: 12px;
    color: #999;
    min-height: 16px;
    display: flex;
    align-items: center;
}

.card-content,
.card-footer {
    margin-left: 55px;
}

.card-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.card-tags {
    display: flex;
    gap: 5px;
}

/* 加载更多按钮样式 */
.load-more-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.page-info {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.all-loaded-tip {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .header {
        padding: 10px;
    }
    
    .card-list {
        padding: 10px;
    }

    .loading-indicator {
        font-size: 13px;
    }
    
    .page-info {
        font-size: 11px;
    }
    
    .all-loaded-tip {
        font-size: 11px;
        padding: 15px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.layui-carousel {
    margin-top: 20px;
}

@media (min-width: 641px) {
    body {
        background: var(--site-background, #f5f6fa) !important;
        background-image: var(--site-background-image, none) !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-attachment: fixed !important;
    }
    .main-content {
        min-width: 320px;
        max-width: 640px;
        margin: 0 auto;
        background: #fff;
        min-height: calc(100vh - 50px);
    }
    .footer-bar {
        background: #fff !important;
        max-width: 640px;
        min-width: 320px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }

    .layui-carousel,
    .layui-carousel [carousel-item]>div {
        height: 300px !important;
    }

    .layui-carousel img {
        height: 300px !important;
    }

    .load-more {
        background: #fff;
        max-width: 640px;
        min-width: 320px;
        margin: 0 auto;
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    body {
        background: var(--site-background, #fff) !important;
        background-image: var(--site-background-image, none) !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-attachment: fixed !important;
    }
    .main-content {
        min-height: calc(var(--vh, 1vh) * 100 - 50px);
    }
    .footer-bar {
        background: #fff !important;
        width: 100%;
        left: 0;
        transform: none;
        max-width: none;
        min-width: 0;
        margin: 0;
    }
}

.footer-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 640px;
    height: 50px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 101;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.footer-bar-item {
    flex: 1;
    text-align: center;
    color: #888;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: pointer;
    transition: color 0.2s;
}

.footer-bar-item.active,
.footer-bar-item:active {
    color: #ff9933;
}

.footer-bar-item i {
    font-size: 20px;
    margin-bottom: 0.5px;
}

.footer-bar-item span {
    margin-top: 0;
    line-height: 1.1;
}

body {
    background: #fff;
}

.layui-tab-title {
    display: flex;
    border: none;
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
}

.layui-tab-title li {
    flex: 1 1 50%;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #888;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.layui-tab-title li.layui-this {
    background: #fff;
    color: #ff9933;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.layui-tab {
    background: #fff;
}

.layui-tab-content {
    background: none;
    padding: 0;
    margin-bottom: 35px;
}

.tag-top {
    display: inline-block;
    background: #ff6b6b;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    padding: 0 8px;
    height: 20px;
    line-height: 20px;
    margin-left: 6px;
    vertical-align: middle;
    margin-bottom: 2px;
}

/* 搜索相关样式 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ff4757;
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* 搜索输入框焦点样式 */
.search-input:focus {
    outline: none;
}

.search-form:focus-within {
    box-shadow: 0 2px 12px rgba(255, 153, 51, 0.2);
}