/* ── COMMUNITY VIEW ───────────────────────────────────────────── */
.community-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  animation: fadeIn 0.4s var(--ease);
}

.community-header {
  margin-bottom: 40px;
}

.community-header h1 {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--text-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.community-header p {
  color: var(--text-3);
  font-size: 16px;
}

.community-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* Feed */
.community-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Post Card */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.post-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  object-fit: cover;
}

.post-author-info {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.post-date {
  font-size: 12px;
  color: var(--text-3);
}

.post-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 20px;
  white-space: pre-wrap;
}

/* Badges */
.post-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge.pinned {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.badge.featured {
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-light);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge.admin {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge svg {
  width: 12px;
  height: 12px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.post-action {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--fast) var(--ease);
}

.post-action:hover {
  color: var(--text);
}

.post-action.voted {
  color: var(--accent-light);
}

.post-action svg {
  width: 18px;
  height: 18px;
}

/* Comments Section */
.comments-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.comment-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.comment-author {
  font-weight: 700;
  color: var(--text-2);
}

.comment-date {
  color: var(--text-3);
  font-size: 11px;
}

.comment-content {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.comment-replay-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  width: fit-content;
}

/* Sidebar */
.community-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
}

.sidebar-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.sidebar-card p {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-post {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--r-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.btn-post:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

/* Composer Modal */
.composer-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.composer-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.composer-textarea {
  width: 100%;
  min-height: 150px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
}

.composer-input:focus,
.composer-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Admin Actions */
.admin-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.admin-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-btn:hover {
  background: var(--bg-raised);
  color: var(--text);
  border-color: var(--text-3);
}

.admin-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Mobile */
@media (max-width: 900px) {
  .community-layout {
    grid-template-columns: 1fr;
  }
  .community-sidebar {
    order: -1;
  }
}

@media (max-width: 600px) {
  .community-view {
    padding: 24px 16px;
  }
  .post-card {
    padding: 16px;
  }
  .post-content {
    font-size: 14px;
  }
}
