/* static/post.css */

/* Base styles for all devices */
.community-page {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Sidebar styles */
.community-sidebar {
    background: #222222;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: auto; /* Ensure height is only as tall as content */
}

/* Community header */
.community-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.community-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #50c878;
}

.community-header-info {
    flex-grow: 1;
}

h2 {
    margin: 0;
    font-size: 1.6em;
    color: #50c878;
    font-weight: 700;
}

.community-header p {
    margin: 8px 0;
    color: #bbbbbb;
    font-size: 0.9em;
}

.community-header p a {
    color: #50c878;
    text-decoration: none;
    font-weight: 500;
}

.community-header p a:hover {
    text-decoration: underline;
}

/* Moderators section */
.moderators h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #50c878;
    font-weight: 700;
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 5px;
}

.moderators ul {
    list-style: none;
    padding: 0;
}

.moderators li {
    margin-bottom: 8px;
    color: #bbbbbb;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.moderators li a {
    color: #50c878;
    text-decoration: none;
    font-weight: 500;
}

.moderators li a:hover {
    text-decoration: underline;
}

.mod-badge {
    height: 0.9em; /* Match username text height */
    vertical-align: middle;
    margin-left: 5px;
}

.moderators .flair {
    display: inline-block;
    padding: 2px 5px;
    margin-left: 5px;
    font-size: 0.7em;
    border-radius: 3px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Actions and buttons */
.community-actions {
    display: flex;
    flex-direction: column; /* Stack buttons vertically by default */
    gap: 10px;
    margin: 10px 0;
    align-items: center; /* Center buttons vertically */
}

.community-actions .btn-subscribe {
    background: linear-gradient(90deg, #23825f, #1c664b);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 150px; /* Fixed exact width */
    white-space: nowrap; /* Prevent text wrapping */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.community-actions .btn-subscribe:hover {
    background: linear-gradient(90deg, #1c664b, #144e3a);
    transform: translateY(-2px);
}

.community-actions .btn-unsubscribe {
    background: linear-gradient(90deg, #ff5555, #e04b4b);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 85, 85, 0.1);
    width: 150px; /* Fixed exact width */
    white-space: nowrap; /* Prevent text wrapping */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.community-actions .btn-unsubscribe:hover {
    background: linear-gradient(90deg, #e04b4b, #cc4040);
    transform: translateY(-2px);
}

.community-actions button.btn-subscribe,
.community-actions button.btn-unsubscribe {
    border: none; /* Remove default button border */
    outline: none; /* Remove default button outline */
    cursor: pointer; /* Maintain pointer cursor */
    width: 150px; /* Match the width of <a> tags */
    min-width: 150px; /* Force minimum width to prevent shrinking */
    padding: 10px 20px; /* Match the padding of <a> tags */
    font-weight: bold;
    font-size: 0.9em;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding is included in width */
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap; /* Prevent text wrapping */
    text-decoration: none; /* Ensure no underline */
    background: none; /* Let the specific class handle the background */
}

.community-actions button.btn-subscribe {
    background: linear-gradient(90deg, #23825f, #1c664b);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.community-actions button.btn-subscribe:hover {
    background: linear-gradient(90deg, #1c664b, #144e3a);
    transform: translateY(-2px);
}

.community-actions button.btn-unsubscribe {
    background: linear-gradient(90deg, #ff5555, #e04b4b);
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 85, 85, 0.1);
}

.community-actions button.btn-unsubscribe:hover {
    background: linear-gradient(90deg, #e04b4b, #cc4040);
    transform: translateY(-2px);
}

.community-actions .mod-btn {
    background: linear-gradient(90deg, #ffa500, #cc8400);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 150px; /* Fixed exact width */
    white-space: nowrap; /* Prevent text wrapping */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.community-actions .mod-btn:hover {
    background: linear-gradient(90deg, #cc8400, #a86500);
    transform: translateY(-2px);
}

.submit-post-action {
    margin: 15px 0;
    text-align: center; /* Center the button on desktop */
}

.submit-post-action .btn {
    background: linear-gradient(90deg, #50c878, #3da660);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 150px; /* Match other buttons */
    white-space: nowrap; /* Prevent text wrapping */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-post-action .btn:hover {
    background: linear-gradient(90deg, #3da660, #2f8050);
    transform: translateY(-2px);
}

/* Main content styles */
.community-main {
    background: #222222;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.post-container {
    padding: 20px;
}

.post-header {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 20px;
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    min-width: 50px;
}

.vote-arrow {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.vote-arrow img {
    width: 25px;
    height: 25px;
}

.vote-arrow.voted img {
    filter: hue-rotate(0deg) brightness(1.2);
}

.vote-section span {
    margin: 8px 0;
    font-weight: bold;
    color: #f0f0f0;
    font-size: 1.1em;
}

.post-meta {
    flex-grow: 1;
}

.post-meta h2 {
    margin: 0 0 10px;
    font-size: 1.6em;
    font-weight: 700;
}

.post-meta p {
    margin: 5px 0;
    color: #bbbbbb;
    font-size: 0.9em;
}

.post-meta p a {
    color: #50c878;
    text-decoration: none;
}

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

.post-meta .badge {
    height: 0.9em;
    vertical-align: middle;
    margin-left: 5px;
}

.post-meta .flair {
    display: inline-block;
    padding: 2px 5px;
    margin-left: 5px;
    font-size: 0.7em;
    border-radius: 3px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.post-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.save-form,
.delete-form {
    margin: 0;
}

.save-button {
    background: none;
    border: none;
    padding: 5px; /* Increased padding for better touch area */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.save-icon {
    width: 36px; /* Increased size to match visual hierarchy */
    height: 36px;
}

.delete-button {
    background: linear-gradient(90deg, #ff5555, #e04b4b);
    color: #fff;
    padding: 5px 10px; /* Reduced padding to make the button smaller */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8em; /* Slightly smaller font size */
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 85, 85, 0.1);
}

.delete-button:hover {
    transform: translateY(-2px);
}

.post-content-box {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #f0f0f0;
    font-size: 0.95em;
    line-height: 1.6;
}

.comment-count {
    margin-bottom: 20px;
    color: #bbbbbb;
    font-size: 0.9em;
}

/* Formatting Styles */
.formatted-bold {
    font-weight: bold;
}

.formatted-italic {
    font-style: italic;
}

.formatted-strikethrough {
    text-decoration: line-through;
}

.formatted-title {
    font-size: 1.6em;
    font-weight: 700;
    color: #50c878;
    margin: 10px 0;
}

.formatted-subtitle {
    font-size: 1.4em;
    font-weight: 600;
    color: #50c878;
    margin: 8px 0;
}

.formatted-center {
    text-align: center;
}

.formatted-quote {
    border-left: 4px solid #50c878;
    padding-left: 10px;
    margin: 10px 0;
    color: #bbbbbb;
    font-style: italic;
}

.formatted-quote cite {
    display: block;
    font-size: 0.9em;
    color: #50c878;
    margin-bottom: 5px;
}

.formatted-url {
    color: #50c878;
    text-decoration: none;
}

.formatted-url:hover {
    text-decoration: underline;
}

.formatted-code {
    background: #333333;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    margin: 10px 0;
}

.formatted-list {
    list-style-type: disc;
    margin: 10px 0;
    padding-left: 20px;
}

.formatted-list li {
    margin-bottom: 5px;
}

.formatted-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.formatted-table th,
.formatted-table td {
    border: 1px solid #3a3a3a;
    padding: 8px;
    text-align: left;
}

.formatted-table th {
    background: #2a2a2a;
    font-weight: bold;
    color: #50c878;
}

.formatted-table td {
    background: #222222;
}

/* Comment Form */
.comment-form-container {
    margin-bottom: 30px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 0.95em;
    resize: vertical;
    min-height: 100px;
}

.comment-form textarea:focus {
    border-color: #50c878;
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-btn {
    background: linear-gradient(90deg, #50c878, #3da660);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comment-btn:hover {
    background: linear-gradient(90deg, #3da660, #2f8050);
    transform: translateY(-2px);
}

.formatting-link {
    color: #50c878;
    text-decoration: none;
    font-size: 0.9em;
}

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

/* Sort Options */
.sort-options {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sort-options a {
    color: #50c878;
    text-decoration: none;
    font-size: 0.9em;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sort-options a.active {
    color: #fff;
    font-weight: bold;
}

.time-filters {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.time-filters a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85em;
    padding: 6px 10px;
    transition: color 0.3s ease;
}

.time-filters a.active {
    color: #50c878;
    font-weight: bold;
}

/* Comments Section */
.comments-section {
    margin-top: 20px;
}

.comment-thread {
    margin-bottom: 15px;
    padding-left: 20px;
    border-left: 2px solid #3a3a3a;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 5px;
}

.comment-content {
    flex-grow: 1;
}

.comment-content p {
    margin: 5px 0;
    color: #bbbbbb;
    font-size: 0.9em;
}

.comment-content p a {
    color: #50c878;
    text-decoration: none;
}

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

.comment-content .badge {
    height: 0.9em;
    vertical-align: middle;
    margin-left: 5px;
}

.comment-content .flair {
    display: inline-block;
    padding: 2px 5px;
    margin-left: 5px;
    font-size: 0.7em;
    border-radius: 3px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.comment-score {
    margin: 0 10px;
    color: #f0f0f0;
    font-weight: bold;
}

.comment-body {
    color: #f0f0f0;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 10px 0;
}

.comment-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.delete-comment-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on mobile */
}

.reply-link {
    color: #50c878;
    text-decoration: none;
    font-size: 0.85em;
    margin-right: 10px;
}

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

.reply-form-container {
    margin-top: 10px;
    padding-left: 20px;
    width: calc(100% - 20px); /* Adjust for padding to prevent overflow */
    box-sizing: border-box;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 0.9em;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.reply-form textarea:focus {
    border-color: #50c878;
    outline: none;
}

.reply-form .form-actions {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap between buttons */
}

.reply-btn {
    background: linear-gradient(90deg, #50c878, #3da660);
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reply-btn:hover {
    background: linear-gradient(90deg, #3da660, #2f8050);
    transform: translateY(-2px);
}

.cancel-link {
    color: #ff5555;
    text-decoration: none;
    font-size: 0.85em;
}

.cancel-link:hover {
    text-decoration: underline;
    color: #e04b4b;
}

.delete-button {
    background: linear-gradient(90deg, #ff5555, #e04b4b);
    color: #fff;
    padding: 5px 10px; /* Reduced padding to match reply-btn */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 85, 85, 0.1);
}

.delete-button:hover {
    transform: translateY(-2px);
}

.comment-replies {
    margin-top: 10px;
    padding-left: 20px;
}

/* Inline Edit Form for Post */
.edit-post-form-container {
    margin-bottom: 20px;
}

.edit-post-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-post-form textarea {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 0.95em;
    resize: vertical;
    min-height: 200px;
}

.edit-post-form textarea:focus {
    border-color: #50c878;
    outline: none;
}

/* Inline Edit Form for Comment */
.edit-comment-form-container {
    margin-top: 10px;
    padding-left: 20px;
    width: calc(100% - 20px); /* Adjust for padding to prevent overflow */
    box-sizing: border-box;
}

.edit-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edit-comment-form textarea {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 0.9em;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.edit-comment-form textarea:focus {
    border-color: #50c878;
    outline: none;
}

/* Edit and Cancel Edit Buttons */
.edit-button {
    background: linear-gradient(90deg, #ffa500, #cc8400);
    color: #fff;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.1);
    text-decoration: none;
    display: inline-block;
}

.edit-button:hover {
    background: linear-gradient(90deg, #cc8400, #a86500);
    transform: translateY(-2px);
}

.cancel-edit-button {
    background: linear-gradient(90deg, #ff5555, #e04b4b);
    color: #fff;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 85, 85, 0.1);
    text-decoration: none;
    display: inline-block;
}

.cancel-edit-button:hover {
    background: linear-gradient(90deg, #e04b4b, #cc4040);
    transform: translateY(-2px);
}

/* Submit Edit Button */
.submit-edit-btn {
    background: linear-gradient(90deg, #50c878, #3da660);
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submit-edit-btn:hover {
    background: linear-gradient(90deg, #3da660, #2f8050);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .community-page {
        padding: 10px;
    }

    .edit-post-form textarea {
        font-size: 0.9em;
    }

    .edit-comment-form-container {
        padding-left: 10px;
        width: calc(100% - 10px); /* Adjust for smaller padding on mobile */
    }

    .edit-comment-form textarea {
        font-size: 0.85em;
    }

    .edit-button,
    .cancel-edit-button,
    .submit-edit-btn {
        font-size: 0.8em;
        padding: 6px 12px;
    }

    .community-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 5px;
    }

    .community-image {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
    }

    h2 {
        font-size: 1.4em;
    }

    .community-header p {
        margin: 3px 0;
        font-size: 0.85em;
    }

    .community-actions {
        flex-direction: column;
        gap: 8px;
        margin: 8px 0;
        align-items: flex-start; /* Left-align the button group on mobile */
    }

    .community-actions .btn-subscribe,
    .community-actions .btn-unsubscribe,
    .community-actions .mod-btn,
    .community-actions button.btn-subscribe,
    .community-actions button.btn-unsubscribe,
    .submit-post-action .btn {
        width: 100%;
        max-width: 130px; /* Reduced to match desktop width */
        padding: 8px 15px;
        font-size: 0.85em;
        text-align: center; /* Center text inside buttons */
        display: block; /* Ensure block-level for alignment */
        text-decoration: none; /* Ensure no underline */
    }

    .submit-post-action {
        margin: 10px 0;
        text-align: left; /* Left-align the button */
    }

    .moderators h3 {
        font-size: 1em;
    }

    .moderators li {
        font-size: 0.8em;
        gap: 5px;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vote-section {
        flex-direction: row;
        justify-content: space-between;
        margin-bottom: 10px;
        min-width: auto;
    }

    .vote-arrow img {
        width: 20px;
        height: 20px;
    }

    .post-meta h2 {
        font-size: 1.4em;
    }

    .post-meta p {
        font-size: 0.85em;
    }

    .post-actions {
        position: static;
        margin-top: 10px;
        flex-direction: row;
        gap: 10px;
    }

    .save-button {
        padding: 4px; /* Slightly reduced for mobile */
    }

    .save-icon {
        width: 20px; /* Slightly smaller for mobile */
        height: 20px;
    }

    .delete-button {
        font-size: 0.75em; /* Smaller font size for mobile */
        padding: 4px 8px; /* Reduced padding for mobile */
    }

    .comment-form textarea {
        font-size: 0.9em;
    }

    .comment-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .sort-options a, .time-filters a {
        font-size: 0.85em;
        padding: 6px 10px;
    }

    .comment-thread {
        padding-left: 10px;
    }

    .comment-item {
        flex-direction: column;
    }

    .comment-actions {
        position: static;
        margin-top: 5px;
        display: flex;
        justify-content: flex-end;
    }

    .delete-comment-actions {
        position: static;
        margin-top: 5px;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
    }

    .reply-form-container {
        padding-left: 10px;
        width: calc(100% - 10px); /* Adjust for smaller padding on mobile */
    }

    .reply-form textarea {
        font-size: 0.85em;
    }

    .reply-form .form-actions {
        gap: 6px; /* Slightly smaller gap on mobile */
    }

    .reply-btn,
    .cancel-link,
    .delete-button {
        font-size: 0.8em;
        padding: 6px 12px;
    }
}

@media (min-width: 769px) {
    .community-page {
        display: flex;
        flex-direction: row;
        align-items: flex-start; /* Align items at the top to prevent stretching */
    }

    .community-sidebar {
        flex: 0 0 auto; /* Do not grow or shrink, only as tall as content */
        min-width: 250px;
        margin-right: 20px;
    }

    .edit-button,
    .cancel-edit-button,
    .submit-edit-btn {
        font-size: 0.85em;
        padding: 5px 10px;
    }

    .community-main {
        flex: 1; /* Take remaining space, but allow sidebar to dictate its own height */
    }

    .community-header {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        margin-bottom: 10px;
    }

    h2 {
        font-size: 1.6em;
    }

    .community-header p {
        margin: 5px 0;
        font-size: 0.9em;
    }

    .community-actions {
        flex-direction: column; /* Stack buttons vertically on desktop */
        gap: 10px;
        align-items: center; /* Center buttons vertically */
    }

    .community-actions .btn-subscribe,
    .community-actions .btn-unsubscribe,
    .community-actions .mod-btn,
    .community-actions button.btn-subscribe,
    .community-actions button.btn-unsubscribe,
    .submit-post-action .btn {
        width: 150px; /* Maintain fixed width */
        padding: 10px 20px;
        font-size: 0.9em;
        text-align: center; /* Center text inside buttons */
        display: block; /* Ensure block-level for alignment */
        text-decoration: none; /* Ensure no underline */
    }

    .post-actions {
        flex-direction: row;
        gap: 10px;
    }

    .save-button {
        padding: 5px;
    }

    .save-icon {
        width: 24px;
        height: 24px;
    }

    .delete-button {
        font-size: 0.85em;
        padding: 5px 10px;
    }
}
