/**
 * 文章详情页（电脑版）— 与手机版 detail-section 结构一致
 */
.article-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}

.ais-article-detail.detail-section {
    background: #fff;
    min-height: auto;
    max-width: 960px;
    margin: 0 auto 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.ais-article-detail .detail-info {
    padding: 16px 16px 12px;
}

.ais-article-detail .detail-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.ais-article-detail .detail-title-row h1 {
    flex: 1;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    min-width: 0;
    color: #1a1a1a;
}

.ais-article-detail .detail-share-btn {
    flex-shrink: 0;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    padding: 7px 12px;
    border-radius: 14px;
    cursor: pointer;
}

.ais-article-detail .detail-share-btn:hover {
    background: #ebebeb;
}

.ais-article-detail .detail-info .meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.ais-article-detail .detail-info .meta .tag,
.ais-article-detail .detail-info .meta span.tag {
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 13px;
}

.ais-article-detail .detail-info .meta[data-channel="nan"] .tag:not(.tag-derive),
.ais-article-detail .detail-info .meta.meta-nan .tag:not(.tag-derive) {
    background: #f5faff;
    color: #1565c0;
}

.ais-article-detail .detail-info .meta[data-channel="nv"] .tag:not(.tag-derive),
.ais-article-detail .detail-info .meta.meta-nv .tag:not(.tag-derive) {
    background: #fff7f9;
    color: #c2185b;
}

.ais-article-detail .detail-info .meta .tag-derive {
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 13px;
    background: #fff3e0;
    color: #e65100;
}

.ais-article-detail .detail-info .meta .detail-author a {
    color: #666;
    text-decoration: none;
}

.ais-article-detail .detail-info .meta .detail-author a:hover {
    color: #2196F3;
}

.ais-article-detail .detail-info .summary-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ais-article-detail .detail-info .summary-label {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    background: var(--channel-color, #ff4757);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0;
}

.ais-article-detail .detail-info .detail-ai-date {
    font-size: 14px;
    white-space: nowrap;
}

.ais-article-detail .detail-info .detail-ai-date .ai-prefix {
    color: #ccc;
}

.ais-article-detail .detail-info .detail-ai-date .ai-light {
    color: #ececec;
}

.ais-article-detail .detail-info .summary {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    white-space: normal;
    word-break: break-word;
}

.ais-article-detail .detail-info .summary.summary-nan {
    background: #f5faff;
}

.ais-article-detail .detail-info .summary.summary-nv {
    background: #fff7f9;
}

.ais-article-detail .detail-derive-section {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.ais-article-detail .detail-derive-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ais-article-detail .detail-derive-count {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

.ais-article-detail .detail-derive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ais-article-detail .detail-derive-list li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.ais-article-detail .detail-derive-list li:last-child {
    border-bottom: none;
}

.ais-article-detail .detail-derive-list a {
    color: #2196F3;
    text-decoration: none;
}

.ais-article-detail .detail-derive-list a:hover {
    text-decoration: underline;
}

.ais-article-detail .detail-derive-meta {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.ais-article-detail .detail-info .heat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    margin-bottom: 4px;
}

.ais-article-detail .detail-info .heat.heat-low {
    color: #999;
}

.ais-article-detail .detail-info .heat.heat-high {
    color: #1a1a1a;
    font-weight: 600;
}

.ais-article-detail .detail-body {
    padding: 16px;
    font-size: 17px;
    line-height: 1.75;
    color: #1a1a1a;
    letter-spacing: 0.2px;
    border-top: 1px solid #f5f5f5;
}

/* 相关故事：电脑版 5 列网格（最多约 3 行） */
.ais-article-detail .detail-related-section {
    margin: 0;
    padding: 16px 16px 12px;
    border-top: 1px solid #f0f0f0;
}
.ais-article-detail .detail-related-section .detail-derive-title {
    margin-bottom: 12px;
}
/* D4：相关故事标题下方、标题列表上方 */
.ais-article-detail .detail-related-ad {
    margin: 0 0 12px;
    text-align: center;
}
.ais-article-detail .detail-related-ad .ais-ad-slot {
    margin: 0;
    padding: 0;
    width: 100%;
    line-height: 0;
}
.ais-article-detail .detail-related-ad img,
.ais-article-detail .detail-article-end-ad img {
    width: 100% !important;
    display: block;
    margin: 0;
    padding: 0;
}
.ais-article-detail .detail-related-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px 12px;
}
.ais-article-detail .detail-related-grid li {
    margin: 0;
    padding: 0;
    border: none;
    min-width: 0;
}
.ais-article-detail .detail-related-grid a {
    display: block;
    font-size: 13px;
    line-height: 1.35;
    color: #1976d2;
    text-decoration: none;
    padding: 8px 10px;
    background: #f7f9fc;
    border-radius: 6px;
    border: 1px solid #eef2f7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ais-article-detail .detail-related-grid a:hover {
    background: #eef5ff;
    border-color: #d0e4ff;
    text-decoration: none;
}
.ais-article-detail .detail-article-end-ad {
    padding: 8px 16px 12px;
    text-align: center;
}
.ais-article-detail .detail-article-end-ad .ais-ad-slot {
    margin: 0;
}

@media (max-width: 900px) {
    .ais-article-detail .detail-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    /* 窄屏不展示相关故事（手机 SPA 本身也无此块） */
    .ais-article-detail .detail-related-section,
    .ais-article-detail .detail-related-ad,
    .ais-article-detail .detail-article-end-ad {
        display: none !important;
    }
}

.ais-article-detail .detail-body p {
    margin-bottom: 1.1em;
    text-indent: 0;
}

.ais-article-detail .detail-body .ais-mark,
.ais-article-detail .detail-body .wm[data-ais-m],
.ais-article-detail .detail-body .wm[data-wm] {
    display: none !important;
    visibility: hidden !important;
}

/* 底部操作栏 — 与手机版 detail-action 一致（无播读/阅读模式） */
.ais-article-detail .detail-action {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(216, 216, 216, 0.9);
    background: rgba(232, 232, 232, 0.95);
}

.ais-article-detail .detail-action button {
    flex: 1;
    padding: 12px 8px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    background: transparent;
    color: rgba(102, 102, 102, 0.85);
    cursor: pointer;
}

.ais-article-detail .detail-action button:hover {
    background: rgba(0, 0, 0, 0.04);
}

.ais-article-detail .detail-action button.bookmark-btn.bookmark-lit {
    color: #1976D2;
    font-weight: 600;
}

.ais-article-detail .detail-action .btn-derive.derive-active {
    color: #1976D2;
    font-weight: 600;
}

.ais-article-detail .detail-action .btn-copy-full:hover {
    background: #e8f4fd;
    border-color: #90caf9;
}

.ais-article-detail .detail-action .btn-back-top:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* 分享面板（电脑版文章页已改为直接复制链接，保留样式供其他页复用） */
.share-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.share-panel.show {
    display: block;
}

.share-panel h4 {
    margin: 0 0 15px;
    text-align: center;
}

.share-btns {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.share-btn .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.share-btn .label {
    font-size: 12px;
    color: #666;
}

.share-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.share-overlay.show {
    display: block;
}

@media screen and (max-width: 768px) {
    .article-page {
        padding: 0 0 24px;
        margin: 0;
    }

    .ais-article-detail.detail-section {
        border-radius: 0;
        box-shadow: none;
        max-width: none;
    }
}
