/* ========================================
   通用内容卡片样式
   用于: tag, vip_download_list, soft_detail, code_list, readcode 等页面
   不用于: dl (.dl-page → dl.css), dl_detail (.detail-page → dl_detail.css)
   ======================================== */

/* 资源列表卡片 */
.resource-section {
    background: #fff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 3px solid transparent;
    background: linear-gradient(to right, #2563EB, transparent) bottom left / 60px 3px no-repeat;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    color: #1E293B;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 28px;
    background: linear-gradient(135deg, #2563EB, #D97706);
    border-radius: 3px;
}

/* 资源列表 */
.resource-list { list-style: none; }

.resource-item {
    padding: 18px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 10px;
    margin: 0 -10px;
}
.resource-item:last-child { border-bottom: none; }
.resource-item:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    padding-left: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateX(5px);
    border-bottom-color: transparent;
}
.resource-item::before {
    content: '►';
    position: absolute;
    left: 8px;
    top: 18px;
    opacity: 0;
    color: #2563EB;
    font-size: 12px;
    transition: all 0.3s;
}
.resource-item:hover::before { left: 12px; opacity: 1; }

.resource-title {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    line-height: 1.6;
    transition: all 0.3s;
}
.resource-title:hover { color: #2563EB; transform: translateX(3px); }

.resource-meta { display: flex; gap: 15px; font-size: 12px; color: #64748B; flex-wrap: wrap; }
.resource-meta span { display: inline-flex; align-items: center; gap: 3px; }
.resource-desc { color: #64748B; font-size: 13px; line-height: 1.6; margin: 10px 0; padding-left: 5px; }
.resource-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 25px 22px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.sidebar-widget:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.widget-title {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 22px;
    color: #1E293B;
    padding-left: 12px;
    border-left: 4px solid #2563EB;
}

/* 排行榜 */
.rank-list { list-style: none; }
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    border: 1px solid transparent;
}
.rank-item:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    transform: translateX(5px);
    border-color: #2563EB;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    background: #F1F5F9;
    color: #64748B;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.rank-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #FFD700 0%, #F39C12 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}
.rank-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #E8E8E8 0%, #BDC3C7 100%);
    color: #34495E;
    box-shadow: 0 4px 12px rgba(189, 195, 199, 0.4);
}
.rank-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #CD853F 0%, #8B4513 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(205, 133, 63, 0.4);
}
.rank-title {
    flex: 1;
    font-size: 14px;
    text-decoration: none;
    color: #1E293B;
    line-height: 1.5;
    transition: all 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rank-title:hover { color: #2563EB; transform: translateX(3px); }

/* 响应式 */
@media (max-width: 1024px) {
    .sidebar { position: static; }
}
