/* ==========================================================================
   Paleta (fork: tema oscuro único, sin variante clara)
   ========================================================================== */
:root {
    --bg: #14161a;
    --surface: #1c1f24;
    --surface-alt: #16181d;
    --fg: #e4e6eb;
    --fg-muted: #9aa0a8;
    --accent: #6ea8fe;
    --accent-hover: #8bbcff;
    --accent-active: #5590e6;
    --on-accent: #10131a;
    --border: #2c3138;
    --border-strong: #3a4048;
    --pre-marker: #f36d33;
    --error: #ff6b6b;
    --shadow: rgba(0, 0, 0, 0.45);
}

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--fg);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a .btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent);
    color: var(--on-accent);
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
}

a .btn:hover {
    background-color: var(--accent-hover);
}

a .btn:active {
    background-color: var(--accent-active);
}

/* Header Styles */
header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 40px;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header nav {
    margin-top: 10px;
}

header nav a {
    margin-right: 15px;
}

/* Footer Styles */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9em;
    color: var(--fg-muted);
}

/* Article Styles */
article {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow);
}

article h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

article .meta {
    color: var(--fg-muted);
    font-size: 0.9em;
    margin-bottom: 20px;
}

article img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Code Block Styles */
pre {
    background-color: var(--surface-alt);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--pre-marker);
    color: var(--fg);
    page-break-inside: avoid;
    font-family: monospace;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 1.6em;
    max-width: 100%;
    overflow: auto;
    padding: 1em 1.5em;
    display: block;
    word-wrap: break-word;
}

/* IFrame Styles */
iframe {
    max-width: 100%;
    border: none;
    margin: 20px 0;
}

/* GitHub Gist Styles */
.gist {
    margin: 20px 0;
}

.gist h4 {
    margin-bottom: 10px;
    color: var(--fg);
}

/* Error Page Styles */
.error-container {
    text-align: center;
    padding: 40px;
    background-color: var(--surface);
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow);
}

.error-container h1 {
    color: var(--error);
}

.error-container ul {
    text-align: left;
    display: inline-block;
}

/* Preview Notice */
.preview-notice {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent);
    background-color: var(--surface-alt);
}

.preview-notice p {
    margin: 0.4rem 0;
}