/* ===========================
   RESET
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,Helvetica,sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:#f0f2f5;
    color:#050505;
    overflow-x:hidden;
    padding-top:65px;
    padding-bottom:80px;
}

/* ===========================
   HEADER
=========================== */

.header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:65px;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 18px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    z-index:1000;
}

.menu-btn{
    display:none;
    border:none;
    background:none;
    font-size:28px;
    cursor:pointer;
}

.app-name{
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
}

.logo{
    width:42px;
    height:42px;
    object-fit:contain;
}

.logo-text{
    font-size:30px;
    font-weight:700;
}

.white{
    color:#111;
}

.blue{
    color:#1877F2;
}

/* ===========================
   SEARCH BAR
=========================== */

.search-bar{
    width:40%;
    height:42px;
    background:#f0f2f5;
    display:flex;
    align-items:center;
    border-radius:30px;
    padding:0 15px;
}

.search-bar input{
    flex:1;
    border:none;
    outline:none;
    background:transparent;
    margin-left:8px;
    font-size:15px;
}

.header-icons{
    display:flex;
    align-items:center;
    gap:18px;
}

.icon{
    width:28px;
    cursor:pointer;
}

.notify{
    font-size:26px;
    cursor:pointer;
}

.header-profile{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid #1877F2;
    cursor:pointer;
}

/* ===========================
   SIDEBAR
=========================== */

.sidebar-left{
    position:fixed;
    top:65px;
    left:0;
    width:270px;
    height:calc(100vh - 65px);
    background:#fff;
    overflow-y:auto;
    padding:20px;
    box-shadow:2px 0 8px rgba(0,0,0,.05);
}

.sidebar-profile{
    display:flex;
    align-items:center;
    gap:15px;
    margin-bottom:20px;
}

.sidebar-photo{
    width:60px;
    height:60px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #1877F2;
}

.sidebar-profile h3{
    font-size:18px;
}

.sidebar-profile p{
    color:#666;
    font-size:14px;
}

.sidebar-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 15px;
    margin-top:8px;
    text-decoration:none;
    color:#222;
    border-radius:10px;
    transition:.3s;
}

.sidebar-item:hover{
    background:#f0f2f5;
}

.logout{
    color:#d93025;
}

/* ===========================
   OVERLAY
=========================== */

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    display:none;
    z-index:999;
}

.overlay.show{
    display:block;
}

/* ===========================
   MAIN CONTENT
=========================== */

.main-content{
    margin-left:290px;
    padding:20px;
    max-width:900px;
}

/* ===========================
   RESPONSIVE
=========================== */

@media(max-width:768px){

    .menu-btn{
        display:block;
    }

    .logo-text{
        display:none;
    }

    .search-bar{
        width:48%;
    }

    .sidebar-left{
        left:-290px;
        transition:.35s;
        z-index:1001;
    }

    .sidebar-left.active{
        left:0;
    }

    .main-content{
        margin-left:0;
        padding:15px;
    }

}
/* ===================================
   PROFILE COVER
=================================== */

.profile-cover{
    position:relative;
    width:100%;
    height:350px;
    border-radius:18px;
    overflow:hidden;
    background:#ddd;
    box-shadow:0 4px 15px rgba(0,0,0,.12);
}

.cover-image{
    width:100%;
    height:100%;
    object-fit:cover;
}

.change-cover{
    position:absolute;
    right:20px;
    bottom:20px;
    border:none;
    outline:none;
    background:#ffffff;
    color:#111;
    padding:12px 18px;
    border-radius:12px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;
    box-shadow:0 3px 12px rgba(0,0,0,.2);
}

.change-cover:hover{
    background:#1877F2;
    color:#fff;
}

/* ===================================
   PROFILE HEADER
=================================== */

.profile-header-box{
    position:relative;
    margin-top:-70px;
    padding:0 25px 25px;
    display:flex;
    align-items:flex-end;
    gap:25px;
}

/* ===================================
   PROFILE PHOTO
=================================== */

.profile-photo-wrapper{
    position:relative;
}

.profile-photo{
    width:170px;
    height:170px;
    border-radius:50%;
    object-fit:cover;
    border:6px solid #fff;
    background:#fff;
    box-shadow:0 5px 20px rgba(0,0,0,.2);
}

.edit-photo{
    position:absolute;
    right:8px;
    bottom:10px;
    width:42px;
    height:42px;
    border:none;
    border-radius:50%;
    background:#1877F2;
    color:#fff;
    font-size:18px;
    cursor:pointer;
    transition:.3s;
}

.edit-photo:hover{
    transform:scale(1.08);
}

/* ===================================
   PROFILE DETAILS
=================================== */

.profile-details{
    flex:1;
    padding-bottom:15px;
}

.profile-details h1{
    font-size:34px;
    color:#111;
}

.profile-details p{
    margin-top:6px;
    color:#666;
    font-size:16px;
    line-height:1.5;
}

/* ===================================
   PROFILE STATS
=================================== */

.profile-stats{
    margin-top:25px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}

.stat-box{
    background:#fff;
    padding:20px;
    text-align:center;
    border-radius:15px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    transition:.3s;
}

.stat-box:hover{
    transform:translateY(-4px);
}

.stat-box h2{
    color:#1877F2;
    font-size:28px;
    margin-bottom:8px;
}

.stat-box span{
    color:#666;
    font-size:15px;
}

/* ===================================
   PROFILE BUTTONS
=================================== */

.profile-buttons{
    display:flex;
    gap:12px;
    margin-top:25px;
}

.primary-btn,
.secondary-btn{
    border:none;
    cursor:pointer;
    padding:13px 24px;
    border-radius:12px;
    font-size:15px;
    font-weight:600;
    transition:.3s;
}

.primary-btn{
    background:#1877F2;
    color:#fff;
}

.primary-btn:hover{
    background:#0d65d9;
}

.secondary-btn{
    background:#e4e6eb;
    color:#111;
}

.secondary-btn:hover{
    background:#d8dadf;
}

/* ===================================
   RESPONSIVE
=================================== */

@media(max-width:768px){

    .profile-cover{
        height:220px;
        border-radius:0;
    }

    .profile-header-box{
        margin-top:-50px;
        flex-direction:column;
        align-items:center;
        text-align:center;
    }

    .profile-photo{
        width:120px;
        height:120px;
    }

    .profile-details h1{
        font-size:28px;
    }

    .profile-stats{
        grid-template-columns:repeat(2,1fr);
    }

    .profile-buttons{
        flex-direction:column;
    }

    .primary-btn,
    .secondary-btn{
        width:100%;
    }

    .change-cover{
        padding:10px 14px;
        font-size:14px;
    }

}
/* ===================================
   PROFILE TABS
=================================== */

.profile-tabs{
    margin-top:25px;
    display:flex;
    gap:10px;
    overflow-x:auto;
    scrollbar-width:none;
}

.profile-tabs::-webkit-scrollbar{
    display:none;
}

.tab-btn{
    padding:12px 22px;
    border:none;
    border-radius:12px;
    background:#fff;
    color:#555;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;
    white-space:nowrap;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.tab-btn:hover{
    background:#1877F2;
    color:#fff;
}

.tab-btn.active{
    background:#1877F2;
    color:#fff;
}

/* ===================================
   CREATE POST
=================================== */

.create-post-card{
    margin-top:25px;
    background:#fff;
    border-radius:18px;
    padding:18px;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.create-top{
    display:flex;
    align-items:center;
    gap:15px;
}

.small-profile{
    width:50px;
    height:50px;
    border-radius:50%;
    object-fit:cover;
}

#createPostInput,
#postInput{
    flex:1;
    border:none;
    outline:none;
    background:#f0f2f5;
    padding:14px 18px;
    border-radius:25px;
    font-size:15px;
}

.create-actions{
    display:flex;
    justify-content:space-between;
    margin-top:18px;
    gap:10px;
}

.create-actions button{
    flex:1;
    border:none;
    background:#f7f7f7;
    padding:12px;
    border-radius:12px;
    cursor:pointer;
    font-weight:600;
    transition:.3s;
}

.create-actions button:hover{
    background:#1877F2;
    color:#fff;
}

/* ===================================
   POSTS
=================================== */

.posts-container{
    margin-top:25px;
}

.post-card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    margin-bottom:25px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
}

.post-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:16px;
}

.post-user{
    display:flex;
    align-items:center;
    gap:12px;
}

.post-user img{
    width:48px;
    height:48px;
    border-radius:50%;
    object-fit:cover;
}

.post-user h4{
    font-size:17px;
    color:#111;
}

.post-user span{
    font-size:13px;
    color:#777;
}

.post-menu{
    font-size:22px;
    cursor:pointer;
    color:#666;
}

.post-text{
    padding:0 16px 15px;
    line-height:1.6;
    font-size:15px;
}

.post-image{
    width:100%;
    max-height:600px;
    object-fit:cover;
}

.post-stats{
    display:flex;
    justify-content:space-between;
    padding:14px 16px;
    color:#666;
    font-size:14px;
    border-bottom:1px solid #eee;
}

.post-actions{
    display:flex;
}

.post-actions button{
    flex:1;
    border:none;
    background:none;
    padding:14px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;
}

.post-actions button:hover{
    background:#f0f2f5;
    color:#1877F2;
}

/* ===================================
   RESPONSIVE
=================================== */

@media(max-width:768px){

    .profile-tabs{
        gap:8px;
    }

    .tab-btn{
        font-size:14px;
        padding:10px 16px;
    }

    .create-actions{
        flex-wrap:wrap;
    }

    .create-actions button{
        min-width:48%;
    }

    .post-header{
        padding:12px;
    }

    .post-user img{
        width:42px;
        height:42px;
    }

    .post-text{
        font-size:14px;
    }

    .post-actions button{
        font-size:14px;
        padding:12px;
    }

}
/* ===================================
   PHOTOS SECTION
=================================== */

.profile-section{
    margin-top:25px;
    background:#fff;
    border-radius:18px;
    padding:20px;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.section-header h2{
    font-size:22px;
}

.section-header a{
    text-decoration:none;
    color:#1877F2;
    font-weight:600;
}

.photos-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.photos-grid img{
    width:100%;
    aspect-ratio:1;
    object-fit:cover;
    border-radius:12px;
    cursor:pointer;
    transition:.3s;
}

.photos-grid img:hover{
    transform:scale(1.04);
}

/* ===================================
   FRIENDS
=================================== */

.friends-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:15px;
}

.friend-card{
    background:#f7f7f7;
    border-radius:15px;
    overflow:hidden;
    text-align:center;
    padding:15px;
}

.friend-card img{
    width:90px;
    height:90px;
    border-radius:50%;
    object-fit:cover;
}

.friend-card h4{
    margin:10px 0;
}

.friend-card button{
    width:100%;
    border:none;
    padding:10px;
    border-radius:10px;
    background:#1877F2;
    color:#fff;
    cursor:pointer;
}

/* ===================================
   ABOUT
=================================== */

.about-list p{
    margin:12px 0;
    font-size:16px;
    border-bottom:1px solid #eee;
    padding-bottom:10px;
}

.about-list strong{
    color:#1877F2;
}

/* ===================================
   BOTTOM NAVIGATION
=================================== */

.bottom-nav{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    height:65px;
    background:#fff;
    display:none;
    justify-content:space-around;
    align-items:center;
    border-top:1px solid #ddd;
    box-shadow:0 -2px 10px rgba(0,0,0,.08);
    z-index:999;
}

.bottom-nav a{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-decoration:none;
    color:#666;
    font-size:13px;
}

.bottom-nav span{
    font-size:24px;
    margin-bottom:2px;
}

.bottom-nav .active{
    color:#1877F2;
}

.center-btn{
    width:55px;
    height:55px;
    border-radius:50%;
    background:#1877F2;
    color:#fff !important;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-top:-25px;
    font-size:28px;
    box-shadow:0 5px 20px rgba(24,119,242,.35);
}

/* ===================================
   LOADER
=================================== */

#loadingScreen{
    position:fixed;
    inset:0;
    background:rgba(255,255,255,.95);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:99999;
    transition:.4s;
}

.loaderBox{
    width:120px;
    height:120px;
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
}

.loaderBox::before{
    content:"";
    position:absolute;
    width:100px;
    height:100px;
    border-radius:50%;
    border:5px solid transparent;
    border-top:5px solid #1877F2;
    border-right:5px solid #1877F2;
    animation:spin 1s linear infinite;
}

.loaderImg{
    width:60px;
    height:60px;
    border-radius:50%;
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

/* ===================================
   MOBILE
=================================== */

@media(max-width:768px){

    .photos-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .friends-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .bottom-nav{
        display:flex;
    }

    body{
        padding-bottom:90px;
    }

}

@media(max-width:480px){

    .photos-grid,
    .friends-grid{
        grid-template-columns:1fr;
    }

    .friend-card img{
        width:70px;
        height:70px;
    }

    .section-header h2{
        font-size:18px;
    }

}