
/* 友联页面固定顶部栏并变暗 */
body[data-current-page="favorites"] .navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(20,20,30,0.1) 100%);
}

body[data-current-page="favorites"] .links-page-container {
    padding-top: 80px !important;
}

/* 收藏页面容器 */
.favorites-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部横幅 - 避开顶部固定导航栏 */
.links-header {
    background: url('/assets/image/backgroundVideo.jpg') center/cover no-repeat;
    border-radius: 16px;
    height: 180px;
    margin-top: 60px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.links-header-content {
    position: relative;
    z-index: 1;
    padding: 30px 40px;
}

.links-header h2 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
    letter-spacing: 3px;
}

.links-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

/* 分类标题 */
.favorites-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid #667eea;
}

/* 收藏网格 - 1行4列 */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* 收藏卡片 */
.favorite-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    min-width: 0;
    max-width: 100%;
}

.favorite-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

/* 收藏图标 */
.favorite-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-icon .default-icon {
    font-size: 20px;
    color: #999;
}

/* 收藏信息 */
.favorite-info {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.favorite-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-desc {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.9em;
    word-break: break-word;
}

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

.favorites-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 移动端适配 - 宽度最大化 */
@media (max-width: 768px) {
    body[data-current-page="favorites"] .links-page-container {
        padding-top: 60px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .favorites-container {
        padding: 5px 2px;
        width: 100%;
        max-width: 100%;
    }
    
    .links-header {
        height: 140px;
        margin-top: 5px;
        margin-bottom: 20px;
        margin-left: 5px;
        margin-right: 5px;
        border-radius: 12px;
    }
    
    .links-header-content {
        padding: 20px 15px;
    }
    
    .links-header h2 {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .links-header h1 {
        font-size: 1.2rem;
    }
    
    .favorites-category {
        margin-bottom: 15px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .category-title {
        font-size: 1rem;
        margin-bottom: 10px;
        margin-left: 5px;
        padding-left: 8px;
    }
    
    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .favorite-card {
        padding: 8px 6px;
        min-width: 0;
        max-width: 100%;
    }
    
    .favorite-info {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    .favorite-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .favorite-icon .default-icon {
        font-size: 16px;
    }
    
    .favorite-title {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .favorite-desc {
        font-size: 0.65rem;
        line-clamp: 1;
        -webkit-line-clamp: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-all;
    }
}

/* 深色模式适配 */
body.dark-mode .favorite-card {
    background: rgba(40, 40, 50, 0.9);
    border-color: rgba(255,255,255,0.05);
}

body.dark-mode .favorite-title {
    color: #f0f0f0;
}

body.dark-mode .favorite-desc {
    color: #aaa;
}

body.dark-mode .category-title {
    color: #f0f0f0;
}

body.dark-mode .favorites-empty {
    color: #777;
}

body.dark-mode .favorite-icon {
    background: rgba(255,255,255,0.1);
}

body.dark-mode .favorite-icon .default-icon {
    color: #777;
}
