/* 物品卡片容器 */
.items-container {
    margin: 2rem 0;
}

.items-container .section-subtitle {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

/* 物品卡片网格 */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

/* 物品卡片 - 液态玻璃效果（优化版） */
.item-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px); /* 降低模糊值减少GPU消耗 */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.1); /* 简化阴影 */
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    will-change: transform, box-shadow;
    transform: translateZ(0); /* 启用GPU加速 */
}


.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 物品卡片图片 */
.item-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

img.item-img {
    max-width: 290px;
    max-height: 160px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;

}

.item-image img:hover {
    transform: scale(1.08);
}

/* 用户头像和用户名样式 */
.user-info-o {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    z-index: 2;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-name {
    color: #37393b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 物品卡片信息 */
.item-info {
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.item-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.item-description {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    
    /* 文本溢出处理 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 物品卡片元信息 */
.item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.item-meta span {
    display: flex;
    align-items: center;
}

.item-meta i {
    margin-right: 0.3rem;
}

/* 物品卡片标签 */
.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-badge {
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    color: #555;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-badge:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 物品卡片操作按钮 */
.item-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    color: palevioletred;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
    transform: translateZ(0); /* 启用GPU加速 */
}



.action-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.action-btn i {
    margin-right: 0.3rem;
}

/* 加载更多按钮 - 液态玻璃效果 */
div#loadingMore {
    text-align: center;
}

.load-more {
    width: 230px;
    height: 40px;
    font-size: 16px;
    background: transparent;
    border: none;
    position: relative;
    color: #f0f0f0;
    z-index: 1;
}

.load-more::after,
.load-more::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: -99999;
    transition: all 0.3s; /* 缩短过渡时间 */
}

.load-more::before {
    transform: translate(0%, 0%);
    width: 100%;
    height: 100%;
    background: #28282d;
    border-radius: 10px;
}

.load-more::after {
    transform: translate(10px, 10px);
    width: 35px;
    height: 35px;
    background: #ffffff15;
    backdrop-filter: blur(5px);
    border-radius: 50px;
}

.load-more:hover::before {
    transform: translate(5%, 20%);
    width: 110%;
    height: 110%;
}

.load-more:hover::after {
    border-radius: 10px;
    transform: translate(0, 0);
    width: 100%;
    height: 100%;
}

.load-more:active::after {
    transition: 0s;
    transform: translate(0, 5%);
}

/* 加载中状态 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top: 2px solid #3498db;
    animation: spin 1s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes liquidMove {
    0% { transform: rotate(15deg) translateY(0); }
    100% { transform: rotate(15deg) translateY(-100%); }
}

.hidden {
    display: none;
}

img.user-avatar {
    width: 30px;
    height: 30px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* 增大最小宽度 */
        gap: 1rem;
    }
    
    .item-image {
        height: 140px;
    }
    
    .item-info {
        padding: 0.8rem;
    }
    
    .item-title {
        font-size: 1rem;
    }
    
    .item-description {
        font-size: 0.8rem;
    }
    
    /* 避免过小字体 */
    .item-meta, .tag-badge, .action-btn {
        font-size: 0.8rem;
    }
}

/* 移动端专项优化 */
@media (max-width: 480px) {
    .items-grid {
        padding: 0.5rem;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .item-card {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 3px 12px 0 rgba(31, 38, 135, 0.08);
    }
    

    
    .item-image {
        height: 120px;
    }
    
    .item-info {
        padding: 0.6rem;
    }
    
    .item-title {
        font-size: 0.95rem;
    }
    
    .item-description {
        -webkit-line-clamp: 2;
    }
    
    .item-meta {
        gap: 0.6rem;
    }
    
    .action-btn {
        padding: 0.4rem 0.8rem;
    }
}
