.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 10000;
    display: none;
}

/* 1. Sửa lại độ rộng để nó giãn theo cột của Bootstrap */
.post-card, .fb-post-card {
    width: 100% !important; 
    max-width: 100%;
    margin-bottom: 20px;
}

/* 2. Cấu trúc cột bên phải */
.sidebar-sticky {
    position: sticky;
    top: 20px; /* Khoảng cách so với top khi cuộn */
}

.my-posts-widget {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-height: 520px;	
}

.sidebar-title {
    font-size: 17px;
    font-weight: 600;
    color: #65676b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebedf0;
}

.sidebar-my-post-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.sidebar-my-post-item:last-child { border-bottom: none; }

.sidebar-my-post-item a { text-decoration: none !important; }

.my-post-t {
    font-size: 14px;
    color: #050505;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Giới hạn 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.my-post-m {
    font-size: 12px;
    color: #65676b;
    margin-top: 4px;
}

.sidebar-my-post-item:hover .my-post-t {
    color: #1877f2;
}

.post-card {
    width: 680px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 12px 16px 10px 16px;
    margin: 0 auto;
}

/* Phần nhập liệu */
.post-top {
    display: flex;
    align-items: center;
    gap: 8px;
    /* margin-bottom: 12px; */
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-input {
    flex: 1;
    background: var(--input-bg);
    border-radius: 20px;
    padding: 8px 12px;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 17px;
    transition: background 0.2s;
}

.post-input:hover {
    background: #e4e6eb;
}

.post-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0 4px;
}

/* Các nút chức năng */
.post-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
}

.post-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-sub);
    font-weight: 600;
    font-size: 14px;
}

.post-option:hover {
    background: #f2f2f2;
}

/* Màu sắc Icon */
.icon-anonymous { color: #1d9bd1; font-size: 18px; }
.icon-poll { color: #ff9f43; font-size: 18px; }
.icon-feeling { color: #f7b928; font-size: 18px; }


:root {
    --fb-bg: #ffffff;
    --fb-gray-bg: #f0f2f5;
    --fb-text-main: #050505;
    --fb-text-sub: #65676b;
    --fb-blue: #1877f2;
    --fb-border: #e5e5e5;
}

.fb-post-card {
    /*max-width: 680px;*/
    background: var(--fb-bg);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    padding: 12px 16px;
    font-family: Arial, sans-serif;
}

/* Header */
.fb-post-header {
    display: flex;
	gap: 5px;
    align-items: flex-start;
    margin-bottom: 12px;
    position: relative;	
}

.fb-post-header-left {
    display: flex;
    gap: 10px;
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-username {
    font-size: 15px;
    font-weight: 600;
    color: var(--fb-text-main);
    margin: 0;
}
/* Tên người dùng cần đậm và nổi bật */
.fb-username {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em; /* Thu hẹp khoảng cách một chút cho hiện đại */
}

/* Hệ số Elo nên dùng font có độ rộng cố định nhẹ hoặc nét đứng */
.elo-values {
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Nội dung bài viết */
.fb-post-text {
    font-size: 15px;
    line-height: 1.4;
    color: #050505;
}

.fb-badge {
    background: #e4e6eb;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: normal;
}

.fb-post-meta {
    font-size: 13px;
    color: var(--fb-text-sub);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Content */
.fb-post-content {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--fb-text-main);
}

.fb-post-link {
    text-decoration: none;
    color: inherit;
}

/* Stats */
.fb-post-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--fb-text-sub);
}

.like-icons {
    background: var(--fb-blue);
    color: white;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
}

.fb-divider {
    height: 1px;
    background: var(--fb-border);
    margin: 0 -4px;
}

/* Actions */
.fb-post-actions {
    display: flex;
    padding: 4px 0;
}

.fb-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--fb-text-sub);
    font-weight: 600;
    transition: background 0.2s;
}

.fb-action-btn:hover {
    background: #f2f2f2;
}

/* Comment Area */
.fb-comment-input-area {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    align-items: center;
}

.fb-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.fb-comment-box {
    flex: 1;
    background: var(--fb-gray-bg);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

.fb-comment-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
}

.fb-comment-icons {
    display: flex;
    gap: 12px;
    color: var(--fb-text-sub);
    font-size: 16px;
    padding-right: 5px;
}

/* Overlay che toàn màn hình */
.fb-modal-overlay {
    display: none; /* Ẩn mặc định */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(243, 243, 244, 0.7);
    backdrop-filter: blur(4px);
}

/* Khung nội dung trắng */
.fb-modal-content {
    background-color: #fff;
    margin: 10% auto;
    width: 500px;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.fb-modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
    position: relative;
}

.fb-modal-header h3 { margin: 0; font-size: 20px; }

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #606770;
    background: #e4e6eb;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    line-height: 32px;
}

.fb-modal-body { padding: 16px; }

.fb-modal-textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 18px;
    min-height: 150px;
    resize: none;
}

.fb-add-to-post {
    border: 1px solid #ced0d4;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.fb-add-icons i { font-size: 20px; margin-left: 12px; cursor: pointer; }

.btn-fb-submit {
    width: calc(100% - 32px);
    margin: 16px;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background-color: #1877f2;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.btn-fb-submit:disabled {
    background-color: #e4e6eb;
    color: #bcc0c4;
    cursor: not-allowed;
}
/* Trạng thái nút khi bị vô hiệu hóa */
.btn-fb-submit:disabled {
    background-color: #e4e6eb !important;
    color: #bcc0c4 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Trạng thái nút khi sẵn sàng */
.btn-fb-submit:not(:disabled) {
    background-color: #1877f2;
    color: #fff;
    cursor: pointer;
    opacity: 1;
}

/* Trạng thái mặc định: Giới hạn 4 dòng */
.fb-post-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    word-break: break-word;
}

/* Trạng thái khi nhấn Xem thêm: Hiện thanh cuộn nội bộ */
.fb-post-content.expanded {
    display: block;
    max-height: 300px; /* Chiều cao tối đa của khung cuộn */
    overflow-y: auto;  /* Hiện thanh cuộn dọc nếu nội dung vượt quá max-height */
    padding-right: 5px; /* Tránh nội dung đè lên thanh cuộn */
}

/* Tùy chỉnh thanh cuộn cho đẹp giống Facebook */
.fb-post-content.expanded::-webkit-scrollbar {
    width: 6px;
}
.fb-post-content.expanded::-webkit-scrollbar-thumb {
    background-color: #bcc0c4;
    border-radius: 10px;
}
.fb-post-content.expanded::-webkit-scrollbar-track {
    background: transparent;
}

/* Style cho tiêu đề bài viết */
.fb-post-title {
    margin-bottom: 8px; /* Khoảng cách với nội dung bên dưới */
}

.fb-post-title a {
    font-size: 16px; /* To hơn nội dung một chút */
    font-weight: 700; /* Đậm giống Facebook Title */
    color: #050505; /* Màu đen tuyền */
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color 0.2s ease;
}

.fb-post-title a:hover {
    color: #1877f2; /* Đổi màu xanh khi rê chuột vào */
    text-decoration: none;
}

/* Căn chỉnh lại phần nội dung bên dưới cho thoáng */
.fb-post-text {
    font-size: 15px;
    color: #1c1e21;
    line-height: 1.5;
}

/* Khoảng cách cho nút xem thêm nếu tiêu đề quá dài */
.read-more-btn {
    margin-top: 5px;
    color: #65676b;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.read-more-btn {
    background: none;
    border: none;
    color: #65676b;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
    font-size: 15px;
}

.read-more-btn:hover {
    text-decoration: underline;
}


.fb-comments-container {
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #ebedf0;
}

.comment-count {
    font-size: 14px;
    color: #65676b;
    cursor: pointer;
    margin-bottom: 15px;
}

.comment-count:hover { text-decoration: underline; }

.fb-comment-item {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.fb-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-comment-body {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 40px);
}

.fb-comment-content {
    background-color: #f0f2f5;
    border-radius: 18px;
    padding: 8px 12px;
    display: inline-block;
}
.fb-comment-content .fb-comment-user-name, .fb-comment-content .elo-display-wrapper {
    display: inline-block;
    margin-right: 5px;
}
.fb-comment-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #050505;
    margin-bottom: 2px;
}

.fb-comment-text {
    font-size: 15px;
    line-height: 1.4;
    color: #050505;
    word-break: break-word;
}

.fb-comment-actions {
    display: flex;
    gap: 12px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #65676b;
}

.action-link { cursor: pointer; border: none; background: none; font-size: 12px; font-weight: 700; color: #65676b; padding: 0; }
.action-link:hover { text-decoration: underline; }

/* Ô nhập liệu reply */
.fb-reply-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.fb-avatar-small {
    width: 32px;
    height: 32px;
    object-fit: cover;	
    border-radius: 50%;
}

.fb-reply-box {
    flex: 1;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
}

.fb-reply-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    margin: 0;	
}

.fb-reply-icons {
    display: flex;
    gap: 10px;
    color: #65676b;
    font-size: 16px;
    padding-right: 4px;
}

.fb-reply-icons i { cursor: pointer; opacity: 0.7; }
.fb-reply-icons i:hover { opacity: 1; }
/* Trạng thái mặc định: Xám nhẹ và không cho click */
.btn-send-reply {
    margin-left: 8px;
    font-size: 18px;
    color: #bcc0c4; /* Màu xám nhẹ */
    cursor: default;
    pointer-events: none; /* Vô hiệu hóa click khi chưa có chữ */
    transition: all 0.2s ease;
    display: inline-block !important; /* Luôn hiển thị */
}

/* Trạng thái khi có chữ: Màu xanh Facebook và cho phép click */
.btn-send-reply.active {
    color: #1877f2; /* Xanh Brand Facebook */
    cursor: pointer;
    pointer-events: auto; /* Cho phép click */
}

.btn-send-reply.active:hover {
    transform: scale(1.1);
}

// css nút like
.btn-like-trigger.active {
    color: #1877f2 !important; /* Màu xanh Facebook */
}

.btn-like-trigger.active i {
    animation: like-bounce 0.3s ease;
}

@keyframes like-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.fb-post-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #ebedf0;
    font-size: 14px;
    color: #65676b;
}

.stats-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-icons {
    background: linear-gradient(180deg, #18AFFF 0%, #0062E0 100%);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Màu chữ khi đã like */
.btn-like-trigger.active {
    color: #1877f2 !important;
}

/* nút xóa bài viết */
.sidebar-my-post-item {
    position: relative; /* Để định vị nút xóa */
    padding: 10px 30px 10px 0; /* Chừa khoảng trống bên phải cho nút xóa */
    border-bottom: 1px solid #f0f2f5;
}

.sidebar-my-post-item:hover {
    background-color: #f8f9fa;
}

/* Style cho nút xóa nhỏ gọn ở góc */
.sidebar-delete-btn, .sidebar-edit-btn {
    position: absolute;
    right: 0;
    top: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #bcc0c4;
    cursor: pointer;
    opacity: 0.8; 
    transition: all 0.2s;
}
.sidebar-edit-btn {
    right: 22px;
	color: #f50;
	opacity: 0.6; 
}
.sidebar-my-post-item:hover .sidebar-delete-btn {
    opacity: 1; 
}
.sidebar-edit-btn:hover {
    opacity: 1;
}
.sidebar-delete-btn:hover {
    background-color: #ffebe9;
    color: #f02849;
}

.sidebar-delete-btn i {
    font-size: 12px;
}

/* Container bao quanh profile ở sidebar */
.sidebar-profile-box {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.profile-cover {
    height: 60px;
    background: linear-gradient(to right, #1877f2, #00c6ff);
}

.profile-content {
    padding: 0 15px 15px 15px;
    text-align: center;
    margin-top: -30px; /* Đẩy ảnh lên trên nền cover */
}

.profile-img-sidebar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    background: #fff;
}

.profile-name-sidebar {
    font-size: 17px;
    font-weight: 700;
    margin: 10px 0 0 0;
    color: #050505;
}

.profile-nickname {
    font-size: 13px;
    color: #65676b;
    margin-bottom: 15px;
}

/* Tạo khoảng cách giữa các block */
.sidebar-spacer {
    height: 20px;
    background-color: transparent;
}

/* Khung chung cho từng phần */
.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding-bottom: 10px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #65676b;
    padding: 10px 0;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #ebedf0; 
	text-transform: uppercase;
}

/* Style cho danh sách thông tin cá nhân */
.profile-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #f7f8fa;
}

.profile-info-list li strong {
    color: #65676b;
    font-weight: 500;
}

/* Dòng tiêu đề Elo World */
.elo-separator-line {
    text-align: center;
    position: relative;
    margin: 20px 0 10px 0;
}

.elo-separator-line span {
    background: #fff;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #bcc0c4;
    position: relative;
    z-index: 1;
}

.elo-separator-line:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ebedf0;
    z-index: 0;
}

.elo-item {
    border-bottom: none !important;
}

.elo-val {
    color: #d32f2f;
    font-weight: 700;
}

/* style like phần comment */
/* Màu cho nút Like bình luận khi đã nhấn */
.btn-like-comment.active {
    color: #1877f2 !important;
    font-weight: 800;
}

/* Wrapper cho icon like nhỏ trong bình luận */
.comment-like-count-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #65676b;
    margin-left: 5px;
}

.comment-like-count-wrapper i {
    color: #1877f2;
    font-size: 10px;
}

.comment-like-count-wrapper.hidden {
    display: none;
}

.btn-delete-comment {
    color: #65676b;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.btn-delete-comment:hover {
    text-decoration: underline;
    color: #f02849; 
}

/* CSS cho Modal Chỉnh sửa */
.edit-footer {
    display: flex !important;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #e5e5e5;
}

.btn-edit-cancel, .btn-edit-submit {
    flex: 1; /* Chia đều 50/50 chiều rộng */
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-edit-cancel {
    background-color: #e4e6eb;
    color: #050505;
}

.btn-edit-cancel:hover {
    background-color: #d8dadf;
}

.btn-edit-submit {
    background-color: #0866ff; /* Màu xanh đậm hiện đại */
    color: #ffffff;
}

.btn-edit-submit:hover {
    background-color: #075ce4;
}

.btn-edit-submit:disabled {
    background-color: #e4e6eb;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Fix cho textarea bị vỡ màu chữ trong hình */
.fb-modal-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.5;
    color: #050505; /* Đảm bảo màu chữ không bị tím như trong ảnh */
}