/* ============================================
   资源详情页专用样式
   ============================================ */

/* CSS变量 */
:root {
    --primary: #c62828;
    --primary-dark: #b71c1c;
    --secondary: #d32f2f;
    --warning: #f39c12;
    --dark: #212121;
    --gray: #616161;
    --gray-light: #9e9e9e;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 两栏布局 */
.detail-layout {
    display: grid;
    grid-template-columns: 68% 30%;
    gap: 2%;
    align-items: start;
}

.detail-main {
    width: 100%;
}

/* 侧边栏（与主内容同步滚动） */
.sidebar {
    /* 移除sticky定位，实现左右同步滚动 */
    position: relative;
    width: 100%;
}

/* 卡片样式 */
article, section.detail-card, section.sidebar-widget {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

article:hover, section.detail-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* 标题卡片 */
.title-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.resource-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
}

.title-icon {
    font-size: 32px;
}

/* 详情卡片 */
.detail-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: var(--primary);
}

/* Section标题 */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 20px 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    color: var(--primary);
    font-size: 18px;
}

/* 资源简介 */
.description-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.description-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    line-height: 1.8;
    color: #555;
    font-size: 15px;
}

/* 下载区域 */
.download-section {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.3);
    position: relative;
    overflow: hidden;
}

.download-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.download-title {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.download-icon {
    font-size: 28px;
}

/* 下载按钮 */
.btn-single-download {
    width: 100%;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.35);
    position: relative;
}

.btn-single-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.5);
}

.download-icon-simple {
    font-size: 24px;
    line-height: 1;
}

.download-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.download-tip {
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 1;
}

/* 侧边栏widget */
.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: rgba(198, 40, 40, 0.3);
}

/* Widget标题 */
.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 面包屑导航 */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumb-nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.breadcrumb-nav a:hover {
    background: #E8F4FF;
    transform: scale(1.05);
}

.breadcrumb-sep {
    color: var(--gray-light);
}

.breadcrumb-current {
    color: var(--dark);
    font-weight: 600;
}

/* 响应式 - 平板 */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 18px !important;
    }
    
    .detail-layout {
        gap: 15px;
        grid-template-columns: 65% 33%;
    }
    
    .sidebar {
        top: 70px;
    }
}

/* 响应式 - 移动端 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px !important;
    }
    
    .breadcrumb-nav {
        padding: 12px 15px !important;
        font-size: 12px !important;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .detail-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .detail-main, .sidebar {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
    }
    
    .detail-card, .title-card, .description-card, .download-section {
        padding: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .resource-title {
        font-size: 20px !important;
    }
    
    .title-icon {
        font-size: 28px !important;
    }
    
    .section-title {
        font-size: 15px !important;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .container {
        padding: 0 12px !important;
    }
    
    .detail-card, .title-card, .description-card, .download-section, .sidebar-widget {
        padding: 15px !important;
        margin-bottom: 12px !important;
    }
    
    .resource-title {
        font-size: 18px !important;
    }
    
    .section-title {
        font-size: 14px !important;
    }
}

/* 热门排行榜标签切换样式 */
.hot-tab-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.hot-tab-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    font-family: inherit;
}

.hot-tab-active {
    background: var(--primary);
    color: white;
}

.hot-tab-inactive {
    background: #f0f0f0;
    color: #666;
}

.hot-tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 排行榜列表样式 */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: #f8f9fa;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 8px;
}

.rank-number {
    display: inline-block;
    min-width: 24px;
    height: 24px;
    border-radius: 4px;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.rank-number.top-3 {
    background: linear-gradient(135deg, #FF4757, #FF6B6B);
    color: white;
}

.rank-number.normal {
    background: #f0f0f0;
    color: #999;
}

.rank-title {
    color: var(--dark);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s;
}

.rank-title.hover-primary:hover {
    color: var(--primary);
}

/* 代码文件列表样式 */
.code-file-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    background: white;
}

.code-file-item:hover {
    background: #fafbfc;
}

.code-file-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
}

.code-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

.code-file-icon.top-3 {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    color: white;
}

.code-file-icon.normal {
    background: #f5f5f5;
    color: #999;
}

.code-file-title {
    margin: 0;
    flex: 1;
}

.code-file-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    transition: color 0.2s;
}

.code-file-link:hover {
    color: #c62828;
}

.code-file-desc {
    margin-left: 42px;
    font-size: 14px;
    color: #5a5e66;
    line-height: 1.7;
    margin-bottom: 10px;
}

.code-file-meta {
    margin-left: 42px;
    font-size: 13px;
    color: #909399;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.code-file-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.code-file-meta-icon {
    font-size: 12px;
    color: #c0c4cc;
}

/* 相关资源项样式 */
.related-resource-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    background: white;
}

.related-resource-item:hover {
    background: #fafbfc;
}

/* 查看源码按钮样式 */
.view-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #E8F4FF 0%, #F0F8FF 100%);
    color: var(--primary);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-code-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

/* 信息网格样式 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: linear-gradient(135deg, #e8f4ff 0%, #f8f9fa 100%);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.15);
}

.info-icon {
    color: var(--primary);
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(198, 40, 40, 0.2));
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.info-value {
    font-weight: 700;
    color: var(--dark);
    word-break: break-word;
    font-size: 15px;
    line-height: 1.4;
}

.info-value a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.info-value a:hover {
    text-decoration: underline;
}

/* 标签样式 */
.tags-section {
    margin-bottom: 25px;
}

.tags-title {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #E8F4FF 0%, #F0F8FF 100%);
    color: var(--primary);
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

/* 下载确认弹窗样式 */
.download-confirm-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}

.download-confirm-header {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    padding: 24px 24px 20px;
    text-align: center;
    position: relative;
}

.download-confirm-header .close {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    opacity: 1;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-confirm-header .close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.download-confirm-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
}

.download-confirm-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.download-confirm-body {
    padding: 20px 24px;
    background: #fafbfc;
}

.credit-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
}

.credit-info {
    text-align: center;
}

.credit-label {
    color: #5f6368;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}


.cost-card {
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
}

.cost-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.cost-header span:first-child {
    color: #3c4043;
    font-size: 15px;
    font-weight: 600;
}

.cost-amount {
    font-size: 28px;
    font-weight: 700;
    color: #d93025;
}

.cost-details {
    padding-top: 10px;
}

.cost-benefit {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    color: #34a853;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.cost-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #5f6368;
    font-size: 13px;
    line-height: 1.4;
}

.tip-card {
    background: linear-gradient(135deg, #fffbea 0%, #fff4cc 100%);
    border-radius: 10px;
    padding: 10px 14px;
    border-left: 3px solid #fbbf24;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-icon {
    font-size: 18px;
    line-height: 1;
}

.tip-text {
    color: #92400e;
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
}

.download-confirm-footer {
    background: white;
    padding: 14px 24px 18px;
    border-top: 1px solid #e8eaed;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-cancel {
    background: white;
    color: #5f6368;
    border: 2px solid #dadce0;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-cancel:hover {
    background: #f8f9fa;
    border-color: #5f6368;
    color: #3c4043;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-confirm {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-confirm:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(198, 40, 40, 0.5);
}

.btn-confirm:disabled {
    opacity: 0.5;
    background: #9e9e9e;
    cursor: not-allowed;
}

/* Alert 和 Confirm 弹窗样式 */
.alert-modal-body {
    text-align: center;
    padding: 30px;
}

.alert-modal-body h4 {
    margin: 20px 0 10px 0;
}

.alert-modal-body p {
    color: #666;
}

.alert-modal-footer {
    border-top: none;
    justify-content: center;
}

.confirm-modal-body {
    text-align: center;
    padding: 30px;
}

.confirm-modal-body i {
    color: #ffc107;
}

.confirm-modal-body h4 {
    margin: 20px 0 10px 0;
}

.confirm-modal-body p {
    color: #666;
}

.confirm-modal-footer {
    border-top: none;
    justify-content: center;
}

/* 加载对话框样式 */
.loading-dialog {
    text-align: center;
    padding: 20px;
}

.loading-dialog i {
    color: #c62828;
}

.loading-dialog p {
    margin-top: 15px;
    color: #666;
}

/* 侧边栏图标样式 */
.rank-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #E8F4FF;
    color: var(--primary);
    border-radius: 4px;
    text-align: center;
    line-height: 22px;
    font-size: 12px;
    flex-shrink: 0;
}

/* 修复 -webkit-line-clamp 兼容性警告 */
.rank-title,
.code-file-link {
    line-clamp: 2;
}

/* 详情页特定样式 */
.uncategorized-text {
    color: #999;
}

.warning-icon {
    color: var(--warning);
}

.warning-value {
    color: var(--warning);
}

.warm-tip {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-left: 4px solid #fbbf24;
    border-radius: 8px;
}

.warm-tip p {
    margin: 0;
    color: #92400e;
    line-height: 1.8;
    font-size: 14px;
}

.code-section-content {
    background: white;
    padding: 0;
    border-left: none;
}

.code-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e8f4ff;
}

.code-section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.code-count {
    color: var(--primary);
    font-weight: 600;
}

.code-hint {
    margin-left: 15px;
    color: #999;
}

.code-file-list {
    background: white;
}

.code-file-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    background: white;
}

.code-file-item:hover {
    background: #fafbfc;
}

.code-file-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.code-file-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e8f4ff, #f0f8ff);
    color: var(--primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.code-file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.code-file-info {
    flex: 1;
    min-width: 0;
}

.code-file-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: block;
    line-height: 1.6;
    word-break: break-all;
    transition: color 0.2s;
}

.code-file-link:hover {
    color: var(--primary);
}

.code-file-size {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.code-file-size-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.code-file-size-icon {
    font-size: 11px;
}

.code-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #c62828, #b71c1c);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.code-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.code-view-icon {
    font-size: 12px;
}

.view-all-link {
    display: block;
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e8f4ff;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: linear-gradient(135deg, #e8f4ff 0%, #f0f8ff 100%);
    color: var(--primary-dark);
}

/* 相关资源推荐样式 */
.related-resource-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.related-resource-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.related-resource-item:hover {
    background: #fafbfc;
}

.related-resource-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
}

.related-resource-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.related-resource-number.top-3 {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    color: white;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

.related-resource-number.normal {
    background: #f5f5f5;
    color: #999;
}

.related-resource-title {
    margin: 0;
    flex: 1;
}

.related-resource-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    transition: color 0.2s;
}

.related-resource-link:hover {
    color: #c62828;
}

.related-resource-desc {
    margin-left: 42px;
    font-size: 14px;
    color: #5a5e66;
    line-height: 1.7;
    margin-bottom: 10px;
}

.related-resource-meta {
    margin-left: 42px;
    font-size: 13px;
    color: #909399;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.related-resource-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.related-resource-meta-icon {
    font-size: 12px;
    color: #c0c4cc;
}

/* 软件说明网格 */
.software-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.software-info-section h3 {
    color: var(--dark);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.software-info-section .section-icon {
    color: var(--primary);
}

.software-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 2;
}

.software-info-list li {
    position: relative;
    padding-left: 12px;
}

.software-info-list li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.software-info-list strong {
    color: var(--warning);
}

.software-info-list a {
    color: var(--primary);
    text-decoration: none;
}

/* 查看全部容器 */
.view-all-container {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

/* 代码底部提示 */
.code-bottom-tip {
    background: linear-gradient(135deg, #fffbea 0%, #fff4cc 100%);
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    border-top: 2px solid #fbbf24;
}

.code-tip-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-tip-icon {
    font-size: 18px;
}

.code-tip-text {
    color: #92400e;
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
}

.code-tip-text strong {
    font-weight: 700;
}

/* 下载按钮容器样式 */
.download-buttons-container {
    max-width: 360px;
    margin: 0 auto;
}

/* 标签描述样式 */
.tags-description {
    color: #666;
    margin-bottom: 15px;
}

/* 关键词高亮样式 */
.keyword-highlight {
    color: #ff4d4f;
    font-style: normal;
    font-weight: 600;
}

/* 隐藏元素样式 */
.hidden {
    display: none;
}

/* 用户资源图标样式 */
.user-resource-icon {
    background: #FFF3E0 !important;
    color: #f39c12 !important;
    border-radius: 6px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    font-size: 14px !important;
}

/* 容器最大宽度 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* 卡片统一样式 */
article,
section.detail-card,
section.sidebar-widget {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

article:hover,
section.detail-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* 标题统一样式 */
h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
}

h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

/* 链接统一样式 */
a {
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.85;
}

/* 按钮统一样式 */
button,
.btn {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.3s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
}

/* 侧边栏列表样式优化 */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: #f8f9fa;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 8px;
}

.rank-title {
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    display: block;
    transition: color 0.3s ease;
}

.rank-title:hover {
    color: var(--primary);
}

/* Widget标题样式 */
.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* SEO优化：H1标题样式增强 */
.resource-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.title-suffix {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
}

.subtitle-info {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--gray);
}

.category-tag {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.download-count, .file-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.download-count::before {
    content: "📊";
}

.file-info::before {
    content: "📁";
}

/* ============================================
   提升爬取深度优化 - 新增模块样式
   ============================================ */

/* 分类导航模块 */
.category-navigation-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: white;
    border: 2px solid #e8eaf0;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width 0.4s ease;
    z-index: -1;
}

.category-item:hover::before {
    width: 100%;
}

.category-item:hover {
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.3);
}

.category-count {
    color: #999;
    font-size: 0.9em;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s;
}

.category-item:hover .category-count {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
}

/* 相关搜索模块 */
.related-searches-section {
    margin: 30px 0;
    padding: 28px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.related-searches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.search-keyword {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: white;
    border: 2px solid #ffe0e0;
    border-radius: 24px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.search-keyword::before {
    content: '🔍';
    margin-right: 6px;
    font-size: 13px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s;
}

.search-keyword:hover::before {
    opacity: 1;
    transform: scale(1);
}

.search-keyword:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(198, 40, 40, 0.25);
}

/* 侧边栏新增模块样式增强 */
.sidebar-widget .resource-meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

/* 响应式优化 */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .category-item {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .search-keyword {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .category-navigation-section,
    .related-searches-section {
        padding: 20px;
        margin: 25px 0;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .related-searches-grid {
        gap: 8px;
    }
}
