.feed-page-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 40px 60px;
    text-align: left;
}

.feed-grid-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    align-items: flex-start;
}

.feed-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 49px;
}

.widget-card {
    background: var(--feed-card-bg);
    border: 1px solid var(--feed-border);
    border-radius: 20px;
    padding: 24px;
}

.widget-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

@media (max-width: 900px) {
    .feed-page-container {
        padding: 32px 16px 40px !important;
    }

    .feed-grid-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feed-sidebar {
        position: static;
    }
}

/* Small Adjustments for compact composer in sidebar */
.feed-compose-card {
    margin-bottom: 0px !important;
    padding: 24px !important;
}

.compose-avatar {
    width: 32px !important;
    height: 32px !important;
}

.compose-input {
    font-size: 0.9rem !important;
    min-height: 40px !important;
}

/* Filters */
.filters-widget {
    padding: 20px 24px;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    background: transparent;
    border: 1px solid var(--feed-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.light-theme .custom-select-trigger {
    background: transparent;
}

.light-theme .custom-select-trigger:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.chevron-icon {
    width: 12px;
    height: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-select-container.open .chevron-icon {
    transform: rotate(180deg);
}

.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #0D0D0F;
    border: 1px solid var(--feed-border);
    border-radius: 12px;
    padding: 6px;
    z-index: 100;
    box-sizing: border-box;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    flex-direction: column;
    gap: 4px;
}

.light-theme .custom-select-options {
    background: #eae2d2;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.custom-select-container.open .custom-select-options {
    display: flex;
}

.custom-select-option {
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.light-theme .custom-select-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.custom-select-option.selected {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 600;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Widget */
.news-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-highlight);
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-content {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-content.expanded {
    -webkit-line-clamp: unset !important;
    display: block !important;
}

.news-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

section.page-section {
    background: var(--bg-color) !important;
    --feed-card-bg: #0D0D0F;
    --feed-border: var(--border-color);
    --reaction-color: rgba(255, 255, 255, 0.45);
    min-height: 100vh;
    overflow-x: hidden;
}

.light-theme section.page-section {
    --feed-card-bg: #eae2d2;
    --feed-border: var(--border-color);
    --reaction-color: rgba(0, 0, 0, 0.45);
}

.compose-btn {
    background: transparent !important;
    border: 1px solid var(--border-highlight) !important;
    color: var(--text-main) !important;
    transition: all 0.2s;
    border-radius: 10px;
    cursor: pointer;
    padding: 6px 16px;
    font-weight: 500;
    outline: none;
}

.compose-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.feed-compose-card {
    background: var(--feed-card-bg);
    border: 1px solid var(--feed-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.compose-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.compose-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-main);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-highlight);
}

.compose-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    padding-top: 8px;
    min-height: 44px;
}

.compose-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-highlight);
    margin-top: 5px;
    padding-top: 15px;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.tool-btn svg {
    width: 18px;
    height: 18px;
}

#image-preview-container {
    display: none;
    position: relative;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-highlight);
}

#image-preview {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.remove-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Poll setup in composer */
#poll-setup-container {
    display: none;
    padding: 18px 0;
    margin-top: 5px;
    border-top: 1px solid var(--border-highlight);
}

.poll-setup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}

.poll-setup-input {
    width: 100%;
    box-sizing: border-box;
    background: transparent !important;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 10px;
    outline: none;
    transition: all 0.2s;
}

.poll-setup-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent !important;
}

.poll-add-option {
    width: 100%;
    box-sizing: border-box;
    border: 1px dashed var(--border-highlight);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    transition: all 0.2s;
}

.poll-add-option:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-color: var(--text-muted);
}



/* Post Feed items */
.post-image-preview {
    display: block;
    max-width: 100%;
    width: auto;
    max-height: 450px;
    height: auto;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid var(--border-highlight);
}

.feed-card {
    position: relative;
}

.post-delete-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.2s;
    cursor: pointer;
    z-index: 5;
}

.feed-card:hover .post-delete-btn {
    opacity: 1;
}

.post-delete-btn:hover {
    opacity: 0.85;
    color: white;
}

.post-poll-container {
    margin: 16px 0;
    background: transparent !important;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-highlight);
}

.poll-question {
    font-weight: 700;
    margin-bottom: 14px;
    font-size: 1.05rem;
}

.poll-option {
    position: relative;
    background: transparent !important;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
}

.poll-option.voted {
    border-color: var(--accent);
}

.poll-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    transition: width 0.8s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.poll-option-text {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}


/* Post Options Dropdown */
.feed-card-options {
    position: relative;
}

.options-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.options-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.options-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    background: var(--feed-card-bg);
    border: 1px solid var(--feed-border);
    border-radius: 12px;
    padding: 6px;
    min-width: 200px;
    z-index: 1000;
    /* box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7); */
    animation: menuFade 0.2s ease-out;
}

@keyframes menuFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small caret triangle */
.options-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: var(--card-bg);
    border-left: 1px solid var(--border-highlight);
    border-top: 1px solid var(--border-highlight);
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item.delete {
    color: #ef4444;
}

.dropdown-item.delete:hover {
    background: rgba(255, 77, 77, 0.1);
}



/* Feed Posts */
.feed-card {
    background: var(--feed-card-bg);
    border: 1px solid var(--feed-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    height: auto;
    animation: fadeInUp 0.4s ease-out both;
    transition: border-color 0.25s ease;
}

.feed-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.light-theme .feed-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.feed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.feed-card-header-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.feed-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-main);
    overflow: hidden;
    border: 1px solid var(--border-highlight);
}


.feed-author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feed-author-name {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}

.feed-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.owner-badge {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.feed-card-options {
    color: var(--text-muted);
    cursor: pointer;
}

.feed-card-content {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.feed-card-footer {
    display: flex;
    gap: 28px;
    font-size: 0.95rem;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--feed-border);
}

.feed-action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--reaction-color);
    transition: color 0.15s ease;
}

.feed-action-item svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feed-action-item:hover svg {
    transform: scale(1.18);
}

.like-btn:hover,
.like-btn.active-like {
    color: #ef4444 !important;
}

.dislike-btn:hover,
.dislike-btn.active-dislike {
    color: #ef4444 !important;
}

.comment-btn:hover {
    color: #3b82f6 !important;
}




/* Comment actions */
.comment-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
    cursor: pointer;
}

.comment-action:hover {
    color: var(--text-main);
}

.comment-action svg {
    width: 14px;
    height: 14px;
}

/* Inline reply form */
.reply-form {
    display: none;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.reply-form.open {
    display: flex;
}

.reply-input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
}

.reply-input::placeholder {
    color: var(--text-muted);
}

.reply-send-btn {
    background: var(--border-highlight);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transform: rotate(-45deg);
    flex-shrink: 0;
}

.reply-send-btn:hover {
    opacity: 0.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}