:root {

    --color-primary-vue: 252;
    --dark-color-lightness: 17%;
    --light-color-lightness: 95%;
    --white-color-lightness: 100%;

    --color-white: hsl(252, 30%, var(--white-color-lightness) );
    --color-light: hsl(252, 30%, var(--light-color-lightness));
    --color-gray: hsl(252, 15%, 65%);
    --color-primary: hsl(var(--color-primary-vue), 75%, 60%);
    --color-secondary: hsl(252, 100%, 90%);
    --color-success: hsl(152, 95%, 65%);
    --color-danger: hsl(0, 95%, 65%);
    --color-dark: hsl(252, 30%, var(--dark-color-lightness));
    --color-black: hsl(252, 30%, 10%);


    --border-radius: 2rem;
    --card-border-radius: 1rem;
    --btn-padding: 0.6rem 2rem;
    --search-padding: 0.6rem 1rem;
    --card-padding: 1rem;

    --sticky-top-left: 5.4rem;
    --sticky-top-right: -18rem;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    outline: none;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    border: 0;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--color-dark);
    background: var(--color-light);
    overflow-x: hidden;
}

/* GENERAL SETTINGS */
.container {
    width: 80%;
    margin: 0 auto;
}

.profile-picture {
    width: 2.7rem;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;

}

img {
    display: block;
    width: 100%;
}


.btn {
    display: inline-block;
    padding: var(--btn-padding);
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 300ms ease;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.text-bold {
    font-weight: 500;
}

.text-muted {
    color: var(--color-gray)
}


/* navbar styles */

nav {
    width: 100%;
    background: var(--color-white);
    padding: 0.7rem 0;
    position: fixed;
    top: 0;
    z-index: 10;
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-bar {
    background: var(--color-light);
    border-radius: var(--border-radius);
    padding: var(--search-padding)
}

.search-bar input[type="search"] {
    background: transparent;
    width: 30vw;
    margin-left: 1rem;
    font-size: 0.9em;
    color: var(--color-dark);
}

.search-bar input[type="search"]::placeholder {
    color: var(--color-gray);
}

nav .create {
    display: flex;
    justify-content: center;
    gap: 2rem;
}



/*main section */
main {
    position: relative;
    top: 5.7rem;
}

main .container {
    display: grid;
    grid-template-columns: 18vw auto 20vw;
    column-gap: 2rem;
    position: relative;
}

/* left side bar */
main .container .left {
    height: max-content;

    position: sticky;
    top: var(--sticky-top-left);

}

main .container .left .profile {
    padding: var(--card-padding);
    background: var(--color-white);
    border-radius: var(--card-border-radius);
    display: flex;
    align-items: center;
    column-gap: 1rem;
    width: 100%;
}



/* side bar */

.left .sidebar {
    margin-top: 1rem;
    background: var(--color-white);
    border-radius: var(--card-border-radius);
}

.left .sidebar .menu-item {
    display: flex;
    align-items: center;
    height: 4rem;
    cursor: pointer;
    translate: all 300ms ease-in;
    position: relative;
}

.left .sidebar .menu-item:hover {
    background: var(--color-light);
}

.left .sidebar i {
    font-size: 1.4rem;
    color: var(--color-gray);
    margin-left: 2rem;
    position: relative;
}

.left .sidebar i .notification-count {
    background: var(--color-danger);

    width: fit-content;
    color: var(--color-white);

    position: absolute;
    font-size: 0.7rem;
    border-radius: 0.7rem;
    padding: 0.1rem 0.4em;
    top: -0.4rem;
    right: -0.4rem;
}

.left .menu-item h3 {
    margin: 1.5rem;
    font-size: 1rem;
}

.left .sidebar .active {
    background: var(--color-light);

}

.left .sidebar .active i,
.left .sidebar .active h3 {
    color: var(--color-primary);
}

.left .sidebar .active::before {
    content: "";
    display: block;
    width: 0.5rem;
    height: 100%;
    position: absolute;
    background-color: var(--color-primary);
}

.left .sidebar .menu-item:first-child {
    border-top-left-radius: var(--card-border-radius);
    overflow: hidden;
}

.left .sidebar .menu-item:last-child {
    border-bottom-left-radius: var(--card-border-radius);
    overflow: hidden;
}

.left .btn {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    
}


/* notification popup portion*/

.left .notifications-popup {
    position: absolute;
    top: 0;
    left: 110%;
    width: 30rem;
    background: var(--color-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    box-shadow: 0 0 2rem hsl(var(--color-primary), 75% 60% 25%);
    z-index: 6;
    display: none;

}

.left .notifications-popup::before {
    content: "";
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    background: var(--color-white);
    position: absolute;
    left: -0.6rem;
    transform: rotate(-45deg);
    )
}

.left .notifications-popup>div {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.left .notifications-popup small {
    display: block;
}

.center .stories {
    display: flex;
    justify-content: space-between;
    height: 12rem;
    gap: 0.5rem;

}

.center .stories .story {
    display: flex;
    position: relative;
    padding: var(--card-padding);
    width: 100%;
    color: aliceblue;
    background-color: var(--color-primary);
    flex-direction: column;
    border-radius: var(--card-border-radius);
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    overflow: hidden;

}

.center .stories .story::before {
    content: "";
    background: black;
    width: 100%;
    height: 5rem;
    bottom: 0;
    position: absolute;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.center .stories .story p {
    z-index: 1;
}


.center .stories .story:nth-child(1) {
    background: url("./assets/images/story-1.jpg") no-repeat center center/cover;

}

.center .stories .story:nth-child(2) {
    background: url("./assets/images/story-2.jpg") no-repeat center center/cover;

}

.center .stories .story:nth-child(3) {
    background: url("./assets/images/story-4.jpg") no-repeat center center/cover;

}

.center .stories .story:nth-child(4) {
    background: url("./assets/images/story-5.jpg") no-repeat center center/cover;

}

.center .stories .story:nth-child(5) {
    background: url("./assets/images/story-3.jpg") no-repeat center center/cover;

}

.center .stories .story:nth-child(6) {
    background: url("./assets/images/story-6.jpg") no-repeat center center/cover;

}


.center .story .profile-picture {
    height: 2rem;
    width: 2rem;
    align-self: start;
    border: 3px solid var(--color-primary);
}


.center .create-post {
    display: flex;
    width: 100%;
    padding: 0.4rem var(--card-padding);
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    background-color: var(--color-white);
    border-radius: var(--border-radius);
}


.center .create-post input[type='text'] {
    justify-self: start;
    width: 100%;
    padding-left: 0.75rem;
    margin-right: 1rem;
    background: transparent;
    color: var(--color-dark);

}

.center .feeds .feed {
    background: var(--color-white);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.5;

}

.center .feed .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed .head .user {
    display: flex;
    gap: 2rem;

}

.center .feed .photo {
    border-radius: var(--card-border-radius);
    overflow: hidden;
    margin: 0.7rem 0;
}


.center .feed .action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem;
    font-size: 1.4rem;
}

.center .feed .liked-by {
    display: flex;
}

.feed .liked-by span {
    display: block;
    height: 1.7rem;
    width: 1.7rem;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--color-white);
    margin-left: -0.7rem;
}

.feed .liked-by span:first-child {
    margin: 0;
}

.feed .liked-by p {
    margin-left: 0.5rem;
}




/* RIGHT SIDE OF THE GRID */
main .container .right {
    height: max-content;
    position: sticky;
    top: var(--sticky-top-right);
    bottom: 0;

}

.right .messages {
    background-color: var(--color-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);

}

.right .messages .heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;

}

.right .messages i {
    font-size: 1.4rem;
}

.right .messages .search-bar {
    display: flex;
    margin-bottom: 1rem;

}

.right .messages .catergory {
    display: flex;
    width: 100%;
    text-align: center;
    justify-content: space-between;
    margin-bottom: 1rem;

}

.right .messages .catergory h6 {
    font-size: 0.85rem;
    padding-bottom: 0.3rem;
    border-bottom: 4px solid var(--color-light);
}

.right .messages .catergory .active {
    border-color: var(--color-dark);
}

.right .messages .catergory .message-requests {
    color: var(--color-primary);
}

.right .messages .message {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
    align-items: start;
}

.right .messages .message:last-child {
    margin-bottom: 0;
}

.right .messages .message p {
    font-size: 0.8rem;
}

.right .messages .message .profile-picture .active {
    height: 0.8rem;
    width: 0.8rem;
    background-color: var(--color-success);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--color-white);
}

.messages .message .profile-picture img {
    border-radius: 50%;
}

.messages .message .profile-picture {
    overflow: visible;
    position: relative;
}



/* requests section */

.right .friend-requests {
    margin-top: 1rem;
}

.right .friend-requests h4 {
    color: var(--color-gray);
    margin: 1rem 0;
}

.right .friend-requests .request {
    border-radius: var(--card-border-radius);
    background: var(--color-white);
    padding: var(--card-padding);
    margin-bottom: 0.7rem;
}

.friend-requests .request .info {
    display: flex;
    gap: 1.0rem;
    margin-bottom: 1rem;
}

.right .request .action {
    display: flex;
    gap: 1.0rem;
}



/*Modal for theme customization*/

.customize-theme {

    background: rgba(255, 255, 255, 0.5);
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    text-align: center;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    display: none;
}


.customize-theme .card {
    padding: 3rem;
    background: var(--color-white);
    width: 50%;
    border-radius: var(--card-border-radius);
    box-shadow: 0 0 1rem var(--color-primary);

}


.customize-theme .font-size {
    margin-top: 5rem;
}

.customize-theme .font-size>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-light);
    padding: var(--search-padding);
    border-radius: var(--card-border-radius);
}

.customize-theme .choose-size {
    height: 0.3rem;
    background: var(--color-secondary);
    width: 100%;
    display: flex;
    margin: 0 1rem;
    justify-content: space-between;
    align-items: center;

}

.customize-theme .choose-size span {
    height: 1rem;
    width: 1rem;
    background: var(--color-secondary);
    border-radius: 50%;
    cursor: pointer;
}

.customize-theme .choose-size .active {
    background: var(--color-primary);
}






/*COLOR POSITION CUSTOMIZATION*/

.customize-theme .color {
    margin-top: 2rem;
}

.customize-theme .color .choose-color {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--card-border-radius);
    padding: 1rem;
    background-color: var(--color-light);
}

.color .choose-color span {
    height: 2.2rem;
    width: 2.2rem;
    border-radius: 50%;

}

.color .choose-color span:nth-child(1) {
    background: hsl(252, 75%, 60%);
}

.color .choose-color span:nth-child(2) {
    background: hsl(52, 75%, 60%);
}

.color .choose-color span:nth-child(3) {
    background: hsl(352, 75%, 60%);
}

.color .choose-color span:nth-child(4) {
    background: hsl(152, 75%, 60%);
}

.color .choose-color span:nth-child(5) {
    background: hsl(202, 75%, 60%);
}







.color .choose-color span.active {
    border: 2px solid var(--color-white);
}

.customize-theme .background {
    margin-top: 2rem;
}

.customize-theme .background .choose-bg {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 1rem;
}

.background .choose-bg .active {
    border: 2px solid var(--color-primary);
}

.background .choose-bg>div {
    padding: var(--card-padding);
    width: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.0rem;
    border-radius: 0.4rem;
    gap: 0.8rem;
}



.background .choose-bg .bg-1 {
    background: white;
    color: black;

}

.background .choose-bg .bg-2 {
    background: hsl(252, 30%, 17%);
    color: white;
}

.background .choose-bg .bg-3 {
    background: hsl(252, 30%, 17%);
    color: white;
}

.background .choose-bg>div span {
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
    border: 2px solid var(--color-secondary);
}


/******RESPONSIVE FOR LARGER DEVICES(LAPTOPS)*********/

@media screen and (max-width:1200px) {
    .container {
        width: 96%;

    }

    .main .container {
        grid-template-columns: 5rem auto 30vw;
        gap: 1rem;
    }

    .left {
        width: 5rem;
        z-index: 5;
    }

    main .container .left .profile {
        display: none;
    }

    .sidebar h3 {
        display: none;
    }

    .left .btn {
        display: none;
    }

    .customize-theme .card {
        width: 80vw;

    }
}

/************RESPONSIVE DESIGN FOR SMALL TABLETS AND MOBILE PHONES******************/
@media screen and (max-width:992px) {


    nav .search-bar {
        display: none;

    }

    main .container {
        grid-template-columns: 0 auto 5rem;
        gap: 0;
    }

    main .container .left {
        grid-column: 3/4;
        position: fixed;
        bottom: 0;
        right: 0;

    }


    /*NOTIFICATION POP UP**/
    .left .notifications-popup {
        display: absolute;
        left: -20rem;
        width: 20rem;

    }

    .left .notifications-popup::before {
        display: absolute;
        top: 1.3rem;
        left: calc(20rem - 0.6rem);
        display: block;
    }


    main .container .left .sidebar>div h3 {
        display: none;
    }

    main .container .right {
        display: none;
    }

    main .container .center {
        grid-column: 1/3;
    }

    .customize-theme .card {
        width: 92vw;
    }

}