html, body {
    height: 100%;
    margin: 0;
    background-color: #000;
    color: white;
    font-family: 'Fira Code', monospace;
}

/* Solo centrar el home */
body.home {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    font-size: 2.5em;
}

/* Para páginas de posts, permitir scroll normal */
body:not(.home) {
    height: auto;
    min-height: 100vh;
    display: block;
}

/* Ajuste para que el contenido no se superponga con el header */
body.with-header:not(.home) {
    height: auto;
    min-height: 100vh;
    display: block;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    font-family: 'Fira Code', monospace;
}

/* Para posts, el container no debe usar flex centering */
body:not(.home) .container {
    display: block;
    text-align: left;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

a {
    color: white;
    text-decoration: none;
    margin: 4px;
}

a:hover {
    text-decoration: underline;
}

.post-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.2em;
    padding: 0;
}

.post-list-item {
    text-align: center;
    margin-bottom: 1em;
}

.post-list-title {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.post-list-date {
    color: #aaa;
    font-size: 0.95em;
    margin-top: 0.2em;
}

.post-card {
    position: relative;
    background: #111;
    border: 1.5px solid #333;
    border-radius: 12px;
    padding: 2.2em 2em 1.2em 2em;
    min-width: 320px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 2px 12px 0 #000a;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-card-date {
    position: absolute;
    top: 0.7em;
    right: 1.2em;
    color: #aaa;
    font-size: 0.95em;
    white-space: nowrap;
}

.post-card-title {
    text-align: center;
    font-size: 1.25em;
    font-weight: bold;
    word-break: break-word;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title a {
    color: white;
    text-decoration: none;
}

.post-card-title a:hover {
    text-decoration: underline;
}

.category-title, .post-card {
    width: 500px;
    max-width: 95vw;
    min-width: 320px;
    margin: 0 auto 0.7em auto;
    text-align: center;
    display: block;
}

.post-content {
    text-align: left;
    font-size: 1.08em;
    line-height: 1.7;
    margin: 0 auto;
    width: 100%;
    max-width: 900px;
    word-break: break-word;
}

/* Contenedor principal para bloques de código */
.highlight {
    position: relative;
    margin-bottom: 1.5em;
    border: 1px solid #444;
    border-radius: 8px;
    background: #181818;
    box-shadow: 0 2px 12px 0 #000a;
    overflow-x: auto;
}

/* Contenedor principal para bloques de código */
.highlight {
    position: relative;
    margin-bottom: 1.5em;
    border: 1px solid #000000;
    border-radius: 8px;
    background: #181818;
    box-shadow: 0 2px 12px 0 #000a;
    overflow-x: auto;
}

/* El elemento pre dentro del highlight */
.highlight pre {
    margin: 0;
    padding: 1.2em 1em 1em 1em;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 1em;
    color: #ffffff;
    overflow-x: visible;
}

/* Para bloques pre que no están dentro de .highlight */
pre:not(.highlight pre) {
    position: relative;
    margin-bottom: 1.5em;
    padding: 1.2em 1em 1em 1em;
    border: 1px solid #000000;
    border-radius: 8px;
    background: #181818;
    box-shadow: 0 2px 12px 0 #000a;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 1em;
    color: #ffffff;
    overflow-x: auto;
}

/* Código dentro de pre (evita estilos duplicados) */
pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: inherit;
    font-family: inherit;
}

/* Código inline (en medio de párrafos) */
p code, li code, span code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    background: #222;
    color: #ffffff;
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* Asegurarse de que no haya conflictos con otros elementos code */
:not(pre) > code {
    background: #222;
    color: #ffffff;
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9em;
}