/* YIA 节点卡片：左侧色条 + 时间轴，区别于 DUX 白底圆角 */
.article-content .node-sub-cards,
.article .node-sub-cards,
.node-sub-cards,
.article-content .node-info-cards,
.article .node-info-cards,
.node-info-cards {
    margin: 8px 0 20px;
}

.article-content p:has(> .node-sub-card),
.article-content p:has(> .node-info-card),
.article-content p:has(> .node-sub-cards),
.article-content p:has(> .node-info-cards) {
    margin: 0;
}

.node-sub-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.node-sub-card {
    position: relative;
    padding: 14px 14px 14px 18px;
    margin: 0;
    background: linear-gradient(90deg, rgba(11, 178, 122, 0.08) 0%, #f8fbf9 42%, #fff 100%);
    border: 1px solid rgba(11, 178, 122, 0.16);
    border-radius: 8px;
}

.node-sub-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--primary-color, #0bb27a);
}

.node-sub-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-color, #0bb27a);
    line-height: 1.3;
    margin-bottom: 8px;
}

.node-sub-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px 8px 12px;
    background: #fff;
    border: 1px dashed rgba(11, 178, 122, 0.28);
    border-radius: 6px;
}

.node-sub-url {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #202935;
    word-break: break-all;
    font-family: Consolas, "Courier New", monospace;
}

.node-copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid var(--primary-color, #0bb27a);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-color, #0bb27a);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.node-copy-btn:hover {
    background: var(--primary-color, #0bb27a);
    color: #fff;
}

.node-copy-btn:active {
    transform: scale(0.97);
}

.node-copy-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    pointer-events: none;
}

.node-copy-btn.is-copied {
    background: var(--primary-color, #0bb27a);
    color: #fff;
}

.node-info-cards {
    position: relative;
    margin-left: 8px;
    padding-left: 18px;
    border-left: 1px solid #edf1fc;
}

.node-info-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    margin: 0;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #eaeaea;
    box-shadow: none;
}

.node-info-card:last-child {
    border-bottom: none;
}

.node-info-card::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -5px;
    background: #fff;
    border: 2px solid var(--primary-color, #0bb27a);
    border-radius: 50%;
}

.node-info-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #202935;
    line-height: 1.4;
    word-break: break-word;
}

.node-info-tags {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.node-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.node-tag-ping {
    color: #0bb27a;
    background: rgba(11, 178, 122, 0.1);
}

.node-tag-ping.is-mid {
    color: #e6a23c;
    background: rgba(230, 162, 60, 0.12);
}

.node-tag-ping.is-high {
    color: #ff5e52;
    background: rgba(255, 94, 82, 0.1);
}

.node-tag-proto {
    color: #8d8f96;
    background: #f3f5f7;
}

.yia-node-tip {
    position: fixed;
    left: 50%;
    bottom: 80px;
    z-index: 99999;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 18px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.yia-node-tip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
    .node-sub-card {
        padding: 12px 12px 12px 16px;
    }

    .node-sub-name {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .node-sub-row {
        flex-wrap: nowrap;
        min-height: 36px;
        padding: 6px 8px;
        gap: 8px;
    }

    .node-sub-url {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: normal;
        font-size: 12px;
    }

    .node-copy-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .node-info-cards {
        margin-left: 4px;
        padding-left: 14px;
    }

    .node-info-card {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 0;
    }

    .node-info-card::before {
        left: -19px;
        width: 8px;
        height: 8px;
    }

    .node-info-name {
        font-size: 13px;
    }

    .node-info-tags {
        margin-left: auto;
        justify-content: flex-end;
    }
}
