/* 文章板块 - kuakes.com 浅色风格 */
.article-page, .article-detail {
    --art-bg: #f0f0f0;
    --art-card: #ffffff;
    --art-border: #e0e0e0;
    --art-text: #383840;
    --art-dim: #8a8a94;
    --art-primary: #2170ff;
    --art-primary-soft: #e8f0ff;
    --art-accent: #7c3aed;
    --art-radius: 12px;
}

/* 文章页浅色背景(覆盖站内深色 body) */
body:has(.article-page-light), body:has(.art-wrap-light) {
    background: #f0f0f0;
    color: #383840;
}
body:has(.article-page-light) .site-header,
body:has(.art-wrap-light) .site-header {
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
}
body:has(.article-page-light) .site-header .logo,
body:has(.art-wrap-light) .site-header .logo { color: #1a1a2e; }
body:has(.article-page-light) .site-footer,
body:has(.art-wrap-light) .site-footer {
    background: #ffffff;
    color: #8a8a94;
    border-top: 1px solid #e8e8e8;
}
body:has(.article-page-light) .friend-links a,
body:has(.art-wrap-light) .friend-links a { color: #6b6b76; }
body:has(.article-page-light) .friend-label,
body:has(.art-wrap-light) .friend-label { color: #6b6b76; }
.article-page-light, .article-detail-light {
    background: #f0f0f0;
    min-height: 60vh;
}
.article-page-light { padding: 32px 24px 48px; }
.article-detail-light { padding: 40px 24px 56px; }
/* 分类导航(仿 kuakes) */
.art-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
/* 移动端:分类导航一排横向滚动(可左右移动,不换行) */
@media (max-width: 768px) {
    .art-cat-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 12px 14px;
        margin-bottom: 20px;
        gap: 8px;
    }
    .art-cat-nav::-webkit-scrollbar { display: none; }
    .art-cat-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 6px 14px;
    }
}
.art-cat-tab {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 14px;
    color: #6b6b76;
    text-decoration: none;
    background: #f5f5f7;
    transition: all .2s;
}
.art-cat-tab:hover { color: #2170ff; background: #e8f0ff; }
.art-cat-tab.active {
    background: linear-gradient(135deg, #2170ff, #7c3aed);
    color: #ffffff;
    font-weight: 600;
}

/* 卡片优化(kuakes 风格) */
.article-card { border-radius: 14px; }
.article-cover { position: relative; }
.article-cover img { height: 190px; }
.article-cover::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,0.15));
}
.article-card-title {
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-cat {
    background: linear-gradient(135deg, #2170ff, #7c3aed);
    color: #ffffff;
    font-weight: 500;
}

/* 文章列表页 */
.article-page { padding: 32px 0 48px; }
.article-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 20px;
    background: linear-gradient(135deg, #e8f0ff, #f3eeff);
    border-radius: 12px;
}
.article-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #2170ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.article-page-desc { color: #6b6b76; font-size: 14px; }

.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.article-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: #383840;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(33,112,255,0.12);
    border-color: #2170ff;
}
.article-cover img { width: 100%; height: 180px; object-fit: cover; display: block; }
.article-card-body { padding: 18px; }
.article-card-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.4;
}
.article-card-title:hover { color: #2170ff; }
.article-card-summary {
    color: #8a8a94;
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}
.article-card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #a0a0aa; }
.article-cat {
    background: #e8f0ff;
    color: #2170ff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 40px; }
.page-btn {
    padding: 9px 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #383840;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}
.page-btn:hover { border-color: #2170ff; color: #2170ff; }
.page-info { color: #8a8a94; font-size: 14px; }

/* 下载按钮(kuakes 风格:白底蓝框圆角+云朵图标) */
.art-dl-wrap {
    margin: 28px 0 8px;
    padding: 20px;
    background: #f8faff;
    border: 1px solid #e0e8ff;
    border-radius: 12px;
    text-align: center;
}
.art-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: #ffffff;
    border: 1px solid #2170ff;
    border-radius: 10px;
    color: #2170ff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.art-dl-btn:hover {
    background: #2170ff;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(33,112,255,0.25);
}
.art-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    margin-left: 12px;
    background: #ffffff;
    border: 1px solid #10b981;
    border-radius: 10px;
    color: #10b981;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.art-share-btn:hover {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16,185,129,0.25);
}
.art-dl-icon { flex-shrink: 0; }
/* 分享成功提示 toast */
.art-toast {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(17, 24, 39, 0.92);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    white-space: nowrap;
}
.art-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
@media (max-width: 768px) {
    .art-dl-wrap { padding: 14px 10px; }
    .art-dl-btn, .art-share-btn { padding: 10px 18px; font-size: 14px; }
    .art-share-btn { margin-left: 8px; }
}

/* 文章详情页 - kuakes 风格(左宽右窄) */
.art-wrap { max-width: 1200px; margin: 0 auto; }
.art-breadcrumb {
    padding: 20px 0 4px;
    font-size: 13px;
    color: #8a8a94;
}
.art-breadcrumb a { color: #2170ff; text-decoration: none; }
.art-breadcrumb a:hover { text-decoration: underline; }
.bc-sep { margin: 0 8px; color: #c0c0c8; }

.art-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding: 24px 0 48px;
    align-items: start;
}
.art-main {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.art-detail-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.art-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 14px;
}
.art-detail-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #a0a0aa; flex-wrap: wrap; }
.art-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.art-cat {
    background: #e8f0ff;
    color: #2170ff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.art-summary {
    background: #f5f8ff;
    border-left: 4px solid #2170ff;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    color: #5a5a66;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 28px;
}
.art-content {
    font-size: 16px;
    line-height: 1.95;
    color: #383840;
    word-break: break-word;
}
.art-content h2, .art-content h3 {
    color: #1a1a2e;
    margin: 28px 0 14px;
    line-height: 1.4;
    padding-left: 12px;
    border-left: 4px solid #2170ff;
}
.art-content h2 { font-size: 22px; }
.art-content h3 { font-size: 18px; }
.art-content p { margin-bottom: 18px; }
.art-content img { max-width: 100%; border-radius: 8px; }
.art-content a { color: #2170ff; }
.art-content ul, .art-content ol { margin: 0 0 18px 26px; }
/* 资源文件目录区块 */
.art-content .art-file-list {
    list-style: none;
    margin: 12px 0 18px;
    padding: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    max-height: 320px;
    overflow-y: auto;
}
.art-content .art-file-list li {
    padding: 8px 16px;
    font-size: 14px;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
    word-break: break-all;
    line-height: 1.6;
}
.art-content .art-file-list li:last-child { border-bottom: none; }
.art-content .art-file-more {
    font-size: 13px;
    color: #94a3b8;
    margin: -10px 0 18px;
}
@media (max-width: 768px) {
    .art-content .art-file-list { max-height: 260px; }
    .art-content .art-file-list li { font-size: 13px; padding: 7px 12px; }
}

/* ===== 标签页 ===== */
.tag-page-head { text-align: center; padding: 24px 16px 8px; }
.tag-page-head h1 { font-size: 26px; color: #1a1a2e; margin-bottom: 6px; }
.tag-page-sub { color: #7a7a85; font-size: 14px; }
.tag-back-btn { display: inline-block; margin-top: 10px; color: #2170ff; font-size: 14px; text-decoration: none; }
.tag-back-btn:hover { text-decoration: underline; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px 40px;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #f0f4ff;
    border: 1px solid #dbe6ff;
    color: #2170ff;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}
.tag-pill:hover { background: #2170ff; color: #fff; border-color: #2170ff; }
.tag-pill .tag-count {
    background: #2170ff;
    color: #fff;
    font-size: 12px;
    border-radius: 999px;
    padding: 1px 8px;
    min-width: 20px;
    text-align: center;
}
.tag-pill:hover .tag-count { background: #fff; color: #2170ff; }
.tag-size-sm { font-size: 13px; padding: 6px 12px; }
.tag-size-md { font-size: 14px; }
.tag-size-lg { font-size: 17px; padding: 10px 20px; }
.tag-size-xl { font-size: 20px; padding: 12px 24px; font-weight: 600; }

/* 文章卡片内标签 */
.article-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f0f4ff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    text-decoration: none;
}
.mini-tag:hover { background: #2170ff; color: #fff; border-color: #2170ff; }

/* 文章详情页标签行 */
.art-tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; }.art-tag-link {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: #f0f4ff;
    border: 1px solid #dbe6ff;
    color: #2170ff;
    font-size: 13px;
    text-decoration: none;
    transition: all .2s;
}
.art-tag-link:hover { background: #2170ff; color: #fff; border-color: #2170ff; }
.art-tag-all { color: #94a3b8; font-size: 13px; text-decoration: none; margin-left: 4px; }
.art-tag-all:hover { color: #2170ff; }
.art-content blockquote {
    border-left: 4px solid #7c3aed;
    background: #f8f5ff;
    padding: 14px 18px;
    color: #5a5a66;
    margin: 18px 0;
    border-radius: 0 8px 8px 0;
}
.art-content code {
    background: #f0f0f2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #7c3aed;
}
.art-content pre {
    background: #f5f5f7;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 18px 0;
}
.art-back {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    grid-column: 1 / 2;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.art-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    background: #ffffff;
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    color: #2170ff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.art-back-btn:hover {
    background: #2170ff;
    color: #ffffff;
    border-color: #2170ff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(33,112,255,0.2);
}

/* 侧边栏 */
.art-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }
.art-side-block {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.art-side-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid #2170ff;
}
.art-side-list { list-style: none; margin: 0; padding: 0; }
.art-side-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f7;
    font-size: 14px;
}
.art-side-list li:last-child { border-bottom: none; }
.art-side-list a {
    color: #383840;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.art-side-list a:hover { color: #2170ff; }
.art-side-date { color: #c0c0c8; font-size: 12px; flex-shrink: 0; }

@media (max-width: 1024px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    /* 移动端文章列表:每行2篇,卡片更紧凑 */
    .article-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .article-cover img { height: 100px; }
    .article-card-body { padding: 12px 12px 10px; }
    .article-card-title {
        font-size: 15px;
        line-height: 1.35;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .article-card-summary {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .article-card-meta { gap: 6px; font-size: 11px; }
    .article-cat { padding: 1px 8px; font-size: 11px; }
    .article-views { display: none; }

    .article-detail-title { font-size: 22px; }
    .article-content { font-size: 15px; }

    /* 移动端:相关文章/最新文章放到正文下方(不再挤在右侧320px列) */
    .art-layout { grid-template-columns: 1fr; gap: 16px; }
    .art-sidebar { position: static; }
    .art-main { padding: 20px 16px; }
    .art-back { grid-column: auto; }
    .art-back { gap: 8px; }
    .art-back-btn { flex: 1; padding: 10px 8px; font-size: 13px; gap: 4px; }
    .art-side-block { padding: 16px; }

    /* 移动端滚动适配:正文长内容(代码块/表格/长链接)防横向溢出 */
    .art-wrap { overflow-x: hidden; }
    .art-content pre { white-space: pre-wrap; word-break: break-all; }
    .art-content table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .art-breadcrumb { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .art-side-list a { white-space: normal; overflow-wrap: break-word; }
}

/* ===== 搜索标签磁盘列表 ===== */
.stag-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px 40px;
    max-width: 860px;
    margin: 0 auto;
}
.stag-item {
    display: block;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 20px;
    text-decoration: none;
    color: #383840;
    transition: all .2s;
}
.stag-item:hover {
    border-color: #2170ff;
    box-shadow: 0 4px 16px rgba(33,112,255,0.1);
    transform: translateY(-2px);
}
.stag-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.4;
}
.stag-item-title:hover { color: #2170ff; }
.stag-item-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #a0a0aa; }
@media (max-width: 768px) {
    .stag-list { padding: 12px 8px 30px; }
    .stag-item { padding: 12px 14px; }
    .stag-item-title { font-size: 15px; }
}

/* 文章列表页底部快捷卡片(返回首页/交流社区/社区公告) */
.art-quick-links {
    margin-top: 28px;
    margin-bottom: 10px;
}

/* ===== 分类页 SEO 内容段(分类专属描述 + 统计 + 相关词) ===== */
/* sr-only 隐藏时消除自带 margin/padding(视觉完全不可见,HTML 保留供蜘蛛爬行) */
.art-cat-seo.sr-only {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none;
}
.art-cat-seo {
    max-width: 960px;
    margin: 18px auto 6px;
    padding: 16px 18px;
    background: var(--art-card, #fff);
    border: 1px solid var(--art-border, #e0e0e0);
    border-radius: var(--art-radius, 12px);
}
.art-cat-desc {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.9;
    color: #4a4a55;
}
.art-cat-stats {
    margin: 0 0 12px;
    font-size: 12px;
    color: #a0a0aa;
}
.art-cat-related {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.art-cat-word {
    font-size: 12px;
    color: #2170ff;
    text-decoration: none;
    background: #e8f0ff;
    border-radius: 4px;
    padding: 3px 10px;
    line-height: 1.6;
    transition: all .18s ease;
}
.art-cat-word:hover { background: #2170ff; color: #fff; }
@media (max-width: 768px) {
    .art-cat-seo { margin: 12px 8px 4px; padding: 12px 14px; }
    .art-cat-desc { font-size: 13px; line-height: 1.8; }
    .art-cat-word { font-size: 12px; padding: 3px 8px; }
}

/* ===== 热门资源排行榜页 ===== */
.hot-list { max-width: 960px; margin: 16px auto; }
.hot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--art-card, #fff);
    border: 1px solid var(--art-border, #e0e0e0);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.hot-rank {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #2170ff;
    font-size: 13px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.hot-rank:nth-child(1) { background: #ff6b35; color: #fff; }
.hot-rank:nth-child(2) { background: #ffa726; color: #fff; }
.hot-rank:nth-child(3) { background: #ffd54f; color: #333; }
.hot-name {
    flex: 1;
    font-size: 14px;
    color: #1a1a2e;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hot-name:hover { color: #2170ff; }
.hot-meta { font-size: 12px; color: #a0a0aa; flex-shrink: 0; }
@media (max-width: 768px) {
    .hot-list { margin: 12px 8px; }
    .hot-item { padding: 8px 10px; }
    .hot-name { font-size: 13px; }
}
