/* ==========================================================================
   StaticStack Community Forum - Modern Theme & Sidebar Layout
   Integrates seamlessly with the StaticStack Global Design System
   ========================================================================== */

/* ==========================================================================
   Mini Hero Section & Header Styles
   ========================================================================== */
.mini-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 2.25rem 0 2rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  position: relative;
  width: 100%;
}

.mini-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Breadcrumbs inside Mini Hero */
.mini-hero-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.mini-hero-breadcrumbs a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.mini-hero-breadcrumbs .crumb-sep {
  display: inline-flex;
  align-items: center;
  color: var(--text-subtle);
  opacity: 0.6;
}

.mini-hero-breadcrumbs .crumb-current {
  color: var(--text-main);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mini-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.mini-hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.mini-hero-title-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.mini-hero-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.mini-hero-title {
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
}

.mini-hero-subtext {
  font-size: clamp(0.975rem, 1.4vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 780px;
  margin: 0;
}

/* Accessibility Utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mini-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-self: flex-end;
}

.mini-hero-search-actions {
  flex: 0 1 360px;
  width: 360px;
  max-width: 100%;
}

.community-search-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.community-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.community-search-wrap input[type="search"] {
  width: 100%;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.65rem 2.4rem 0.65rem 2.65rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-sizing: border-box;
}

.community-search-wrap input[type="search"]::-webkit-search-decoration,
.community-search-wrap input[type="search"]::-webkit-search-cancel-button,
.community-search-wrap input[type="search"]::-webkit-search-results-button,
.community-search-wrap input[type="search"]::-webkit-search-results-decoration {
  display: none !important;
  -webkit-appearance: none;
}

.community-search-wrap input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--shadow-sm);
  background: var(--bg-surface);
}

.community-search-wrap input[type="search"]::placeholder {
  color: var(--text-subtle);
  opacity: 0.85;
}

.community-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--text-subtle);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
  z-index: 2;
}

.community-search-clear:hover {
  color: var(--text-main);
  background: var(--bg-muted);
}

/* ==========================================================================
   Tool Page Style Sidebar & 2-Column Layout
   ========================================================================== */
.tool-page-layout,
.community-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-bottom: 3.5rem;
}

@media (max-width: 1040px) {
  .tool-page-layout,
  .community-layout-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2rem !important;
  }
}

.discussion-main,
.tool-page-main {
  min-width: 0;
  width: 100%;
}

.community-sidebar,
.archive-sidebar,
.tool-page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
}

/* Sidebar Widgets (Exact match to Tool Pages) */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-card);
  box-sizing: border-box;
  width: 100%;
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget-header.has-action {
  justify-content: space-between;
}

.sidebar-widget-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.sidebar-widget-body {
  display: flex;
  flex-direction: column;
}

/* Sidebar Channels Navigation inside Widget */
.community-categories-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.category-link {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.925rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.category-link:hover {
  background: var(--bg-muted);
  color: var(--accent);
  border-color: var(--border-hover);
  transform: translateX(2px);
  text-decoration: none;
}

.category-link.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.category-link small {
  display: block;
  font-size: 0.775rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.2rem;
}

.category-link.active small {
  color: var(--accent);
  opacity: 0.85;
}

.category-reset-link:hover {
  text-decoration: underline !important;
}

/* Sidebar Tip Items */
.sidebar-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.sidebar-tip-item:last-child {
  margin-bottom: 0;
}

.sidebar-tip-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Sidebar Tool Cards */
.sidebar-tool-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.18s ease;
  color: inherit;
}

.sidebar-tool-card:hover {
  background: var(--bg-muted);
  border-color: var(--border-hover);
  transform: translateX(2px);
  text-decoration: none;
}

.sidebar-tool-icon {
  width: 2.1rem;
  height: 2.1rem;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-tool-info {
  flex: 1;
  min-width: 0;
}

.sidebar-tool-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.sidebar-tool-desc {
  font-size: 0.775rem;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

.community-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Section Header */
/* Section Header Toolbar - Unified Inline Row with Equal Spacing */
.community-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: nowrap;
  width: 100%;
}

.community-section-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.community-heading-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.community-section-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

.community-section-actions .community-search-wrap {
  flex: 1;
  min-width: 140px;
}

.community-section-actions .community-search-wrap input[type="search"] {
  height: 2.35rem;
  padding: 0.35rem 2rem 0.35rem 2.25rem;
  font-size: 0.875rem;
}

.community-section-actions .community-search-icon {
  left: 0.75rem;
}

.community-section-actions .community-search-icon svg {
  width: 15px;
  height: 15px;
}

.community-section-actions .account {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.community-section-actions .account .button,
.community-section-actions .account .button-quiet {
  height: 2.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.community-section-actions .account-user {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.35rem;
  padding: 0.25rem 0.75rem 0.25rem 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.18s ease;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

.community-section-actions .account-user:hover {
  background: var(--bg-muted);
  border-color: var(--border-hover);
  text-decoration: none;
}

.community-section-actions .account-user .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.community-section-actions .account-user .avatar-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.community-section-actions .account-user .account-name {
  font-weight: 600;
  color: var(--text-main);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-section-actions #new-topic {
  height: 2.35rem;
  padding: 0.35rem 0.95rem;
  font-size: 0.875rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

/* Table-Style Discussion Container */
.topic-table-wrapper {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

/* Topic List Header Row */
.topic-list-header {
  display: none;
}

/* Topic Card / List Layout */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
}

.topic-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.topic-card.topic-card-pinned {
  border-left: 3.5px solid #f59e0b;
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.3) 0%, var(--bg-surface) 35%);
}

.topic-card.topic-card-pinned:hover {
  border-left: 3.5px solid #f59e0b;
  border-color: #f59e0b;
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.45) 0%, var(--bg-surface) 35%);
}

[data-theme="dark"] .topic-card.topic-card-pinned {
  border-left: 3.5px solid #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, var(--bg-surface) 35%);
}

[data-theme="dark"] .topic-card.topic-card-pinned:hover {
  border-left: 3.5px solid #f59e0b;
  border-color: #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, var(--bg-surface) 35%);
}

.topic-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 0;
}

/* Pinned Announcement Badge */
.badge-pinned {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  line-height: 1.2;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 0.4rem;
  margin-bottom: 0.12rem;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.08);
}

.badge-pinned svg {
  flex-shrink: 0;
  color: #d97706;
}

[data-theme="dark"] .badge-pinned {
  background-color: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .badge-pinned svg {
  color: #fbbf24;
}

/* Locked Discussion Badge */
.badge-locked {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  line-height: 1.2;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 0.4rem;
  margin-bottom: 0.12rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.badge-locked svg {
  flex-shrink: 0;
  color: #6b7280;
}

[data-theme="dark"] .badge-locked {
  background-color: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
  border-color: rgba(107, 114, 128, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .badge-locked svg {
  color: #9ca3af;
}

/* Announcements Channel Sidebar Accent */
.category-link-announcements {
  position: relative;
  font-weight: 700;
}

.category-link-announcements:not(.active) {
  border-left: 3px solid #f59e0b;
  padding-left: 0.7rem;
}

.category-link-announcements.active {
  border-left: 3px solid #f59e0b;
}


/* Compose Dialog Pinned Checkbox */
.compose-pinned-wrap {
  display: flex;
  align-items: center;
  margin: 0.85rem 0 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.compose-pinned-wrap:hover {
  border-color: #f59e0b;
}

.compose-pinned-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.compose-pinned-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #f59e0b;
  cursor: pointer;
}

.pinned-checkbox-custom {
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
}

/* Topic Card Footer & Metadata Row (Category, Votes, Replies, Last Post) */
.topic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  width: 100%;
}

.topic-footer-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.topic-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.2;
  user-select: none;
}

.topic-stat-pill svg {
  flex-shrink: 0;
}

.topic-stat-votes {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.2);
  background: var(--accent-light);
}

.topic-stat-votes svg {
  color: var(--accent);
}

[data-theme="dark"] .topic-stat-votes {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

[data-theme="dark"] .topic-stat-votes svg {
  color: #93c5fd;
}

.topic-stat-replies {
  color: var(--text-main);
}

.topic-stat-replies svg {
  color: var(--text-subtle);
}

.topic-stat-pill strong {
  font-weight: 700;
}

.topic-stat-pill .stat-unit {
  font-size: 0.72rem;
  opacity: 0.85;
}

.topic-last-post {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.topic-last-post .last-post-label {
  color: var(--text-subtle);
}

.last-post-user-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.last-post-user-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.last-post-time {
  color: var(--text-subtle);
  font-size: 0.74rem;
}

.topic-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--text-subtle);
}

.topic-author-byline {
  color: var(--text-subtle);
}

.topic-author-byline strong {
  color: var(--text-muted);
  font-weight: 600;
}

.meta-dot {
  opacity: 0.5;
  font-size: 0.72rem;
}

.topic-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: inline;
  vertical-align: middle;
  transition: color 0.15s ease;
}

.topic-title:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.topic-excerpt {
  color: var(--text-muted);
  font-size: 0.865rem;
  line-height: 1.5;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-subtle);
  line-height: 1.2;
}

.topic-meta strong {
  color: var(--text-muted);
  font-weight: 600;
}

.topic-category-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.15s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-category-link:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

[data-theme="dark"] .topic-category-link {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

[data-theme="dark"] .topic-category-link:hover {
  background: var(--accent);
  color: #ffffff;
}

.empty-state {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Header Account Widget */
.account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.5rem 0.25rem 0.35rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.user-session-badge:hover {
  border-color: var(--border-hover);
}

.user-badge-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.account-badge-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  flex-shrink: 0;
}

.account-badge-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-badge-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.user-badge-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signout-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 9999px;
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.signout-action-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.auth-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.account-user strong {
  color: var(--text-main);
}

.account-user .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-light);
  box-shadow: var(--shadow-sm);
}

/* Button & Action Overrides */
.button,
button.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.button:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none !important;
}

.button-quiet {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

.button-quiet:hover {
  background: var(--bg-muted) !important;
  border-color: var(--border-hover) !important;
  color: var(--accent) !important;
}

/* Interactive Dialogs & Modals */
.dialog {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 2rem;
  width: min(580px, calc(100% - 32px));
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.25);
  margin: auto;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog-wide {
  width: min(840px, calc(100% - 32px));
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.dialog-heading h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-main);
}

.close-button {
  background: transparent;
  border: 0;
  font-size: 1.65rem;
  line-height: 1;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.close-button:hover {
  background: var(--bg-muted);
  color: var(--text-main);
}

.dialog form {
  display: grid;
  gap: 1rem;
}

.dialog label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.dialog input,
.dialog select,
.dialog textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.dialog input:focus,
.dialog select:focus,
.dialog textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.form-message {
  min-height: 1.25em;
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

/* Headless & Footerless Auth Modal */
.auth-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 2.25rem 2rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  text-align: center;
  position: relative;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-modal-icon-wrap {
  margin-bottom: 1.25rem;
}

.auth-modal-brand-icon {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: var(--radius-lg);
  background: var(--accent-gradient);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.45);
}

.auth-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin: 0 0 0.65rem;
}

.auth-modal-subtitle {
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 340px;
}

.auth-modal-action {
  width: 100%;
  margin-bottom: 1.15rem;
}

.button-github-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.975rem;
  font-weight: 600;
  background: #24292f;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.button-github-auth:hover {
  background: #0f172a;
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.35);
  transform: translateY(-1px);
}

.auth-modal-note {
  font-size: 0.775rem;
  color: var(--text-subtle);
  line-height: 1.45;
  margin: 0;
}

/* Topic Detail Dialog Styles */
.detail-header {
  margin-bottom: 1.25rem;
}

.detail-header .eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.detail-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0.25rem 0 0.75rem;
  overflow-wrap: anywhere;
}

.detail-body {
  font-size: 1.025rem;
  line-height: 1.7;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 1.5rem 0;
  padding: 1.25rem 1.4rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.75rem;
}

/* Vote Cluster: Unified Upvote Icon, Net Score Icon + Count, Downvote Icon */
.vote-cluster {
  display: inline-flex;
  align-items: center;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.18rem;
  gap: 0.15rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}

.vote-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.vote-btn.vote-btn-up:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.14);
}

.vote-btn.vote-btn-up.selected {
  color: #10b981;
  background: rgba(16, 185, 129, 0.2);
}

.vote-btn.vote-btn-down:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.vote-btn.vote-btn-down.selected {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.vote-score-display {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
  justify-content: center;
  user-select: none;
}

.vote-score-display.score-positive {
  color: #10b981;
}

.vote-score-display.score-negative {
  color: #ef4444;
}

.vote-metric-icon {
  opacity: 0.75;
  flex-shrink: 0;
}

/* Action Buttons (Report, Admin Pin, Lock, Delete, Hide) */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 34px;
  padding: 0 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.action-btn:hover {
  background: var(--bg-muted);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.action-btn.report-icon-btn {
  width: 34px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-full);
}

.action-btn.report-icon-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.action-btn.admin-lock-btn {
  color: #d97706;
}

.action-btn.admin-lock-btn:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.action-btn.admin-lock-btn.is-locked {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #b45309;
}

[data-theme="dark"] .action-btn.admin-lock-btn.is-locked {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.45);
}

.action-btn.admin-pin-btn {
  color: var(--accent);
}

.action-btn.admin-pin-btn:hover,
.action-btn.admin-pin-btn.is-active {
  background: var(--accent-light);
  border-color: var(--accent-border);
}

.action-btn.admin-delete-btn,
.action-btn.author-delete-btn {
  color: #ef4444;
}

.action-btn.admin-delete-btn:hover,
.action-btn.author-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

.action-btn.admin-hide-btn {
  color: var(--text-muted);
}

.action-btn.admin-hide-btn:hover {
  background: var(--bg-muted);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.action-btn.op-edit-btn {
  color: var(--accent);
}

.action-btn.op-edit-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.8s linear infinite;
}

.vote-button,
.text-button {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.vote-button:hover,
.text-button:hover {
  background: var(--bg-muted);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.vote-button.selected {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

.reply-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  color: var(--text-main);
}

.replies {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reply {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
}

.reply-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0.65rem 0 0.85rem;
}

.reply-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.reply-form textarea {
  min-height: 110px;
}

/* ==========================================================================
   Dedicated Topic Page Styles
   ========================================================================== */
.thread-op-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.thread-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.thread-author-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-light);
  box-shadow: var(--shadow-sm);
  background: var(--bg-muted);
}

.thread-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 1.5rem 0 2rem;
}

.thread-body h1,
.thread-body h2,
.thread-body h3,
.thread-body h4,
.reply-body h1,
.reply-body h2,
.reply-body h3,
.reply-body h4,
.detail-body h1,
.detail-body h2,
.detail-body h3,
.detail-body h4 {
  color: var(--text-main);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.thread-body h1, .reply-body h1, .detail-body h1 { font-size: 1.5rem; }
.thread-body h2, .reply-body h2, .detail-body h2 { font-size: 1.3rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.35rem; }
.thread-body h3, .reply-body h3, .detail-body h3 { font-size: 1.15rem; }
.thread-body h4, .reply-body h4, .detail-body h4 { font-size: 1.05rem; }

.thread-body p,
.reply-body p,
.detail-body p {
  margin-bottom: 1rem;
}

.thread-body p:last-child,
.reply-body p:last-child,
.detail-body p:last-child {
  margin-bottom: 0;
}

.thread-body ul,
.thread-body ol,
.reply-body ul,
.reply-body ol,
.detail-body ul,
.detail-body ol {
  margin: 0.85rem 0 1.15rem 1.75rem;
  padding-left: 0.5rem;
}

.thread-body li,
.reply-body li,
.detail-body li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
}

.thread-body blockquote,
.reply-body blockquote,
.detail-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-muted);
  padding: 0.75rem 1.15rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-muted);
  font-style: italic;
}

.thread-body a,
.reply-body a,
.detail-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.thread-body a:hover,
.reply-body a:hover,
.detail-body a:hover {
  color: var(--accent-hover);
}

.thread-body hr,
.reply-body hr,
.detail-body hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.75rem 0;
}

.thread-body pre,
.reply-body pre,
.detail-body pre {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 1rem 0;
}

.thread-body code,
.reply-body code,
.detail-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-muted);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.thread-body pre code,
.reply-body pre code,
.detail-body pre code {
  background: transparent;
  padding: 0;
  border: none;
  font-size: inherit;
}

.thread-replies-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.thread-reply-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.thread-reply-card:hover {
  border-color: var(--border-hover);
}

.thread-composer-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  margin-top: 2rem;
}

.badge-op {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-admin {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .badge-admin {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Admin Moderation Panel */
.admin-panel {
  margin-bottom: 2rem;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(254, 242, 242, 0.4);
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.report-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.report-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--text-main);
  color: var(--bg-surface);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mini-hero {
    padding: 1.5rem 0 1.25rem;
    margin-bottom: 1.5rem;
  }
  .mini-hero-inner {
    gap: 0.65rem;
  }
  .mini-hero-header {
    gap: 1.15rem;
  }
  .mini-hero-header-main {
    flex: 1 1 100%;
    min-width: 0;
  }
  .mini-hero-title-row {
    gap: 0.6rem;
  }
  .mini-hero-icon-box {
    width: 2.25rem;
    height: 2.25rem;
  }
  .mini-hero-title {
    font-size: 1.5rem;
  }
  .mini-hero-subtext {
    font-size: 0.925rem;
    line-height: 1.5;
  }
  .mini-hero-actions {
    width: 100%;
  }
  .mini-hero-search-actions {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .community-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topic-list-header {
    display: none;
  }

  .topic-card {
    padding: 0.85rem 1rem;
    gap: 0.45rem;
  }

  .topic-title {
    font-size: 0.975rem;
  }

  .topic-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .topic-footer-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.25rem;
    border-top: 1px dashed var(--border-color);
  }

  .topic-title {
    font-size: 0.925rem;
  }

  .dialog {
    padding: 1.25rem;
  }
}

@media (max-width: 680px) {
  .community-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .community-section-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .community-section-actions .community-search-wrap {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* ==========================================================================
   Floating Back to Top Button
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.05rem;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  transform: translateY(-3px);
}

.back-to-top-btn .btt-icon {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.back-to-top-btn:hover .btt-icon {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* Forum Information & Statistics Bar (Compact 14px font-size) */
.forum-stats-section {
  font-size: 14px;
  line-height: 1.45;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.forum-stats-container,
.forum-stats-section > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1040px) {
  .forum-stats-container,
  .forum-stats-section > .container {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2rem !important;
  }
}

.forum-stats-card {
  grid-column: 1;
  width: 100%;
  font-size: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.forum-stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: 14px;
}

.forum-stats-metrics {
  color: var(--text-main);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-color);
}

.forum-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 14px;
}

.forum-stat-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.forum-stat-val {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
}

.forum-stat-label {
  color: var(--text-muted);
  font-size: 14px;
}

.forum-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.forum-stats-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: -0.015em;
}

.forum-stats-title .forum-stat-icon {
  color: var(--accent);
}

.forum-stats-activity {
  font-size: 14px;
  color: var(--text-main);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-color);
}

/* Topic Page Modern Meta Bar Layout */
.thread-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin-top: 0.65rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.thread-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  line-height: 1.35;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.thread-meta-item svg {
  flex-shrink: 0;
  color: var(--text-subtle);
}

.thread-meta-item.thread-meta-author {
  color: var(--text-main);
  border-color: rgba(37, 99, 235, 0.2);
}

.thread-meta-item.thread-meta-author svg {
  color: var(--accent);
}

.thread-meta-item.thread-meta-replies {
  background: var(--bg-muted);
  color: var(--text-main);
}

.thread-meta-item.thread-meta-votes {
  background: var(--accent-light);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--accent);
  font-weight: 600;
}

.thread-meta-item.thread-meta-votes svg {
  color: #eab308;
}

[data-theme="dark"] .thread-meta-item {
  background: var(--bg-surface-elevated);
  border-color: var(--border-color);
}

[data-theme="dark"] .thread-meta-item.thread-meta-votes {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.forum-activity-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 14px;
  flex-wrap: wrap;
}

.forum-activity-label {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 14px;
}

.forum-activity-highlight {
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
}

.forum-activity-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.15s ease;
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-activity-link:hover {
  text-decoration: underline;
}

.forum-stats-legend {
  font-size: 14px;
  color: var(--text-muted);
}

.legend-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 14px;
}

.legend-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
  margin-right: 0.15rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 14px;
  color: var(--text-muted);
}

.legend-item svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .forum-stats-card {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .forum-stats-row {
    gap: 0.4rem 1.15rem;
  }
  .forum-activity-link {
    max-width: 280px;
  }
}

/* Footer Links List Reset */
.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.footer-links,
ul.footer-links {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links li,
ul.footer-links li {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
}



