body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    padding: 20px;
    background: white;
    color: black;
    background-color: #EEF2FF;
}

.header-header {
    text-align: center;
    margin-bottom: 20px;
}

.header-image {
    margin-top: 10px;
    max-width: 20%;
    height: auto;
}

header h1 {
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 1px;
    margin: 0;
    color: gray;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
    width: fit-content;
    max-width: 90%;
}

.main-post {
    border: none;
}

.post-header {
    display: flex;
    font-size: 0.9em;
    color: gray;
    gap: 5px;
    text-decoration: none;
}

.post-date {
    color: black;
}

.post-content {
    margin-top: 5px;
    font-size: 10pt;
}

.post.highlighted {
    background-color: #d0e8ff !important;
}

.thread-container {
    border-top: 0.5px solid #B7C5D9;
    background-color: #EEF2FF;
}

.post.main-post {
    background-color: inherit;
    border: none;
}

.post:not(.main-post) {
    background-color: #D6DAF0;
    border: 1px solid #ccc;
    box-shadow: 1px 1px 0px #555;
}

.replies-count {
    font-size: 12px;
}

.replies-container {
    border: 2px solid #888;
    padding: 15px;
    margin-top: 10px;
    border-radius: 8px;
    background-color: #fafafa;
}

.thread-line-container {
    position: relative;
    padding-left: 20px;
    margin-left: -20px;
}

/** Attachments **/

.attachment {
    margin-bottom: 10px;
}

.attachment-image {
    max-width: 200px;
    max-height: 200px;
    cursor: pointer;
    transition: all 0.1s ease;
    display: block;
}

.attachment-size {
    color: #777;
    font-size: 0.85em;
    margin-left: 5px;
}

.attachment-image.zoomed {
    max-width: 550px;
    max-height: 550px;
}

.attachment-link {
    font-size: 0.9em;
    color: #3366cc;
    text-decoration: none;
}

.attachment-link:hover {
    text-decoration: underline;
}

/** Create NEW POSTS **/
.post-box {
    padding: 10px;
    border-top: 1px solid #000;
    background: #f0f0f0;
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 20px;
}

.post-box form {
    display: flex;
    width: 100%;
    max-width: 900px;
    gap: 20px;
}

.post-text-section,
.post-attachments-section {
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.post-text-section {
    flex: 2;
}

.post-attachments-section {
    flex: 1;
    max-width: 300px;
}

.toggle-replies-button {
    background: none;
    border: none;
    color: gray;
    cursor: pointer;
}

.ft-button {
    background: none;
    border: none;
    color: gray;
    cursor: pointer;
    font-family: monospace;
    padding: 0;
    margin: 0;
    line-height: 1;
    display: inline;
    vertical-align: middle;
}

.ft-button::before,
.ft-button::after {
    color: black;
    font-weight: bold;
}

.ft-button::before {
    content: "[";
    margin-right: 1px;
}

.ft-button::after {
    content: "]";
    margin-left: 1px;
}

.ft-button:hover {
    color: red;
}

.replying-to-label {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 5px;
}

.post-attachments {
    margin-top: 10px;
    font-size: 0.9em;
}

.create-post form {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    gap: 0;
}

textarea {
    width: 100%;
    height: 120px;
    resize: vertical;
    padding: 8px;
    font-size: 1em;
    box-sizing: border-box;
    margin-top: 10px;
}

select {
    width: 100%;
    font-size: 1em;
    padding: 2px;
}

input[type="file"] {
    margin-top: 10px;
    cursor: pointer;
}

button[type="submit"] {
    margin-top: 15px;
    font-size: 1em;
    cursor: pointer;
    align-self: flex-start;
}
