/* Forum — Makai Forge */
.forum-layout {
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.forum-main { flex: 1; min-width: 0; }
.forum-sidebar { width: 280px; flex-shrink: 0; }

.forum-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; flex-wrap: wrap; gap: 1rem;
}
.forum-title { font-size: 1.75rem; font-weight: 800; color: var(--purple-200); }

/* Category tabs */
.category-tabs {
  display: flex; gap: 0.35rem; margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cat-tab {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  color: var(--text-light); padding: 0.4rem 0.9rem;
  border-radius: 20px; cursor: pointer; font-size: 0.8rem;
  font-weight: 500; transition: all 0.2s; font-family: inherit;
}
.cat-tab:hover { border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.08); }
.cat-tab.active { background: var(--purple-600); border-color: var(--purple-500); color: white; }

/* Thread list */
.thread-list { list-style: none; }
.thread-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: 10px; padding: 1rem 1.25rem;
  margin-bottom: 0.75rem; transition: all 0.2s;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.thread-item:hover { border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.05); }
.thread-item a {
  color: var(--purple-200); text-decoration: none;
  font-weight: 600; font-size: 1rem;
}
.thread-item a:hover { color: var(--purple-300); }
.thread-meta { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; display: flex; align-items: center; }
.thread-info { flex: 1; min-width: 0; }
.thread-info p { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

/* Thread detail */
.thread-detail-title { font-size: 1.5rem; font-weight: 700; color: var(--purple-200); margin-bottom: 0.25rem; }
.thread-detail-meta { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.post {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.1);
  border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 0.75rem;
}
.post-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem; font-size: 0.85rem;
}
.post-author { font-weight: 600; color: var(--purple-200); }
.post-time { color: var(--text-dim); }
.post-body { font-size: 0.9rem; line-height: 1.6; color: var(--text-light); white-space: pre-wrap; }
.post-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.post-actions button {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 0.75rem; padding: 0.2rem 0.4rem;
}
.post-actions button:hover { color: var(--purple-200); }
.post-actions .btn-del { color: var(--orange); }

.reply-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.15);
  border-radius: 10px; padding: 1rem 1.25rem; margin-top: 1rem;
}
.reply-form textarea {
  width: 100%; min-height: 100px;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(168,85,247,0.2);
  border-radius: 8px; padding: 0.75rem; color: var(--text);
  font-size: 0.85rem; font-family: inherit; outline: none; resize: vertical;
}
.reply-form textarea:focus { border-color: var(--purple-500); }

.new-thread-form label { color: var(--text-light); font-size: 0.85rem; }
.new-thread-form input, .new-thread-form textarea, .new-thread-form select {
  width: 100%;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(168,85,247,0.2);
  border-radius: 8px; padding: 0.75rem; color: var(--text);
  font-size: 0.85rem; font-family: inherit; outline: none;
  margin-bottom: 0.75rem;
}
.new-thread-form input:focus, .new-thread-form textarea:focus, .new-thread-form select:focus { border-color: var(--purple-500); }
.new-thread-form textarea { min-height: 150px; resize: vertical; }

.pagination {
  display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem;
}
.pagination button {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(168,85,247,0.2);
  color: var(--text-light); padding: 0.4rem 0.75rem; border-radius: 6px;
  cursor: pointer; font-size: 0.8rem;
}
.pagination button:hover { background: rgba(168,85,247,0.1); }
.pagination button.active { background: var(--purple-600); border-color: var(--purple-500); color: white; }
.pagination button:disabled { opacity: 0.3; cursor: default; }

/* Sidebar card */
.sidebar-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: 12px; padding: 1rem;
  margin-bottom: 1rem;
}
.sidebar-title {
  font-size: 0.95rem; font-weight: 700; color: var(--purple-200);
  margin-bottom: 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(168,85,247,0.1);
}

/* Leaderboard */
.leaderboard-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0; font-size: 0.8rem;
  border-bottom: 1px solid rgba(168,85,247,0.06);
}
.leaderboard-item:last-child { border-bottom: none; }
.lb-rank { width: 1.4rem; text-align: center; font-weight: 700; font-size: 0.75rem; flex-shrink: 0; }
.lb-avatar { width: 24px; height: 24px; min-width:24px; max-width:24px; border-radius: 50%; flex-shrink: 0; }
.lb-name { flex: 1; color: var(--text-light); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-points { color: var(--accent); font-weight: 700; font-size: 0.75rem; }

.pinned-badge { font-size: 0.85rem; }

/* Post footer with votes + actions */
.post-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.75rem; padding-top: 0.5rem;
  border-top: 1px solid rgba(168,85,247,0.08);
  flex-wrap: wrap; gap: 0.5rem;
}

/* Vote buttons */
.vote-buttons { display: flex; gap: 0.35rem; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(168,85,247,0.15);
  color: var(--text-dim); padding: 0.25rem 0.6rem;
  border-radius: 6px; cursor: pointer; font-size: 0.75rem;
  font-family: inherit; transition: all 0.2s;
}
.vote-btn:hover:not(:disabled) { background: rgba(168,85,247,0.1); border-color: var(--purple-400); }
.vote-btn:disabled { opacity: 0.4; cursor: default; }
.vote-btn.vote-active { background: rgba(168,85,247,0.15); border-color: var(--purple-500); }
.vote-like.vote-active { color: var(--green); }
.vote-dislike.vote-active { color: var(--orange); }
.vote-count { font-weight: 600; }

@media (max-width: 768px) {
  .forum-layout { flex-direction: column; }
  .forum-sidebar { width: 100%; }
}
