body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 20px;
  background: #f4f4f4;
  color: #222;
}

h1 {
  text-align: center;
  color: #ff4500;
  margin-bottom: 8px;
}

#profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px;
}

#profile-header {
  text-align: center;
  margin-bottom: 16px;
}

#profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

#profile-username {
  margin-top: 8px;
  color: #ff4500;
}

#profile-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  font-weight: bold;
  color: #555;
  font-size: 0.95rem;
}

/* 🧩 GRID layout for posts */
#profile-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 20px;
  justify-items: center;
}

/* 📦 Each post card smaller */
.profile-post {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  width: 160px;              /* 👈 smaller fixed width */
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  text-align: center;
  overflow: hidden;
}

.profile-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* 🖼️ Image inside post */
.profile-post img.post-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

/* 🧍 User info smaller */
.profile-post .meta {
  display: none; /* hide username/avatar for clean grid look */
}

.profile-post h3 {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #333;
}

.profile-post p {
  margin: 4px 8px;
  font-size: 0.75rem;
  color: #555;
}

/* ❤️ Like buttons small */
.post-actions {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 0 8px;
}

.like-btn {
  cursor: pointer;
  border: none;
  background: none;
  color: #ff4500;
  font-size: 0.8rem;
  transition: transform 0.1s;
}

.like-btn:hover {
  transform: scale(1.2);
}

.like-btn.liked {
  color: #e03e00;
}

.like-count {
  font-weight: bold;
  font-size: 0.75rem;
  color: #333;
}

/* 🔙 Back link */
.back-link {
  display: inline-block;
  margin-top: 25px;
  text-decoration: none;
  color: #ff4500;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 400px) {
  #profile-posts {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .profile-post {
    width: 130px;
  }
}
