/* 文章板块 - 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);
}
.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-dl-icon { flex-shrink: 0; }

/* 文章详情页 - 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 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: 32px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.art-back a { color: #2170ff; font-size: 14px; text-decoration: none; }
.art-back a:hover { text-decoration: underline; }

/* 侧边栏 */
.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) {
    .article-grid { grid-template-columns: 1fr; }
    .article-detail-title { font-size: 22px; }
    .article-content { font-size: 15px; }
}
