* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1877f2;
    --primary-dark: #242526;
    --bg-light: #f0f2f5;
    --white: #ffffff;
    --border: #dadde1;
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
}


.login-body, .signup-body, .forgot-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.login-container, .signup-container, .forgot-container {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    min-height: 100vh;
    align-items: center;
}

.login-left, .signup-left, .forgot-left {
    flex: 1;
    padding: 100px 40px;
    color: white;
}

.fb-logo-large {
    width: 300px;
    height: auto;
    margin-bottom: 24px;
}

.login-left h1, .signup-left h1, .forgot-left h1 {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 20px;
}

.login-right, .signup-right, .forgot-right {
    flex: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.login-box, .signup-box, .forgot-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
    width: 100%;
    max-width: 396px;
    padding: 32px;
}

.login-form input, .signup-box input, .forgot-box input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    font-size: 17px;
    margin-bottom: 16px;
    transition: border-color .2s;
}

.login-form input:focus, .signup-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.login-btn, .signup-btn, .search-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.login-btn:hover, .signup-btn:hover, .search-btn:hover {
    background: #166fe5;
}

.create-account-btn, .login-link {
    display: inline-block;
    text-align: center;
    width: 100%;
    padding: 12px;
    background: #42b72a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 16px;
}

.forgot-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    display: block;
    text-align: center;
    margin: 16px 0;
}

.name-inputs {
    display: flex;
    gap: 12px;
}

.name-inputs input {
    flex: 1;
}

.birthday-inputs {
    display: flex;
    gap: 8px;
}

.birthday-inputs select {
    flex: 1;
    padding: 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
}

.gender-label {
    display: flex;
    gap: 24px;
    margin: 16px 0;
    font-size: 14px;
}

.gender-label input {
    margin-right: 4px;
}

.terms-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.34;
}

.terms-text a {
    color: var(--primary-blue);
    text-decoration: none;
}


body {
    background: var(--bg-light);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
}

.sidebar-checkbox {
    display: none;
}

.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 340px;
    height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.fb-logo {
    width: 42px;
    height: 42px;
}

.search-container {
    position: relative;
    margin-top: 12px;
}

.search-container input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 16px;
}

.search-container i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.sidebar-menu {
    padding: 8px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    transition: all .2s;
}

.menu-item:hover, .menu-item.active {
    background: #e4f0fa;
    border-right: 3px solid var(--primary-blue);
    color: var(--primary-blue);
}

.menu-item i {
    width: 24px;
    margin-right: 16px;
    font-size: 20px;
}

.sidebar-section {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.sidebar-section h4 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.shortcut-item, .group-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    border-radius: 8px;
    transition: background .2s;
}

.shortcut-item:hover, .group-item:hover {
    background: var(--bg-light);
    padding-left: 12px;
}

.shortcut-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.group-item i {
    color: var(--primary-blue);
    width: 24px;
    margin-right: 12px;
}

.main-content {
    margin-left: 340px;
    min-height: 100vh;
}


.top-bar {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 900;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.top-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.top-menu {
    padding: 8px;
    margin-right: 16px;
    border-radius: 50%;
    cursor: pointer;
}

.top-menu:hover {
    background: var(--bg-light);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
    margin-right: 24px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 16px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.top-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-icons {
    display: flex;
    gap: 12px;
}

.top-icon {
    padding: 8px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .2s;
}

.top-icon:hover, .top-icon.active {
    background: #e4f0fa;
    color: var(--primary-blue);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s;
}

.profile-section:hover {
    background: var(--bg-light);
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}


.stories-section {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
}

.stories {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.story {
    flex: 0 0 80px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.story img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--primary-blue);
    object-fit: cover;
    display: block;
    margin: 0 auto 4px;
}

.story.active img {
    border-width: 3px;
    box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--primary-blue);
}

.story p {
    font-size: 12px;
    color: var(--text-primary);
}

.story-plus {
    position: absolute;
    bottom: -3px;
    right: -3px;
    font-size: 24px;
    color: var(--primary-blue);
    background: var(--white);
    border-radius: 50%;
}


.create-post {
    background: var(--white);
    margin: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.post-input-section {
    padding: 16px 24px;
    display: flex;
    align-items: center;
}

.post-input-section img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
}

.post-input-section input {
    flex: 1;
    border: none;
    background: var(--bg-light);
    padding: 12px 16px;
    border-radius: 24px;
    font-size: 16px;
}

.post-actions {
    display: flex;
    border-top: 1px solid var(--border);
}

.post-action {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
}

.post-action:hover {
    background: var(--bg-light);
}


.posts-feed {
    margin: 0 24px 32px;
}

.post {
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
    overflow: hidden;
    transition: box-shadow .2s;
}

.post:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.post-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-header img {
    width: 100%;
    height: 100px;
    object-fit: contain;   
    object-position: center;
    background-color: #f0f0f0; 
    border-radius: 50%; 
}


.post-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.post-header span {
    font-size: 14px;
    color: var(--text-secondary);
}

.post-header i.fa-ellipsis-h {
    margin-left: auto;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
}

.post-header i.fa-ellipsis-h:hover {
    background: var(--bg-light);
}

.post p {
    padding: 0 24px 16px;
    font-size: 15px;
    line-height: 1.4;
}

.post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-stats {
    padding: 12px 24px;
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.post-stats:hover {
    color: var(--primary-blue);
}


@media (max-width: 1200px) {
    .sidebar {
        width: 280px;
    }
    .main-content {
        margin-left: 280px;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s ease;
    }
    
    #sidebarToggle:checked ~ .sidebar {
        transform: translateX(0);
    }
    
    #sidebarToggle:checked ~ .main-content {
        margin-left: 280px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-bar {
        padding: 0 16px;
    }
    
    .posts-feed {
        margin: 0 16px 24px;
    }
    
    .create-post {
        margin: 16px;
    }
    
    .story {
        flex: 0 0 68px;
    }
}

@media (max-width: 480px) {
    .login-container, .signup-container {
        flex-direction: column;
        padding: 20px;
    }
    
    .login-left, .signup-left {
        text-align: center;
        padding: 40px 20px;
    }
}
