/* ================= GLOBAL STYLES ================= */
:root {
  --primary-color: #4cd964; /* Apple green */
  --secondary-color: #e0f2f1; /* Light green background */
  --text-color: #333;
  --font-family: 'Premier League', sans-serif;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: var(--text-color);
  line-height: 1.5;
}

.container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ================= NAVBAR ================= */
.navbar {
  background-color: var(--primary-color);
  display: flex;
  justify-content: space-around; /* Spread links evenly across the navbar */
  align-items: center;
  padding: 10px 20px;
  color: #fff;
  flex-wrap: wrap; /* Ensures wrapping on smaller screens */
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  text-align: center; /* Ensures uniform spacing if wrapped */
  margin: 0 5px; /* Small inner spacing */
  flex: 1; /* Equal space for each link */
}

.nav-username {
  font-weight: bold;
  text-align: right; /* Keep username at the end */
  flex: 1; /* Takes remaining space */
}

.notif-badge {
  background-color: red;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8em;
}

/* ================= INPUTS & BUTTONS ================= */
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

textarea {
  resize: none;
  min-height: 60px;
}

button {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  background-color: var(--primary-color);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================= POST FEED ================= */
.post {
  background-color: #fff;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.post .username {
  font-weight: bold;
  color: var(--primary-color);
}

.post-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.comments {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--primary-color);
}

.comments div {
  margin-bottom: 6px;
  font-size: 0.9em;
}

/* ================= PROFILE ================= */
.profile-bio {
  margin-top: 10px;
  font-style: italic;
}

#profilePreview {
  display: block;
  margin: 10px 0;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  width: 100px;
  height: 100px;
  object-fit: cover;
}

/* ================= FRIENDS / SEARCH ================= */
.friend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background-color: #fff;
  margin-bottom: 6px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.friend-item button {
  margin-left: 6px;
  font-size: 0.9em;
}

/* ================= CHAT ================= */
#chatWindow {
  background-color: #fff;
  padding: 12px;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.messages {
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.messages div {
  margin-bottom: 8px;
  padding: 6px 8px;
  background-color: #e0f2f1;
  border-radius: 6px;
}

#messageInput {
  width: calc(100% - 70px);
  display: inline-block;
}

#sendMsgBtn {
  display: inline-block;
}

/* ================= NOTIFICATIONS ================= */
.notification {
  padding: 10px;
  background-color: #fff;
  margin-bottom: 6px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.notification.unread {
  font-weight: bold;
  background-color: #e0f2f1;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  #messageInput {
    width: 100%;
    margin-bottom: 6px;
  }
  #sendMsgBtn {
    width: 100%;
  }
}
/* ================== POSTS ================== */
.post {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.post .username {
  font-weight: bold;
  margin-right: 5px;
}

.post-meta {
  font-size: 0.9rem;
  color: #555;
  margin-top: 5px;
  margin-bottom: 10px;
}

.post-actions button {
  margin-right: 10px;
  padding: 5px 10px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.post-actions button:hover {
  background-color: #0056b3;
}

/* ================== COMMENTS ================== */
.comments {
  margin-top: 10px;
}

.comments div {
  margin-left: 20px; /* indent comments */
  padding: 5px 0;
  font-size: 0.9rem;
  border-left: 2px solid #ddd;
  padding-left: 10px;
}

/* ================== FRIENDS / FOLLOWERS ================== */
.friend-item {
  border: 1px solid #ddd;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.friend-item button {
  margin-left: 5px;
  padding: 4px 8px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #28a745;
  color: white;
}

.friend-item button:hover {
  background-color: #218838;
}

/* ================== NOTIFICATIONS ================== */
.notification {
  border: 1px solid #ddd;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  background-color: #fff;
}

.notification.unread {
  font-weight: bold;
  background-color: #e6f7ff;
}

/* ================== MESSAGES ================== */
#messagesList {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fefefe;
  margin-bottom: 15px;
}

#messagesList div {
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
}

/* ================== GENERAL ================== */
button {
  transition: all 0.2s ease;
}
/* ================== POSTS ================== */
.post {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-family: Arial, sans-serif;
}

.post .username {
  font-weight: bold;
  color: #333;
}

.post-stats {
  font-size: 12px;
  color: #555;
  margin-top: 5px;
  margin-bottom: 10px;
}

.post-actions button {
  margin-right: 10px;
  padding: 5px 10px;
  border: none;
  background-color: #3b82f6;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.2s;
}

.post-actions button:hover {
  background-color: #2563eb;
}

/* ================== COMMENTS ================== */
.comments {
  margin-top: 8px;
}

.comments div {
  background-color: #eef2ff;
  padding: 5px 10px;
  margin-bottom: 5px;
  border-radius: 8px;
  margin-left: 20px; /* make comments appear indented */
  font-size: 13px;
  color: #333;
}

/* ================== NOTIFICATIONS ================== */
.notification {
  padding: 8px 12px;
  margin-bottom: 5px;
  border-radius: 8px;
  background-color: #f0f0f0;
  font-size: 13px;
}

.notification.unread {
  font-weight: bold;
  background-color: #dbeafe; /* light blue */
}

/* ================== FRIENDS / MESSAGES ================== */
.friend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  background-color: #f7f7f7;
  font-size: 14px;
}

.friend-item button {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background-color: #3b82f6;
  color: white;
  font-size: 12px;
  margin-left: 5px;
}

.friend-item button:hover {
  background-color: #2563eb;
}
/* Badges for Chat, Followers, Notifications */
.badge {
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  vertical-align: top;
  margin-left: 4px;
  display: inline-block;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* Optional: animation for new badge */
.badge.new {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
/* ================== FEED ================== */
#feed {
  max-width: 600px;
  margin: 20px auto;
  font-family: Arial, sans-serif;
}

.post {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.username {
  color: green;
  font-weight: bold;
  cursor: pointer;
}

.post-details {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
}

.post-actions {
  margin-top: 8px;
}

.post-actions button {
  padding: 5px 12px;
  margin-right: 6px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: #eee;
  color: #333;
  transition: background 0.2s;
}

.post-actions button:hover {
  background: #ddd;
}

.comments {
  margin-top: 6px;
  font-size: 13px;
  color: #333;
}

.comments div {
  margin-bottom: 4px;
}

/* ================== SUGGESTED USERS ================== */
#suggestedUsers {
  max-width: 600px;
  margin: 20px auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
}

#suggestedUsers .clickable {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

#suggestedUsers .clickable:hover {
  background: #e0f7e0;
}

/* ================== LOAD MORE BUTTON ================== */
#loadMorePosts {
  display: block;
  margin: 15px auto;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: green;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#loadMorePosts:hover {
  background: darkgreen;
}

/* ================== GENERAL FEED LOADING / EMPTY MESSAGES ================== */
#feed p {
  text-align: center;
  font-style: italic;
  color: #888;
  margin: 10px 0;
}
#markAllReadBtn:hover{background-color: blue; text-decoration: underline;}