/* Root Variables */
:root {
    --primary-color: #2D3436;
    --secondary-color: #636E72;
    --accent-color: #00B894;
    --background-color: #F8F9FA;
    --border-color: #DFE6E9;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--primary-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

p {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

ul {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Navigation */
.navbar {
    border-bottom: 1px solid var(--border-color);
    background-color: white;
    margin-bottom: 0;
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand {
    font-family: 'Urbanist', sans-serif;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Board Components */
.board-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.board-item {
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.board-item.view-all {
    border: 1px solid var(--accent-color);
}

.board-item.view-all:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

a.board-item.view-all:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: var(--background-color);
}

.board-header {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.board-list-container {
    margin-top: 2rem;
}

.board-title {
    color: var(--accent-color);
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
}

.board-name {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.board-description {
    font-size: 1rem;
    margin-bottom: 0;
}

.board-tag {
    color: var(--accent-color);
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Thread Components */
.thread-container,
.thread-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: white;
}

.thread-subject {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.thread-content,
.reply-content {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.thread-preview {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.thread-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, white);
}

/* Post Components */
.post-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.username {
    font-weight: 600;
    color: var(--accent-color);
    margin-right: 0.25rem;
}

.meta-info,
.thread-meta {
    color: var(--secondary-color);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Reply Components */
.reply-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: white;
}

.reply-container:last-child {
    margin-bottom: 0;
}

.replies-section {
    margin: 2rem 0;
}

.replies-heading {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Forms and Buttons */
.form-control {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: none;
}

.btn-primary {
    background-color: var(--accent-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
}

.btn-primary:hover {
    background-color: #00A884;
}

.btn-outline-primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Images */
.image-container {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-container img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Modals */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
}

/* Section Titles */
.section-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

/* Content Container */
.content-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    flex: 1;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
}

/* Footer */
.footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 3rem;
    text-align: center;
}

.footer-links {
    text-align: right;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent-color);
}

.separator {
    margin: 0 0.5rem;
    color: var(--border-color);
}

/* Admin Components */
.content-card,
.board-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: .5rem;
    margin-bottom: 1rem;
    background-color: white;
}

.content-card.deleted {
    background-color: #FFF5F5;
    border-color: #FED7D7;
}

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    color: var(--secondary-color);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.deleted-badge {
    background-color: #FC8181;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-group .btn {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px !important;
    font-weight: 500;
}

.btn-group .btn-outline-danger {
    color: #DC3545;
    border-color: #DC3545;
}

.btn-group .btn-outline-danger:hover {
    background-color: #DC3545;
    color: white;
}

.btn-group .btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-group .btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Profile Components */
.profile-dropdown {
    position: relative;
}

.profile-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.profile-menu.show {
    display: block;
}

.profile-menu-item {
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    text-decoration: none;
    display: block;
}

.profile-menu-item:hover {
    background-color: var(--background-color);
}

.profile-button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
}

.profile-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .board-list {
        padding: 1rem;
        gap: 0.5rem;
    }

    .board-item {
        padding: 0.35rem 0.75rem;
        font-size: 0.9rem;
    }

    .thread-card,
    .reply-container {
        padding: 1rem;
    }

    .thread-subject {
        font-size: 1.1rem;
        margin: 0.75rem 0;
    }

    .post-info {
        flex-wrap: wrap;
        gap: 0.25rem;
        font-size: 0.9rem;
    }

    .meta-info,
    .thread-meta {
        font-size: 0.85rem;
    }

    .thread-meta>* {
        display: inline-block;
    }

    .thread-meta::before {
        content: '|';
        margin: 0 0.25rem;
        color: var(--border-color);
    }

    .board-header {
        padding: 1rem;
    }

    .board-header .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .board-name {
        font-size: 1.5rem;
    }

    .board-description {
        font-size: 0.9rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        padding: 0.5rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }

    .image-container {
        margin: 0.5rem 0;
        text-align: center;
    }

    .image-container img {
        border-radius: 8px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .board-list {
        padding: 0.75rem;
    }

    .thread-card,
    .reply-container {
        padding: 0.75rem;
    }

    .thread-content,
    .reply-content {
        font-size: 0.95rem;
    }

    .board-item {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }

    .post-info {
        font-size: 0.85rem;
    }

    .meta-info,
    .thread-meta {
        font-size: 0.8rem;
    }
}

/* Board Navigation */
.board-nav {
    background: white;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding: 0.5rem 0;
}

.board-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0.5rem;
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    /* IE and Edge */
}

.board-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.board-scroll .board-item {
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    font-size: 0.9rem;
}

.board-scroll .board-item:hover,
.board-scroll .board-item.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: var(--background-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .board-nav {
        margin-bottom: 1rem;
        padding: 0.35rem 0;
    }

    .board-scroll {
        gap: 0.35rem;
        padding: 0.25rem 0.75rem;
    }

    .board-scroll .board-item {
        padding: 0.25rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .board-scroll .board-item {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Search */
.search-container {
    flex: 0 1 400px;
    margin: 0 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background-color: var(--background-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: white;
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-button:hover {
    color: var(--accent-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-left {
        gap: 0.5rem;
    }

    .search-container {
        flex: 1 1 100%;
        order: 2;
        margin: 0;
    }

    .search-input {
        padding: 0.35rem 1rem;
        padding-right: 2.25rem;
        font-size: 0.85rem;
    }

    .search-button svg {
        width: 14px;
        height: 14px;
    }

    .board-nav {
        margin-bottom: 1rem;
        padding: 0.35rem 0;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .board-title {
        font-size: 0.9rem;
    }

    .search-input {
        padding: 0.3rem 0.75rem;
        padding-right: 2rem;
        font-size: 0.8rem;
    }

    .search-button svg {
        width: 12px;
        height: 12px;
    }
}

/* Search Results */
.search-header {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.search-meta {
    color: var(--secondary-color);
    margin-bottom: 0;
}

.search-results .card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.search-results .card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-results .card-body {
    padding: 1.5rem;
}

.search-results .card-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.search-results .card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-results .card-title a:hover {
    color: var(--accent-color);
}

.search-results .card-text {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.search-results .text-muted {
    font-size: 0.9rem;
}

.search-results .text-muted a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.search-results .text-muted a:hover {
    text-decoration: underline;
}

.no-results {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.no-results p:first-child {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.no-results p:last-child {
    color: var(--secondary-color);
    margin-bottom: 0;
}

.pagination-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.page-link {
    color: var(--accent-color);
    border-color: var(--border-color);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: white;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.page-item.disabled .page-link {
    color: var(--secondary-color);
    border-color: var(--border-color);
}

/* Mobile Responsiveness for Search Results */
@media (max-width: 768px) {
    .search-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .search-title {
        font-size: 1.25rem;
    }

    .search-results .card-body {
        padding: 1rem;
    }

    .search-results .card-title {
        font-size: 1.1rem;
    }

    .no-results {
        padding: 1.5rem;
    }

    .pagination-container {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .page-link {
        padding: 0.35rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding: 0.75rem;
    }

    .search-title {
        font-size: 1.1rem;
    }

    .search-results .card-body {
        padding: 0.75rem;
    }

    .search-results .card-title {
        font-size: 1rem;
    }

    .no-results {
        padding: 1rem;
    }

    .no-results p:first-child {
        font-size: 1rem;
    }

    .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Board Links */
.board-link {
    color: var(--accent-color) !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.board-link:hover,
.board-link:visited,
.board-link:active {
    color: var(--accent-color) !important;
    opacity: 0.8;
    text-decoration: none;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-container {
    cursor: pointer;
}

.image-container img {
    transition: opacity 0.2s ease;
}

.image-container:hover img {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .lightbox img {
        max-width: 95%;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

.video-container {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.video-container video {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    .image-container img,
    .video-container video {
        max-width: 600px;
    }
}

/* Three-dot menu styles */
.btn-link.text-muted {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.btn-link.text-muted:hover {
    background-color: var(--hover-color);
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.dropdown-item:hover {
    background-color: var(--hover-color);
}

.dropdown-item.text-danger {
    color: var(--danger-color) !important;
}

.dropdown-item.text-danger:hover {
    background-color: var(--danger-color-light);
}

.dropdown-item svg {
    margin-right: 0.5rem;
}

.ad-container {
    margin: 1rem 0;
    text-align: center;
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-top {
    margin-bottom: 2rem;
}

.ad-bottom {
    margin-top: 2rem;
}

.ad-sidebar {
    margin: 1rem;
}

/* Ensure ads are responsive */
.ad-container img,
.ad-container iframe {
    max-width: 100%;
    height: auto;
}

/* Mobile Responsiveness for Ads */
@media (max-width: 768px) {
    .ad-container {
        margin: 0.75rem 0;
    }

    .ad-top {
        margin-bottom: 1.5rem;
    }

    .ad-bottom {
        margin-top: 1.5rem;
    }

    .ad-sidebar {
        margin: 0.75rem 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ad-container {
        margin: 0.5rem 0;
    }

    .ad-top {
        margin-bottom: 1rem;
    }

    .ad-bottom {
        margin-top: 1rem;
    }

    .ad-sidebar {
        margin: 0.5rem 0;
    }

    .ad-container img,
    .ad-container iframe {
        width: 100%;
        max-height: 100px;
        object-fit: contain;
    }
}

/* Share Button Styles */
.share-dropdown {
    display: inline-block;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.share-button i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .share-button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .share-button i {
        font-size: 1.2rem;
    }
}

/* Attachment grid layout */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.attachment-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #ddd;
    height: 150px;
    background-color: #f8f9fa;
}

.attachment-item img, 
.attachment-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.attachment-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.attachment-item img:hover {
    opacity: 0.9;
}

.thread-attachments,
.reply-attachments {
    margin-top: 15px;
}

.thread-media,
.reply-media {
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: inline-block;
    background-color: #f8f9fa;
}

.thread-media img,
.reply-media img {
    max-height: 400px;
    width: auto;
    border-radius: 8px;
}

.thread-media video,
.reply-media video {
    max-height: 400px;
    width: auto;
    border-radius: 8px;
}