body {
    max-width: 650px;
    text-align: justify;
    text-justify: auto;
    margin: 40px auto;
    padding: 0 10px;
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    color: #444;
    transition: color 0.3s ease, background-color 0.3s ease;
}

h1, h2, h3 {
    line-height: 1.2;
}

pre {
    font-family: monospace;
    font-size: 13px; /* 3px menos que 16px del body */
    line-height: initial;
    overflow-x: auto;
}

td {
    vertical-align: top;
}

input, textarea {
    -webkit-appearance: none;
    padding: 5px 8px;
    font-size: 16px;
    font: inherit;
    background-color: #e1dfdf;
    border: 1px solid #444;
    border-radius: 0;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.posts-table td {
    padding: 2px;
    border-bottom: 1px solid;
}

input[type=file] {
    background-color: initial;
    border: initial;
}

blockquote {
    margin-left: 20px;
    margin-right: 0;
    padding: 0 10px;
    border-left: .2em solid;
}

img {
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    body {
        color: white;
        background: #444
    }
    a:link{
        color:#5bf
    }
    a:visited{
        color:#ccf
    }
    input, textarea {
        color: white;
        background-color: #222;
        border: 1px solid white;
    }
    .posts-table td {
        border-bottom: 1px solid;
    }
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline-block;
    padding-right: 8px;
}

/* Classes */

.field { margin-bottom: 1rem; }
.field > label { margin-bottom: .25rem; }
.field > * { display: block; width: 100%; box-sizing: border-box; }

.editor { height: 650px; }
.about { height: 200px; }
.auth-form { max-width: 650px; }

.posts-title {
    padding-left: 8px;
}

.posts-date {
    white-space: nowrap;
}

/* Mejoras de accesibilidad */
input:focus, textarea:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Ajustes para móviles */
@media (max-width: 480px) {
    body {
        margin: 20px auto;
        padding: 0 15px;
        font-size: 15px; /* Ligera reducción en móviles */
    }
    
    nav ul li {
        display: block;
        padding: 5px 0;
    }
    
    pre {
        font-size: 12px; /* Ajuste proporcional para móviles */
    }
    
    .editor {
        height: 500px; /* Reducción de altura en móviles */
    }
}

/* Mejora adicional: suavizar el scroll */
html {
    scroll-behavior: smooth;
}

/* Mejora para tablas en móviles */
@media (max-width: 480px) {
    .posts-table {
        font-size: 14px;
    }
    
    .posts-table td {
        padding: 4px 2px;
    }
}
