.forum-page {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--text);
}

.forum-page h1,
.forum-page h2,
.forum-page h3,
.forum-page h4,
.forum-page h5,
.forum-page h6 {
  color: #f8fafc;
}

.forum-page p,
.forum-page li,
.forum-page dd,
.forum-page dt,
.forum-page small,
.forum-page .card-body {
  color: #e5e7eb;
}

.forum-page-header,
.forum-home-grid,
.forum-node-card,
.forum-thread-row,
.forum-post-head,
.forum-post-actions,
.forum-thread-meta,
.forum-member-stats div {
  display: flex;
  gap: 1rem;
}

.forum-page-header,
.forum-thread-row,
.forum-node-card,
.forum-post-head,
.forum-post-actions,
.forum-thread-meta,
.forum-member-stats div {
  justify-content: space-between;
  align-items: flex-start;
}

.forum-page-header {
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.forum-page-actions,
.forum-tag-list,
.forum-reaction-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.forum-home-grid {
  align-items: flex-start;
}

.forum-home-main {
  flex: 1 1 0;
}

.forum-category-section + .forum-category-section {
  margin-top: 2.25rem;
}

.forum-home-side {
  width: 320px;
  max-width: 100%;
}

.forum-section-heading {
  margin-bottom: 1.15rem;
}

.forum-category-section .forum-node-list {
  margin-bottom: 0.25rem;
}

.forum-section-heading h2,
.forum-node-card h2,
.forum-page h1 {
  margin: 0 0 0.35rem;
}

.forum-node-list,
.forum-post-list {
  display: grid;
  gap: 1rem;
}

.forum-node-card,
.forum-thread-row,
.forum-post-card,
.forum-auth-card,
.forum-reply-card {
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.forum-page .card {
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

.forum-node-card,
.forum-thread-row {
  padding: 1rem 1.1rem;
}

.forum-thread-row.is-unread {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: inset 3px 0 0 #f97316;
}

.forum-thread-title,
.forum-post-author,
.forum-node-card h2 a,
.forum-section-heading h2 a,
.forum-breadcrumbs a,
.forum-simple-list a {
  color: #fff;
  text-decoration: none;
}

.forum-thread-title:hover,
.forum-post-author:hover,
.forum-breadcrumbs a:hover,
.forum-simple-list a:hover {
  color: var(--accent);
}

.forum-thread-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.forum-thread-main,
.forum-node-main {
  min-width: 0;
}

.forum-thread-meta,
.forum-post-meta,
.forum-node-stats,
.forum-post-position,
.forum-simple-list span,
.forum-member-stats dt,
.forum-member-list span,
.admin-muted {
  color: var(--text-muted);
}

.forum-page .card-body .admin-muted,
.forum-page .admin-muted {
  color: #a1a1aa !important;
}

.forum-thread-counts,
.forum-node-stats {
  min-width: 120px;
  text-align: right;
  display: grid;
  gap: 0.35rem;
}

.forum-breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.forum-prefix,
.forum-tag,
.forum-reaction-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.forum-prefix {
  margin-right: 0.4rem;
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

.forum-prefix-info {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

.forum-prefix-success {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.forum-prefix-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.forum-tag,
.forum-reaction-chip {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.forum-post-body {
  line-height: 1.8;
  color: var(--text);
}

.forum-post-body blockquote {
  border-left: 3px solid rgba(249, 115, 22, 0.7);
  margin: 1rem 0;
  padding: 0.6rem 0 0.6rem 1rem;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.03);
}

.forum-simple-list,
.forum-member-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.forum-simple-list li,
.forum-member-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

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

.forum-member-stats {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.forum-member-stats dt,
.forum-member-stats dd {
  margin: 0;
}

.forum-member-stats dd {
  color: #fff;
  font-weight: 600;
}

.forum-pagination .page-link {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.forum-pagination .page-item.active .page-link,
.forum-active-reaction,
.forum-page .btn-primary {
  background: #f97316;
  border-color: #f97316;
  color: #111;
}

.forum-page .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.forum-page .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.forum-page .form-control,
.forum-page .form-select,
.forum-page details summary {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.forum-page .form-label,
.forum-page .form-check-label {
  color: #f3f4f6;
  font-weight: 600;
}

.forum-page .form-control:focus,
.forum-page .form-select:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: #f97316;
  box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.15);
}

.forum-page .form-control::placeholder {
  color: #9ca3af;
}

.forum-page .form-select option {
  background: #111827;
  color: #f8fafc;
}

.forum-rich-editor {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.82);
}

.forum-rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.95);
}

.forum-rich-editor-toolbar button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(17, 24, 39, 0.95);
  color: #f3f4f6;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
}

.forum-rich-editor-toolbar button:hover {
  background: #f97316;
  border-color: #f97316;
  color: #111111;
}

.forum-rich-editor-content {
  min-height: 240px;
  padding: 1rem;
  color: #e8e8ec;
  outline: none;
  line-height: 1.7;
}

.forum-rich-editor-content a {
  color: #fb923c;
}

.forum-rich-editor-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.forum-rich-editor-content blockquote {
  border-left: 3px solid #f97316;
  padding-left: 1rem;
  color: #d1d5db;
  margin: 1rem 0;
  background: rgba(255, 255, 255, 0.03);
}

.forum-rich-editor-content h2,
.forum-rich-editor-content h3,
.forum-rich-editor-content h4 {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  color: #f8fafc;
}

.forum-rich-editor-content p,
.forum-rich-editor-content ul,
.forum-rich-editor-content ol {
  margin-bottom: 1rem;
}

.forum-report-box summary {
  cursor: pointer;
}

.forum-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.forum-error-card {
  max-width: 760px;
  margin: 2rem auto;
}

.forum-error-card .card-body {
  text-align: center;
  padding: 3rem 1.5rem;
}

.forum-error-code {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
  font-weight: 700;
  letter-spacing: 0.08em;
}

@media (max-width: 992px) {
  .forum-home-grid,
  .forum-page-header,
  .forum-thread-row,
  .forum-node-card,
  .forum-post-head,
  .forum-post-actions,
  .forum-thread-meta,
  .forum-simple-list li,
  .forum-member-list li {
    display: block;
  }

  .forum-home-side {
    width: 100%;
  }

  .forum-thread-counts,
  .forum-node-stats {
    min-width: 0;
    text-align: left;
    margin-top: 0.8rem;
  }
}
