/* CorePress 节点卡片：IDE 窗口 + 行号列表 */
.post-content .node-sub-cards,
.post-content .node-info-cards,
.node-sub-cards,
.node-info-cards {
    margin: 12px 0 20px;
    max-width: 100%;
}

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

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

.node-sub-card {
    position: relative;
    padding: 38px 14px 14px;
    margin: 0;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.node-sub-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 28px;
    background-color: #303133;
    background-image:
        radial-gradient(circle at 16px 14px, #ff5f57 0 5px, transparent 6px),
        radial-gradient(circle at 34px 14px, #febc2e 0 5px, transparent 6px),
        radial-gradient(circle at 52px 14px, #28c840 0 5px, transparent 6px);
}

.node-sub-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--Maincolor, #409EFF);
    line-height: 1.3;
    margin-bottom: 8px;
}

.node-sub-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 10px;
    background: #f7f9fa;
    border: 1px dashed #dcdfe6;
    border-radius: 4px;
}

.node-sub-url {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #303133;
    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: 7px 12px;
    border: none;
    border-radius: 4px;
    background: var(--Maincolor, #409EFF);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.2s, transform 0.15s, background 0.2s;
}

.node-copy-btn:hover {
    filter: brightness(1.06);
}

.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: #67c23a;
    filter: none;
}

.node-info-cards {
    overflow: hidden;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    background: #fff;
    counter-reset: cp-node;
}

.node-info-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 10px 0;
    margin: 0;
    background: #fff;
    border: none;
    border-bottom: 1px solid #ebeef5;
    box-shadow: none;
}

.node-info-card:nth-child(even) {
    background: #fafbfc;
}

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

.node-info-name {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 44px;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    line-height: 1.4;
    word-break: break-word;
    counter-increment: cp-node;
}

.node-info-name::before {
    content: counter(cp-node, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
    color: #909399;
    font-size: 11px;
    font-weight: 700;
    font-family: Consolas, "Courier New", monospace;
    border-right: 1px solid #ebeef5;
}

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

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

.node-tag-ping {
    color: #67c23a;
    background: rgba(103, 194, 58, 0.12);
}

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

.node-tag-ping.is-high {
    color: #f56c6c;
    background: rgba(245, 108, 108, 0.12);
}

.node-tag-proto {
    color: #909399;
    background: #f4f4f5;
}

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

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

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

    .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: 6px 10px;
        font-size: 12px;
    }

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

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

    .node-info-name::before {
        width: 32px;
    }

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