*, *::before, *::after{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    border: none;
}
body{
    width: 100%;
    background: #f5efef;
}
.container{
    width: 80%;
    margin: 0 auto;
}
.profilepicture{
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
}
img{
    display: block;
    width: 100%;
}
.btn{
    display: inline-block;
    padding: 0.6rem 2rem;
    cursor: pointer;
    transition: all 300ms ease;
    border-radius: 2rem;
    background-color: rgb(235, 224, 224);
}
.btn:hover{
    opacity: 0.8;
}
.btn-red{
    background: white;
    color: grey;
}
.btnprimary{
    background: red;
    color: white;
}
.text{
    color: gray;
}

nav{
    width: 100%;
    background: red;
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    z-index: 99;
    color: white;
}
nav .container{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
nav span{
    letter-spacing: 1px;
    font-size: 2.5rem;
    font-weight: bold;
}
nav .searchbar{
    padding: 0.6rem 1rem;
    border-radius: 2rem;
    background: hsl(252, 30%, 95%);
}
nav .searchbar input[type="search"]{
    background: transparent;
    width: 30vw;
    margin-left: 1rem;
    font-size: 0.9rem;
    outline: none;
}
nav .searchbar i{
    color: hsl(252, 30%, 17%);
}
nav .searchbar input[type="search"]::placeholder{
    color: hsl(252, 15%, 65%);
}
nav .login{
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
nav .login label {
    font-weight: bold;
}
nav .profilecontainer{
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

main{
    position: relative;
    top: 5.4rem;
}
main .container{
    display: grid;
    grid-template-columns: 15vw auto 20vw;
    column-gap: 2rem;
    position: relative;
}
main .container .leftbar{
    height: max-content;
    position: sticky;
    top: 5.4rem;
}
main .leftbar .profile{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    border-radius: 1rem;
}
.leftbar .profile .line{
    width: 100%;
    height: 1px;
    background: gray;
    opacity: 0.2;
}
.leftbar .profile .profilepicture{
    width: 5rem;
    height: 5rem;
    z-index: 1;
    margin-top: 2rem;
    border: 4px solid white;
}
.leftbar .profile .info h4{
    font-size: x-large;
}
.leftbar .profile .info p{
    font-size:1rem;
    margin: 4px 0;
}
.leftbar .profile .info button{
    border: none;
    padding: 0.5rem 0;
    background: transparent;
    margin: 4px 0;
    font-size: 1rem;
    font-weight: bold;
    color: red;
    cursor: pointer;
}
.leftbar .profile .info h5{
    font-size: large;
    margin: 8px 0;
}
.leftbar .profile .info span{
    font-size: medium;
    margin: 4px 0;
    font-weight: lighter;
}
.leftbar .menubar{
    margin-top: 1rem;
    background: white;
    border-radius: 1rem;
}
.leftbar .menubar .menuitems{
    display: flex;
    align-items: center;
    height: 4rem;
    cursor: pointer;
    transition: all 300ms ease;
    position: relative;
}
.leftbar .menubar .menuitems:hover{
    background: #f5efef;
}
.leftbar .menubar i{
    font-size: 1.4rem;
    color: rgb(170, 161, 161);
    margin-left: 2rem;
    position: relative;
}
.leftbar .menubar i .notification-count{
    color: white;
    background-color: red;
    font-size: 0.7rem;
    width: fit-content;
    border-radius: 0.8rem;
    padding: 0.1rem 0.4rem;
    position: absolute;
    top: -0.2rem;
    right: -0.8rem;
}
.leftbar .menubar h3{
    margin-left: 1.5rem;
    font-size: 1rem;
}
.leftbar .menubar .active{
    background: #f5efef;
}
.leftbar .menubar .active i, .leftbar .menubar .active h3{
    color: red;
}
.leftbar .menubar .active::before{
    content: "";
    display: block;
    width: 0.5rem;
    height: 100%;
    position: absolute;
    background: red;
}
.leftbar .menubar .menuitems:first-child.active{
    border-top-left-radius: 1rem;
    overflow: hidden;
}
.leftbar .menubar .menuitems:last-child.active{
    border-bottom-left-radius: 1rem;
    overflow: hidden;
}
.leftbar .profile::before{
    content: "";
    display: block;
    width: 100%;
    height: 5rem;
    position: absolute;
    background: red;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}
.leftbar .notificationspopup{
    position: absolute;
    top: 0;
    left: 106%;
    background: white;
    width: 30rem;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 0 1rem red ;
    display: none;
}
.leftbar .notificationspopup::before{
    content: "";
    width: 1.5rem;
    height: 1.5rem;
    display: block;
    position: absolute;
    background: white;
    top: 2;
    left: -0.6rem;
    transform: rotate(45deg);
}
.leftbar .notificationspopup > div {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.leftbar .notificationspopup small{
    display: block;
}

.middlebar .stories{
    display: flex;
    justify-content: space-between;
    height: 15rem;
    gap: 0.5rem;
}
.middlebar .stories .story{
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    font-size: 0.75rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.middlebar .stories .story .name{
    z-index: 2;
    font-size: 1rem;
}
.middlebar .stories .story::before{
    content: "";
    display: block;
    width: 100%;
    height: 8rem;
    background: linear-gradient(transparent,rgba(0.70, 0.85, 0.90, 0.95));
    position: absolute;
    bottom: 0;
}
.middlebar .stories .story:nth-child(1){
    background: url(./assets/post/Elizabeth/4.jpg)
    no-repeat center center/cover;
}
.middlebar .stories .story:nth-child(2){
    background: url(./assets/post/Keerthy/1.jpg)
    no-repeat center center/cover;
}
.middlebar .stories .story:nth-child(3){
    background: url(./assets/post/Hailee/4.jpg)
    no-repeat center center/cover;
}
.middlebar .stories .story:nth-child(4){
    background: url(./assets/post/Raashi/3.jpg)
    no-repeat center center/cover;
}
.middlebar .stories .story:nth-child(5){
    background: url(./assets/post/Iswarya/5.jpg)
    no-repeat center center/cover;
}
.middlebar .stories .story:nth-child(6){
    background: url(./assets/post/Shahid/1.webp)
    no-repeat center center/cover;
}
.middlebar .stories .story .profilepicture{
    width: 2.5rem;
    height: 2.5rem;
    align-items: start;
    border: 2px solid blueviolet;
}
.middlebar .createpost{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    background: white;
    padding: 0.4rem 1rem;
    border-radius: 1rem;
}
.middlebar .createpost input[type="text"]{
    justify-self: start;
    width: 100%;
    padding-left: 1rem;
    background: transparent;
    color: gray;
    outline: none;
}
.middlebar .feeds .post{
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}
.middlebar .feeds .post .head{
    display: flex;
    justify-content: space-between;
}
.middlebar .post .user{
    display: flex;
    gap: 1rem;
}
.middlebar .post .desc{
    margin-top: 1rem;
    font-size: 1rem;
}
.middlebar .post .photo{
    border-radius: 1rem;
    overflow: hidden;
    margin: 0.7rem 0;
}
.middlebar .post .responsebutton{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    margin: 0.6rem;
}
.middlebar .likeby{
    display: flex;
}
.middlebar .likeby span{
    width: 1.4rem;
    height: 1.4rem;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    margin-left: -0.6rem;
}
.middlebar .likeby span:first-child{
    margin: 0;
}
.middlebar .likeby p{
    margin-left: 0.5rem;
}

main .container .rightbar{
    height: max-content;
    position: sticky;
    top: -18rem;
    bottom: 0;
}
.rightbar .messages{
    background: white;
    border-radius: 1rem;
    padding: 1rem;
}
.rightbar .messages .heading{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.rightbar .messages i{
    font-size: 1.4rem;
}
.rightbar .messages .searchbar{
    display: flex;
    margin-bottom: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 2rem;
    background: hsl(252, 30%, 95%);
}
.messages .searchbar input[type="search"]{
    background: transparent;
    width: 30vw;
    margin-left: 1rem;
    font-size: 0.9rem;
    outline: none;
}
.rightbar .messages .category{
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.rightbar .messages .category h6{
    width: 100%;
    text-align: center;
    border-bottom: 4px solid #c0b7b7;
    padding-bottom: 0.5rem ;
    font-size: 0.85rem;
}
.rightbar .messages .category .active{
    border-color: gray;
}
.rightbar .messages .message{
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.rightbar .messages .message:last-child{
    margin: 0;
}
.rightbar .messages .message p{
    font-size: 0.8rem;
}
.rightbar .message .messagebody{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.rightbar .messages .message .profilepicture{
    position: relative;
    overflow: visible;
}
.rightbar .profilepicture img{
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}
.rightbar .message .messagebody .time{
    align-self: start;
}
.rightbar .messages .message .profilepicture .active{
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    border: 3px solid white;
    background: rgb(7, 216, 7);
    position: absolute;
    bottom: 0;
    right: 0;
}
.rightbar .friendrequests{
    margin-top: 1rem;
}
.rightbar .friendrequests h2{
    color: gray;
    margin: 1rem 0;
}
.rightbar .request {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 0.7rem;
}
.rightbar .request .info{
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.rightbar .request .button{
    display: flex;
    gap: 1rem;
}


@media (max-width:1200px) {
    .container{
        width: 96%;
    }
    main .container{
        grid-template-columns: 5rem auto 30vw;
        gap: 1rem;
    }
    .leftbar{
        width: 5rem;
        z-index: 5;
    }
    main .container .leftbar .profile{
        display: none;
    }
    .menubar h3{
        display: none;
    }
}

@media (max-width:992px) {
    nav .searchbar {
        display: none;
    }
    main .container{
        grid-template-columns: 0 auto 5rem;
        gap: 0;
    }
    main .container .leftbar{
        grid-template-columns: 3/4;
        position: fixed;
        bottom: 0;
        right: 0;
    }
    
    .leftbar .notificationspopup{
        position: absolute;
        left: -26rem;
        width: 25rem;
    }
    .leftbar .notificationspopup::before{
        display: absolute;
        top: 1.3rem;
        left: calc(25rem - 0.7rem);
        display: block;
    }
    main .container .leftbar .menubar> div h3{
        display: none;
    }
    main .container .middlebar {
        grid-column: 1/3;
    }
    main .container .rightbar{
        display: none;
    }
}
@media (max-height:780px) {
    main .container .leftbar .profile{
        display: none;
    } 
    main .container .leftbar .menubar{
        margin-top: 0rem;
    }
}
@media (max-width:800px){
    nav .container .login label{
        display: none;
    }
}
