.community-panel {
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-primary, #111318);
}

.community-empty {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary, #a5a7ad);
}

.community-empty-icon {
  margin-bottom: 16px;
  font-size: 52px;
}

.community-empty h2 {
  margin: 0 0 10px;
  color: var(--text-primary, #f5f5f5);
}

.community-empty p {
  max-width: 520px;
  margin: 0 0 22px;
  line-height: 1.7;
}

.community-source-link,
.community-original-link {
  border-radius: 7px;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.community-source-link {
  padding: 10px 16px;
}

.community-content {
  max-width: 920px;
  margin: 0 auto;
}

.community-source-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color, #30333b);
}

.community-source-heading {
  min-width: 0;
}

.community-site-badge,
.community-category {
  display: inline-block;
  margin: 0 6px 8px 0;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 15px;
  font-weight: 700;
}

.community-site-badge {
  background: #7c3aed;
  color: #fff;
}

.community-category {
  background: var(--bg-tertiary, #272a31);
  color: var(--text-secondary, #b6b8bf);
}

.community-source-header h2 {
  margin: 0;
  color: var(--text-primary, #f5f5f5);
  font-size: 25px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.community-original-link {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 16px;
}

.community-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 0;
  color: var(--text-secondary, #a5a7ad);
  font-size: 16px;
}

.community-production-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 6px;
  border: 1px solid rgba(124, 58, 237, 0.55);
  border-radius: 10px;
  padding: 14px;
  background: rgba(124, 58, 237, 0.08);
}

.community-production-actions strong,
.community-production-actions span {
  display: block;
}

.community-production-actions strong {
  margin-bottom: 4px;
  color: var(--text-primary, #f5f5f5);
  font-size: 17px;
}

.community-production-actions span {
  color: var(--text-secondary, #a5a7ad);
  font-size: 15px;
  line-height: 1.5;
}

.community-production-buttons {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.community-production-btn {
  min-width: 124px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.community-production-btn small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.78;
}

.community-production-btn-shorts {
  border-color: #7c3aed;
  background: #7c3aed;
}

.community-production-btn-longform {
  border-color: #2563eb;
  background: #2563eb;
}

.community-production-btn:hover {
  filter: brightness(1.12);
}

.community-section {
  margin-top: 18px;
  border: 1px solid var(--border-color, #30333b);
  border-radius: 10px;
  background: var(--bg-secondary, #1b1e24);
  overflow: hidden;
}

.community-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-color, #30333b);
}

.community-section-title h3 {
  margin: 0;
  color: var(--text-primary, #f5f5f5);
  font-size: 17px;
}

.community-section-title span {
  color: var(--text-secondary, #a5a7ad);
  font-size: 15px;
}

.community-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.community-image-card {
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: #0c0d10;
}

.community-image-card img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.community-text {
  padding: 16px;
  color: var(--text-primary, #e9e9eb);
  font-size: 17px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.community-copy-btn {
  border: 1px solid var(--border-color, #3a3d45);
  border-radius: 5px;
  padding: 4px 9px;
  background: transparent;
  color: var(--text-secondary, #bbb);
  cursor: pointer;
}

.community-comments {
  display: grid;
}

.community-comment {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color, #30333b);
}

.community-comment:last-child {
  border-bottom: 0;
}

.community-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--text-secondary, #a5a7ad);
  font-size: 15px;
}

.community-comment-nick {
  color: #a78bfa;
  font-weight: 700;
}

.community-comment p,
.community-no-data {
  margin: 0;
  color: var(--text-primary, #e9e9eb);
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.community-no-data {
  padding: 16px;
  color: var(--text-secondary, #a5a7ad);
}

@media (max-width: 760px) {
  .community-panel {
    padding: 14px;
  }

  .community-source-header {
    flex-direction: column;
  }

  .community-production-actions,
  .community-production-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .community-image-grid {
    grid-template-columns: 1fr;
  }
}
