:root {
    --fb-primary: #1877f2;
    --fb-dark: #242526;
    --fb-dark-secondary: #333334;
    --fb-dark-hover: #4e4f50;
    --fb-text-primary: #e4e6eb;
    --fb-text-secondary: #b0b3b8;
    --fb-border: #3e4042;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1c1c1d;
    color: var(--fb-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.fb-header {
    background-color: var(--fb-dark);
    border-bottom: 1px solid var(--fb-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
}

.header-center {
    display: flex;
    gap: 15px;
    flex: 2;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: end;
    flex: 1;
    gap: 8px;
    font-size: 20px;
}

.fb-logo {
    display: flex;
    align-items: start;
    justify-content: center;
    cursor: pointer;
}

.fb-logo>img {
    width: 40px;
    height: 40px;
}

.search-container {
    position: relative;
    width: 240px;
    font-size: 15px;
}

.search-input {
    background-color: var(--fb-dark-secondary);
    border: none;
    border-radius: 50px;
    color: var(--fb-text-primary);
    padding: 14px 16px 14px 35px;
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: var(--fb-text-secondary);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fb-text-secondary);
}

.nav-icon-btn {
    background: transparent;
    border: none;
    color: var(--fb-text-secondary);
    padding: 8px 40px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.nav-icon-btn:hover {
    background-color: var(--fb-dark-secondary);
}

.nav-icon-btn.active {
    color: var(--fb-primary);
    border-bottom: 3px solid var(--fb-primary);
    border-radius: 0;
    background-color: transparent;
}

.nav-icon-btn i {
    font-size: 24px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background-color: var(--fb-dark-secondary);
    border: none;
    border-radius: 50%;
    color: var(--fb-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    font-size: 20px;
}

.icon-btn:hover {
    background-color: var(--fb-dark-hover);
}

.icon-btn .badge {
    position: absolute;
    top: -2px;
    right: -5px;
    background-color: #f02849;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 6px;
    width: 20px;
    height: 20px;
}

.profile-icon {
    position: relative;
}

.profile-icon .profile-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #f02849;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 2px 6px;
    width: 10px;
    height: 10px;
    outline: 2px solid var(--fb-dark);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.main-layout {
    display: flex;
    justify-content: center;
    margin-top: 57px;
    min-height: calc(100vh - 57px);
}

.left-sidebar {
    width: 310px;
    position: fixed;
    top: 57px;
    left: 0;
    height: calc(100vh - 57px);
    overflow-y: auto;
    padding: 16px 8px;
    background-color: #1c1c1d;
}

.left-sidebar::-webkit-scrollbar {
    width: 8px;
    padding: 10px;
    display: none;
}

.left-sidebar:hover::-webkit-scrollbar {
    display: block;
}

.left-sidebar::-webkit-scrollbar:hover {
    background-color: var(--fb-dark);
}

.left-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--fb-dark-hover);
    border-radius: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: var(--fb-text-primary);
}

.sidebar-item:hover {
    background-color: var(--fb-dark-secondary);
}

.sidebar-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item-icon i {
    font-size: 20px;
}

.sidebar-item-text {
    font-size: 15px;
    font-weight: 500;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--fb-border);
    margin: 8px 0;
}

.sidebar-section-title {
    color: var(--fb-text-secondary);
    font-size: 17px;
    font-weight: 600;
    padding: 16px 8px 8px;
}


.main-feed {
    padding: 16px 0;
    max-width: 680px;
}

.post-creator {
    background-color: var(--fb-dark);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.post-creator-top {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
}

.post-creator-input {
    background-color: var(--fb-dark-secondary);
    border: none;
    border-radius: 50px;
    color: var(--fb-text-primary);
    padding: 14px 16px;
    width: 100%;
    outline: none;
}

.post-creator-input::placeholder {
    color: var(--fb-text-secondary);
    font-weight: 600;
}

.post-creator-actions {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.post-action-btn {
    background: transparent;
    border: none;
    color: var(--fb-text-secondary);
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.post-action-btn:hover {
    background-color: var(--fb-dark-secondary);
}

.post-action-btn i {
    font-size: 24px;
}

.live-icon {
    color: #f3425f;
}

.photo-icon {
    color: #45bd62;
}

.feeling-icon {
    color: #f7b928;
}


.stories-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.stories-wrapper::-webkit-scrollbar {
    display: none;
}

.stories-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--fb-dark-secondary);
    border-radius: 3px;
}

.story-card {
    min-width: 112px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.story-card:hover.story-card img {
    transform: scale(1.03);
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.story-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.story-author {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.story-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--fb-primary);
    position: absolute;
    top: 12px;
    left: 12px;
    object-fit: cover;
}

.create-story-card {
    background-color: var(--fb-dark-secondary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.create-story-img-wrapper {
    height: 160px;
    overflow: hidden;
}

.create-story-card .story-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.create-story-icon {
    width: 40px;
    height: 40px;
    background-color: var(--fb-primary);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin: -20px auto 5px;
    border: 4px solid var(--fb-dark);
    position: relative;
    z-index: 1;
}

.create-story-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--fb-text-primary);
    text-align: center;
    padding-bottom: 10px;
}

.feed-post {
    background-color: var(--fb-dark);
    border-radius: 10px;
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-details {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fb-text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.join-btn {
    background-color: transparent;
    color: var(--fb-primary);
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.join-btn:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 13px;
    color: var(--fb-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-header-actions {
    display: flex;
    gap: 4px;
}

.post-menu-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--fb-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.post-menu-btn:hover {
    background-color: var(--fb-dark-secondary);
}

.post-text {
    font-size: 15px;
    line-height: 1.3333;
    color: var(--fb-text-primary);
    margin-bottom: 12px;
    padding: 0 16px;
}

.see-more-btn {
    background: transparent;
    border: none;
    color: var(--fb-text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.see-more-btn:hover {
    text-decoration: underline;
}

.post-image-container{
    object-fit: cover;
    overflow: hidden;
    background-position: center;
    min-height: 350px;
}

.post-footer {
    font-size: 13px;
    color: var(--fb-text-secondary);
    padding: 0 12px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    font-size: 15px;
}

.left-stats {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-row {
    display: flex;
    align-items: center;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    color: var(--fb-text-secondary);
}

.action-btn>svg{
    width: 30px;
}

.post-reaction-group>img{
    margin: -3px;
    border: 1px solid --fb-dark-secondary;
}


.right-sidebar {
    width: 310px;
    position: fixed;
    top: 57px;
    right: 0px;
    height: calc(100vh - 57px);
    overflow-y: scroll;
    padding: 16px;
    background-color: #1c1c1d;
}

.right-sidebar::-webkit-scrollbar {
    width: 8px;
    display: none;
}

.right-sidebar::-webkit-scrollbar:hover {
    background-color: var(--fb-dark);
}

.right-sidebar:hover::-webkit-scrollbar {
    display: block;
}

.right-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--fb-dark-hover);
    border-radius: 4px;
}


.birthdays-section {
    margin-bottom: 16px;
}

.birthday-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px;
}

.birthday-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.birthday-text {
    font-size: 15px;
    line-height: 1.4;
    color: var(--fb-text-primary);
}

.birthday-text strong {
    font-weight: 600;
}

.contacts-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    color: var(--fb-text-secondary);
    font-size: 17px;
    font-weight: 600;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 2px;
    position: relative;
}

.contact-item:hover {
    background-color: var(--fb-dark-secondary);
}

.contact-avatar-wrapper {
    position: relative;
    margin-right: 12px;
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.online-status {
    width: 12px;
    height: 12px;
    background-color: #31a24c;
    border: 2px solid var(--fb-dark);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
}

.contact-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--fb-text-primary);
}

.group-chats-section {
    margin-top: 24px;
}

.group-chat-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 2px;
}

.group-chat-item:hover {
    background-color: var(--fb-dark-secondary);
}

.group-avatar-wrapper {
    position: relative;
    margin-right: 12px;
}

.group-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--fb-dark-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-name {
    font-size: 15px;
    font-weight: 500;
    padding-right: 10px;
    color: var(--fb-text-primary);
}

.create-group-chat {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 12px;
}

.create-group-chat:hover {
    background-color: var(--fb-dark-secondary);
}

.create-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--fb-dark-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.create-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--fb-text-primary);
}


@media (max-width: 1300px) {
    .left-sidebar {
        width: 280px;
    }

    .right-sidebar {
        width: 280px;
    }

    .main-feed {
        max-width: 580px;
    }
}

@media (max-width: 1100px) {
    .left-sidebar {
        display: none;
    }

    .search-container {
        max-width: 170px;
    }

    .header-center{
        gap: 5px;
    }

    .main-layout{
        justify-content: flex-start;
    }

    .main-feed {
        max-width: calc(100vw - 340px);
        margin: 20px;
    }
    
}

@media (max-width: 900px) {
    .right-sidebar {
        display: none;
    }

    .main-feed {
        margin-left: 20px;
        max-width: 100vw;
    }

    .search-container {
        max-width: 50px;
    }
}

@media (max-width: 768px) {
    .header-center {
        display: none;
    }

    .main-feed {
        margin: 0px 20px;
    }

    .search-container {
        display: none;
    }
}