/* Melhorias específicas para exibição de código */

/* Garantir que códigos sejam totalmente visíveis */
pre code,
pre code.language-csharp,
pre code.hljs {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: pre !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    padding: 1.5rem !important;
    background: transparent !important;
    color: inherit !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Container do código */
pre {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #282c34 !important;
    color: #abb2bf !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    position: relative !important;
    max-width: 100% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border-left: 4px solid #ff6600 !important;
}

/* Comentários destacados */
pre code .hljs-comment,
pre code .comment,
.hljs-comment {
    color: #5c6370 !important;
    font-style: italic !important;
    background-color: rgba(92, 99, 112, 0.15) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    display: inline !important;
}

/* Palavras-chave */
pre code .hljs-keyword,
.hljs-keyword {
    color: #c678dd !important;
    font-weight: 600 !important;
}

/* Strings */
pre code .hljs-string,
.hljs-string {
    color: #98c379 !important;
}

/* Tipos e classes */
pre code .hljs-type,
pre code .hljs-class,
.hljs-type,
.hljs-class {
    color: #e5c07b !important;
}

/* Números */
pre code .hljs-number,
.hljs-number {
    color: #d19a66 !important;
}

/* Funções */
pre code .hljs-function,
.hljs-function {
    color: #61afef !important;
}

/* Variáveis */
pre code .hljs-variable,
.hljs-variable {
    color: #e06c75 !important;
}

/* Scrollbar personalizada */
pre::-webkit-scrollbar {
    height: 10px !important;
    width: 10px !important;
}

pre::-webkit-scrollbar-track {
    background: #1e2127 !important;
    border-radius: 5px !important;
}

pre::-webkit-scrollbar-thumb {
    background: #0066cc !important;
    border-radius: 5px !important;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #004499 !important;
}

/* Garantir que não há elementos ocultos */
pre * {
    visibility: visible !important;
    display: inline !important;
}

pre code * {
    visibility: visible !important;
}

/* Quebra de linha preservada */
pre code br {
    display: block !important;
    content: "" !important;
    margin: 0 !important;
}

/* Espaçamento entre linhas */
pre code {
    line-height: 1.8 !important;
    letter-spacing: 0.3px !important;
}

