
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #222;
}

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 70px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  z-index: 1000;
}

.nav-icon {
  width: 40px;
  height: 40px;
  margin: 0.6rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-icon img {
  width: 28px;
  height: 28px;
  opacity: 0.7;
  transition: 0.2s ease;
}

.nav-icon:hover img {
  opacity: 1;
  transform: scale(1.15);
}

.nav-icon.active img {
  opacity: 1;
  transform: scale(1.2);
  filter: drop-shadow(0 0 4px #6a5acd);
}

.nav-spacer {
  flex-grow: 1;
}


.top-bar {
  position: fixed;
  top: 0;
  left: 70px;
  right: 0;
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  z-index: 900;
}

.search-wrapper {
  position: relative;
  width: 50%;
  max-width: 500px;
}


.search-bar {
  width: 100%;
  padding: 0.6rem 1rem;
  padding-right: 40px; 
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  background: #fafafa;
}


.search-icon-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon-btn img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
  transition: 0.2s ease;
}

.search-icon-btn img:hover {
  opacity: 1;
  transform: scale(1.1);
}

.top-logo {
  position: absolute;
  right: 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #6a5acd;
}


.page-content {
  margin-left: 70px;
  padding-top: 90px;
  padding: 1.5rem;
}



.profile-header {
  margin-left: 70px;
  padding-top: 120px; 
  padding-bottom: 1rem;
}

.profile-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}


.profile-pic {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}


.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.username {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.bio {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
  max-width: 600px;
  margin-bottom: 1.2rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 0.5rem;
}

.stats div {
  text-align: center;
}

.stats strong {
  font-size: 1.2rem;
  display: block;
}

.stats span {
  font-size: 0.85rem;
  color: #666;
}



.profile-tabs {
  margin-left: 70px;
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding-bottom: 1.5rem;
}

.tab-link {
  font-size: 1rem;
  color: #6a5acd;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: 0.2s ease;
}

.tab-link:hover {
  border-bottom: 2px solid #6a5acd;
}

.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.tab-link {
  font-size: 1rem;
  color: #6a5acd;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: 0.2s ease;
}

.tab-link:hover {
  border-bottom: 2px solid #6a5acd;
}

/* STATS */
.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 0.5rem;
}

.stats div {
  text-align: center;
}

.stats strong {
  font-size: 1.2rem;
  display: block;
}

.stats span {
  font-size: 0.85rem;
  color: #666;
}


.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 20px 10px;
}


.post-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
}


.post-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
}


.post-icons {
  margin-top: 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.post-icons img {
  width: 26px;
  height: 26px;
  opacity: 0.8;
  cursor: pointer;
  transition: 0.2s ease;
}

.post-icons img:hover {
  opacity: 1;
  transform: scale(1.15);
}

.popup-overlay {
  position: fixed;
  top: 70px;
  left: 120px;
  display: none;
  z-index: 999;
}


.popup-card {
  background: #fff;
  width: 260px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
}


.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.4rem;
  text-decoration: none;
  color: #666;
}


.popup-title {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.2rem;
}


.popup-item {
  display: block;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  font-size: 15px;
}

.popup-item:hover {
  color: #6a5acd;
}


.popup-logout {
  display: block;
  margin: 20px auto 0;
  background: #6a5acd;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.popup-logout:hover {
  background: #5a4ac0;
}

.popup-logout:active {
  background: #4a3ab0;
}


@media (max-width: 1100px) {
  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .feed-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}