/* Global Dark 4chan-Inspired CSS */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;700&display=swap');

body {
    font-family: 'Fira Sans', sans-serif;
    background-color: #121212;   /* Dark background */
    color: #e0e0e0;              /* Light gray text */
    margin: 0;
    padding: 0;
}

a {
    color: #8ab4f8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header, footer {
    background-color: #1f1f1f;
    border-bottom: 1px solid #444;
    padding: 10px 20px;
}

header button, footer button {
    background-color: #2a2a2a;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
}

header button:hover, footer button:hover {
    background-color: #3a3a3a;
}

header img {
    vertical-align: middle;
    border: 1px solid #555;
    border-radius: 4px;
    margin-right: 10px;
}

main {
    padding: 20px;
}

div, section, article {
    background-color: #1b1b1b;
    border: 1px solid #333;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

h1, h2, h3, h4 {
    color: #f0f0f0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 10px;
}

input, textarea, select {
    background-color: #1f1f1f;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 5px;
    border-radius: 3px;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    border-color: #8ab4f8;
    outline: none;
}

button {
    background-color: #2a2a2a;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

button:hover {
    background-color: #3a3a3a;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #333;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #222;
}

/* Forms container */
form {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Footer styling */
footer {
    text-align: center;
    font-size: 0.9em;
    color: #aaa;
    padding: 15px 0;
    margin-top: 30px;
}

.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
}

.user-card {
    background-color: #1b1b1b;     /* Same as your div/section/article background */
    border: 1px solid #333;
    padding: 12px;
    border-radius: 4px;
    width: 150px;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.user-card:hover {
    background-color: #222;       /* Slight highlight on hover */
    border-color: #555;
}

.user-card img {
    border-radius: 4px;           /* Matches header img style */
    border: 1px solid #555;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
}

.user-card a {
    color: #e0e0e0;               /* Keep text readable */
    text-decoration: none;
}

.user-card a:hover {
    text-decoration: underline;   /* Consistent link hover */
}

.bio img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.bio code {
    background-color: #2a2a2a;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.post-card {
    background-color: #1b1b1b;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.post-card:hover {
    background-color: #2a2a2a;
}

.post-card h3 {
     margin: 0 0 5px 0;
}

.post-card .meta {
    font-size: 0.9em;
    color: #aaa;
}

.post-card .description {
    margin-top: 8px;
}

.form-container {
    max-width: 700px;
    margin: 20px auto;
    background-color: #1b1b1b;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 4px;
}

.form-container label {
    display: block;
    margin-bottom: 5px;
    margin-top: 15px;
}

.form-container input[type="text"],
.form-container textarea,
.form-container select {
    width: 100%;
}

.form-container button {
    margin-top: 15px;
}

.error {
    color: #ff6666;
    margin-top: 10px;
}

.success {
    color: #66ff66;
    margin-top: 10px;
}

/* Header specific for create post */
header.post-header {
    background-color: #1f1f1f;
    padding: 10px 20px;
    margin-bottom: 20px;
}

header.post-header button {
    margin-right: 10px;
}

/* Post page */
header.post-header {
    background-color: #1f1f1f;
    padding: 10px 20px;
    margin-bottom: 20px;
}

header.post-header button {
    margin-right: 10px;
}

.post-meta {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 10px;
}

.post-meta a {
    color: #8ab4f8;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-short-desc {
    background-color: #1b1b1b;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.post-content {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 4px;
    line-height: 1.6;
}

/* Ensure BBCode-generated links are styled */
.post-content a {
    color: #8ab4f8;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

header.post-header {
    background-color: #1f1f1f;
    padding: 10px 20px;
    margin-bottom: 20px;
}

header.post-header button {
    margin-right: 10px;
}

.filter-bar {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    gap: 10px;
}

.filter-bar input[type="text"],
.filter-bar select {
    flex: 1;
    padding: 5px;
    background-color: #1f1f1f;
    border: 1px solid #555;
    color: #e0e0e0;
    border-radius: 3px;
}

.filter-bar button {
    padding: 5px 10px;
}

.post-card {
    max-width: 800px;
    margin: 15px auto;
    background-color: #1b1b1b;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 4px;
}

.post-card h3 {
    margin: 0 0 10px 0;
}

.post-meta {
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 10px;
}

.post-meta a {
    color: #8ab4f8;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-short-desc {
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    background-color: #1b1b1b;
    border: 1px solid #333;
    border-radius: 3px;
    color: #8ab4f8;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #2a2a2a;
}

.pagination .current {
    background-color: #3a3a3a;
    color: #fff;
    cursor: default;
}

/* Post author + comment pfp */
.pfp, .comment-pfp {
    width: 16px;
    height: 16px;
    border-radius: 3px;  /* matches your existing small rounded style */
    object-fit: cover;
    margin-right: 6px;
    border: 1px solid #555; /* consistent with your theme */
}

/* Align pfps + text nicely */
.post-meta,
.comment-meta {
    display: flex;
    align-items: center;   /* vertically center */
    gap: 6px;              /* small space between pfp + text */
}


/* --- Unified Comment Blob Style --- */

.comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    background-color: #1b1b1b;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

/* Remove background from inner sections so they look unified */
.comment-meta,
.comment-content {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Divider line between meta and content */
.comment-meta {
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
    margin-bottom: 8px;

    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-content {
    line-height: 1.5;
}