.forum-page {
  display: grid;
  gap: 1rem;
}

.forum-controls {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.sort-group {
  width: min(280px, 100%);
}

.forum-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.forum-highlight-card {
  padding: 1rem;
}

.mini-list {
  display: grid;
  gap: 0.65rem;
}

.mini-list a {
  text-decoration: none;
  color: #d9e5ff;
  font-weight: 600;
}

.mini-list a:hover {
  color: var(--accent);
}

.posts-list {
  display: grid;
  gap: 0.9rem;
}

.post-row,
.post-detail {
  padding: 1rem;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1rem;
}

.vote-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.vote-btn {
  border: 1px solid rgba(104, 181, 255, 0.45);
  color: #dcedff;
  width: 36px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(14, 22, 40, 0.9);
}

.vote-btn.active-vote {
  border-color: rgba(132, 228, 173, 0.8);
  background: rgba(38, 110, 78, 0.45);
}

.vote-score {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.post-content h3,
.post-content h1 {
  margin: 0;
}

.post-content p {
  margin: 0.5rem 0;
  color: var(--muted);
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #b8c9ec;
}

.forum-modal {
  width: min(640px, 92vw);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 16, 31, 0.95);
  color: var(--text);
}

.forum-form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

textarea {
  width: 100%;
  border: 1px solid rgba(180, 203, 255, 0.28);
  background: rgba(12, 18, 36, 0.7);
  color: var(--text);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  resize: vertical;
}

.comments-panel {
  padding: 1rem;
}

.comment-form {
  margin-bottom: 1rem;
}

.comments-list {
  display: grid;
  gap: 0.7rem;
}

.comment-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(9, 14, 27, 0.85);
}

@media (max-width: 720px) {
  .forum-highlights {
    grid-template-columns: 1fr;
  }

  .forum-controls,
  .post-row,
  .post-detail {
    grid-template-columns: 1fr;
  }

  .forum-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .vote-column {
    flex-direction: row;
    justify-content: flex-start;
  }
}
