/* 统一分类标签样式 - 所有模块通用 */
.qm-article-list-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    font-weight: 500;
    visibility: visible;
    opacity: 1;
}

@media (min-width: 768px) {
    .qm-article-list-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

/* 文章列表模块特定样式（保持兼容，但使用统一的基础样式） */
.qm-article-list-module .qm-article-list-badge {
    font-size: 0.6875rem;
    padding: 0.15rem 0.5rem;
    display: inline-flex;
    visibility: visible;
    opacity: 1;
}

@media (min-width: 768px) {
    .qm-article-list-module .qm-article-list-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

/* 确保所有模块的分类标签容器显示 */
.qm-card .d-flex.align-items-center.gap-2,
.qm-article-list-module .d-flex.align-items-center.gap-2,
.qm-software-download-section .d-flex.align-items-center.gap-2,
.qm-material-gallery-card .d-flex.align-items-center.gap-2,
.qm-material-gallery-card .mt-1.d-flex.align-items-center.gap-2 {
    display: flex;
    visibility: visible;
    opacity: 1;
}

/* 统一分类标签颜色样式 - 12种不同颜色 */
.qm-article-list-badge[data-color-index="0"] {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.qm-article-list-badge[data-color-index="1"] {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.qm-article-list-badge[data-color-index="2"] {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.qm-article-list-badge[data-color-index="3"] {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.qm-article-list-badge[data-color-index="4"] {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.qm-article-list-badge[data-color-index="5"] {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.qm-article-list-badge[data-color-index="6"] {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.qm-article-list-badge[data-color-index="7"] {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.qm-article-list-badge[data-color-index="8"] {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.qm-article-list-badge[data-color-index="9"] {
    background: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.qm-article-list-badge[data-color-index="10"] {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.qm-article-list-badge[data-color-index="11"] {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* 夜间模式 */
.dark .qm-article-list-badge[data-color-index="0"] {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.dark .qm-article-list-badge[data-color-index="1"] {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.dark .qm-article-list-badge[data-color-index="2"] {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.dark .qm-article-list-badge[data-color-index="3"] {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.dark .qm-article-list-badge[data-color-index="4"] {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.dark .qm-article-list-badge[data-color-index="5"] {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.dark .qm-article-list-badge[data-color-index="6"] {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.dark .qm-article-list-badge[data-color-index="7"] {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.dark .qm-article-list-badge[data-color-index="8"] {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.dark .qm-article-list-badge[data-color-index="9"] {
    background: rgba(20, 184, 166, 0.2);
    color: #5eead4;
}

.dark .qm-article-list-badge[data-color-index="10"] {
    background: rgba(251, 146, 60, 0.2);
    color: #fdba74;
}

.dark .qm-article-list-badge[data-color-index="11"] {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

/**
 * 文章卡片样式 - 异形波浪设计
 * QiMeng Theme - Article Card Module
 */


.qm-module-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.qm-module-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.qm-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 18px;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 8px;
    flex-shrink: 0;
}


.dark .qm-module-header {
    border-bottom-color: #374151;
}

.dark .qm-module-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.dark .qm-module-title {
    color: #f9fafb;
}


.qm-module-header--with-sort {
    justify-content: space-between;
    gap: 1.25rem;
}

.qm-module-header--with-sort .qm-module-sort {
    margin-left: auto;
    display: flex;
    align-items: center;
}


@media (max-width: 639px) {
    /* 移动端确保文章卡片容器padding为0，与最外层容器对齐 */
    .qm-article-cards {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .qm-module-title {
        font-size: 18px;
    }

    .qm-module-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .qm-module-header--with-sort {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .qm-module-header--with-sort .qm-module-sort {
        width: 100%;
        margin-left: 0;
        margin-top: 0.25rem;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .qm-module-header--with-sort .qm-sort-select {
        max-width: 9rem;
    }
    
    /* 确保移动端分类标签显示 */
    .qm-card .d-flex.align-items-center.gap-2,
    .qm-card .mt-1.d-flex.align-items-center.gap-2,
    .qm-article-list-module .d-flex.align-items-center.gap-2,
    .qm-article-list-module .mt-1.d-flex.align-items-center.gap-2,
    .qm-software-download-section .d-flex.align-items-center.gap-2,
    .qm-software-download-section .mt-1.d-flex.align-items-center.gap-2,
    .qm-material-gallery-card .d-flex.align-items-center.gap-2,
    .qm-material-gallery-card .mt-1.d-flex.align-items-center.gap-2,
    .qm-material-gallery-card .d-flex.align-items-center.justify-content-center.gap-2,
    .qm-material-gallery-card .mt-1.d-flex.align-items-center.justify-content-center.gap-2 {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .qm-card .qm-article-list-badge,
    .qm-article-list-module .qm-article-list-badge,
    .qm-software-download-section .qm-article-list-badge,
    .qm-material-gallery-card .qm-article-list-badge {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}



.qm-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.qm-article-cards .qm-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    align-items: stretch;
    border: 0;
    overflow: visible;
}

.qm-article-cards .qm-card > a {
    text-decoration: none;
    display: block;
    overflow: hidden;
}

.qm-article-cards .qm-card::before {
    content: none;
}

.qm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qm-sticky-badge-host {
    position: relative;
    overflow: visible;
}

.qm-card.qm-sticky-badge-host > a {
    display: block;
    overflow: hidden;
}

.qm-card-sticky-badge {
    position: absolute;
    top: 0.3rem;
    left: 0.3rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--qm-primary-gradient-135, linear-gradient(135deg, #FF1493 0%, #FF69B4 100%));
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 16px rgba(236, 72, 153, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    user-select: none;
    pointer-events: none;
}

.qm-card-sticky-badge::before {
    content: none;
}

.qm-card-sticky-badge::after {
    content: none;
}

.qm-card-sticky-badge i {
    font-size: 0.62rem;
    line-height: 1;
}



.qm-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    
    background: linear-gradient(135deg, #e0a5bf, #b4a3d2, #ccafea);
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    padding-top: 0.5rem;
    transition: background 0.3s ease;
}

.qm-card-thumb,
.qm-card-thumb::before,
.qm-card-thumb .qm-mockup-frame,
.qm-card-thumb .qm-mockup-image {
    border-radius: 0.75rem 0.75rem 0 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}


.qm-card-thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    background-image: none;
    background-size: 120px 120px;
    background-repeat: repeat;
    background-position: 0 0;
    pointer-events: none;
    z-index: 0;
    border-radius: 0.75rem 0.75rem 0 0;
    opacity: 0.5;
    
    mix-blend-mode: normal;
}

.qm-card-thumb .qm-mockup-image {
    width: 75%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.qm-card-thumb .qm-mockup-screen {
    position: absolute;
    top: 22%;
    left: 20%;
    width: 60%;
    height: 38%;
    background-size: cover;
    background-position: center top;
    border-radius: 2px;
    z-index: 0;
}


.qm-card-thumb .qm-mockup-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    background-image: none;
    background-size: 80px 80px;
    background-repeat: repeat;
    background-position: 0 0;
    pointer-events: none;
    border-radius: 2px;
    opacity: 0.35;
    mix-blend-mode: normal;
    z-index: 1;
}


@media (max-width: 1023px) {
    .qm-card-thumb::before {
        background-image: url('../images/pattern-decorative.svg');
    }

    .qm-card-thumb .qm-mockup-screen::after {
        background-image: url('../images/pattern-decorative.svg');
    }
}


@media (min-width: 768px) {
    .qm-card-thumb::before {
        background-image: url('../images/pattern-decorative.svg');
    }

    .qm-card-thumb .qm-mockup-screen::after {
        background-image: url('../images/pattern-decorative.svg');
    }
}

.qm-card-thumb .qm-mockup-frame {
    position: relative;
    width: 75%;
    height: auto;
    object-fit: contain;
    z-index: 2;
}

.qm-card-thumb .qm-mockup-image {
    position: relative;
    z-index: 2;
}

.qm-card:hover .qm-card-thumb .qm-mockup-image,
.qm-card:hover .qm-card-thumb .qm-mockup-frame {
    transform: scale(1.05);
}



.qm-card-content {
    padding: 1rem;
    padding-left: 1.25rem;
    padding-top: 3.5rem;
    position: relative;
    z-index: 3;
    background: #fff;
    
    margin-top: -30%;
    clip-path: url(#qm-curve-clip);
}

.dark .qm-card-content {
    background: #1f2937;
}

.qm-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    text-decoration: none;
    word-break: break-word;
}

@media (min-width: 768px) {
    .qm-card-title {
        font-size: 0.9375rem;
    }
}

.qm-card:hover .qm-card-title {
    color: #2563eb;
}

.qm-card-excerpt {
    font-size: 0.6875rem;
    color: #6b7280;
    margin-bottom: 0.625rem;
    
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    text-decoration: none;
    word-break: break-word;
}

@media (min-width: 768px) {
    .qm-card-excerpt {
        font-size: 0.8125rem;
    }
}




.qm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}

.qm-card-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.qm-author-avatar {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}

.qm-author-name {
    font-size: 0.6875rem;
    color: #6b7280;
    max-width: 4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    text-decoration: none;
}

.qm-card-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.qm-card-stats span {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.6875rem;
    color: #9ca3af;
    text-decoration: none;
}

.qm-card-stats i {
    font-size: 0.625rem;
}

.qm-card-stat[data-stat-type] {
    cursor: pointer;
    user-select: none;
}

.qm-card-stat[data-stat-type] i {
    color: currentColor;
}

.qm-card-like:hover {
    color: #f97373;
}

.qm-card-like.active {
    color: #ef4444;
}

.qm-card-fav:hover {
    color: #f59e0b;
}

.qm-card-fav.active {
    color: #f97316;
}

.dark .qm-card-stat[data-stat-type] i {
    color: currentColor;
}




.qm-article-cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
    /* 确保padding为0，与最外层容器对齐 */
    padding: 0 !important;
}

@media (min-width: 640px) {
    .qm-article-cards {
        gap: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .qm-article-cards {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem;
    }
    
    .qm-article-cards .qm-card .qm-card-content {
        padding: 0.75rem;
        padding-left: 0.875rem;
        padding-top: 2.75rem;
        clip-path: url(#qm-curve-clip); /* 全局保留clip-path异形效果 */
    }
    
    .qm-article-cards .qm-card .qm-card-title {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .qm-article-cards .qm-card .qm-card-excerpt {
        font-size: 0.6875rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    
    .qm-article-cards .qm-card .qm-card-footer {
        padding-top: 0.375rem;
        margin-top: 0.375rem;
    }
    
    .qm-article-cards .qm-card .qm-author-name {
        font-size: 0.625rem;
        max-width: 3rem;
    }
    
    .qm-article-cards .qm-card .qm-card-stats span {
        font-size: 0.625rem;
    }
    
    .qm-article-cards .qm-card .qm-author-avatar {
        width: 1rem;
        height: 1rem;
    }
}

/* 更大屏幕显示4列 */
@media (min-width: 1280px) {
    .qm-article-cards {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}


/* 文章列表模块样式已移除，使用 Bootstrap 默认样式 */


.qm-search-results .qm-article-cards,
.qm-recommended-content .qm-article-cards {
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .qm-search-results .qm-article-cards,
    .qm-recommended-content .qm-article-cards {
        gap: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .qm-search-results .qm-article-cards,
    .qm-recommended-content .qm-article-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1280px) {
    .qm-search-results .qm-article-cards,
    .qm-recommended-content .qm-article-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1536px) {
    .qm-search-results .qm-article-cards,
    .qm-recommended-content .qm-article-cards {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }
}


@media (min-width: 640px) and (max-width: 1023.98px) {
    .qm-article-cards .qm-card .qm-card-content {
        margin-top: -23%;
        padding-top: 3.5rem;
    }
}


@media (min-width: 1024px) and (max-width: 1439.98px) {
    .qm-article-cards .qm-card .qm-card-content {
        margin-top: -25%;
    }
}

@media (min-width: 1440px) {
    .qm-article-cards .qm-card .qm-card-content {
        margin-top: -25%;
    }
}



.dark .qm-card {
    background: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    border-color: #374151;
}

.dark .qm-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

.dark .qm-card-title {
    color: #f3f4f6;
}

.dark .qm-card:hover .qm-card-title {
    color: #60a5fa;
}

.dark .qm-card-excerpt {
    color: #9ca3af;
}

.dark .qm-card-footer {
    border-top-color: #374151;
}

.dark .qm-author-name {
    color: #9ca3af;
}

.dark .qm-card-stats span {
    color: #9ca3af;
}

.dark .qm-card-stats i {
    color: #6b7280;
}

.dark .qm-card-like:hover {
    color: #f97373;
}

.dark .qm-card-like.active {
    color: #ef4444;
}

.dark .qm-card-fav:hover {
    color: #f59e0b;
}

.dark .qm-card-fav.active {
    color: #f97316;
}



.qm-cards-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dark .qm-cards-empty {
    background: #1f2937;
}

.qm-cards-empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 9999px;
}

.dark .qm-cards-empty-icon {
    background: #374151;
}

.qm-cards-empty-icon i {
    font-size: 1.25rem;
    color: #9ca3af;
}

.qm-cards-empty-text {
    color: #6b7280;
    font-size: 0.875rem;
}



.qm-posts-filter {
    margin-bottom: 2rem;
    margin-top: 1.5rem; 
}


.qm-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}


.qm-filter-row--categories {
    justify-content: flex-start;
    margin-bottom: 0.25rem;
}


.qm-filter-row--sort {
    justify-content: flex-start;
    margin-top: 0.25rem;
}


.qm-category-tags-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
    cursor: grab;
    user-select: none;
}

.qm-category-tags-wrapper::-webkit-scrollbar {
    height: 4px;
}

.qm-category-tags-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.qm-category-tags-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
}

.qm-category-tags-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

.qm-category-tags-wrapper:active {
    cursor: grabbing;
}

/* 文章卡片和文章列表的分类标签容器滚动样式 */
.qm-card-badges-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.qm-card-badges-wrapper::-webkit-scrollbar {
    display: none;
}

.qm-card-badges-wrapper:active {
    cursor: grabbing;
}


.qm-category-tags-scroll {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0;
    min-width: max-content;
}

.qm-category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #4b5563;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

@media (min-width: 768px) {
    .qm-category-btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

.qm-category-btn:hover {
    color: #111827;
}

.qm-category-btn.active {
    color: #374151;
    font-weight: 600;
    padding-left: 1.25rem;
}

.qm-category-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF1493 0%, #FF69B4 100%);
}

.dark .qm-category-btn {
    color: #e5e7eb;
    background: transparent;
}

.dark .qm-category-btn:hover {
    color: #f9fafb;
}

.dark .qm-category-btn.active {
    color: #f3f4f6;
}


.qm-filter-divider {
    color: #d1d5db;
    font-size: 1rem;
    font-weight: 300;
    flex-shrink: 0;
    padding: 0 0.5rem;
}

.dark .qm-filter-divider {
    color: #4b5563;
}


.qm-sort-tabs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qm-sort-tab {
    padding: 0.15rem 0.5rem 0.25rem;
    font-size: 0.75rem; 
    font-weight: 500;
    color: #9ca3af; 
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qm-sort-tab:hover {
    color: #6b7280;
}

.qm-sort-tab.active {
    
    color: #4b5563;
}

.dark .qm-sort-tab {
    color: #6b7280;
}

.dark .qm-sort-tab:hover {
    color: #e5e7eb;
}

.dark .qm-sort-tab.active {
    color: #e5e7eb;
}


.qm-sort-select {
    display: none !important;
}


.qm-posts-loading {
    padding: 3rem 1.5rem;
    text-align: center;
}

.qm-posts-error {
    padding: 3rem 1.5rem;
    text-align: center;
}

.qm-posts-spinner {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    border: 2px solid rgba(209, 213, 219, 1);
    border-bottom-color: rgba(129, 140, 248, 1);
    animation: qm-spin 0.75s linear infinite;
}

.qm-posts-loading-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.qm-posts-error-icon {
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.qm-posts-error-text {
    color: #4b5563;
}

@keyframes qm-spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 640px) {
    /* 移动端确保文章卡片容器padding为0，与最外层容器对齐 */
    .qm-article-cards {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .qm-filter-row {
        gap: 0.5rem;
    }
    
    .qm-category-btn {
        padding: 0.2rem 0.5rem 0.25rem;
        font-size: 0.8125rem;
    }

    .qm-sort-tabs {
        gap: 0.5rem;
    }

    .qm-sort-tab {
        font-size: 0.6875rem;
    }
}

.dark .qm-cards-empty-text {
    color: #9ca3af;
}



.qm-card-thumb-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--loader-width, 6em);
    height: var(--loader-width, 6em);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: visible;
    pointer-events: none;
}

.qm-card-thumb-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.qm-card-thumb-loader .pl {
    width: 6em;
    height: 6em;
}

.qm-card-thumb-loader .pl__ring {
    animation: ringA 2s linear infinite;
}

.qm-card-thumb-loader .pl__ring--a {
    stroke: #f42f25;
}

.qm-card-thumb-loader .pl__ring--b {
    animation-name: ringB;
    stroke: #f49725;
}

.qm-card-thumb-loader .pl__ring--c {
    animation-name: ringC;
    stroke: #255ff4;
}

.qm-card-thumb-loader .pl__ring--d {
    animation-name: ringD;
    stroke: #f42582;
}


@keyframes ringA {
    from, 4% {
        stroke-dasharray: 0 660;
        stroke-width: 20;
        stroke-dashoffset: -330;
    }

    12% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -335;
    }

    32% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -595;
    }

    40%, 54% {
        stroke-dasharray: 0 660;
        stroke-width: 20;
        stroke-dashoffset: -660;
    }

    62% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -665;
    }

    82% {
        stroke-dasharray: 60 600;
        stroke-width: 30;
        stroke-dashoffset: -925;
    }

    90%, to {
        stroke-dasharray: 0 660;
        stroke-width: 20;
        stroke-dashoffset: -990;
    }
}

@keyframes ringB {
    from, 12% {
        stroke-dasharray: 0 220;
        stroke-width: 20;
        stroke-dashoffset: -110;
    }

    20% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -115;
    }

    40% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -195;
    }

    48%, 62% {
        stroke-dasharray: 0 220;
        stroke-width: 20;
        stroke-dashoffset: -220;
    }

    70% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -225;
    }

    90% {
        stroke-dasharray: 20 200;
        stroke-width: 30;
        stroke-dashoffset: -305;
    }

    98%, to {
        stroke-dasharray: 0 220;
        stroke-width: 20;
        stroke-dashoffset: -330;
    }
}

@keyframes ringC {
    from {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: 0;
    }

    8% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -5;
    }

    28% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -175;
    }

    36%, 58% {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -220;
    }

    66% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -225;
    }

    86% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -395;
    }

    94%, to {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -440;
    }
}

@keyframes ringD {
    from, 8% {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: 0;
    }

    16% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -5;
    }

    36% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -175;
    }

    44%, 50% {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -220;
    }

    58% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -225;
    }

    78% {
        stroke-dasharray: 40 400;
        stroke-width: 30;
        stroke-dashoffset: -395;
    }

    86%, to {
        stroke-dasharray: 0 440;
        stroke-width: 20;
        stroke-dashoffset: -440;
    }
}


.qm-card-thumb img.qm-mockup-image.loaded,
.qm-card-thumb .qm-mockup-screen.loaded,
.qm-mockup-area img.qm-mockup-image.loaded,
.qm-mockup-area .qm-mockup-screen.loaded {
    opacity: 1;
}

.qm-card-thumb img.qm-mockup-image:not(.loaded),
.qm-card-thumb .qm-mockup-screen:not(.loaded),
.qm-mockup-area img.qm-mockup-image:not(.loaded),
.qm-mockup-area .qm-mockup-screen:not(.loaded) {
    opacity: 0;
    transition: opacity 0.3s ease;
}


.relative .qm-card-thumb-loader {
    width: var(--loader-width, 3em);
    height: var(--loader-width, 3em);
}



.qm-article-cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
    /* 移动端确保padding为0，与最外层容器对齐 */
    padding-left: 0;
    padding-right: 0;
}



@media (min-width: 640px) {

    .qm-article-cards {

        gap: 1.75rem;
    }

}



@media (min-width: 1024px) {

    .qm-article-cards {

        grid-template-columns: repeat(3, 1fr) !important;

        gap: 1.25rem;
    }
}

/* 更大屏幕显示4列 */
@media (min-width: 1280px) {
    .qm-article-cards {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}


.qm-search-results .qm-article-cards {
        gap: 1.5rem;

    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .qm-search-results .qm-article-cards {
        gap: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .qm-search-results .qm-article-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1280px) {
    .qm-search-results .qm-article-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1536px) {
    .qm-search-results .qm-article-cards {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }

}







@media (max-width: 639px) {
    /* 移动端确保文章卡片容器padding为0，与最外层容器对齐 */
    .qm-article-cards {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .qm-article-cards .qm-card .qm-card-thumb {

        aspect-ratio: 4 / 3;

        padding: 0.5rem;

    }

    

    .qm-article-cards .qm-card .qm-card-thumb .qm-mockup-image,

    .qm-article-cards .qm-card .qm-card-thumb .qm-mockup-frame {

        width: 70%;

    }

    

    .qm-article-cards .qm-card .qm-card-content {
        margin-top: -30%;
        padding: 0.625rem;
        padding-top: 2.5rem;
        clip-path: url(#qm-curve-clip); /* 全局保留clip-path异形效果 */
    }

    

    

    .qm-article-cards .qm-card .qm-card-title {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
        line-height: 1.4;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .qm-article-cards .qm-card .qm-card-excerpt {
        font-size: 0.6875rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    

    

    /* 确保移动端分类标签容器显示 */
    .qm-article-cards .qm-card .d-flex.align-items-center.gap-2,
    .qm-article-cards .qm-card .mt-1.d-flex.align-items-center.gap-2 {
        display: flex;
        visibility: visible;
        opacity: 1;
    }
    
    /* 确保移动端分类标签显示 */
    .qm-article-cards .qm-card .qm-article-list-badge {
        display: inline-flex;
        visibility: visible;
        opacity: 1;
    }
    
    /* 文章列表模块移动端分类标签显示 */
    .qm-article-list-module .d-flex.align-items-center.gap-2,
    .qm-article-list-module .mt-1.d-flex.align-items-center.gap-2 {
        display: flex;
        visibility: visible;
        opacity: 1;
    }
    
    .qm-article-list-module .qm-article-list-badge {
        display: inline-flex;
        visibility: visible;
        opacity: 1;
    }
    
    /* 软件下载模块移动端分类标签显示 */
    .qm-software-download-section .d-flex.align-items-center.gap-2,
    .qm-software-download-section .mt-1.d-flex.align-items-center.gap-2 {
        display: flex;
        visibility: visible;
        opacity: 1;
    }
    
    .qm-software-download-section .qm-article-list-badge {
        display: inline-flex;
        visibility: visible;
        opacity: 1;
    }
    
    /* 素材下载模块移动端分类标签显示 */
    .qm-material-gallery-card .d-flex.align-items-center.gap-2,
    .qm-material-gallery-card .mt-1.d-flex.align-items-center.gap-2,
    .qm-material-gallery-card .d-flex.align-items-center.justify-content-center.gap-2,
    .qm-material-gallery-card .mt-1.d-flex.align-items-center.justify-content-center.gap-2 {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .qm-material-gallery-card .qm-article-list-badge {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    

    .qm-article-cards .qm-card .qm-card-footer {

        padding-top: 0.375rem;

        margin-top: 0.375rem;

    }

    

    .qm-article-cards .qm-card .qm-author-avatar {

        width: 1.125rem;

        height: 1.125rem;

    }

    

    .qm-article-cards .qm-card .qm-author-name {

        font-size: 0.625rem;

        max-width: 3rem;

    }

    

    .qm-article-cards .qm-card .qm-card-stats {

        gap: 0.375rem;

    }

    

    .qm-article-cards .qm-card .qm-card-stats span {

        font-size: 0.625rem;

    }

    

    .qm-article-cards .qm-card .qm-card-stats i {

        font-size: 0.5625rem;

    }

    

    

    .qm-article-cards .qm-card:hover {

        transform: translateY(-2px);

    }

}

/* 超小屏幕：保持两列但收紧间距，避免横向溢出 */
@media (max-width: 420px) {
    .qm-article-cards,
    .qm-search-results .qm-article-cards,
    .qm-recommended-content .qm-article-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem;
        overflow-x: hidden;
    }

    .qm-article-cards .qm-card {
        min-width: 0;
    }
}







.dark .qm-card {
    background: #1f2937;
    border-color: #374151;
}

.dark .qm-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.dark .qm-card-title {
    color: #f3f4f6;
}

.dark .qm-card:hover .qm-card-title {
    color: #60a5fa;
}

.dark .qm-card-excerpt {
    color: #9ca3af;
}

.dark .qm-card-footer {
    border-top-color: #374151;
}

.dark .qm-author-name {
    color: #9ca3af;
}

.dark .qm-card-stats span {
    color: #9ca3af;
}

.dark .qm-card-stats i {
    color: #6b7280;
}







.qm-cards-empty {

    grid-column: 1 / -1;

    text-align: center;

    padding: 3rem 1.5rem;

    background: #fff;

    border-radius: 0.75rem;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);

}



.dark .qm-cards-empty {

    background: #1f2937;

}



.qm-cards-empty-icon {

    width: 3.5rem;

    height: 3.5rem;

    margin: 0 auto 0.75rem;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f3f4f6;

    border-radius: 9999px;

}



.dark .qm-cards-empty-icon {

    background: #374151;

}



.qm-cards-empty-icon i {

    font-size: 1.25rem;

    color: #9ca3af;

}



.qm-cards-empty-text {

    color: #6b7280;

    font-size: 0.875rem;

}



.dark .qm-cards-empty-text {

    color: #9ca3af;

}
