:root {
    --bg-color: #0d0b14;
    --card-bg: #16141f;
    --input-bg: #1f1b2e;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #2d2b3b;
    --error: #ef4444;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

.acentuado {
    color: var(--primary)
}

/* NAVBAR */
nav {
    background-color: var(--card-bg);
    /* Glassmorphism effect background */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-logo {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-main);
}

nav a.btn-nav {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.9rem;
}

nav a.btn-nav:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* CONTAINER */
.container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
    /* Sticky footer */
}

/* HEADINGS */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* FORMS */
form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

button[type="submit"] {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: var(--primary-hover);
}

/* POSTS */
article.post-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    /* Mantiene saltos de línea */
}

/* ERRORS AND MESSAGES */
.error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.flashes {
    list-style: none;
    margin-bottom: 2rem;
}

.flashes li {
    background-color: rgba(16, 185, 129, 0.1);
    /* Green tint */
    color: var(--success);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--success);
    margin-bottom: 0.5rem;
}

.flashes li.error {
    background-color: rgba(239, 68, 68, 0.1);
    /* Red tint */
    color: var(--error);
    border-color: var(--error);
}

/* LOGIN */
.aviso {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .container {
        margin-top: 1rem;
    }
}