/**
 * Estilos principales de Bedland
 * 
 * Responsabilidad: Estilos globales de la aplicación
 */

/* Reset básico */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables CSS */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-error: #dc2626;
    --color-success: #16a34a;
    --color-warning: #ca8a04;
    --color-bg: #f8fafc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-border: #e2e8f0;
    --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Consolas, monospace;
}

/* Base */
html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
}

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tipografía */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

code {
    background-color: var(--color-border);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Página de errores */
.errors-page header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.errors-info {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.errors-info p {
    margin-bottom: 0.5rem;
}

.errors-info p:last-child {
    margin-bottom: 0;
}

.errors-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-clear, .btn-test {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-clear {
    background-color: var(--color-error);
    color: white;
}

.btn-clear:hover {
    background-color: #b91c1c;
    text-decoration: none;
}

.btn-test {
    background-color: var(--color-warning);
    color: white;
}

.btn-test:hover {
    background-color: #a16207;
    text-decoration: none;
}

.errors-list h2 {
    margin-bottom: 1rem;
}

.errors-list ul {
    list-style: none;
}

.error-item {
    background: white;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-error);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0 0.375rem 0.375rem 0;
}

.error-item pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.no-errors {
    color: var(--color-success);
    font-weight: 500;
}

/* Navegación */
nav {
    margin-top: 2rem;
}

nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 0.375rem;
}

nav a:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none;
}

/* Navegación home */
.home-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 300px;
}

.home-nav a {
    text-align: center;
}
