body {
    margin: 0;
    background: #1e1f24;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

.app {
    max-width: 960px;
    margin: auto;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    border: none;
    border-radius: 8px;
    background: #2b2c31;
    color: #e0e0e0;
    outline: none;
}

.section {
    margin-bottom: 3rem;
    background: #25262b;
    border-radius: 12px;
    padding: 1rem;
    transition: max-height 0.3s ease;
}

.section h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section.collapsed .posts {
    display: none;
}

.toggle-icon {
    font-size: 1rem;
    opacity: 0.6;
}

.posts,
.flat-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 1rem;
}

/* Individual Post Box */
.post {
    background: #2e2f34;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 5px #00000044;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s ease;
    min-height: 160px;
}

.post:hover {
    transform: scale(1.02);
}

.post h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #58a6ff;
}

.post p {
    margin: 0;
    color: #ccc;
}

.post-links {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-links a {
    color: #ffffff;
    background: #3a3b40;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.post-links a:hover {
    background: #58a6ff;
    color: black;
}

/* Tag display under each post */
.post-tags {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.post-tags span {
    background: #3a77fa94;
    color: #ddd;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    user-select: none;
}

.form-banner {
    background: #2b2c31;
    border-radius: 10px;
    max-width: 960px;
    margin: 2rem auto;
    padding: 1rem 1.5rem;
    text-align: center;
    box-shadow: 0 0 6px #00000033;
    font-size: 1.05rem;
}

.form-banner a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: bold;
    margin-left: 0.4rem;
    transition: color 0.2s ease;
}

.form-banner a:hover {
    color: #ffffff;
}

.contributors {
    background: #2b2c31;
    border-radius: 10px;
    max-width: 960px;
    margin: 2rem auto;
    padding: 1rem 1.5rem;
    text-align: center;
    box-shadow: 0 0 6px #00000033;
    font-size: 1.05rem;
    transition: background-color 1s ease, transform 1s ease;
}

.contributors a {
    color: #ff6161;
    text-decoration: none;
    font-weight: bold;
    margin-left: 0.4rem;
    transition: color 0.2s ease;
}

.contributors a:hover {
    color: #ffffffee;
}

.contributors:hover {
    background: #ff36369a;
    box-shadow: 0 0 6px #670000;
    transform: scale(1.05);
}

@media (max-width: 768px) {

    .posts,
    .flat-posts {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2rem;
    }

    input[type="text"] {
        font-size: 1rem;
        padding: 0.6rem;
    }

    .post {
        font-size: 0.95rem;
    }

    .post h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {

    .posts,
    .flat-posts {
        grid-template-columns: 1fr;
    }

    .app {
        padding: 1rem;
    }

    .form-banner {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .contributors {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
}