/* 列表页专用样式 */

/* 主要内容区域 */
.main-content {
    margin-top: 80px;
    padding: 40px 0;
    min-height: calc(100vh - 80px);
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 搜索和筛选区域 */
.search-filter-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    color: #999;
    z-index: 2;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    padding: 12px 25px;
    border-radius: 25px;
    white-space: nowrap;
}

.filter-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.reset-btn {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-section label {
    font-weight: 500;
    color: #333;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.view-btn.active,
.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.results-count {
    color: #666;
    font-size: 14px;
}

/* 信息列表 */
.info-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.info-list.list-view {
    grid-template-columns: 1fr;
}

.info-list.list-view .info-card {
    display: flex;
    align-items: center;
    padding: 20px;
}

.info-list.list-view .card-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-list.list-view .service-description {
    display: none;
}

.info-list.list-view .service-tags {
    margin: 0;
}

/* 信息卡片 */
.info-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

/* 卡片图片区域 */
.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.info-card:hover .cover-image {
    transform: scale(1.05);
}

.card-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 2;
    border-bottom: none;
}

.service-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-badge.mobile {
    background: rgba(17, 153, 142, 0.9);
}

.service-badge.system {
    background: rgba(240, 147, 251, 0.9);
}

.service-badge.database {
    background: rgba(79, 172, 254, 0.9);
}

.service-badge.api {
    background: rgba(67, 233, 123, 0.9);
}

.service-badge.maintenance {
    background: rgba(250, 112, 154, 0.9);
}

.publish-time {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.card-content {
    padding: 20px;
}

.service-title {
    margin-bottom: 12px;
}

.service-title a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.service-title a:hover {
    color: #667eea;
}

.service-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 10px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-info {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
}

.price-unit {
    color: #666;
    font-size: 14px;
}

.publisher-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.publisher-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffc107;
    font-size: 14px;
    font-weight: 500;
}

.rating span {
    color: #333;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 0;
    }
    
    .page-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .search-filter-section {
        padding: 20px;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-btn {
        align-self: center;
        width: 200px;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .toolbar > div {
        justify-content: center;
    }
    
    .info-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }
    
    .search-filter-section {
        padding: 15px;
    }
    
    .info-card {
        margin: 0 -5px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .service-title a {
        font-size: 16px;
    }
    
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .publisher-info {
        align-self: flex-end;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    margin-bottom: 20px;
}

/* 筛选结果高亮 */
.highlight {
    background: yellow;
    padding: 2px 4px;
    border-radius: 3px;
}