* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Poppins", sans-serif;
  background-color: var(--background-of-main);
}

:root {
  --main: hsl(0, 0%, 100%);
  --background-of-main: hsl(0, 0%, 88%);
  --darkgray: darkgray;
  --black-dark: #111111;
  --white: white;
  --left-hover: #9f99c7af;
  --btn-color: #6733c2;

  --sticky-top-left: 7rem;
  --sticky-top-right: -22.5rem;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
html {
  font-size: 14px;
}
.container {
  max-width: 80%;
  margin: 0 auto;
}
::placeholder {
  font-size: 1.1rem;
}
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.btn {
  /* background-color: rgb(194, 51, 75); */

  background-color: var(--btn-color);

  padding: 0.8rem 2.4rem;
  border: none;
  border-radius: 2.8rem;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-border-radius: 2.8rem;
  -moz-border-radius: 2.8rem;
  -ms-border-radius: 2.8rem;
  -o-border-radius: 2.8rem;
}

h3 {
  color: var(--black-dark);

  font-weight: 600;
  font-size: 1.4rem;
}
.text-muted {
  color: var(--darkgray);
  font-size: 1.2rem;
  font-weight: 600;
}

a,
li,
input {
  outline: none;
  border: none;
  text-decoration: none;
}
.icon {
  color: var(--black-dark);
  font-size: 2.1rem;
}

input {
  border: none;
  outline: none;
}

.profile img {
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  object-fit: cover;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

.container,
.mainSection {
  width: 80%;
  margin: 0 auto;
}

nav {
  height: 5.5rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--main);
  padding: 0.3rem;
  .container {
    .logo {
      display: flex;
      font-size: 2.4rem;
      font-weight: 700;
      background-image: linear-gradient(
        to right,
        #6733c2,
        #8843e1,
        #b35af7,
        #e467ff,
        #ff6fd8
      );

      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: hackerGlow 4s infinite linear;
    }
    .navSearch {
      width: 50%;
      background-color: var(--darkgray);
      border-radius: 3.2rem;
      color: var(--black-dark);
      padding: 0.4rem 2.8rem;
      display: flex;
      align-items: center;
      -webkit-border-radius: 3.2rem;
      -moz-border-radius: 3.2rem;
      -ms-border-radius: 3.2rem;
      -o-border-radius: 3.2rem;

      input {
        font-size: 1.1rem;
        color: blackr;
        width: 100%;
        padding: 0.8rem;
        background-color: var(--darkgray);
      }
    }
    .navRight {
      padding: 0.6rem;
      display: flex;
      gap: 2rem;

      a {
        display: none;
      }
    }
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

.mainSection {
  position: relative;
  background-color: var(--background-of-main);
  top: 5.5rem;
  width: 80vw;
}

.mainSection {
  display: grid;
  column-gap: 0.9rem;
  grid-template-columns: 20% 50% 28%;
}

.generalLeft {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
  padding: 0.6rem 1rem;
  background-color: var(--main);
  border-radius: 1.4rem;
  -webkit-border-radius: 1.4rem;
  -moz-border-radius: 1.4rem;
  -ms-border-radius: 1.4rem;
  -o-border-radius: 1.4rem;
}

.left::-webkit-scrollbar {
  display: none;
}
.mainSection {
  position: relative;
  padding-top: 1.8rem;
  .left {
    /* height: calc(100vh - 5.5rem); */
    height: max-content;
    position: sticky;
    top: var(--sticky-top-left);
    display: flex;
    flex-direction: column;
    .top {
      .topContent {
        position: sticky;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
      }
    }
    .btn {
      padding: 1.2rem 2.4rem;
      margin-bottom: 1rem;
    }
  }
  .left .sidebar {
    position: relative;
    flex-direction: column;
    align-items: start;
    justify-content: space-between;
    padding: 0;
    gap: 0;
    background-color: var(--main);

    .active {
      background: var(--background-of-main);
    }
    .active span,
    .active h3 {
      color: var(--btn-color);
    }
    & .active::before {
      left: 0;
      content: "";
      display: block;
      width: 0.5rem;
      height: 100%;
      position: absolute;
      background: var(--btn-color);
    }
    & .menu-item {
      width: 100%;
      display: flex;
      align-items: center;
      cursor: pointer;
      position: relative;
      padding: 2rem;
      height: 2.8rem;
      gap: 1.8rem;
      transition: all 300ms ease;
    }
    .menu-item:hover {
      background-color: var(--left-hover);
      width: 100%;
    }
    & .menu-item:first-child.active,
    .menu-item:first-child {
      border-top-left-radius: 1.4rem;
      border-top-right-radius: 1.4rem;
      overflow: hidden;
    }
    & .menu-item:last-child.active,
    .menu-item:last-child:hover {
      border-bottom-left-radius: 1.4rem;
      border-bottom-right-radius: 1.4rem;
      overflow: hidden;
    }
  }
}

.notifications {
  display: none;
}
/* 
.notifications.show {
  display: flex;
} */

.notifications {
  h3 {
    display: none;
  }
  color: var(--black-dark);
  box-shadow: inset 0 0 1.2rem var(--btn-color);
  background-color: var(--main);
  border-radius: 1.4rem;
  -webkit-border-radius: 1.4rem;
  -moz-border-radius: 1.4rem;
  -ms-border-radius: 1.4rem;
  -o-border-radius: 1.4rem;
  font-size: 1.1rem;
  width: 24rem;
  height: 30rem;
  overflow-y: auto;
  flex-direction: column;
  &::-webkit-scrollbar {
    display: none;
  }
  /* gap: 1.8rem; */
  position: absolute;
  left: 105%;
  top: 0;
  z-index: 2001;
  padding: 1.2rem 0.8rem;

  > div {
    display: flex;
    gap: 1rem;
    align-self: self-start;
    align-items: center;
    margin-bottom: 0.8rem;
    .message {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }
    small {
      display: block;
    }
  }
}
.notificationDiv {
  .text-muted {
    font-size: 1rem;
    font-weight: 500;
  }
}

.stories {
  max-width: 58rem;
  height: 20rem;
  margin-bottom: 1.2rem;
  border-radius: 1.4rem;
  overflow-x: auto;
  display: flex;
  gap: 1.1rem;
  justify-content: space-between;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-border-radius: 1.4rem;
  -moz-border-radius: 1.4rem;
  -ms-border-radius: 1.4rem;
  -o-border-radius: 1.4rem;
}

#scrollable-box::-webkit-scrollbar {
  display: none;
}

.story {
  &:nth-child(1) {
    background-image: url("images/str2.jpg");
    background-size: cover;
  }
  &:nth-child(2) {
    background-image: url("images/str1.jpg");
    background-size: cover;
  }
  &:nth-child(3) {
    background-image: url("images/str3.jpg");
    background-size: cover;
  }
  &:nth-child(4) {
    background-image: url("images/str4.jpg");
    background-size: cover;
  }
  &:nth-child(5) {
    background-image: url("images/str5.jpg");
    background-size: cover;
  }
  &:nth-child(6) {
    background-image: url("images/post4.avif");
    background-size: cover;
  }
  &:nth-child(7) {
    background-image: url("images/post3.jpg");
    background-size: cover;
  }
  &:nth-child(8) {
    background-image: url("images/image1.png");
    background-size: cover;
  }
  &:nth-child(9) {
    background-image: url("images/image4.png");
    background-size: cover;
  }
  &:nth-child(10) {
    background-image: url("images/str2.jpg");
    background-size: cover;
  }

  width: 12rem;
  height: 20rem;
  border-radius: 1.4rem;
  font-size: 1.2rem;
  font-weight: bold;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  /* position: relative; */

  .story-profile {
    margin: 1.2rem;
    border: 0.2rem solid rgb(128, 0, 98);
    border-radius: 50%;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-border-radius: 0.2rem solid rgb(128, 0, 98);
    -moz-border-radius: 0.2rem solid rgb(128, 0, 98);
    -ms-border-radius: 0.2rem solid rgb(128, 0, 98);
    -o-border-radius: 0.2rem solid rgb(128, 0, 98);
    div {
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  span {
    display: block;
    padding: 0 1.2rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    color: var(--white);
  }
}
.create-post {
  color: var(--black-dark);
  width: 100%;
  height: 5rem;
  background-color: var(--main);
  padding-left: 1.2rem;
  border-radius: 3.2rem;
  -webkit-border-radius: 3.2rem;
  -moz-border-radius: 3.2rem;
  -ms-border-radius: 3.2rem;
  -o-border-radius: 3.2rem;
  margin-bottom: 1.8rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;

  input[type="text"] {
    color: var(--black-dark);
    background: var(--main);
    font-size: 1.2rem;
    padding: 0.4rem 1rem;
    width: 80%;
  }
}

.create-post .btn {
  &:hover {
    box-shadow: 0 0 1rem rgb(0, 0, 0, 0.5);
  }
}

.feeds {
  color: var(--black-dark);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 0.8rem;
  .posts {
    background-color: var(--main);
    border-radius: 1.4rem;
    -webkit-border-radius: 1.4rem;
    -moz-border-radius: 1.4rem;
    -ms-border-radius: 1.4rem;
    -o-border-radius: 1.4rem;
    padding: 1.4rem 2rem;

    .self {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .profile {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        .text-muted {
          font-weight: 500;
          font-size: 1rem;
        }
      }
    }

    .post {
      width: 100%;
      max-width: 100%;
      object-fit: contain;
      margin: 1.2rem auto;
      border-radius: 1.4rem;
      -webkit-border-radius: 1.4rem;
      -moz-border-radius: 1.4rem;
      -ms-border-radius: 1.4rem;
      -o-border-radius: 1.4rem;
      overflow: hidden;
      img {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: auto;
        max-height: 90vh;
        object-fit: contain;
        flex-wrap: nowrap;
        display: block;
        border-radius: 1.4rem;
        -webkit-border-radius: 1.4rem;
        -moz-border-radius: 1.4rem;
        -ms-border-radius: 1.4rem;
        -o-border-radius: 1.4rem;
      }
    }
    .action-btn {
      padding: 0.2rem 0.8rem;
      display: flex;
      justify-content: space-between;
      .interactions {
        display: flex;
        gap: 1rem;
      }
    }
    .liked-by {
      padding: 0 0 0.4rem 0.4rem;
      display: flex;
      gap: 0.4rem;
      align-items: center;
      .like-profile {
        margin-left: 0.4rem;
        span {
          margin-left: -0.8rem;
          img {
            object-fit: cover;
            width: 1.8rem;
            height: 1.8rem;
            border-radius: 50%;
            overflow: hidden;
            border: 0.2rem solid white;
            -webkit-border-radius: 50%;
            -moz-border-radius: 50%;
            -ms-border-radius: 50%;
            -o-border-radius: 50%;
          }
        }
      }
    }
    .text-muted {
      padding: 0.4rem 0;
      font-size: 1.2rem;
      font-weight: 500;
    }
  }
}

.right {
  color: var(--black-dark);
  overflow-y: visible;
  height: max-content;
  position: sticky;
  top: var(--sticky-top-right);
  bottom: 0;
  .message-box {
    display: flex;
    flex-direction: column;
    .heads {
      padding: 0.6rem 0.4rem;
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .search-bar {
      width: 100%;
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      align-items: center;
      background-color: var(--background-of-main);
      border-radius: 6rem;
      -webkit-border-radius: 6rem;
      -moz-border-radius: 6rem;
      -ms-border-radius: 6rem;
      -o-border-radius: 6rem;
      padding: 0.6rem 1.2rem;
      input[type="search"] {
        width: 100%;
        background-color: var(--background-of-main);
      }
    }
    .category {
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: row;
      h5 {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.7rem 1.8rem;
        border-bottom: 0.4rem solid var(--background-of-main);
      }
      .active {
        border-color: var(--btn-color);
      }
    }
    .message-container {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 0.3rem;

      .message:nth-child(1),
      .message:nth-child(3) {
        .profile::before {
          content: "";
          position: absolute;
          width: 0.9rem;
          height: 0.9rem;
          background-color: #42ae42;
          bottom: 1.5px;
          right: 1.5px;
          border-radius: 50%;
          border: 2px solid var(--main);
          -webkit-border-radius: 50%;
          -moz-border-radius: 50%;
          -ms-border-radius: 50%;
          -o-border-radius: 50%;
        }
      }
    }
    .message {
      display: flex;
      justify-self: start;
      align-items: center;
      gap: 1.2rem;
      .profile {
        scale: 0.9;
        position: relative;
      }
      b {
        font-size: 0.9rem;
      }
      h4 {
        padding-bottom: 0.2rem;
      }
      .text-muted {
        font-size: 1.1rem;
        font-weight: 500;
      }
    }
  }
  .freind-requests {
    background-color: var(--background-of-main);
    margin: 0rem;
    padding: 0rem;
    display: flex;
    flex-direction: column;
    h3 {
      align-self: flex-start;
    }
    .request {
      background-color: var(--main);
      width: 100%;
      padding: 1.2rem;
      border-radius: 1.4rem;
      -webkit-border-radius: 1.4rem;
      -moz-border-radius: 1.4rem;
      -ms-border-radius: 1.4rem;
      -o-border-radius: 1.4rem;
      .info {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        padding-bottom: 1rem;
        .text-muted {
          font-size: 1.1rem;
          font-weight: 500;
        }
      }
      .action {
        display: flex;
        gap: 1rem;
        :nth-child(2) {
          background-color: var(--background-of-main);
          color: var(--black-dark);
        }
      }
    }
  }
}

.customize-theme {
  color: var(--black-dark);
  background: rgba(255, 355, 255, 0.5);
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  text-align: center;
  place-items: center;

  .card {
    background-color: var(--main);
    box-shadow: inset 0 0 1.8rem var(--btn-color);
    width: 50%;
    display: flex;
    flex-direction: column;
    padding: 3rem;
    border-radius: 1.4rem;
    -webkit-border-radius: 1.4rem;
    -moz-border-radius: 1.4rem;
    -ms-border-radius: 1.4rem;
    -o-border-radius: 1.4rem;

    .text-muted {
      font-size: 1rem;
      font-weight: 500;
    }

    .font-size {
      margin-top: 4rem;

      > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--background-of-main);
        padding: 0.4rem 1.6rem;
        border-radius: 1.2rem;
        -webkit-border-radius: 1.2rem;
        -moz-border-radius: 1.2rem;
        -ms-border-radius: 1.2rem;
        -o-border-radius: 1.2rem;
      }
      .choose-size {
        margin: 0.8rem 1.2rem;
        width: 100%;
        height: 0.3rem;
        background-color: #d1c3ed;
        display: flex;
        justify-content: space-between;
        align-items: center;
        span {
          cursor: pointer;
          width: 1.2rem;
          height: 1.2rem;
          border-radius: 50%;
          background-color: #d1c3ed;
          -webkit-border-radius: 50%;
          -moz-border-radius: 50%;
          -ms-border-radius: 50%;
          -o-border-radius: 50%;
        }
        .active {
          background-color: var(--btn-color);
        }
      }
    }

    .color {
      margin-top: 2rem;

      .choose-color {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--background-of-main);
        padding: 0.6rem 1.6rem;
        border-radius: 1.2rem;
        -webkit-border-radius: 1.2rem;
        -moz-border-radius: 1.2rem;
        -ms-border-radius: 1.2rem;
        -o-border-radius: 1.2rem;

        .active {
          border: 0.3rem solid white;
        }
        span {
          cursor: pointer;
          width: 2.6rem;
          height: 2.6rem;
          border-radius: 50%;
          background-color: #fe2010;
          -webkit-border-radius: 50%;
          -moz-border-radius: 50%;
          -ms-border-radius: 50%;
          -o-border-radius: 50%;

          &:nth-child(1) {
            background: hsl(252, 75%, 60%);
          }
          &:nth-child(2) {
            background: hsl(52, 75%, 60%);
          }
          &:nth-child(3) {
            background: hsl(352, 75%, 60%);
          }
          &:nth-child(4) {
            background: hsl(152, 75%, 60%);
          }
          &:nth-child(5) {
            background: hsl(202, 75%, 60%);
          }
        }
      }
    }

    .background {
      margin-top: 2rem;

      .choose-bg {
        display: flex;
        justify-content: space-evenly;
        gap: 3rem;
        align-items: center;

        > div {
          cursor: pointer;
          padding: 1.2rem 3rem;
          display: flex;
          align-items: center;
          font-size: 1.2rem;
          font-weight: bold;
          border-radius: 0.6rem;
          -webkit-border-radius: 0.6rem;
          -moz-border-radius: 0.6rem;
          -ms-border-radius: 0.6rem;
          -o-border-radius: 0.6rem;

          span {
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 50%;
            margin-right: 1rem;
            border: 2px solid gray;
            -webkit-border-radius: 50%;
            -moz-border-radius: 50%;
            -ms-border-radius: 50%;
            -o-border-radius: 50%;
          }
        }
        .active {
          border: 2px solid var(--btn-color);
        }

        .bg1 {
          background: white;
          color: black;
        }
        .bg2 {
          background: hsl(252, 30%, 15%);
          color: white;
        }
        .bg3 {
          background: hsl(252, 30%, 8%);
          color: white;
        }
      }
    }
  }
}

footer {
  display: none;
  position: fixed;
  width: 100%;
  background-color: red;
  bottom: 0;
  padding: 0;
  margin: 0;
  .sidebarBottom {
    border-radius: 0;
    box-shadow: 5px 0 5px rgba(0, 0, 0, 0.5);
    height: 5rem;
    margin: 0;
    padding: 0 2.2rem;
    display: flex;
    align-items: center;
    gap: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
    .menu-item {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      width: calc(100vw / 6);
      height: 100%;
      &:hover {
        background-color: var(--left-hover);
      }
    }
    .active span {
      color: var(--btn-color);
      padding-bottom: 0.2rem;
      border-bottom: 3px solid var(--btn-color);
      font-size: 2.4rem;
    }
  }
}

/* MEDIA QUERIES */

@media screen and (max-width: 1280px) {
  html {
    font-size: 13px;
  }
  .mainSection {
    width: 98%;
  }
  .mainSection {
    display: grid;
    column-gap: 1.2rem;
    grid-template-columns: 7% 60% 30%;
  }

  .left {
    width: 5.5rem;
    z-index: 5;
    position: sticky;
    top: 7.3rem;
    display: flex;
    flex-direction: column;
    .sidebar {
      height: calc(100vh - 8.2rem);
    }
    .top,
    .btn {
      display: none;
    }
  }
  .sidebar {
    height: max-content;
    justify-content: space-between;
    h3 {
      display: none;
    }
  }

  #notifications .notifications {
    .headName {
      width: 100%;
      justify-content: center;
      h3 {
        display: block;
        padding: 0 0.5rem 0;
        align-items: center;
      }
    }
    width: 28rem;
    height: calc(100vh - 20.8rem);
    left: 120%;
    overflow-y: auto;
  }
  .customize-theme {
    .card {
      .background {
        .choose-bg {
          gap: 2rem;
        }
      }
      width: 75%;
    }
  }
}

@media screen and (max-width: 996px) {
  html {
    font-size: 12px;
  }
  nav .container {
    .navSearch {
      display: none;
    }
  }

  #notifications .notifications {
    width: 28rem;
    height: 39rem;
    position: absolute;
    left: -28.5rem;
    top: 0;
    margin-bottom: 2rem;
    /* z-index: 2000; */
  }

  .mainSection {
    grid-template-columns: 0% 90% 10%;
  }
  .left .sidebar {
    .menu-item {
      justify-content: start;
      align-items: center;
    }
  }
  .stories {
    width: 100%;
    max-width: none;
  }
  .mainSection .left {
    position: fixed;
    right: 0;
    bottom: 0;
    grid-column: 3/4;
  }

  .mainSection .middle {
    width: 100%;
    grid-column: 1/3;
  }
  .mainSection .right {
    display: none;
  }
  b {
    font-size: 1.2rem;
  }

  .customize-theme {
    .card {
      width: 75%;
    }
  }
}

@media screen and (max-width: 720px) {
  html {
    font-size: 11px;
  }
  nav .container {
    .navRight {
      align-items: center;
      a {
        display: block;
      }
    }
    .btn {
      display: none;
    }
  }

  .mainSection {
    grid-template-columns: 0 100%;
    position: relative;
    gap: 0;
    .left {
      position: absolute;
      left: 101.5%;
      top: 1.8rem;
      grid-column: 2/3;
    }
  }

  .left {
    .sidebar {
      position: absolute;
      left: -2rem;
      visibility: hidden;
      height: max-content;

      .notifications {
        width: 30rem !important;
        display: none;
        visibility: visible;
      }
      .menu-item:nth-child(1),
      .menu-item:nth-child(2),
      .menu-item:nth-child(4),
      .menu-item:nth-child(5),
      .menu-item:nth-child(6),
      .menu-item:nth-child(7),
      .menu-item:nth-child(8) {
        display: none;
      }
    }
  }
  b {
    font-size: 1rem;
  }
  footer {
    display: block;
  }

  .customize-theme {
    .card {
      width: 90%;
      padding: 2.4rem 0.8rem;
      .background .choose-bg {
        padding-top: 0.4rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        gap: 0.6rem;
        text-align: center;
        > div {
          padding: 1.2rem 2.4rem;
          width: 50%;
        }
      }
    }
  }
}
