* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
}
body {
  background: #ffffff;
}
.title a {
  margin: 10px;
  color: #fe2c55;
  font-style: italic;
  font-family: Sans-Serif;
  font-size: 25px;
  cursor: pointer;
}
#hr {
  border-top: 1px solid #333;
  margin: 10px;
}
.header i, .header-item2 a {
  color: #555;
  font-size: 20px;
  cursor: pointer;
}


.nav-items-right-to-left.nav-items {
  direction: rtl;
}

nav ul li {
  margin: 9%;
  font-size: 20px;
}
nav ul li a, nav ul li {
  color: #555;
}
nav i {
  margin-right: 15px;
}


.nav-items-right-to-left nav i {
  margin: 0;
  margin-left: 15px;
}

 .menu {
      margin-top: 20px;
      margin-left: 9%;
    }
    .user-info {
      display: flex;
    }
    .user-profile-pic-div {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      margin-right: 10px;
      background: #ccc;
    }


    .nav-items-right-to-left .user-profile-pic-div {
      margin: 0;
      margin-left: 10px;
    }

    .user-profile-pic {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      object-fit: cover;
    }
    .profile-user-info {
      overflow: hidden;
      flex: 1;
    }
     #name {
      color: #000000;
      overflow: hidden;
      white-space: pre-wrap;
      word-wrap: break-word;
    }
    .profile-user-info p {
      font-size: 0.8rem;
      margin: 0;
      color: #999;
    }
    #hide-nav {
      font-size: 20px;
      margin-left: 20px;
      margin-right: 20px;
      cursor: pointer;
    }
    .nav-items-right-to-left #hide-nav {
      transform: rotate(-180deg);
    }
    
#following-followers {
  display: flex;
  margin-left: 9%;
}



.nav-items-right-to-left #following-followers {
  margin: 0;
  margin-right: 9%;
}
.following {
  margin-right: 10px;
}


.nav-items-right-to-left .following {
  margin: 0;
  margin-left: 10px;
}

.following label, .followers label {
  color: #999;
}

.toggle {
  display: flex;
  justify-content: space-between;
}

        .toggle-button {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }

        .toggle-button input {
            display: none;
            outline: none; /* Remove the default blue outline on click */
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            border-radius: 34px;
            transition: 0.4s;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            border-radius: 50%;
            transition: 0.4s;
        }


        .nav-items-right-to-left .toggle-slider:before {
          left: auto;
          right: 4px; /* Start from right */
      }
      
      
        input:checked + .toggle-slider {
            background-color: #2196F3;
        }

        input:checked + .toggle-slider:before {
            transform: translateX(26px);
        }


        .nav-items-right-to-left input:checked + .toggle-slider:before {
          transform: none;
          transform: translateX(-26px); /* Move to the left instead of right */
      }

.header-unread:not(:empty) {
      font-size: 16px;
      font-weight: bold;
      color: #ffffff;
      padding: 5px;
      margin-left: 10px;
      margin-top: -5px;
      min-width: 20px;
      height: 20px;
      border-radius: 50px;
      background-color: #fe2c55;
      position: absolute;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
   }
   #preloder {
    border: 7px solid #f3f3f3; /* Light grey */
    border-top: 7px solid #fe2c55; /* #fe2c55 */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    z-index: 100;
    animation: spin 2s linear infinite;
  }
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }   
  
  
  .header-right-to-left.header {
    direction: rtl;
  }

@media screen and (max-width: 767px) {
.space {
  margin-top: 100px;
}
.space.Profile, .space.Search {
  margin: 0;
}
header {
  height: 100px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #f5f6f7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 100px;
  z-index: 200;
  }
  .Chats.header, .Search.header {
    display: none;
  }

  .header.Profile {
    display: none;
  }
  #search-icon {
  position: absolute;
  top: 0;
  right: 40px;
  font-size: 25px;
}


.header-right-to-left #search-icon {
  right: auto;
  left: 40px;
}

#nav-modal {
  height: 100vh;
  width: 100%;
  position: fixed;
  display: none;
  z-index: 1000;
}
#nav-modal.Profile {
  display: none;
}

#nav-icon {
  margin: 10px;
  margin-right: 30px;
  font-size: 25px;
}


.header-right-to-left #nav-icon {
  margin-left: 0;
  margin-left: 30px;
}

.header-item1 {
  display: flex;
  margin-bottom: 20px;
}
.header-item2 {
  display: flex;
  justify-content: space-around;
  }
.nav-items {
  width: 100%;
  height: 100vh;
  position: fixed;
  overflow: hidden;
  left: -100%;
  flex-direction: column;
  background-color: #ffffff;
  transition: all 0.4s;
  overflow-y: scroll;
  top: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}
}

@media screen and (min-width: 768px) {
  .space {
  margin-top: 40px;
}
.Chats.space, .space.Search {
  margin-top: 0;
}
  header {
    height: 40px;
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-around;
    top: 0;
    left: 0;
    right: 0;
    background-color: #f5f6f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 200;
  }

  .Chats.header {
    position: sticky;
  }

  .Search.header {
    display: none;
  }
  .header-item1 {
    display: flex;
    align-items: center;
  }

  .Chats .header-item1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .header-item1 label#nav-icon i {
    display: none;
  }

  .header-item1 h2.title {
    margin-left: 30px;
  }

  .Chats .header-item1 h2.title {
    margin-left: 0;
  }

  .header-item1 label#search-icon {
    margin-left: 40px;
    margin-right: 30px;
    cursor: pointer;
  }

  .header-item1 label#search-icon i {
    font-size: 18px;
  }

  .header-item2 {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-around;
  }

  .Chats .header-item2 {
    position: fixed;
    top: 60px; /* Adjust if your header is taller or shorter */
    left: 0;
    top: 0;
    width: 50px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding-top: 10px;
    gap: 20px;
    z-index: 1000;
  }

  .Chats .header-item2.header-item2-right-to-left {
    left: auto;
    right: 0;
  }

  #nav-modal {
    display: flex;
  }
.nav-items {
  position: unset;
  z-index: 0;
  width: 350px;
  height: 100vh;
  overflow: hidden;
  background-color: none;
  overflow-y: scroll;
  scrollbar-width: none;
  margin-top: 50px;
  height: 100%;
}
.Search .nav-items {
  margin-top: 0;
}
.nav-items-right-to-left.nav-items {
  left: auto;
  right: 0;
}
#hide-nav {
  display: none;
  color: #fe2c55;
}
#name {
  font-size: 20px;
}
.user-profile-pic-div {
      width: 50px;
      height: 50px;
      
    }
    .user-profile-pic {
      width: 50px;
      height: 50px;
      
    }
    .profile-user-info p {
      font-size: 1.0rem;
    }
    #following-followers {
      font-size: 17px;
}
}

.nav-items-right-to-left.nav-items {
  left: auto;
  right: -100%;
}

.dark-mode-nav-items {
  background: #242526;
  color: #fff;
}
.dark-mode-nav-items #name {
  color: #fff;
}
.dark-mode-nav-items #hr {
  border-top: 1px solid #ccc;
}
.dark-mode-nav-items .user-profile-pic-div {
  background: #333;
}
.dark-mode-nav-items nav ul li a, .dark-mode-nav-items nav ul li {
  color: #aaa;
}
.dark-mode-header {
  background: #0a0908;
}
.dark-mode-header i, .dark-mode-header .header-item2 a {
  color: #fff;
}