/* ===== Bloco estilo IDE (barra + código colorido) ===== */
.code-ide-block {
    margin: 1.5rem 0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: #1e1e1e;
}

.code-ide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #2d2d2d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
}

.code-ide-lang {
    color: #9cdcfe;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.code-ide-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #ccc;
    font-size: 0.72rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.code-ide-copy:hover {
    background: rgba(53, 244, 178, 0.15);
    border-color: rgba(53, 244, 178, 0.4);
    color: #fff;
}

.code-ide-block pre {
    margin: 0 !important;
    padding: 1rem 1.15rem !important;
    background: #1e1e1e !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-x: auto;
}

.code-ide-block pre code {
    display: block;
    padding: 0 !important;
    background: transparent !important;
    font-family: ui-monospace, 'Cascadia Code', 'Fira Code', Consolas, monospace !important;
    font-size: 0.8125rem !important;
    line-height: 1.6 !important;
    white-space: pre !important;
    tab-size: 4;
}

/* Texto padrão do bloco; cada .hljs-* mantém sua cor */
.biblioteca-prose .code-ide-block pre code.hljs {
    color: #d4d4d4;
}

/* Código inline (trecho curto no parágrafo) */
.biblioteca-prose :not(.code-ide-block) > :not(pre) code,
.news-content :not(.code-ide-block) > :not(pre) code {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #9cdcfe !important;
    padding: 0.15em 0.45em !important;
    border-radius: 4px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9em;
}

/* Blocos legados sem wrapper IDE (antes do JS rodar) */
.biblioteca-prose pre:not(.code-ide-block pre),
.news-content pre:not(.code-ide-block pre) {
    background: #1e1e1e !important;
    color: #d4d4d4 !important;
    padding: 1rem 1.15rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.biblioteca-prose pre:not(.code-ide-block pre) code,
.news-content pre:not(.code-ide-block pre) code {
    color: inherit !important;
    background: transparent !important;
}
