/* Reset básico para elementos HTML */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* Estilos globales */
body {
    line-height: 1.6;
    font-size: 16px;
    color: #333;
    background-color: #f7f7f7;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Estilos para Markdown */
.markdown-body {
    padding: 2em;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #333;
}

p, ul, ol {
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Estilos específicos para bloques de código */
pre, code {
    font-family: monospace;
}

pre {
    background-color: #eee;
    padding: 1em;
    overflow-x: auto;
    border-radius: 5px;
}

code {
    background-color: #f9f9f9;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Resaltado de sintaxis - Se recomienda usar una hoja de estilos de highlight.js */
.hljs {
    background: #f8f8f8;
    padding: 0.5em;
    border-radius: 5px;
}

/* Mejoras para la tabla de contenidos */
.table-of-contents h2 {
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.table-of-contents ul {
    padding-left: 1em;
}

/* Estilos para impresión y dispositivos móviles */
@media screen and (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    pre {
        word-wrap: break-word;
    }
}

@media print {
    body {
        font-size: 12px;
    }

    .container {
        width: 100%;
        padding: 10px;
        border: none;
    }

    .table-of-contents {
        display: none;
    }

    pre {
        background-color: transparent;
        border: none;
    }
}
