/* ============ newworldgold 详情页：左目录 + 中正文 + 右广告(吸顶) ============ */
:root {
    --newsworld-header-offset: 0px;
    --nf-primary:#e67e23;
}

#main_detail {

    --nf-accent: var(--vertical-primary, var(--nf-primary));
}


@media (min-width: 1024px) {
    #main_detail .content_main {
        display: flex;
        align-items: stretch;
        column-gap: 24px;
    }

    #main_detail .content_main > .article_wrap {
        display: contents;
    }

    #nfTocSide {
        order: 1;
        flex: 0 0 240px;
        min-width: 0;
    }

    #main_detail .article_wrap > article {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
        padding: 0;
    }

    #main_detail .content_main > #sidebar_ad {
        order: 3;
        width: auto;
        flex: 0 0 min(260px,25%);
        min-width: 0;
    }
}

@media (min-width: 1024px) and (max-width: 1279.98px) {
    #nfTocSide {
        display: none !important;
    }
}

/* -------- 左侧目录 -------- */
#nfTocSide {
    display: none;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px;
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    #nfTocSide {
        display: block;
        /* align-self: flex-start;
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--newsworld-header-offset, 0px) + 20px);
        -webkit-overflow-scrolling: touch;
        z-index: 2; */
        max-height: calc(100vh - var(--newsworld-header-offset, 0px) - 40px);
        overflow-y: auto;
    }
}

.nf-toc-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.nf-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nf-toc-list .nf-toc-item {
    margin: 0;
    list-style: none;
}

/* h2 */
.nf-toc-item.lvl-2 .nf-toc-link::before {
    content: "";
    display: inline-block;
    height: 3px;
    width: 3px;
    border-radius: 50%;
    background-color: #000;
    flex: 0 0 auto;
    vertical-align: middle;
    margin-top: -5px;
}

.nf-toc-item.lvl-2 .nf-toc-link.active::before {
    background: var(--nf-accent);
}

/* h3 */
.nf-toc-item.lvl-3 .nf-toc-link::before {
    content: "";
    display: inline-block;
    height: 1px;
    width: 5px;
    background-color: #ccc;
    flex: 0 0 auto;
    vertical-align: middle;
    margin-top: -3px;
}

.nf-toc-item.lvl-3 .nf-toc-link.active::before {
    background: var(--nf-accent);
}

#nfTocSide .nf-toc-item a:focus,
#nfTocSide .nf-toc-item a:hover {
    text-decoration: none;
}

#nfTocSide .nf-toc-item a:active,
#nfTocSide .nf-toc-item a:focus {
    color: inherit;
}

.nf-toc-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nf-toc-link:hover {
    color: var(--nf-accent);
    background: rgba(0, 0, 0, 0.05);
}

.nf-toc-link.active {
    color: var(--nf-accent) !important;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.07);
}

.lvl-3 .nf-toc-link {
    padding-left: 22px;
    font-size: 13px;
}

/* -------- meta：tags -------- */
.nf-news-tags {
    margin-top: 8px;
    width: 100%;
}

.nf-news-tags ul {
    list-style-type: disc !important;
    list-style-position: outside !important;
    padding-left: 12px !important;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nf-news-tags ul > li {
    list-style: disc outside !important;
}

.nf-news-tags ul li::marker {
    color: var(--nf-accent);
    font-size: 0.8em;
}

.nf-news-tags ul li span {
    display: inline-block;
    font-size: 14px;
    color: #333333;
    text-transform: none;
}

.nf-news-tags ul li:hover span {
    color: var(--nf-accent) !important;
}

@media (max-width: 768px) {
    .nf-news-tags ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    #author_top_wrapper {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
}

.nf-recommend {
    background: #f5f5f5;
    border-radius: 1rem;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
}

.nf-recommend__title {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.nf-recommend__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
}

.nf-recommend .nf-recommend__list > li {
    list-style: none;
    margin: 0;
    min-width: 0;
}

.nf-recommend__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #ccc;
    text-decoration: none;
}

.nf-recommend__list > li:nth-last-child(-n+2) .nf-recommend__item {
    border-bottom: none;
}

.nf-recommend__img {
    display: block;
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #ececec;
}

.nf-recommend__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.nf-recommend__item:hover .nf-recommend__img img {
    transform: scale(1.05);
}

.nf-recommend__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.nf-recommend__name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-recommend__item:hover .nf-recommend__name {
    color: var(--nf-accent);
}

@media (max-width: 768px) {
    .nf-recommend {
        padding: 18px;
    }

    .nf-recommend__list {
        grid-template-columns: 1fr;
    }

    .nf-recommend__list > li:nth-last-child(-n+2) .nf-recommend__item {
        border-bottom: 1px solid #ccc;
    }

    .nf-recommend__list > li:last-child .nf-recommend__item {
        border-bottom: none;
    }
}

/* -------- 右侧广告 -------- */
@media (min-width: 1024px) {
    #main_detail #sidebar_ad .nf-ad-sticky {
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--newsworld-header-offset, 0px) + 20px);
        max-width: 100%;
    }

    #main_detail #sidebar_ad img {
        max-height: calc(100vh - var(--newsworld-header-offset, 0px) - 60px);
        object-fit: contain;
    }
}



/* -------- 分享 -------- */
.share-area {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-family: inherit;
}
.share-icons img {
    width: 100%;
    height: 100%;
}
.share-area .share {
    color: #8b9bb4;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.share-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-icons button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.share-icons button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn.sf-twitter {
    background: #000;
}

.share-btn.sf-facebook {
    background: #1877f2;
}

.share-btn.sf-reddit {
    background: #ff4500;
}

.share-btn.sf-whatsapp {
    background: #25d366;
}

.share-btn.sf-pinterest {
    background: #e60023;
}

.share-btn.sf-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-btn.sf-copy {
    background: #5b6472;
}

/* -------- 复制/提示 toast -------- */
#nfToastMask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 100009;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
    pointer-events: none;
}

#nfToast {
    position: fixed;
    left: 50%;
    top: 40vh;
    transform: translateX(-50%);
    background: var(--nf-accent, #d91a68);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    width: max-content;
    max-width: 30vw;
    z-index: 100010;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
    pointer-events: none;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#nfToast.show,
#nfToastMask.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#nfToastClose {
    position: absolute;
    right: -10px;
    top: 10%;
    transform: translateY(-50%);
    border: 0;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    background-color: var(--nf-accent, #d91a68);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

@media (max-width: 768px) {
    #nfToast {
        max-width: 90vw;
        padding: 10px;
    }
}

.nf-toc-fab {
    display: none;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    width: 36px;
    height: fit-content;
    border-radius: 10px;
    border: none;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}

.nf-toc-fab .nf-bar {
    display: block;
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: #cfcfcf;
    transition: all 0.2s ease;
}

.nf-bar.active {
    width: 26px !important;
    background-color: var(--nf-accent) !important;
}

.nf-toc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 950;
    background: transparent;
    display: none;
}

.nf-toc-drawer {
    display: none;
    position: fixed;
    right: 10px;
    top: 50%;
    z-index: 960;
    width: min(84%, 360px);
    max-height: 74vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    flex-direction: column;
    transform: translateY(-50%);
}

.nf-toc-drawer.is-open {
    display: flex;
}

.nf-toc-backdrop.is-open {
    display: block;
}

.nf-toc-drawer-head {
    flex: 0 0 auto;
    position: relative;
    background: var(--nf-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

button.nf-toc-drawer-close {
    background: none;
    color: #fff;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.nf-toc-drawer .nf-toc-list {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.nf-toc-drawer .nf-toc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.35;
}

.nf-toc-drawer .lvl-3 .nf-toc-link {
    padding-left: 30px;
    font-weight: 400;
    color: #8a8a8a;
    font-size: 14px;
}

.nf-toc-drawer .nf-toc-link.active {
    background: rgba(0, 0, 0, 0.07);
    color: var(--nf-accent);
}

@media (max-width: 1279.98px) {
    .nf-toc-fab {
        display: flex;
    }
}

/* -------- 深色模式 -------- */
body.dark #nfTocSide {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(189, 189, 189, 0.3);
}

body.dark .nf-toc-title {
    color: #fff;
}

body.dark .nf-toc-link {
    color: rgba(255, 255, 255, 0.7);
}

body.dark .nf-toc-item.lvl-2 .nf-toc-link::before {
    background-color: #fff;
}

body.dark .nf-toc-item.lvl-3 .nf-toc-link::before {
    background-color: rgba(255, 255, 255, 0.4);
}

body.dark .nf-toc-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark .nf-toc-link.active {
    background: rgba(255, 255, 255, 0.12);
}

body.dark .nf-news-tags ul li span {
    color: #fff;
}

body.dark .nf-recommend {
    background: rgba(255, 255, 255, 0.1);
}

body.dark .nf-recommend__title {
    color: #fff;
}

body.dark .nf-recommend__name {
    color: rgba(255, 255, 255, 0.75);
}

body.dark .nf-recommend__item {
    border-bottom-color: rgba(189, 189, 189, 0.3);
}

body.dark .nf-recommend__img {
    background: rgba(255, 255, 255, 0.15);
}

body.dark .nf-toc-fab {
    background: #222;
}


body.dark .nf-share-icons .sf-copy {
    background: #5b6472;
}

body.dark .nf-toc-drawer {
    background: #222;
}

body.dark .nf-toc-drawer .nf-toc-link {
    color: rgba(255, 255, 255, 0.85);
}

body.dark .nf-toc-drawer .lvl-3 .nf-toc-link {
    color: rgba(255, 255, 255, 0.5);
}

body.dark .nf-toc-drawer .nf-toc-link.active {
    background: rgba(255, 255, 255, 0.1);
}

#nfBody  img {
	margin: 15px 0;
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
#nfBody  img:hover{
	transform: translateY(-3px);
	border-color: rgba(100, 210, 255, .55);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .45), 0 0 16px rgba(100, 210, 255, .18);
}