* {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

/*************************************** navbar ***************************************/
nav {
  height: 100px;
  background-color: #fff;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding-left: 15px;
  padding-right: 15px;
  color: #000;
  box-shadow: 0px 4px 5px -1px rgba(148, 148, 148, 0.94);
  -webkit-box-shadow: 0px 4px 5px -1px rgba(148, 148, 148, 0.94);
  -moz-box-shadow: 0px 4px 5px -1px rgba(148, 148, 148, 0.94);
  position: sticky;
  top: 0;
  z-index: 999;
}

#nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
}

#nav-list > li {
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

#nav-list > li {
  list-style: none;
}

#profile-img > img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
}
.navleft {
  padding-left: 0;
  margin-left: 0;
}
#humburger-icon {
  display: none;
}
/*************************************** navbar end ***************************************/

/*************************************** Main Layout ***************************************/
.container {
  display: flex;
  /* Allow content to wrap if needed */
  flex-wrap: nowrap; 
}

/* Base styles for sidebars on large screens */
.left {
  /* Removed position: fixed to allow it to participate in flex layout */
  width: 20%; 
  min-width: 250px; /* Ensures a minimum readable width */
  background-color: #fff;
  box-shadow: 4px 0px 7px 0px rgba(140, 135, 135, 0.75);
  -webkit-box-shadow: 4px 0px 7px 0px rgba(140, 135, 135, 0.75);
  -moz-box-shadow: 4px 0px 7px 0px rgba(140, 135, 135, 0.75);
  /* height: 83vh; - Removed fixed height for scrolling main container */
  min-height: calc(100vh - 100px); /* Fill remaining viewport height */
  padding: 15px;
  position:fixed;

  
  /* Use flex-shrink: 0 to prevent it from shrinking */
  flex-shrink: 0; 
  /* Added overflow-y to handle content taller than the viewport */
  overflow-y: auto; 
}
.right {
  /* Removed position: fixed */
  width: 20%; 
  min-width: 250px; /* Ensures a minimum readable width */
  background-color: #fff;
  box-shadow: -3px 0px 7px -1px rgba(107, 97, 97, 0.83);
  -webkit-box-shadow: -3px 0px 7px -1px rgba(107, 97, 97, 0.83);
  -moz-box-shadow: -3px 0px 7px -1px rgba(107, 97, 97, 0.83);
  /* height: 83vh; - Removed fixed height */
  min-height: calc(100vh - 100px); /* Fill remaining viewport height */
  padding: 15px;
  position: fixed;
  right: 0;  
  /* Removed right: 0; */
  overflow-y: scroll;
  overflow-x: hidden;
  flex-shrink: 0;
}

#leftside-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  top: 10px;
  margin-top: 40px;
}

#leftside-middle > ul > li {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 25px;
  font-size: 20px;
  font-weight: 500;
  margin-top: 25px;
}

#rightrside-middle > ul > li {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  font-size: 15px;
  font-weight: 500;
  margin-top: 20px;
}

#leftside-bottom {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* position: relative; - Removed absolute positioning */
  /* top: 27%; - Removed absolute positioning */
  color: gray;
  font-weight: 400;
  margin-top: 50px; /* Added margin to push it down */
}

#rightside-list > li > img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.center {
  /* Removed fixed width and margin-left */
  margin-left: 0; 
  width: auto;
  flex-grow: 1; /* Allows center to take up all remaining space */
  background-color:white;
  display: block;
  /* Removed fixed overflow-y to prevent internal scrollbar */
  overflow-y: visible;
  padding: 0 15px; /* Added padding for space */
}

.center-top {
  display: block;
  /* Use a percentage width and auto margins to center within .center */
  width: 90%; 
  max-width: 700px; /* Keeps the post creation box from getting too wide */
  margin: 20px auto; 
  align-items: center;
  background-color:black;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  height: 170px;
  color: white;
}
.form {
  display: flex;
  width: 90%; /* Changed from 60% */
  justify-content: space-evenly;
  padding-top: 20px;
  margin: 0 auto;
}
.topbuttons {
  align-items: center;
  font-size: 16px;
  width: 100%;
  margin-top: 10px;
  /* Removed large margin-bottom to make the box smaller */
  margin-bottom: 0px; 
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  background-color:black;
  justify-content: space-evenly;
  display: flex;
}
.topb {
  width: 200px;
  height: 50px;
  align-items: center;
  font-size: 16px;
  border-radius: 10px;
  padding: 0;
  background-color: transparent;
  color:white;
  border: none;
}
.topb:hover {
  background-color:white;
  color:black;
  cursor: pointer;
}
.pp {
  border-radius: 50%;
  margin-left: 20px;
  margin-top: 10px;
}
.form > .textbox {
  border-radius: 40px;
  width: 100%;
  height: 50px;
  border: none;
  padding-left: 30px;
  background-color: white;
  font-size: 16px;
  padding-top: 5px;
  margin-top: 10px;
  margin-left: 30px;
}
input::placeholder {
  font-size: 20px;
  margin-left: 0px;
  align-items: center;
}
.buttonspan {
  margin-bottom: 30px;
  margin-left: 20px;
}
.button {
  display: flex;
  flex-direction: row;
  gap: 10px;
  font-size: 16px;
  padding: 5px;
}
.headingtop {
  padding: 5px;
}
.post-card {
  /* Use a flexible width and center with auto margins */
  width: 90%; 
  max-width: 700px;
  margin: 20px auto;
  
  border-radius: 6px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background: #000009;
  color: white;
}

/* Header */
.post-header {
  align-items: center;
  margin-bottom: 10px;
  margin-top: 30px;
}
.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}
.user-name {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}
.post-date {
  font-size: 12px;
  color: #666;
}

/* Post Content */
.post-title {
  margin: 10px 0 5px;
  font-size: 18px;
}
.post-text {
  margin: 0 0 10px;
  font-size: 14px;
}
.post-img {
  width: 100%;
  border-radius: 6px;
  margin: 10px 0;
}

/* Insights */
.insights {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
}
.insights a {
  color: #1877f2;
  font-size: 14px;
  text-decoration: none;
}
.boost-btn {
  background: #1877f2;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* Reactions */
.reactions {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 14px;
  margin: 10px 0;
}
.likes span {
  margin-right: 5px;
}
.center-middle {
  /* Use a flexible width and center with auto margins */
  width: 90%; 
  max-width: 700px;
  margin: 20px auto;
  
  background-color: white;
  border-radius: 15px;
}
/* Actions */
.actions {
  display: flex;
  justify-content: space-around;
  margin: 10px 0;
}
.actions button {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}
.actions button:hover {
  background: #f0f2f5;
  border-radius: 4px;
}

/* Comment Box */
.comment-box {
  display: flex;
  align-items: center;
  margin-top: 10px;
}
.profile-pic-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
}
.comment-box input {
  flex: 1;
  border: none;
  background: #f0f2f5;
  padding: 8px 12px;
  border-radius: 20px;
}
.comment-box input:focus {
  outline: none;
}

/*************************************** Main Layout end ***************************************/

/************************************** media quries **************************************/
/* Tablet/Small Desktop - Hides the right sidebar to give center more space */
@media (max-width: 1200px) {
  .left, .right {
    min-width: 200px; /* Shrink sidebars slightly */
  }
}

@media (max-width: 1024px) {
  /* Hide the right sidebar */
  .right {
    display: none;
  }
  
  /* Left sidebar adjustments */
  #leftside-top > h2 {
    font-size: 20px;
  }
  #leftside-top > p {
    font-size: 15px;
  }

  #leftside-bottom {
    /* Adjusted for static positioning */
    top: auto; 
    font-size: 12px;
  }
  #leftside-middle > ul > li {
    font-size: 15px;
    gap: 10px;
  }
  .center{
    margin-left:5px;
    width: 50%px;

  }
  .center-top{
    width:50%;
    font-size: 16px;

  }
  .center-middle{
    width:50%;
  }
}


/* Mobile - Hides both sidebars and makes the center content full width */
@media (max-width: 768px) {
  /* Remove sidebars completely */
  .right {
    display: none;
  }
  .left {
    display: none;
  }
  
  /* Make center content full width */
  .center {
    padding: 0 5px; /* Reduce padding for smaller screens */
  }
  
  /* Make center content blocks full width */
  .center-top, .center-middle, .post-card {
    width: 100%;
    border-radius: 0; /* Optional: Make posts full bleed */
    padding: 15px 5px;
  }
  
  /* Navbar adjustments */
  nav {
    justify-content: space-between;
  }
  #nav-list {
    display: none;
  }
  #humburger-icon {
    display: inline;
  }
}

/* Very Small Mobile */
@media (max-width: 481px)  {
  /* Ensure the navbar list remains hidden and hamburger visible */
  #nav-list {
    display: none;
  }
  #humburger-icon {
    display: inline;
  }
}