/* Resource CSS - 资源相关样式 */

/* 资源卡片 */
.resource-item {
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-item:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.resource-item .badge-new {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: #F53F3F;
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
}

.resource-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.resource-item:hover .resource-img {
    transform: scale(1.05);
}

.resource-content {
    line-height: 1.8;
    font-size: 15px;
    color: #1D2129;
}

.resource-content img,
.resource-content video,
.resource-content iframe {
    max-width: 100%;
    height: auto;
}

.resource-content h2,
.resource-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #165DFF;
}

.resource-content h3 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.resource-content p {
    margin-bottom: 12px;
}

.resource-content code {
    background: #F0F2F5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #F53F3F;
}

.resource-content pre {
    background: #1D2129;
    color: #FFFFFF;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
}

.resource-content blockquote {
    border-left: 4px solid #165DFF;
    padding-left: 12px;
    color: #4E5969;
    background: #F7F8FA;
    border-radius: 6px;
}

.resource-info-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #E5E6EB;
}

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

.resource-info-label {
    width: 80px;
    color: #4E5969;
    flex-shrink: 0;
}

.resource-info-value {
    flex: 1;
}

/* 暗黑模式下的资源内容 */
.dark .resource-content {
    color: #ffffff;
}

.dark .resource-content * {
    color: inherit !important;
}

.dark .resource-content pre {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #1f2937;
}

.dark .resource-content pre code {
    color: #e5e7eb;
    background: transparent;
}

/* 资源统计卡片 */
.resource-stat-card {
    background: rgba(22,93,255,0.05);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.resource-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.resource-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #165DFF;
}

.resource-stat-label {
    font-size: 0.875rem;
    color: #4E5969;
    margin-top: 4px;
}

/* 资源筛选栏 */
.resource-filter-bar {
    background: #fff;
    border: 1px solid #E5E6EB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

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

.filter-label {
    font-size: 0.875rem;
    color: #4E5969;
    font-weight: 500;
}

.filter-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid #E5E6EB;
    background: #fff;
    color: #4E5969;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #165DFF;
    color: #165DFF;
    background: rgba(22,93,255,0.05);
}

.filter-btn.active {
    background: #165DFF;
    color: #fff;
    border-color: #165DFF;
}

/* 版本时间线 */
.version-item {
    padding: 16px;
    border-left: 4px solid #165DFF;
    background: #F7F8FA;
    margin-bottom: 12px;
    border-radius: 0 6px 6px 0;
}

.version-title {
    font-weight: 600;
    color: #165DFF;
    margin-bottom: 8px;
}

.version-date {
    font-size: 12px;
    color: #4E5969;
    margin-bottom: 8px;
}

/* 下载按钮 */
.download-btn {
    background: #165DFF;
    color: white;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #0E48E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22,93,255,0.3);
}

.download-btn-secondary {
    background: #F0F2F5;
    color: #1D2129;
    transition: all 0.2s ease;
}

.download-btn-secondary:hover {
    background: #E5E6EB;
}

.resource-item .download-btn {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    position: relative;
    display: block;
}

.resource-item .download-btn.absolute {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    width: auto;
    padding: 2px 6px;
    font-size: 10px;
}

/* 下载页正文样式：突出层级标题、代码与引用 */
.resource-content h1,
.resource-content h2,
.resource-content h3,
.resource-content h4,
.resource-content h5 {
    margin:1.4em 0 0.8em;
    padding: 0.45em 0.8em;
    border-left: 4px solid #165dff;
    background: rgba(22,93,255,0.06);
    border-radius: 10px;
    line-height: 1.4;
}
.resource-content h1 { font-size:1.25em; }
.resource-content h2 { font-size:1.16em; border-left-color: #0f62fe; background: rgba(15,98,254,0.07); }
.resource-content h3 { font-size:1.08em; }
.resource-content h4 { font-size:1.02em; border-left-color: #0f62fe; background: rgba(15,98,254,0.08); }
.resource-content h5 { font-size:0.96em; border-left-color: #2b2f36; background: rgba(43,47,54,0.06); }
.resource-content blockquote {
    margin:1em 0;
    padding: 0.75em 1em;
    border-left: 3px solid #14c9c9;
    background: rgba(20,201,201,0.07);
    border-radius: 8px;
}
.resource-content pre {
    padding: 0.85em 1em;
    background: #0b1526;
    color: #e9edf5;
    border-radius: 10px;
    overflow: auto;
}
.resource-content code {
    background: rgba(0,0,0,0.06);
    padding: 0.15em 0.35em;
    border-radius: 6px;
}
.resource-content strong {
    color: #1f2633;
    background: rgba(255,165,0,0.12);
    padding: 0.1em 0.2em;
    border-radius: 6px;
}
.resource-content hr {
    border: none;
    border-top: 1px dashed #d0d7e2;
    margin: 1.4em 0;
}
.resource-content ul,
.resource-content ol { padding-left: 1.3em; margin: 0.5em 0; }
.resource-content img { max-width: 100%; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.04); }
.resource-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.95em;
}
.resource-content th,
.resource-content td {
    border: 1px solid #e5e7ef;
    padding: 0.6em 0.75em;
}
.resource-content th { background: #f5f7fb; font-weight: 600; }
.resource-content a { color: #165dff; text-decoration: underline; text-decoration-color: rgba(22,93,255,0.35); }
