@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@300;400&display=swap');

:root {
    --primary-color: #8e44ad;
    --secondary-color: #c0392b;
    --background-color: #f4f4f9;
    --surface-color: #ffffff;
    --text-color: #34495e;
    --subtle-text-color: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family-headings: 'Playfair Display', serif;
    --font-family-body: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-family-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    /* Add a subtle noise texture */
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" width="80" height="80"%3E%3Crect fill="%23f4f4f9" width="80" height="80"%3E%3C/rect%3E%3Cg fill-opacity="0.1"%3E%3Ccircle fill="%238e44ad" cx="40" cy="40" r="5"%3E%3C/circle%3E%3C/g%3E%3C/svg%3E');
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
}

header h1 {
    font-family: var(--font-family-headings);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 1px;
}

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

#post-form-container, #posts-container {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

h2 {
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

#post-form input[type="text"],
#post-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#post-form input[type="text"]:focus,
#post-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(142, 68, 173, 0.2);
}

#post-form textarea {
    min-height: 200px;
    resize: vertical;
}

#post-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-family: var(--font-family-body);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.3);
}

#post-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(142, 68, 173, 0.4);
}

#posts-list {
    display: grid;
    gap: 2rem;
}

@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr;
    }
}
