.community-updates-page {
  padding: 2rem 3rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

.community-updates-header {
  text-align: left;
  margin-bottom: 1.5rem;
}

.community-updates-header h1 {
  font-size: 3rem;
  margin: 0;
}

.community-updates-subtitle {
  color: #9a9a9a;
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 0.35rem;
}

.community-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.community-sort-label {
  color: #b6b6b6;
  font-size: 0.9rem;
  font-weight: 500;
}

.community-sort-select {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  color: #f2f2f2;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.community-sort-select:focus {
  outline: none;
  border-color: #f04030;
  box-shadow: 0 0 0 2px rgba(240, 64, 48, 0.2);
}

.community-updates-list {
  display: grid;
  gap: 1.3rem;
}

.community-post {
  background: #14141400;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  display: grid;
  gap: 0.6rem;
}

.community-post-source {
  color: #f04030;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.community-post-main {
  display: grid;
  gap: 0.45rem;
}

.community-post-username {
  color: #cfcfcf;
  font-size: 0.85rem;
}

.community-post-author-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.post-header-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  min-width: max-content;
}

.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cfcfcf;
  flex-shrink: 0;
  white-space: nowrap;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #2a2a2a;
  background: #1b1b1b;
  flex: 0 0 auto;
}

.author-name {
  color: #cfcfcf;
  font-size: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 0;
}

.author-name .user-upvote-total {
  margin-left: 0.2rem;
  font-size: 0.9em;
}

.community-post-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.community-post-title:hover {
  color: #ffffff;
}

.community-post-body {
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.55;
}

.community-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.2rem;
}

.community-post-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: transparent;
}

.community-post-tag.pill--hidden-details {
  color: #ffef38;
}

.community-post-tag.pill--color-lighting {
  color: #25bed6;
}

.community-post-tag.pill--cinematography {
  color: #379846;
}

.community-post-tag.pill--symbolism {
  color: #ee509c;
}

.community-post-tag.pill--spoiler {
  color: #ff0808;
}

.community-post-tag.pill--sound {
  color: #ff8113;
}

.community-post-tag.pill--references {
  color: #6048ff;
}

.spoiler-content {
  position: relative;
  display: block;
}

.spoiler-content.is-blurred .community-post-body-text {
  display: block;
  filter: blur(10px);
  user-select: none;
  pointer-events: none;
}

.spoiler-content.is-blurred::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.35);
}

.spoiler-content.is-revealed .community-post-body-text {
  filter: none;
  user-select: text;
  pointer-events: auto;
}

.spoiler-content.is-revealed::after {
  display: none;
}

.spoiler-reveal-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(243, 243, 243, 0.86);
  padding: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.comment-footer .vote-bar,
.comment-footer .comment-toggle {
  min-height: 28px;
  height: 28px;
}

.comment-footer .insight-comment-meta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.comment-vote-slot {
  display: inline-flex;
}

.comment-vote-slot .vote-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.2rem 0.75rem 0.2rem 0.35rem;
  line-height: 1;
  font-size: inherit;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #d6d6d6;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.vote-btn {
  width: 0.66em;
  height: 0.66em;
  border: 1px solid transparent;
  background: transparent;
  color: #d6d6d6;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.vote-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 0.33em solid transparent;
  border-right: 0.33em solid transparent;
  border-bottom: 0.62em solid currentColor;
}

.vote-btn.is-active {
  color: #f0cc49;
}

.vote-score {
  min-width: 0.7em;
  text-align: center;
  font-size: 0.88em;
  line-height: 1;
  color: currentColor;
  font-weight: 600;
}

.vote-bar.is-upvoted {
  border-color: #8e7800;
  background: #201b0a;
  color: #f0cc49;
}

.comment-vote-slot .vote-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.comment-collapse-toggle {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #2a2a2a;
  background: #151515;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  font-size: inherit;
}

.comment-collapse-toggle.is-active {
  border-color: #f04030;
  color: #f04030;
}

.comment-score {
  color: #d6d6d6;
  font-weight: 600;
}

.comment-toggle {
  padding: 0.2rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #d6d6d6;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.comment-toggle:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.comment-thread-toggle {
  color: #888;
  margin-left: 0.35rem;
}

.comment-thread-toggle:hover {
  color: #ffffff;
}

.insight-comment-list {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.5rem;
  margin-left: 1.25rem;
  padding-left: 0.9rem;
  border-left: 1px solid #222;
}

.insight-comment {
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.insight-comment-meta {
  font-size: 0.8rem;
  color: #777;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 0.82rem;
}

.insight-comment-children {
  position: relative;
  margin-top: 0.15rem;
  margin-left: 0.3rem;
  padding-left: 0.95rem;
  display: grid;
  gap: 0.3rem;
}

.insight-comment-children::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: #2a2a2a;
}

.insight-comment-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.comment-author {
  color: #cfcfcf;
  font-size: 0.85rem;
  text-decoration: none;
}

.insight-comment p {
  margin: 0;
  color: #ffffff;
  line-height: 1.55;
  font-size: 0.95rem;
}

.insight-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.9rem;
  background: #141414;
  border: 1px solid #232323;
  border-radius: 12px;
  padding: 0.9rem;
}

.insight-comment-form textarea {
  min-height: 2.6rem;
  resize: none;
  overflow: hidden;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: #e7e7e7;
  font-size: 0.95rem;
  line-height: 1.5;
}

.insight-comment-form textarea::placeholder {
  color: #666;
}

.insight-comment-form label {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #cfcfcf;
}

.insight-comment-form button {
  align-self: flex-start;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #f04030, #ff6b4a);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(240, 64, 48, 0.18);
}

.insight-comment-form button:hover {
  box-shadow: 0 12px 24px rgba(240, 64, 48, 0.28);
  transform: translateY(-1px);
}

.insight-comment-reply-form {
  display: none;
}

.insight-comment-reply-form.is-open {
  display: flex;
}

.community-post.replies-collapsed .community-replies {
  display: none;
}

.insight-comment.replies-collapsed > .insight-comment-children {
  display: none;
}

.community-empty {
  color: #b0b0b0;
  margin-bottom: 1.5rem;
}

.community-load-more {
  display: flex;
  justify-content: center;
  padding: 1.2rem 1rem 0.6rem;
}

.community-load-more[hidden] {
  display: none;
}

.community-load-more-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #2f2f2f;
  background: rgba(16, 16, 16, 0.95);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  color: #cfcfcf;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.community-load-more-btn:hover {
  border-color: #3a3a3a;
  transform: translateY(-1px);
}

.community-load-more-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.community-load-more-icon {
  width: 18px;
  height: 12px;
  display: block;
}

@media (max-width: 900px) {
  .community-updates-header {
    margin-bottom: 1.1rem;
  }
}

@media (max-width: 768px) {
  .community-updates-page {
    padding: 1rem 1rem 2rem;
  }

  .community-updates-header {
    gap: 0.8rem;
    margin-bottom: 1.2rem;
  }

  .community-updates-header h1 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }

  .community-post {
    padding: 0.9rem;
  }

  .community-controls {
    justify-content: flex-start;
  }

  .comment-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .vote-bar,
  .comment-toggle {
    min-height: 28px;
    height: 28px;
    padding: 0.08rem 0.58rem;
    border-radius: 999px;
    font-size: 0.76rem;
    line-height: 1;
  }

  .vote-bar {
    gap: 0.32rem;
    padding-left: 0.28rem;
  }

  .vote-btn {
    width: 0.56em;
    height: 0.56em;
  }

  .vote-score {
    font-size: 0.82em;
  }
}
