/* ---------- Page Container ---------- */
.mastodon-container {
  display: flex;
  justify-content: center;
  padding: 20px;
  font-family: "Segoe UI", Roboto, Helvetica, sans-serif;
}

/* ---------- Sidebar Filters ---------- */
.mastodon-sidebar {
  flex: 0 0 220px;
  margin-right: 20px;
  padding: 12px;
  background: #f5f8fa;
  border-radius: 12px;
  border: 1px solid #e6ecf0;
  position: sticky;
  top: 20px; /* sticky position */
  height: fit-content;
}

.mastodon-sidebar h3 {
  margin-top: 0;
  font-size: 14px;
  color: #657786;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Modern toggle style for checkboxes */
.mastodon-sidebar label {
  display: inline-block;
  margin: 4px 4px 8px 0;
  font-size: 13px;
  cursor: pointer;
}

.mastodon-sidebar input[type="checkbox"] {
  display: none;
}

.mastodon-sidebar input[type="checkbox"] + span {
  display: inline-block;
  padding: 6px 12px;
  background: #e6ecf0;
  border-radius: 9999px;
  color: #14171a;
  transition: all 0.2s;
}

.mastodon-sidebar input[type="checkbox"]:checked + span {
  background: #1da1f2;
  color: #fff;
}

/* ---------- Feed ---------- */
.mastodon-feed-wrapper {
  flex: 1;
  max-width: 600px; /* like X feed width */
}

.mastodon-feed {
  display: flex;
  flex-direction: column;
}

/* ---------- Each Post ---------- */
.mastodon-post {
  border-bottom: 1px solid #e6ecf0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, box-shadow 0.2s;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
}

.mastodon-post:hover {
  background: #f5f8fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Header */
.mastodon-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.mastodon-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 10px;
}

.mastodon-user {
  font-weight: bold;
  font-size: 14px;
  color: #14171a;
  margin-right: 6px;
}

.mastodon-timestamp {
  font-size: 12px;
  color: #657786;
}

/* Post content */
.mastodon-post .content {
  font-size: 14px;
  color: #14171a;
  margin-bottom: 8px;
  word-wrap: break-word;
  line-height: 1.4;
}

/* Hashtags like X */
.mastodon-hashtag {
  color: #1da1f2;
  cursor: pointer;
  font-weight: 500;
  margin-right: 4px;
}

.mastodon-hashtag:hover {
  text-decoration: underline;
}

/* Media attachments */
.mastodon-post img {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 8px;
}

.mastodon-post iframe {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 8px;
}

/* Load more button */
#mastodon-load {
  display: block;
  margin: 20px auto;
  padding: 10px 18px;
  font-size: 14px;
  background: #1da1f2;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#mastodon-load:hover {
  background: #0d8ddb;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .mastodon-container {
    flex-direction: column;
    align-items: center;
  }
  .mastodon-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 20px;
  }
  .mastodon-feed-wrapper {
    max-width: 100%;
  }
}
