.main-content { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.main-content:has(.article-detail-wrapper) { grid-template-columns: 1fr; }
.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.article-item {
    display: block;
    height: fit-content;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--border-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-image i { font-size: 48px; color: var(--icon-light); }
.article-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--color-news-start), var(--color-news-end));
    color: #fff;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 500;
    z-index: 2;
}
.article-content { padding: 20px; }
.article-title {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.article-excerpt {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}
.article-meta i { margin-right: 5px; color: var(--color-news-start); }
.sidebar { position: sticky; top: 20px; }
.sidebar-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-news-start);
}
.hot-article {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s;
}
.hot-article:last-child { border-bottom: none; }
.hot-article:hover { padding-left: 10px; background: var(--bg-gray-lightest); }
.hot-rank {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}
.hot-rank i {
    font-size: 18px;
}
.hot-article-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hot-article-meta {
    font-size: 12px;
    color: var(--text-light);
}
.hot-article-meta i { margin-right: 3px; }
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--bg-gray-lightest);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
}
.quick-link:hover {
    background: var(--color-news-gradient);
    color: var(--text-white);
    transform: translateX(5px);
}
.quick-link i { font-size: 20px; }
.quick-link span { font-size: 14px; }
.news-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: 12px;
}
.news-empty-state i { font-size: 48px; color: var(--icon-lighter); margin-bottom: 15px; }
.news-empty-state p { color: var(--text-light); font-size: 16px; }
.loading-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 14px;
}
.loading-more i { margin-right: 8px; color: var(--color-news-start); }
.no-more-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 14px;
    border-top: 1px solid var(--border-light);
}

/* 文章详情页样式 */
.article-detail-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    align-items: start;
}
.article-left-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.article-tools {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.article-tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 13px;
}
.article-tool-item:hover {
    background: var(--bg-light);
    color: var(--color-primary);
}
.article-tool-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.article-tool-item i { font-size: 16px; width: 20px; text-align: center; }
.article-tool-item .tool-text { flex: 1; }
.article-tool-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}
.article-tool-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
}
.article-tool-row .article-tool-item {
    flex: 1;
    justify-content: center;
    padding: 8px 4px;
}
.article-action-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 0;
}
.article-action-bar .article-tool-item:hover {
    color: var(--color-primary);
}
.article-font-size-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 20px;
}
.article-share-dropdown {
    position: relative;
}
.article-share-popup {
    position: absolute;
    top: -180%;
    left: 100%;
    background: var(--border-color);
    border-radius: 8px;
    padding: 3px 0;
    box-shadow: var(--box-shadow-dark);
    display: none;
    flex-direction: column;
    z-index: 1000;
    min-width: 140px;
}
.article-share-popup.show {
    display: flex;
}
.article-share-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    /* margin-right: -9px; */
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-right-color: var(--border-color);
    z-index: -1;
}
.article-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.article-share-btn:hover {
    background: var(--bg-light);
    color: var(--color-primary);
}
.article-share-btn span { font-size: 14px; }
.article-share-btn i { font-size: 16px; }
.article-share-btn + .article-share-btn {
    border-top: 1px solid var(--border-color);
}
.article-font-size {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}
.article-font-size-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.article-font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-font-size-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-weight: bold;
}
.article-font-size-btn:hover {
    background: var(--color-primary);
    color: white;
}
.article-toc {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.toc-header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.toc-content {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s;
}
.toc-content.expanded { max-height: fit-content; }
.toc-list {
    list-style: none;
    padding: 12px;
    margin: 0;
}
.toc-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}
.toc-footer:hover {
    background: var(--bg-light);
    color: var(--color-primary);
}
.toc-footer i {
    margin-right: 4px;
}
.article-hot-list {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.hot-list-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.hot-list-content {
    max-height: none;
    overflow: visible;
    padding-bottom: 12px;
}
.hot-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background 0.2s;
    color: var(--text-color);
    font-weight: bold;
}
.hot-list-item:last-child {
    border-bottom: none;
}
.hot-list-item:hover {
    background: var(--bg-light);
}
.hot-rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-light);
    border-radius: 4px;
}
.hot-rank.top1 { 
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: white; 
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}
.hot-rank.top2 { 
    background: linear-gradient(135deg, #ffa502, #ffbe76);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 165, 2, 0.4);
}
.hot-rank.top3 { 
    background: linear-gradient(135deg, #2ed573, #7bed9f);
    color: white;
    box-shadow: 0 2px 8px rgba(46, 213, 115, 0.4);
}
.hot-title {
    flex: 1;
    font-size: 15px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toc-link {
    display: block;
    padding: 8px 10px;
    font-size: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.toc-link:hover {
    background: var(--bg-light);
    color: var(--color-primary);
}
.toc-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 500;
}
.article-main {
    min-width: 0;
    padding-top: 10px;
}
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
}
.article-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--color-primary); }
.article-breadcrumb span { color: var(--text-placeholder); }
.article-breadcrumb .current { color: var(--text-primary); font-weight: 500; }
.article-detail-header {
    background: var(--bg-white);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 24px 24px 0 24px;
    box-shadow: var(--shadow-sm);
}
.article-detail-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}
.article-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.4;
}
.article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}
.article-detail-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.article-meta-divider {
    color: var(--border-color);
}
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.article-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 12px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
}
.article-tag:hover {
    background: var(--color-primary);
    color: white;
}
.article-synopsis {
    padding: 16px 20px;
    background: var(--bg-gray-lightest);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: var(--font-size-md);
}
.article-detail-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}
.article-detail-content {
    background: var(--bg-white);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-primary);
}
.article-detail-content p { margin-bottom: 16px; }
.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    cursor: zoom-in;
}
.article-detail-content h1, .article-detail-content h2,
.article-detail-content h3, .article-detail-content h4 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.article-detail-content h1 { font-size: 22px; color: var(--text-primary); font-weight: 700; }
.article-detail-content h2 { font-size: 20px; color: var(--text-primary); font-weight: 600; }
.article-detail-content h3 { font-size: 18px; color: var(--text-primary); font-weight: 600; }
.article-detail-content h4, .article-detail-content h5, .article-detail-content h6 { color: var(--text-primary); font-weight: 600; }
.article-detail-content ul, .article-detail-content ol {
    margin: 16px 0;
    padding-left: 24px;
}
.article-detail-content li { margin-bottom: 8px; }
.article-detail-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 12px 16px;
    margin: 16px 0;
    background: var(--bg-light);
    border-radius: 0 8px 8px 0;
}
.article-detail-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}
.article-detail-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}
.article-nav-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
.article-nav-item {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.article-nav-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-nav-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.article-nav-item.next-article { text-align: right; }
.article-nav-item.next-article .article-nav-label { justify-content: flex-end; }
.article-nav-title {
    font-size: 14px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-nav-empty { color: var(--text-placeholder); font-size: 13px; }
.article-related {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}
.article-related-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.related-item {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.related-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
}
.related-item-title {
    padding: 10px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.image-lightbox img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}
.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: white;
    cursor: pointer;
}
.image-lightbox-caption {
    color: white;
    margin-top: 12px;
    font-size: 14px;
}
.markdown-body { word-wrap: break-word; }
.markdown-body > *:first-child { margin-top: 0 !important; }
.markdown-body > *:last-child { margin-bottom: 0 !important; }
