*, *::before, *::after { box-sizing: border-box; }
html { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background-color: #f1f5f9; color: #111827; margin: 0; overflow: hidden; height: 100vh; }
 .custom-2nd-column-width-my-contracts-second{
        background-color: #f1f5f9 !important;
    }
.app-shell { display: flex; flex-direction: column; height: 100%; }
.app-header { background-color: #ffffff; border-bottom: 1px solid #e5e7eb; padding: 0 1.5rem; height: 64px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.header-left, .header-right { display: flex; align-items: center; gap: 1.5rem; }
.header-logo { font-weight: 800; font-size: 1.25rem; }
.header-nav { display: flex; gap: 1rem; }
.header-nav a { text-decoration: none; color: #4b5563; font-weight: 600; font-size: 0.9rem; padding: 0.5rem; border-radius: 0.375rem; }
.header-nav a:hover { background-color: #f1f5f9; }
.search-bar { width: 350px; padding: 0.5rem 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; }
.header-icons { display: flex; gap: 0.5rem; }
.header-icons button { background: none; border: none; cursor: pointer; color: #4b5563; width: 40px; height: 40px; border-radius: 50%; }
.header-icons button:hover { background-color: #f1f5f9; }
.header-profile img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.page-container { display: flex; height: calc(100vh - 64px); margin-left: -8px; background-color: #f1f5f9 !important;}
.left-sidebar { flex-shrink: 0; width: 260px; background-color: #ffffff; border-right: 1px solid #e5e7eb; padding: 1.5rem; overflow-y: auto; }
.main-content-discussions { flex-grow: 1; overflow-y: auto; padding: 1.5rem; }
.right-sidebar {
    flex-shrink: 0;
    width: 55%;
    /* max-width: 800px; */
    background-color: var(--color-bg-card);
    border-left: 1px solid var(--color-border);
    display: flex; /* This remains the same */
    flex-direction: column; /* This remains the same */
    height: 100%;
}


#view-post-container {
    display: flex; /* ADDED: Makes this a flex container */
    flex-direction: column; /* ADDED: Stacks its children vertically */
    height: 100%; /* ADDED: Ensures it fills the sidebar */
    overflow: hidden; /* ADDED: Prevents the container itself from scrolling */
}

.right-sidebar.visible { transform: translateX(0); }
.right-sidebar-header { padding: 1rem 1.5rem; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; background-color: #ffffff; }
#right-sidebar-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.close-sidebar-btn { background: none; border: none; cursor: pointer; color: #9ca3af; padding: 0.5rem; border-radius: 50%; }
.close-sidebar-btn:hover { background-color: #f1f5f9; }
#right-sidebar-content-wrapper {
    flex-grow: 1; /* MODIFIED: Allows this element to expand and fill space */
    overflow-y: auto; /* MODIFIED: Makes THIS the scrollable element */
    background-color: var(--color-bg-card-alt);
    padding: 1.5rem;
}

.right-sidebar-content-wrapper{
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#right-sidebar-content .post-card {
    /* box-shadow: none;
    border-radius: 7px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    background-color: #ffffff; */
    margin-bottom: 5%;
}
#right-sidebar-content .post-card:hover { transform: none; box-shadow: none; }
#right-sidebar-content .post-card .post-footer { background-color: transparent; }
.hidden { display: none !important; }
.sidebar-nav { list-style: none; padding: 0; margin: 2rem 0 0 0; }
.sidebar-nav li a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; text-decoration: none; font-weight: 600; border-radius: 0.5rem; }
.sidebar-nav li a svg { width: 20px; height: 20px; }
.community-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.community-header img { width: 64px; height: 64px; border-radius: 0.75rem; object-fit: cover; }
.community-header h1 { font-size: 2rem; font-weight: 800; margin: 0; }
#create-post-collapsed { display: flex; align-items: center; gap: 1rem; background-color: #ffffff; padding: 0.75rem 1rem; border-radius: 999px; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); cursor: text; margin-bottom: 2rem; transition: all 0.2s ease; }
#create-post-collapsed:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
#create-post-collapsed img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
#create-post-collapsed span { color: #4b5563; font-weight: 500; }
.create-post-container { background-color: #ffffff; border-radius: 0.75rem; border: 1px solid #e5e7eb; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); margin-bottom: 2rem; overflow: hidden; }
.create-post-header { padding: 1.5rem; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 1rem; }
.create-post-header .header-icon { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background-color: #e0f2fe; border-radius: 50%; }
.create-post-header .header-icon svg { width: 24px; height: 24px; color: #0ea5e9; }
.create-post-header .header-text h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.create-post-header .header-text p { font-size: 0.9rem; color: #4b5563; margin: 0.25rem 0 0 0; }
.create-post-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; background-color: #f8fafc; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.form-group .input-field, .form-group .select-field, .form-group textarea, .rich-text-editor { width: 100%; padding: 0.75rem 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; font-family: 'Inter', sans-serif; font-size: 1rem; background-color: #ffffff; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-group .input-field:focus, .form-group .select-field:focus, .form-group textarea:focus, .rich-text-editor:focus-within { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); }
.rich-text-editor { padding: 0; }
.editor-toolbar { display: flex; gap: 0.5rem; padding: 0.5rem; border-bottom: 1px solid #e5e7eb; }
.editor-toolbar button { background: none; border: none; width: 32px; height: 32px; border-radius: 0.375rem; cursor: pointer; color: #4b5563; transition: background-color 0.2s ease, color 0.2s ease; }
.editor-toolbar button:hover { background-color: #f1f5f9; color: #111827; }
.editor-content { min-height: 120px; padding: 0.75rem 1rem; font-size: 1rem; outline: none; }
.editor-content[contenteditable=true]:empty:before { content: attr(placeholder); color: #9ca3af; pointer-events: none; display: block; }
.post-type-switcher { display: flex; background-color: #e5e7eb; border-radius: 999px; padding: 0.25rem; }
.post-type-switcher label {  margin-bottom: 0px; flex: 1; text-align: center; padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: #4b5563; cursor: pointer; transition: all 0.2s ease; }
.post-type-switcher input:checked + label { background-color: #ffffff; color: #111827; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.post-type-switcher input { display: none; }
.deal-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .currency-symbol { position: absolute; left: 1rem; color: #9ca3af; }
.input-group .input-field { padding-left: 2.25rem; }
.contract-fetcher { 
        background-color: #eef2ff; border: 1px solid #c7d2fe; border-radius: 0.75rem; 
        padding-left: 1rem;
        padding-right: 1rem; }
.fetcher-input-group { display: flex; gap: 0.75rem; }
#fetch-status { font-size: 0.8rem; margin-top: 0.5rem; font-weight: 500; height: 1.2em; }
#fetch-status.success { color: #10b981; } #fetch-status.error { color: #ef4444; }
.attachment-toolbar {
    display: flex;
    gap: 1rem;
}

.empty-feed-container {
    text-align: center;
    background-color: var(--color-bg-card);
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.empty-feed-container i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.empty-feed-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-feed-container p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.toolbar-button {
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 118px;
    height: 36px;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-button i {
    font-size: 1.25rem;
}

.toolbar-button:hover {
    background-color: #e0f2fe;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.attachment-section { display: none; padding: 1.25rem; margin-top: 1rem; border: 1px dashed #e5e7eb; border-radius: 0.5rem; }
.attachment-section.visible { display: block; }
#image-preview-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 1rem; }
.img-preview-wrapper { position: relative; }
.img-preview { width: 100%; height: 100px; object-fit: cover; border-radius: 0.5rem; }
.remove-img-btn { position: absolute; top: 4px; right: 4px; background-color: rgba(0,0,0,0.6); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; }
.create-post-footer { padding: 1rem 1.5rem; background-color: #f8fafc; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; border-top: 1px solid #e5e7eb; }
.footer-buttons { display: flex; gap: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1.2rem; border-radius: 0.5rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-secondary { background-color: #ffffff; color: #4b5563; border-color: #e5e7eb; }
.btn-primary { background-image: linear-gradient(to right, #0ea5e9, #0284c7); color: white; border: none; }

.post-feed-header { margin: 2rem 0 1.5rem 0; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-tag { background-color: #ffffff; border: 1px solid #e5e7eb; color: #4b5563; padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.filter-tag.active, .filter-tag:hover { background-color: #0ea5e9; color: white; border-color: #0ea5e9; }
.post-feed { display: flex; flex-direction: column; gap: 1.5rem; }
.post-card { background-color: #ffffff; border-radius: 0.75rem; border: 1px solid #e5e7eb; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.post-card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); transform: translateY(-3px); }
.post-header { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.5rem; position: relative; }
.post-author-avatar { position: relative; cursor: pointer; }
.post-author-avatar img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #0ea5e9; object-fit: cover; }
.post-author-info { flex-grow: 1; }
.post-author-name-wrapper { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.25rem; }
.post-author-name {     font-size: 14px; font-weight: 700; }
.post-meta { font-size: 0.85rem; color: #4b5563; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.post-author-stats a { color: #9ca3af; text-decoration: none; font-weight: 500; cursor: pointer; }
.post-author-stats a:hover { color: #0ea5e9; text-decoration: underline; }
.post-category-badge { font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 999px; }
.role-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; }
.role-badge svg { width: 12px; height: 12px; }
.role-badge.admin { background-color: #fef2f2; color: #b91c1c; }
.role-badge.moderator { background-color: #eef2ff; color: #4338ca; }
.role-badge.vip { background-color: #fffbeb; color: #b45309; }
.post-options { position: absolute; top: 0.75rem; right: 0.75rem; }
.post-options-btn { background: none; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: #9ca3af; display: flex; align-items: center; justify-content: center; }
.post-options-btn:hover { background-color: #f1f5f9; }
.options-menu { display: none; position: absolute; top: 100%; right: 0; background-color: #ffffff; border: 1px solid #e5e7eb; border-radius: 0.5rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); width: 200px; z-index: 10; padding: 0.5rem; list-style: none; margin: 0; }
.options-menu.visible { display: block; }
.options-menu li button { display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left; background: none; border: none; padding: 0.4rem 0.6rem; border-radius: 0.375rem; font-size: 0.875rem; font-family: 'Inter', sans-serif; cursor: pointer; }
.options-menu li button:hover { background-color: #f1f5f9; }
.options-menu li button i { width: 16px; text-align: center; margin-right: 0.25rem; color: #4b5563; }
.options-menu .divider { height: 1px; background-color: #e5e7eb; margin: 0.5rem 0; }
.options-menu .text-danger, .options-menu .text-danger i { color: #ef4444 !important; }
.post-body { padding: 0 1.5rem 1.25rem 1.5rem; }
.post-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 0.75rem 0; color: #111827; cursor: pointer; }
.post-title:hover { color: #0ea5e9; }
.post-content { color: #4b5563; line-height: 1.6; }
.post-attachment { margin-top: 1.25rem; }
.post-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.post-image-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.5rem; }
.post-image-attachment img,
.post-content img {
    /* width: 100%; */
    height: auto;
    max-height: 177px;
    object-fit: contain;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.deal-share-section { margin-top: 1.25rem; border-top: 1px solid #e5e7eb; padding-top: 1.25rem; }
.deal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.deal-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.deal-cta-badge { font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.8rem; border-radius: 999px; color: white; background-image: linear-gradient(to right, #0ea5e9, #0284c7); }
.deal-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; }
.metric-item { background-color: #f1f5f9; padding: 1rem; border-radius: 0.5rem; text-align: center; }
.metric-label { font-size: 0.8rem; font-weight: 500; color: #4b5563; margin-bottom: 0.25rem; }
.metric-value { font-size: 1.5rem; font-weight: 800; color: #111827; }
.post-footer { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-top: 1px solid #e5e7eb; background-color: #f8fafc; }
.post-actions { display: flex; gap: 1.5rem; }
.action-button { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: #4b5563; background: none; border: none; cursor: pointer; }
.action-button.liked { color: #ef4444; }
.action-button:hover { color: #0ea5e9; }
.action-button.liked:hover { color: #ef4444; opacity: 0.8; }
.action-button svg { width: 1.25rem; height: 1.25rem; }
.btn-primary.build-team { background-image: linear-gradient(to right, #10b981, #059669); }

#right-sidebar-content .post-card-full { border: none; box-shadow: none;     padding: 22px;}
#right-sidebar-content .post-card-full:hover { transform: none; }
#right-sidebar-content .post-card-full .post-footer { background-color: transparent; }
.comments-section { padding: 1.5rem; }
.comments-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4% !important;
    margin-top: -4%;
}
.reply-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid #e5e7eb; }
.reply-card:last-child { border-bottom: none; }
.reply-card.popular { background-color: #fffbeb; border: 1px solid #fde68a; border-radius: 0.75rem; padding: 1.5rem; margin: 0 0 1.5rem 0; }
.reply-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.reply-body { flex-grow: 1; }
.reply-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.reply-author { font-weight: 700; }
.reply-meta { font-size: 0.85rem; color: #9ca3af; }
.reply-content { line-height: 1.6; color: #4b5563; }
.reply-content blockquote { border-left: 3px solid #e5e7eb; padding: 0.5rem 1rem; margin: 0.5rem 0; font-style: italic; color: #4b5563; background-color: #f1f5f9; border-radius: 0.25rem; }
.reply-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; }
.vote-button { display: flex; align-items: center; gap: 0.25rem; color: #4b5563; background: none; border: none; cursor: pointer; padding: 0.25rem 0.5rem; font-size: 1rem; transition: color 0.2s ease; border-radius: 0.375rem; }
.vote-button:hover { background-color: #f1f5f9; }
.vote-button.voted { color: #ef4444; }
.vote-count { font-weight: 700; font-size: 0.85rem; }
#reply-container {
    flex-shrink: 0; /* MODIFIED: Ensures reply box does not shrink */
    background: var(--color-bg-card-alt);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
}

.rte-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 8px; border: 1px solid #e5e7eb; border-radius: 0.5rem 0.5rem 0 0; background-color: #ffffff; margin-bottom: -1px; }
.rte-toolbar button { background: none; border: none; padding: 5px 8px; border-radius: 4px; cursor: pointer; width: 32px; height: 32px; }
.rte-toolbar button:hover { background-color: #e2e6ea; }
#reply-text { min-height: 60px; max-height: 200px; overflow-y: auto; position: relative; padding: 10px; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 0.5rem 0.5rem; background: #ffffff; outline: none; }
/* #reply-text:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) inset; } */
#reply-text:empty:before { content: attr(data-placeholder); color: #9ca3af; pointer-events: none; }
.picker-container { display: none; position: absolute; bottom: calc(100% + -8px); right: 22.5rem; z-index: 1001; }
.reply-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
#reply-image-preview-container { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
#reply-image-preview-container .img-preview-wrapper { position: relative; }
#reply-image-preview-container .img-preview { width: 64px; height: 64px; object-fit: cover; border-radius: 0.5rem; }

/* .profile-hover-card { display: none; position: absolute; top: 0; left: calc(100% - 20px); width: 320px; background-color: #ffffff; border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); z-index: 1000; padding: 1.5rem; border: 1px solid #e5e7eb; animation: fadeIn 0.2s ease-out; } */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
/* 
.profile-hover-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-hover-header img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.profile-hover-name { font-size: 1.1rem; font-weight: 700; }
.profile-hover-handle { font-size: 0.9rem; color: #4b5563; }
.profile-hover-roles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.profile-hover-stats { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.5rem; text-align: left; }
.profile-hover-stats > div { display: flex; align-items: center; gap: 0.75rem; }
.profile-hover-stats .stat-value { font-weight: 700; font-size: 0.9rem; }
.profile-hover-stats .stat-label { font-size: 0.9rem; color: #4b5563; }
.profile-hover-stats i { color: #9ca3af; font-size: 1rem; width: 20px; text-align: center; }
.profile-hover-actions { display: flex; gap: 0.75rem; } */
.btn-full { flex: 1; }
.loader-container { display: flex; justify-content: center; align-items: center; padding: 4rem; }
.loader { width: 48px; height: 48px; border: 5px solid #e5e7eb; border-bottom-color: #0ea5e9; border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite; }
@keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

#dynamic-content-area{
    display: none !important;
}

 #right-sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* MODIFIED: Ensures header does not shrink */
    background-color: var(--color-bg-card);
}
/* Make right sidebar permanently visible */
.right-sidebar {
    transform: translateX(0);
}

/* Styles for the new overview panel */
#community-overview-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.overview-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.overview-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.stat-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}
.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
}
.contributor-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contributor-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}
.contributor-list img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Add this to your CSS file */

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.page-item .page-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-accent);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.page-item .page-link:hover {
    background-color: #e0f2fe;
    z-index: 2;
}

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

.page-item.disabled .page-link {
    color: #ced4da;
    pointer-events: none;
    background-color: var(--color-bg-card-alt);
}

#right-sidebar-content .post-feed{
    padding: 22px;
}

.menu-dynamic nav button,
.open-user-profile p,
#manifesto div div.py-5 p {
    font-size: 13px !important;
}

.gap-5 {
    gap: 12px !important;
}

.shadow-lg {
    --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
}

.font-18,
#manifesto h2,
#rules h2,
#manifesto .rounded-lg.p-5 p {
    font-size: 16px !important;
}

.custom-3rd-column-width {
    font-family: 'Inter', sans-serif !important;
}

.p-5 {
    padding: 1rem !important;
}

.course-card h3 {
    font-size: 15px !important;
}

.course-card a {
    text-decoration: none !important;
}

#rules .shadow-sm,
#rules p {
    font-size: 13px !important;
}

#rules h3 {
    font-size: 15px !important;
}

#resources h2 {
    font-size: 18px !important;
}

.header-bg {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1a2e, #1a3a5f);
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.donut-chart {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.donut-chart:hover {
    transform: scale(1.05);
}

.donut-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.btn-join {
    background-color: #10b981;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px -5px rgba(16, 185, 129, 0.6);
    font-size: 13px;
}

.btn-join:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -5px rgba(16, 185, 129, 0.8);
    font-size: 13px;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 13px;
}

/* .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    font-size: 13px;
} */

.course-card,
.rule-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.course-card:hover,
.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.tab-btn {
    border-color: transparent;
    color: #6b7280;
}

.tab-btn.active {
    color: #10b981;
    border-color: #10b981;
    font-size: 14px !important;
}

.leaderboard-toggle-btn.active {
    background-color: #10b981;
    color: white;
    box-shadow: 0 2px 8px -2px rgba(16, 185, 129, 0.6);
}

.legend-badge {
    background: linear-gradient(135deg, #6d28d9, #d946ef);
    transform: rotate(-10deg);
}

.heatmap-grid {
    display: grid;
    grid-template-columns: 35px repeat(24, 1fr);
    gap: 2px;
}

.heatmap-cell {
    aspect-ratio: 1 / 1;
    border-radius: 2px;
    transition: transform 0.2s;
}

.heatmap-cell:hover {
    transform: scale(1.2);
    z-index: 10;
    position: relative;
}

.heatmap-day {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
}

.heatmap-time {
    font-size: 0.6rem;
    color: #9ca3af;
    text-align: center;
}

.tracking-tight {
    font-size: 22px;
}

.text-lg {
    font-size: 14px !important;
}

.font-13 {
    font-size: 13px;
}

.font-14 {
    font-size: 14px !important;
}

.font-18 {
    font-size: 18x !important;
}

.text-3xl {
    font-size: 20px !important;
}

.text-xl {
    font-size: 17px !important;
}

.tool-card p {
    font-size: 14px;
}

.main-container {
    background: transparent !important;
}

.dynamic-page p {
    margin-top: 0;
    margin-bottom: 0 !important;
}

#reply-text {
    min-height: 50px;
    transition: min-height 0.3s ease-in-out;
}

#reply-text.reply-active {
    min-height: 120px;
}

#reply-text.reply-expanded-full {
    height: 35vh;
    min-height: 35vh !important;
}

#toggle-reply-size-btn {
    margin-left: auto;
}

.post-header, .post-body{
    cursor: pointer;
}

.dynamic-page p {
    margin-top: 0;
    margin-bottom: 0 !important;
}

/**********************/
/*** Deal Share CSS ***/
/**********************/
/* Universal box-sizing for elements within the form */
#communityAdminSettingsForm *,
#communityAdminSettingsForm *::before,
#communityAdminSettingsForm *::after {
    box-sizing: border-box;
}

/* Base styles applied directly to the form element */
#communityAdminSettingsForm {
    font-family: var(--font-family-sans);
    /* The form's background should likely be transparent, inheriting from its parent.
       The original 'body' background was: background-color: var(--color-bg-main); */
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /*padding: 20px;*/
}


/* === Settings Panel Container === */
#communityAdminSettingsForm .settings-panel-container {
    background-color: var(--color-bg-card);
    width: 100%;
    display: flex;
    flex-direction: column;
    /*border-left: 1px solid var(--color-border);*/
    border-radius: 0.75rem;
}


/* Header */
#communityAdminSettingsForm .settings-header {
    /*padding: 1.5rem;*/
    /*border-bottom: 1px solid var(--color-border);*/
    padding: 0.2rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}
#communityAdminSettingsForm .settings-header-icon {
    width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background-color: #eef2ff; border-radius: 50%;
}
#communityAdminSettingsForm .settings-header-icon svg { width: 24px; height: 24px; color: #4338ca; }
#communityAdminSettingsForm .settings-header-text h2 { font-size: 1.25rem; font-weight: 700; margin: 0; line-height: 1.2; }
#communityAdminSettingsForm .settings-header-text p { font-size: 1.1rem; color: var(--color-text-secondary); margin: 0.25rem 0 0 0; }

/* NEW: Close Button in Header */
#communityAdminSettingsForm .close-btn {
    margin-left: auto; /* Pushes button to the right */
    background-color: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    transition: background-color 0.2s ease, color 0.2s ease;
}
#communityAdminSettingsForm .close-btn:hover {
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
}
#communityAdminSettingsForm .close-btn:focus-visible { /* Better focus state for accessibility */
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Body */
#communityAdminSettingsForm .settings-body {
    /*padding: 1.5rem;*/
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
#communityAdminSettingsForm .settings-section {
    background-color: var(--color-bg-card-alt);
    /*border: 1px solid var(--color-border);*/
    border-radius: var(--border-radius);
    padding: 1.5rem;
}
#communityAdminSettingsForm .settings-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}
#communityAdminSettingsForm .settings-section p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.5rem 0;
    max-width: 600px;
    margin-bottom: 1rem !important;
}
#communityAdminSettingsForm .form-group { display: flex; flex-direction: column; margin-bottom: 1.5rem; }
#communityAdminSettingsForm .form-group:last-child { margin-bottom: 0; }
#communityAdminSettingsForm .form-group label { font-weight: 500; font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--color-text-primary); }
#communityAdminSettingsForm .form-group .input-field,
#communityAdminSettingsForm .form-group .textarea-field {
    width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--color-border); border-radius: 0.5rem; font-family: var(--font-family-sans); font-size: 1.1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; background-color: var(--color-bg-card);
}
#communityAdminSettingsForm .form-group .input-field:focus,
#communityAdminSettingsForm .form-group .textarea-field:focus {
    outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
#communityAdminSettingsForm .form-group .textarea-field { min-height: 120px; resize: vertical; }


/* Feature Toggle Switch */
#communityAdminSettingsForm .feature-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#communityAdminSettingsForm .feature-toggle label {
    font-size: 1.2rem;
}
#communityAdminSettingsForm .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
#communityAdminSettingsForm .toggle-switch input { opacity: 0; width: 0; height: 0; }
#communityAdminSettingsForm .slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 28px;
}
#communityAdminSettingsForm .slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%;
}
#communityAdminSettingsForm input:checked + .slider { background-color: var(--color-accent-secondary); }
#communityAdminSettingsForm input:checked + .slider:before { transform: translateX(22px); }


/* Footer */
#communityAdminSettingsForm .settings-footer {
    padding: 1rem 1.5rem;
    background-color: var(--color-bg-card-alt);
    /*border-top: 1px solid var(--color-border);*/
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    /* Making bottom corners rounded */
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
#communityAdminSettingsForm .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1.2rem; border-radius: 0.5rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease; }
#communityAdminSettingsForm .btn-primary { background-image: linear-gradient(to right, var(--color-accent), var(--color-accent-dark)); color: white; border: none; font-size: 1.1rem; }
#communityAdminSettingsForm .btn-primary:hover { opacity: 0.9; }

.select2-dropdown .select2-results__option {
    font-family: var(--font-family-sans);
    font-size: 1.2rem;
}

/* --- Custom Summernote Theme --- */

/* Main editor frame */
.note-editor.note-frame {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Toolbar */
.note-toolbar {
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    padding: 8px 5px 5px 10px;
}

/* Toolbar buttons */
.note-btn {
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #4b5563;
    padding: 6px 8px;
    transition: background-color 0.2s ease;
}

.note-btn:hover,
.note-btn:focus {
    background-color: #e5e7eb;
    color: #111827;
    outline: none;
}

.note-btn.active {
    background-color: #dbeafe;
    color: #2563eb;
}

/* Dropdown menus (like for tables or links) */
.note-dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.note-dropdown-menu .note-dropdown-item a {
    color: #111827;
}
.note-dropdown-menu .note-dropdown-item a:hover {
    background-color: #f1f5f9;
}

/* The main text editing area */
.note-editable {
    min-height: 150px;
    padding: 1rem;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
}

.note-editable:focus {
    outline: none;
}

/* Placeholder text */
.note-placeholder {
    padding: 1rem;
    color: #9ca3af;
}

/* Status bar at the bottom with resize handle */
.note-statusbar {
    background-color: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.note-resizebar {
    border-top: 1px solid #e5e7eb;
}

.note-btn-primary.note-video-btn{
    margin-top: -3%;
    margin-right: 4%;
}

/* --- Admin Member Search --- */
.member-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9fafb; /* gray-50 */
    padding: 1rem;
    border-radius: 0.75rem; /* 12px */
    border: 1px solid #e5e7eb; /* gray-200 */
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.member-name {
    font-weight: 600;
    color: #1f2937; /* gray-800 */
}

.member-email, .member-role {
    font-size: 0.875rem; /* 14px */
    color: #6b7280; /* gray-500 */
}

.member-actions {
    display: flex;
    gap: 0.5rem; /* 8px */
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action {
    color: #374151; /* gray-700 */
    background-color: #ffffff;
    border-color: #d1d5db; /* gray-300 */
}

.btn-action:hover {
    background-color: #f3f4f6; /* gray-100 */
}

.btn-promote-admin {
    background-color: #fdf2f8; /* pink-50 */
    color: #9d174d; /* pink-800 */
    border-color: #fbcfe8; /* pink-200 */
}
.btn-promote-admin:hover {
     background-color: #fce7f3; /* pink-100 */
}

.btn-promote-mod {
    background-color: #f0f9ff; /* sky-50 */
    color: #0369a1; /* sky-800 */
    border-color: #bae6fd; /* sky-200 */
}
.btn-promote-mod:hover {
    background-color: #e0f2fe; /* sky-100 */
}

.btn-demote-member {
    background-color: #fffbeb; /* amber-50 */
    color: #92400e; /* amber-800 */
    border-color: #fde68a; /* amber-200 */
}
.btn-demote-member:hover {
    background-color: #fef3c7; /* amber-100 */
}

/* --- Admin Sub-navigation --- */
.admin-sub-nav {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    /* margin-top: 2%; */
    margin-bottom: 3%;
}

.sub-nav-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280; /* gray-500 */
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.sub-nav-btn:hover {
    color: #1f2937; /* gray-800 */
}

.sub-nav-btn.active {
    color: #4f46e5; /* indigo-600 */
    border-bottom-color: #4f46e5;
}

/* --- Moderation Queue --- */
.flagged-post-card {
    background-color: #fef2f2; /* red-50 */
    border: 1px solid #fecaca; /* red-200 */
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.flagged-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.flagged-post-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    color: #1f2937; /* gray-800 */
    margin-bottom: 0.25rem;
}

.flagged-post-meta {
    font-size: 0.875rem; /* 14px */
    color: #6b7280; /* gray-500 */
}

.flagged-post-meta a {
    color: #4f46e5;
    text-decoration: none;
}
.flagged-post-meta a:hover {
    text-decoration: underline;
}

.flagged-post-content {
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}
.flagged-post-content:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, transparent, white);
}


.flag-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #b91c1c; /* red-700 */
    background-color: #fee2e2; /* red-100 */
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 1rem;
}

.flag-reasons h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151; /* gray-700 */
}

.flag-reasons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reason-tag {
    background-color: #fee2e2; /* red-100 */
    color: #991b1b; /* red-800 */
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem; /* 12px */
    font-weight: 500;
}

.moderation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    border-top: 1px solid #fee2e2; /* red-100 */
    padding-top: 1rem;
}


/* --- Take Action Form Styles --- */
.action-choice-card {
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}
.action-choice-card input[type="radio"] {
    display: none;
}
.action-choice-card label {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    gap: 1rem;
}
.action-choice-card .icon-info { color: #3b82f6; } /* blue-500 */
.action-choice-card .icon-warning { color: #f59e0b; } /* amber-500 */
.action-choice-card .icon-danger { color: #ef4444; } /* red-500 */

.action-choice-card .icon-info,
.action-choice-card .icon-warning,
.action-choice-card .icon-danger {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.action-text strong {
    font-weight: 600;
    color: #1f2937; /* gray-800 */
}
.action-text span {
    display: block;
    font-size: 0.875rem;
    color: #6b7280; /* gray-500 */
}
.action-options {
    padding: 0 1rem 1rem 3.5rem; /* Aligns with text */
    display: none; /* Hide options by default */
}
.action-options label {
    padding: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
}
.action-choice-card input[type="radio"]:checked + label {
    background-color: #f9fafb; /* gray-50 */
    border-color: #4f46e5; /* indigo-600 */
}
/* Show options when the associated radio is checked */
.action-choice-card input[type="radio"]:checked ~ .action-options {
    display: block;
}

.suspension-banner {
    display: flex;
    align-items: center;
    background-color: #fffbeb; /* amber-50 */
    border: 1px solid #fde68a; /* amber-200 */
    color: #92400e; /* amber-800 */
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.suspension-banner .banner-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}
.suspension-banner .banner-text strong {
    display: block;
    font-weight: 700;
    color: #78350f; /* amber-900 */
}
.suspension-banner .banner-text span {
    font-size: 0.875rem;
}
.suspension-banner .banner-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #b45309; /* amber-700 */
    cursor: pointer;
}

/* --- Ban Overlay --- */
.ban-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.8); /* gray-900 with 80% opacity */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ban-content-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.ban-content-card .banner-icon {
    font-size: 3rem;
    color: #dc2626; /* red-600 */
    margin-bottom: 1rem;
}

.ban-title {
    font-size: 1.875rem; /* 30px */
    font-weight: 800;
    color: #1f2937; /* gray-800 */
}

.ban-text {
    color: #4b5563; /* gray-600 */
    margin-top: 0.5rem;
}

/* Profile hover */
/* --- Profile Hover Card --- */
.post-author-avatar {
    position: relative; /* Crucial for positioning the card */
}

.profile-hover-card {
    position: absolute;
    top: 29px;
    left: 435%;
    transform: translateX(-50%) scale(0.95);
    width: 320px;
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    padding: 1.5rem;
    text-align: left;
}
.profile-hover-card.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    background-color: white;
}
.hover-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.hover-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    object-fit: cover;
}
.hover-card-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}
.hover-card-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    margin-bottom: 1rem;
}
.stat-value {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1f2937;
}
.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}
.hover-card-badges {
    margin-bottom: 1.5rem;
}
.hover-card-badges h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.badge-item {
    background-color: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.hover-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.hover-card-actions .btn {
    width: 100%;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    color: #1f2022;
}


.post-header {
    position: relative; /* This is important for positioning */
}

.post-action-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
}

.post-action-btn {
   
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    /* width: 32px; */
    /* height: 32px; */
    color: var(--color-text-secondary);
    display: flex
;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.post-action-btn:hover {
    background-color: #e5e7eb; /* A light gray background on hover */
    color: var(--color-text-primary);
}

.post-action-btn .text-danger:hover {
    color: #ef4444; /* Red color for delete icon on hover */
}

/* Add or replace this in your stylesheet */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Use a very high z-index to ensure it's on top */
    opacity: 0; /* Start invisible for fade-in effect */
    transition: opacity 0.3s ease;
}
.edit-modal-overlay.visible {
    opacity: 1;
}

.edit-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 85vh; 
}

.edit-modal-overlay.visible .edit-modal-content {
    transform: scale(1);
}

#edit-post-form {
    flex-grow: 1; 
    overflow-y: auto; 
    padding-right: 15px; 
}

.edit-modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.edit-modal-content .form-group {
    margin-bottom: 1rem;
}

.edit-modal-content .form-actions {
    /* Your original styles */
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0; 
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

#post-validation-status,
#edit-validation-status {
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
}

/* Update this rule to apply the error style to both */
#post-validation-status.error,
#edit-validation-status.error {
    display: flex;
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

/* Make sure the icon works for both as well */
#post-validation-status.error::before,
#edit-validation-status.error::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f06a"; /* Font Awesome exclamation-circle icon */
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
}

.close-modal-btn:hover {
    color: var(--color-text-primary);
}

.img-preview-edit{
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
}
.open-user-profile img {
    object-fit: cover;
}


.post-options-menu-container {
    position: relative;
    margin-left: auto; /* This keeps it on the far right */
    display: flex;     /* This makes items inside go inline */
    align-items: center; /* This vertically centers the icon and button */
    gap: 8px;          /* This adds a nice space between them */
}

.pin-icon {
    color: var(--color-text-secondary);
    font-size: 16px;
    transform: rotate(45deg); /* This is for the "pahigda" effect */
}

.post-options-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 6px 10px; /* Adjusted padding for the vertical icon */
    border-radius: 50%;
    line-height: 1;
    font-size: 18px; /* Slightly larger for the vertical ellipsis */
}

.post-options-btn:hover {
    background-color: var(--color-background-hover);
    color: var(--color-text-primary);
}

.options-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    width: 160px;
    overflow: hidden;
    display: none; /* Initially hidden */
    padding: 6px;
    flex-direction: column;
    gap: 4px;
}

.options-menu.visible {
    display: flex; /* Show the menu */
}

.options-menu .action-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--color-text-primary);
    border-radius: 6px;
    cursor: pointer;
}

.options-menu .action-button:hover {
    background-color: var(--color-background-hover);
}

.options-menu .action-button i {
    width: 16px;
    text-align: center;
    margin-right: 4px;
    color: var(--color-text-secondary);
}

.options-menu .action-button.text-danger,
.options-menu .action-button.text-danger i {
    color: var(--color-danger);
}

.options-menu .action-button.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.post-image-announcement {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.post-image-announcement img {
    width: 100%;
    max-height: 450px; /* You can adjust this height */
    object-fit: cover; /* Changed to 'cover' for better framing */
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.grid-image-zoomable {
    cursor: zoom-in;
}

.image-lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.85); /* Dark, semi-transparent background */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.image-lightbox-overlay.fading-out {
    animation: fadeOut 0.3s ease forwards;
}

.lightbox-content {
    position: relative;
}

.lightbox-content img {
    max-width: 90vw;  /* Max 90% of viewport width */
    max-height: 90vh; /* Max 90% of viewport height */
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: white;
    color: #111827;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    font-weight: bold;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.grid-image-wrapper {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden; /* Helps contain the hover effect */
}


.post-image-grid .grid-image-zoomable {
    width: 100%;
    height: 100%;           /* Fills the square grid cell defined by .post-image-grid */
    object-fit: cover;      /* Crops the image to fit, creating the uniform grid */
    cursor: zoom-in;
    transition: transform 0.3s ease;
    border-radius: 0.5rem;
}

.grid-image-wrapper:hover .grid-image-zoomable:not(.expanded) {
    transform: scale(1.05);
}

/* --- Expanded State (When an image is clicked) --- */

/* When the grid is expanded, hide the other images */
.post-image-grid.expanded-view .grid-image-wrapper:not(.expanded) {
    display: none;
}

/* Make the container of the expanded image span the full width */
.grid-image-wrapper.expanded {
    grid-column: 1 / -1; 
}

/* This is the key part: Style the image to its natural aspect ratio */
.grid-image-wrapper.expanded .grid-image-zoomable {
    height: auto;           /* THIS IS THE KEY: Let the image's own aspect ratio define the height */
    max-height: 500px;      /* A safety limit for very tall images */
    object-fit: contain;    /* Show the whole image without any cropping */
    cursor: default;        /* Change cursor to normal */
}

/* Styles for the 'X' close button */
.grid-image-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.grid-image-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.comments-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem !important; /* Overrides existing margin */
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 2%;
}

.sort-btn {
    background: none;
    border: none;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    color: var(--color-text-primary);
    background-color: var(--color-background-hover);
}

.sort-btn.active {
    color: var(--color-accent);
    background-color: #e0f2fe; /* Light blue */
}

#reply-text img{
    width: 150px !important;
}

.reply-card-mimic .post-content img {
    max-width: 150px; 
    height: auto;
    border-radius: 0.5rem;
    cursor: zoom-in;
}

.reply-card-mimic .post-content img.expanded-reply-image {
  max-width: 100%;
    cursor: zoom-out;
    height: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.note-editable p img {
    width: 150px !important;
}

#reply-container .note-editable.expanded-full {
    height: 350px !important; /* Use !important to override Summernote's inline styles */
    max-height: 60vh;
    overflow-y: auto;
}

#reply-placeholder {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background-color: #f0f2f5; /* Light grey background */
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background: #ffffff;
    outline: none;
}

#reply-placeholder img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
#reply-placeholder span {
    color: #6c757d; /* Muted text color */
    font-size: 13px;
}

.note-modal-footer{
    margin-bottom: 3%;
}

.note-video-clip{
    width: 500px;
    height: 300px;
}

#post-validation-status {
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 10px;
}

#post-validation-status.error {
    display: flex;
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

#post-validation-status.error::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f06a"; /* Font Awesome exclamation-circle icon */
}

.join-prompt-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.prompt-icon {
    font-size: 2rem;
    color: #4f46e5; /* Your primary theme color */
    background-color: #e0e7ff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.prompt-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.prompt-text {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.join-prompt-card .btn-join {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-authenticate {
    background-color: #10b981;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px -5px rgba(16, 185, 129, 0.6);
    font-size: 13px;

}

.like-btn svg {
    transition: all 0.2s ease-in-out;
    stroke: #64748b; /* Default outline color (gray) */
    stroke-width: 1.5;
    fill: none; /* Default is not filled */
}

/* When the like button has the 'liked' class... */
.like-btn.liked svg {
    stroke: #ef4444; /* Red outline */
    fill: #ef4444;   /* Red fill */
}