/* 阅读页分享海报 */
.nc-share-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}
.nc-share-modal.is-open { display: block; }
.nc-share-mask {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 12, .74);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    animation: nc-share-fade .2s ease both;
}
.nc-share-dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(980px, calc(100vw - 40px));
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    overflow-x: hidden;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    border: 1px solid var(--nc-line-2);
    border-radius: 22px;
    background: var(--nc-surface);
    box-shadow: 0 36px 100px rgba(0, 0, 0, .65);
    animation: nc-share-pop .24s cubic-bezier(.22, .8, .28, 1) both;
    scrollbar-width: thin;
    scrollbar-color: var(--nc-line-2) transparent;
}
.nc-share-dialog::-webkit-scrollbar { width: 7px; }
.nc-share-dialog::-webkit-scrollbar-track { background: transparent; }
.nc-share-dialog::-webkit-scrollbar-thumb { background: var(--nc-line-2); border-radius: 4px; }
.nc-share-preview {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    background:
        radial-gradient(420px 300px at 50% 0, rgba(224, 178, 106, .08), transparent 72%),
        var(--nc-bg-2);
    border-right: 1px solid var(--nc-line);
}
.nc-share-preview canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 12px;
    background: #0b0e13;
    box-shadow: 0 22px 52px rgba(0, 0, 0, .5);
}
.nc-share-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(9, 12, 18, .9);
    color: var(--nc-text-2);
    font-size: 13px;
}
.nc-share-loading[hidden] { display: none !important; }
.nc-share-loading::before {
    content: "";
    width: 21px;
    height: 21px;
    border: 2px solid rgba(224, 178, 106, .22);
    border-top-color: var(--nc-gold);
    border-radius: 50%;
    animation: nc-share-spin .8s linear infinite;
}
.nc-share-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 38px 36px 32px;
}
.nc-share-close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--nc-line);
    border-radius: 50%;
    background: var(--nc-surface-2);
    color: var(--nc-muted);
    font-size: 22px;
    line-height: 1;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.nc-share-close:hover {
    border-color: var(--nc-gold);
    color: var(--nc-gold);
    background: var(--nc-gold-soft);
}
.nc-share-kicker {
    margin-bottom: 12px;
    color: var(--nc-gold);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
}
.nc-share-side h3 {
    margin: 0 0 12px;
    color: var(--nc-text);
    font: 600 30px/1.3 var(--nc-serif);
}
.nc-share-desc {
    margin: 0;
    color: var(--nc-muted);
    font-size: 14px;
    line-height: 1.85;
}
.nc-share-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
}
.nc-share-actions button {
    width: 100%;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--nc-line-2);
    border-radius: 10px;
    background: var(--nc-surface-2);
    color: var(--nc-text-2);
    font-size: 14px;
    font-weight: 600;
    transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.nc-share-actions button:hover:not(:disabled) {
    border-color: var(--nc-gold);
    color: var(--nc-gold);
    background: var(--nc-gold-soft);
}
.nc-share-actions button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--nc-gold-2), var(--nc-gold));
    color: #17120a;
    box-shadow: 0 8px 22px rgba(224, 178, 106, .2);
}
.nc-share-actions button.primary:hover:not(:disabled) {
    background: var(--nc-gold-2);
    color: #17120a;
}
.nc-share-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.nc-share-status {
    min-height: 20px;
    margin-top: 12px;
    color: var(--nc-muted);
    font-size: 12px;
    line-height: 1.6;
}
.nc-share-status.is-error { color: var(--nc-red); }
.nc-share-url {
    margin-top: 16px;
    padding: 9px 11px;
    overflow: hidden;
    border: 1px solid var(--nc-line);
    border-radius: 8px;
    background: var(--nc-bg-2);
    color: var(--nc-dim);
    font-size: 12px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nc-share-note {
    margin: 12px 0 0;
    color: var(--nc-dim);
    font-size: 11.5px;
    line-height: 1.65;
}
body.nc-share-open { overflow: hidden; }
.paging_share { display: none !important; }

@keyframes nc-share-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes nc-share-pop {
    from { opacity: 0; transform: translate(-50%, -48%) scale(.97); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes nc-share-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
    .nc-share-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        grid-template-columns: minmax(0, 1fr);
        border-radius: 17px;
    }
    .nc-share-preview {
        padding: 22px 20px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--nc-line);
    }
    .nc-share-preview canvas {
        width: min(100%, 250px);
        border-radius: 9px;
    }
    .nc-share-side {
        padding: 22px 20px 22px;
    }
    .nc-share-side h3 { font-size: 24px; }
    .nc-share-actions { margin-top: 18px; }
    .nc-share-actions button { height: 42px; }
}
@media (max-width: 1024px) {
    .paging_share {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .nc-share-mask,
    .nc-share-dialog { animation: none; }
    .nc-share-loading::before { animation-duration: 2s; }
}
