/* ==========================================================================
   ELIXARP - OBSIDIAN & CYBER-GOLD DESIGN SYSTEM
   High-Fidelity Dark Theme, Manrope/Inter Typography & Amber-Gold Accents
   Comprehensive styling for Home, Forums, Threads, Server Cards, Admin, Auth
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   1. Typography & Web Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Nimbus Sans";
  src: url("/static/assets/NimbusSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nimbus Sans";
  src: url("/static/assets/NimbusSans-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Nimbus Narrow";
  src: url("/static/assets/NimbusSansNarrow-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #f3f6f8;
  background: #070709;
  font-synthesis: none;

  /* ELIXARP Obsidian Dark Palette */
  --bg-root: #070709;
  --ink-950: #040507;
  --ink-900: #070709;
  --ink-850: #0d0e12;
  --ink-800: #121316;
  --ink-760: #16171b;
  --ink-700: #1a1b20;
  --ink-650: #202227;
  --ink-600: #282a31;
  
  /* Borders & Dividers */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-subtle: rgba(255, 255, 255, 0.05);

  /* Text & Labels */
  --text-main: #f5f6f8;
  --text-dim: #717784;
  --muted: #8d95a3;
  --muted-bright: #c4ccd8;

  /* ELIXARP Cyber Gold / Amber Accent Colors */
  --amber: #ffc300;
  --amber-bright: #ffc400;
  --amber-glow: rgba(255, 195, 0, 0.22);
  --orange-brand: #ffc300;
  --brand: #ffc300;
  --brand-bright: #ffc400;
  --brand-hover: #ffd033;
  --brand-active: #e6b000;
  --brand-glow: rgba(255, 195, 0, 0.22);
  --brand-contrast: #080808;

  --green: #20c96b;
  --green-glow: rgba(32, 201, 107, 0.24);
  --red: #ed4d40;
  --red-glow: rgba(237, 77, 64, 0.22);
  --blue: #38bdf8;
  --purple: #c084fc;
  --gold: #ffc300;

  /* Glassmorphism & Cards */
  --glass-panel: rgba(23, 23, 23, 0.78);
  --glass-panel-blur: blur(20px);
  --card-border-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.07);

  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.65);
  --shadow-modal: 0 24px 70px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 25px rgba(255, 195, 0, 0.18);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--ink-900);
  color: var(--text-main);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

button {
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink-900);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 195, 0, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 100% 30%, rgba(255, 195, 0, 0.02) 0%, transparent 40%);
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   2. ELIXARP Utilities & Signature Classes
   -------------------------------------------------------------------------- */
.gm-panel {
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: var(--glass-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-card);
}

.gm-tile {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.gm-tile:hover {
  border-color: rgba(255, 195, 0, 0.4);
  transform: translateY(-2px);
}

.gm-icon-tile {
  color: #ffc400;
  background: rgba(255, 196, 0, 0.12);
  border: 1px solid rgba(255, 196, 0, 0.22);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.gm-input {
  color: #f3f6f8;
  background: #121316;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  outline: none;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.18s, background-color 0.18s, box-shadow 0.18s;
}

.gm-input:focus {
  border-color: #ffc400;
  box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.18);
  background: #16171b;
}

.gm-button-primary {
  color: #080808 !important;
  background: #ffc300 !important;
  border: 1px solid #ffc400 !important;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  display: inline-flex;
}

.gm-button-primary:hover {
  background: #ffd033 !important;
  box-shadow: 0 0 18px rgba(255, 195, 0, 0.35);
  transform: translateY(-1px);
}

.gm-button-secondary {
  color: #e6e6e6 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
}

.gm-button-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.gm-button-danger {
  color: #ffffff !important;
  background: #ed4d40 !important;
  border: 1px solid #ed4d40 !important;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
}

.gm-button-danger:hover {
  background: #f06155 !important;
  box-shadow: 0 0 15px rgba(237, 77, 64, 0.3);
}

.tile-glow {
  background: radial-gradient(120% 140% at 0 0, rgba(255, 195, 0, 0.18) 0, rgba(255, 195, 0, 0) 65%), linear-gradient(to bottom right, rgba(255, 195, 0, 0.03), transparent);
  transition: opacity 0.4s ease;
}

/* --------------------------------------------------------------------------
   3. Site Header & Global Navigation
   -------------------------------------------------------------------------- */
.site-header {
  height: 68px;
  background: rgba(7, 7, 9, 0.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
  width: min(100% - 48px, 1360px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.brand-text {
  font-family: "Manrope", sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
}

.brand-text b, .brand-text span.brand-accent, .brand b, .brand span.brand-accent {
  color: var(--brand);
}

.brand-badge {
  background: linear-gradient(135deg, #ffc400, #ff9f1c);
  color: #080808;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.8px;
  box-shadow: 0 0 10px rgba(255, 195, 0, 0.35);
}

.main-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.main-nav .nav-link, .main-nav button {
  border: 0;
  background: transparent;
  color: #c4ccd8;
  cursor: pointer;
  min-width: 82px;
  padding: 0 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: all 160ms ease;
  text-decoration: none;
}

.main-nav .nav-link::after, .main-nav button::after {
  content: "";
  position: absolute;
  height: 3px;
  left: 12px;
  right: 12px;
  bottom: 0;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transition: all 180ms ease;
}

.main-nav .nav-link:hover, .main-nav button:hover {
  color: #ffffff;
}

.main-nav .nav-link:hover::after, .main-nav button:hover::after {
  background: rgba(255, 195, 0, 0.4);
}

.main-nav .nav-link.active, .main-nav button.active {
  color: #ffffff;
}

.main-nav .nav-link.active::after, .main-nav button.active::after {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 195, 0, 0.6);
}

.main-nav .admin-nav-link {
  color: #fb923c;
}

.main-nav .admin-nav-link:hover {
  color: #fdba74;
}

.header-actions {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #c4ccd8;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 150ms ease;
}

.header-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.login-trigger {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.register-button, .btn-register-top {
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--amber-bright);
  border-radius: 8px;
  background: var(--amber);
  color: #080808;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.25);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.register-button:hover, .btn-register-top:hover {
  background: var(--amber-bright);
  box-shadow: 0 0 20px rgba(255, 195, 0, 0.45);
  transform: translateY(-1px);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-bright);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: all 150ms ease;
}

.icon-button:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.mobile-menu { display: none; }
.mobile-nav-actions { display: none; }

/* User Navigation Dropdown */
.user-auth-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-alerts-wrapper {
  position: relative;
}

.nav-alert-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-bright);
  background: rgba(255, 255, 255, 0.025);
  position: relative;
  transition: all 150ms ease;
}

.nav-alert-btn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.nav-alert-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--amber);
  color: #0c0904;
  font-size: 11px;
  font-weight: 800;
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink-900);
}

.user-logged-in {
  position: relative;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 150ms ease;
}

.user-pill:hover, .user-logged-in.menu-open .user-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-username {
  font-size: 13px;
  font-weight: 700;
  color: #f3f6f8;
}

.nav-role-badge {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.nav-caret {
  font-size: 11px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.user-logged-in.menu-open .nav-caret {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #101b25;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal);
  padding: 6px;
  display: none;
  z-index: 100;
}

.user-dropdown.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: #d1d8dc;
  border-radius: 5px;
  transition: all 120ms ease;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--muted-bright);
}

.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 5px 0;
}

.badge-unread-count {
  margin-left: auto;
  background: var(--amber);
  color: #111;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.logout-item:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

/* --------------------------------------------------------------------------
   3. Common Buttons, Badges, Cards & Alerts
   -------------------------------------------------------------------------- */
.btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  transition: all 150ms ease;
}

.btn-primary, .button-primary, .btn-save, .btn-post-submit, .xf-btn-post-thread {
  color: #11100d !important;
  background: var(--amber) !important;
  border: 1px solid var(--amber) !important;
}

.btn-primary:hover, .button-primary:hover, .btn-save:hover, .btn-post-submit:hover, .xf-btn-post-thread:hover {
  background: var(--amber-bright) !important;
  border-color: var(--amber-bright) !important;
  transform: translateY(-1px);
}

.btn-secondary, .button-secondary, .btn-create-thread {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(16, 27, 37, 0.72);
  color: #f3f6f8;
}

.btn-secondary:hover, .button-secondary:hover, .btn-create-thread:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(25, 40, 55, 0.9);
  color: #fff;
}

.btn-success, .btn-save-all {
  background: #15803d;
  color: #fff;
  border: 1px solid #16a34a;
}

.btn-success:hover, .btn-save-all:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-danger {
  background: #991b1b;
  color: #fecaca;
  border: 1px solid #b91c1c;
}

.btn-danger:hover {
  background: #b91c1c;
  color: #fff;
}

.btn-action {
  background: rgba(255, 157, 22, 0.12);
  border: 1px solid rgba(255, 157, 22, 0.35);
  color: var(--amber-bright);
}

.btn-action:hover {
  background: var(--amber);
  color: #111;
}

.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-outline-light {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-bright);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--line-strong);
}

.btn-outline-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 0 14px;
}

.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Form Inputs & Controls */
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #09131c;
  color: #ffffff;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-glow);
  outline: none;
}

.form-input::placeholder {
  color: #556575;
}

/* Card Box */
.card-box, .admin-card, .alerts-card, .account-card, .form-card, .forum-view-container, .thread-header-card, .reply-section-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 23, 32, 0.95);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card-header, .admin-card .card-header, .account-card-header {
  padding: 14px 18px;
  background: var(--ink-850);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3, .account-card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #f3f6f8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i, .account-card-header h2 i {
  color: var(--amber);
}

.account-card-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 24px;
}

.account-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Alerts */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.alert-success {
  background: rgba(22, 101, 52, 0.25);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac;
}

.alert-danger {
  background: rgba(153, 27, 27, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

/* Rank & Role Badges */
.badge-admin, .role-admin {
  background: linear-gradient(135deg, #991b1b, #dc2626) !important;
  color: #ffffff !important;
  border: 1px solid #ef4444 !important;
}

.badge-curator, .role-curator {
  background: linear-gradient(135deg, #86198f, #c026d3) !important;
  color: #ffffff !important;
  border: 1px solid #e879f9 !important;
}

.badge-moderator, .role-moderator {
  background: linear-gradient(135deg, #4c1d95, #7c3aed) !important;
  color: #ffffff !important;
  border: 1px solid #a78bfa !important;
}

.badge-leader, .role-leader {
  background: linear-gradient(135deg, #854d0e, #d97706) !important;
  color: #ffffff !important;
  border: 1px solid #f59e0b !important;
}

.badge-player, .role-player, .role-user {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

.badge-system-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: #1e293b;
  border: 1px solid #475569;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
}

.role-banner, .role-banner-tag, .role-pill, .role-tag, .author-role-banner {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
}

.badge-active {
  background: rgba(79, 226, 110, 0.12);
  color: var(--green);
  border: 1px solid rgba(79, 226, 110, 0.3);
}

.badge-warn, .badge-restricted {
  background: rgba(255, 157, 22, 0.12);
  color: var(--amber-bright);
  border: 1px solid rgba(255, 157, 22, 0.3);
}

/* --------------------------------------------------------------------------
   4. Hero Banner & ELIXARP Multi-Server Cards
   -------------------------------------------------------------------------- */
.hero {
  min-height: 420px;
  position: relative;
  background: #050608 url("/static/assets/hero-city.webp") center center / cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, rgba(7, 7, 9, 0.6) 0%, rgba(7, 7, 9, 0.94) 100%),
    radial-gradient(circle at 75% 20%, rgba(255, 195, 0, 0.12) 0%, transparent 60%),
    rgba(3, 4, 6, 0.45);
  pointer-events: none;
}

.hero-inner {
  width: min(100% - 48px, 1360px);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px);
  align-items: center;
  gap: 40px;
  padding: 48px 0;
  z-index: 2;
}

.hero-copy {
  position: relative;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-eyebrow {
  background: rgba(255, 195, 0, 0.1);
  border: 1px solid rgba(255, 195, 0, 0.3);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.15);
}

.hero h1 {
  margin: 12px 0 16px;
  font-family: "Manrope", sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.8px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
  color: #ffffff;
}

.hero h1 span.gold {
  color: var(--amber);
  background: linear-gradient(135deg, #ffdc40, #ffb300);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  max-width: 520px;
  margin: 0 0 26px;
  color: #c4ccd8;
  font-size: 15.5px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* ELIXARP Multi-Server Cards Grid */
.server-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.server-card {
  position: relative;
  background: rgba(18, 19, 23, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 14px;
  padding: 16px 20px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.server-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 195, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 195, 0, 0.12);
}

.server-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 195, 0, 0.16), transparent 100%);
  pointer-events: none;
}

.server-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.server-name-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.server-badge-rate {
  background: rgba(255, 195, 0, 0.16);
  border: 1px solid rgba(255, 195, 0, 0.4);
  color: #ffc400;
  font-size: 11px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
}

.server-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(32, 201, 107, 0.12);
  border: 1px solid rgba(32, 201, 107, 0.3);
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #20c96b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.server-card-stats {
  margin-bottom: 12px;
}

.server-stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.server-stats-count strong {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.server-stats-count span {
  color: var(--muted);
  font-size: 12px;
}

.server-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.server-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #ffc300, #ff9f1c);
  box-shadow: 0 0 10px rgba(255, 195, 0, 0.4);
  transition: width 0.6s ease;
}

.server-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.server-copy-ip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-bright);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.server-copy-ip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.server-connect-btn {
  background: #ffc300;
  color: #080808;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  border: 1px solid #ffc400;
}

.server-connect-btn:hover {
  background: #ffd033;
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.35);
  transform: translateY(-1px);
}

.server-status {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-bright);
  font-size: 13px;
  background: rgba(23, 23, 23, 0.7);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--line);
}

.server-status strong {
  color: var(--green);
  font-weight: 700;
}

.server-status i.status-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-block;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(32, 201, 107, 0.25);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(32, 201, 107, 0.3); }
  50% { box-shadow: 0 0 0 7px rgba(32, 201, 107, 0.05); }
}

.status-label {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.4px;
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 36px 0;
  }
}

/* Content Shell */
.content-shell {
  width: min(100% - 48px, 1320px);
  margin: 0 auto;
  padding: 0 0 48px;
  transform: translateX(21px);
  flex: 1;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 12px;
}

.main-column {
  min-width: 0;
}

/* Announcement Card */
.announcement {
  width: 100%;
  min-height: 75px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 150ms ease;
}

.announcement:hover {
  border-color: rgba(255, 157, 22, 0.42);
  background: var(--ink-760);
}

.announcement-title, .announcement-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.announcement-copy {
  display: grid;
  gap: 4px;
}

.announcement-copy strong {
  font-size: 15px;
  color: #f3f6f8;
  font-weight: 600;
}

.announcement-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.announcement-link {
  font-size: 13px;
  white-space: nowrap;
}

.breadcrumb {
  height: 46px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #95a2ad;
  font-size: 13px;
}

.breadcrumb a:hover {
  color: var(--amber);
}

/* Forum Category & Node Rows */
.category-block {
  margin-bottom: 24px;
}

.category-header {
  padding: 14px 18px;
  background: rgba(18, 19, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.3px;
}

.category-title i {
  color: var(--amber);
  font-size: 17px;
}

.category-desc {
  color: var(--muted);
  font-size: 12.5px;
}

.forum-list, .latest-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(14, 15, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.category-block .forum-list {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
}

.forum-row {
  width: 100%;
  min-height: 84px;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 52px minmax(225px, 1fr) 150px 240px;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.forum-row:last-child {
  border-bottom: 0;
}

.forum-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.forum-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 195, 0, 0.24);
  background: rgba(255, 196, 0, 0.08);
  color: var(--amber);
  font-size: 19px;
  transition: all 0.22s ease;
}

.forum-row:hover .forum-icon {
  background: rgba(255, 196, 0, 0.16);
  border-color: rgba(255, 195, 0, 0.45);
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.25);
}

.forum-copy, .last-post span, .forum-stats span, .latest-copy, .thread-author span {
  min-width: 0;
  display: grid;
}

.forum-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.forum-title-line strong {
  color: #f5f6f8;
  font-family: "Manrope", sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  transition: color 0.15s ease;
}

.forum-row:hover .forum-title-line strong {
  color: var(--amber);
}

.forum-title-line em, .badge-locked, .prefix-badge {
  padding: 2px 6px;
  border-radius: 3px;
  color: #c6d3dc;
  background: #263647;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.forum-copy > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.sub-nodes-wrapper {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.sub-node-badge {
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted-bright);
}

.forum-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.forum-stats span {
  text-align: center;
  gap: 3px;
  padding: 0 4px;
}

.forum-stats span + span {
  border-left: 1px solid var(--line);
}

.forum-stats small, .last-post small, .latest-item small {
  color: var(--muted);
  font-size: 11px;
}

.forum-stats strong {
  font-size: 17px;
  font-weight: 600;
  color: #f3f6f8;
}

.last-post {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.last-post img, .latest-item img, .thread-author img, .table-avatar, .composer-avatar, .author-avatar-sm, .struct-avatar, .author-avatar {
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.last-post img {
  width: 38px;
  height: 38px;
}

.last-post strong {
  overflow: hidden;
  color: #e5e9eb;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.last-post b {
  color: var(--amber);
  font-weight: 600;
}

.row-caret { display: none; }

/* Latest Discussions Sidebar */
.latest-panel {
  align-self: start;
  scroll-margin-top: 18px;
  display: flex;
  flex-direction: column;
}

.latest-heading {
  min-height: 58px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.latest-heading h2, .latest-heading h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.latest-item {
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
  text-decoration: none;
}

.latest-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.latest-item img {
  width: 36px;
  height: 36px;
}

.latest-copy > span {
  min-width: 0;
  overflow: hidden;
  color: #e7e9eb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 5px;
  border-radius: 2px;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.tag-orange, .prefix-pending, .prefix-important { background: #d87315 !important; color: #fff !important; }
.tag-blue, .prefix-general { background: #2872ad !important; color: #fff !important; }
.tag-gray, .prefix-rejected, .prefix-closed { background: #626b72 !important; color: #fff !important; }
.tag-purple, .prefix-roleplay { background: #8244a9 !important; color: #fff !important; }
.tag-green, .prefix-approved { background: #25864a !important; color: #fff !important; }

.reply-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a9b3bb;
  font-size: 12px;
}

.latest-footer {
  width: 100%;
  height: 48px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #e6e9eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.latest-footer:hover {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.025);
}

/* Sidebar Widgets */
.sidebar-widget {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 23, 32, 0.93);
  overflow: hidden;
}

.widget-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-850);
}

.widget-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-header h3 i {
  color: var(--amber);
}

.widget-content {
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.server-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.server-name {
  font-size: 13px;
  font-weight: 600;
}

.server-badge.online {
  font-size: 11px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.server-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.stats-pair-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted-bright);
}

.stats-pair-row strong { color: #ffffff; }
.highlight-cyan { color: var(--amber-bright); font-weight: 700; }

/* --------------------------------------------------------------------------
   5. Forum Section View (/forum?id=...) - XenForo / Noir Style
   -------------------------------------------------------------------------- */
.forum-view-container {
  display: grid;
  gap: 14px;
}

.forum-header-row {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-850);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.forum-title-area h1 {
  margin: 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 32px;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.forum-description {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.forum-action-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Dedicated XenForo Archive Banner */
.xf-archive-banner-card {
  padding: 14px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 157, 22, 0.03);
  border-left: 3px solid var(--amber);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 140px 240px;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 150ms ease;
}

.xf-archive-banner-card:hover {
  background: rgba(255, 157, 22, 0.07);
}

.xf-archive-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.xf-archive-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 157, 22, 0.1);
  border: 1px solid rgba(255, 157, 22, 0.25);
  color: var(--amber);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.xf-archive-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xf-archive-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.xf-badge-new {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--amber);
  color: #111;
  font-size: 9px;
  font-weight: 800;
}

.xf-archive-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 10px;
}

.xf-stat-box {
  display: grid;
  text-align: center;
  gap: 2px;
}

.xf-stat-count {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.xf-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}

.xf-archive-latest {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.xf-latest-avatar img {
  width: 34px;
  height: 34px;
}

.xf-latest-details {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.xf-latest-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xf-latest-link {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.xf-latest-meta {
  font-size: 11px;
  color: var(--muted);
}

.xf-latest-author {
  color: var(--amber);
}

/* Sub-forums Grid */
.sub-forums-container {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.sub-forums-header h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--amber-bright);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-forums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.sub-forum-card {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 120ms ease;
}

.sub-forum-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.sub-forum-card .card-icon {
  color: var(--amber);
  font-size: 16px;
}

.sub-forum-card .card-info h4 {
  margin: 0;
  font-size: 13px;
  color: #fff;
}

.sub-forum-card .card-info p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

/* Top Nav & Pagination */
.forum-top-nav-bar {
  padding: 10px 20px;
  background: var(--ink-850);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.xf-pagination {
  display: flex;
  gap: 4px;
}

.xf-page-btn {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--muted-bright);
}

.xf-page-btn.active, .xf-page-btn:hover {
  background: var(--amber);
  color: #111;
  border-color: var(--amber);
  font-weight: 700;
}

.forum-tools-right {
  display: flex;
  gap: 8px;
}

/* Filter & Prefix Tabs Bar */
.filter-bar {
  padding: 10px 20px;
  background: var(--ink-950);
  border-bottom: 1px solid var(--line);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  align-items: center;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-bright);
  transition: all 120ms ease;
  white-space: nowrap;
}

.filter-tab:hover, .filter-tab.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
  color: #fff;
}

.filter-tab.active {
  border-color: var(--amber);
  color: var(--amber-bright);
}

/* XenForo Style Struct Item Thread List */
.threads-list-card {
  background: rgba(13, 23, 32, 0.95);
}

.struct-items-list {
  display: grid;
}

.struct-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 140px 180px;
  align-items: center;
  gap: 14px;
  transition: background 120ms ease;
}

.struct-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.struct-item--pinned {
  background: rgba(255, 157, 22, 0.02);
}

.struct-avatar {
  width: 40px;
  height: 40px;
}

.struct-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.struct-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.struct-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #f3f6f8;
  transition: color 120ms ease;
}

.struct-item-title:hover {
  color: var(--amber-bright);
}

.icon-pinned {
  color: var(--amber);
  font-size: 12px;
}

.icon-locked {
  color: #f43f5e;
  font-size: 12px;
}

.struct-item-meta-row {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.struct-author {
  color: var(--muted-bright);
  font-weight: 600;
}

.struct-item-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 10px;
}

.stat-cell {
  display: grid;
  text-align: center;
  gap: 2px;
}

.stat-value {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}

.struct-item-latest {
  display: grid;
  gap: 2px;
  text-align: right;
  font-size: 12px;
}

.latest-date {
  color: var(--muted-bright);
}

.latest-author {
  color: var(--amber);
  font-weight: 600;
}

.empty-state {
  padding: 50px 20px;
  text-align: center;
  display: grid;
  place-items: center;
  gap: 12px;
}

.empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--muted);
}

.empty-state h3 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   6. Thread View (/thread?id=...) & Image Resizing
   -------------------------------------------------------------------------- */
.thread-view-container {
  display: grid;
  gap: 16px;
}

.thread-header-card {
  padding: 24px;
}

.thread-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.thread-title {
  margin: 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 30px;
  letter-spacing: -0.4px;
  color: #fff;
}

.pinned-indicator, .locked-indicator {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pinned-indicator { background: rgba(255, 157, 22, 0.2); color: var(--amber); border: 1px solid rgba(255, 157, 22, 0.35); }
.locked-indicator { background: rgba(244, 63, 94, 0.2); color: #fca5a5; border: 1px solid rgba(244, 63, 94, 0.35); }

.thread-meta-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.meta-sep { color: rgba(255, 255, 255, 0.2); }

/* Admin Moderation Toolbar in Thread */
.admin-mod-card {
  padding: 12px 18px;
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mod-card-label {
  font-size: 13px;
  color: var(--amber-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mod-card-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

.mod-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: #060c12;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.btn-mod {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #fff;
}

.btn-mod:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Post Cards Stream */
.posts-stream {
  display: grid;
  gap: 16px;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
}

.post-author-box {
  background: #08121a;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.author-avatar-wrapper {
  width: 80px;
  height: 80px;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
}

.author-details {
  display: grid;
  gap: 6px;
  width: 100%;
}

.author-username {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.author-profile-link {
  color: #fff;
  transition: color 120ms ease;
}

.author-profile-link:hover {
  color: var(--amber);
}

.author-extra-stats {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  text-align: left;
  width: 100%;
}

.extra-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.extra-stat-item strong {
  color: var(--muted-bright);
}

.post-content-box {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}

.post-number-link {
  color: var(--muted);
  font-weight: 700;
}

.post-body-text {
  font-size: 15px;
  line-height: 1.65;
  color: #e2e8f0;
  flex: 1;
}

.post-body-text ul, .post-body-text ol {
  padding-left: 20px;
  margin: 12px 0;
}

.post-body-text li {
  margin-bottom: 6px;
}

/* Strict Image Resizing & Containment for all post images */
.post-body-text img, .bbImage, .bbCodeImage, .bbCodeImageWrapper img, .fr-element-contenteditable img {
  max-width: 100% !important;
  max-height: 480px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  margin: 10px 0;
  display: block;
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-body-text img:hover, .bbImage:hover, .bbCodeImage:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 157, 22, 0.4);
}

.bbCodeImageWrapper {
  margin: 10px 0;
  display: inline-block;
  max-width: 100%;
}

.img-large { max-width: 600px !important; max-height: 500px !important; }
.img-medium { max-width: 380px !important; max-height: 380px !important; }
.img-thumb { max-width: 200px !important; max-height: 200px !important; }

/* BBCode Formats */
.bbcode-bold { font-weight: 700; }
.bbcode-italic { font-style: italic; }
.bbcode-underline { text-decoration: underline; }
.bbcode-strike { text-decoration: line-through; }

.bbcode-quote, .bbCodeBlock--quote {
  border-left: 3px solid var(--amber);
  background: rgba(255, 157, 22, 0.05);
  margin: 14px 0;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

.bbcode-quote-header, .bbCodeBlock-title {
  padding: 6px 14px;
  background: rgba(255, 157, 22, 0.1);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber-bright);
}

.bbcode-quote-body, .bbCodeBlock-content {
  padding: 10px 14px;
  color: var(--muted-bright);
  font-size: 14px;
}

.bbcode-code, .bbCodeCode {
  background: #060c12;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: monospace;
  color: var(--amber-bright);
  margin: 12px 0;
  white-space: pre-wrap;
}

.bbcode-color-red { color: #f87171; }
.bbcode-color-green { color: #4ade80; }
.bbcode-color-orange { color: #fb923c; }
.bbcode-color-blue { color: #38bdf8; }
.bbcode-color-purple { color: #c084fc; }

/* Reactions Bar & Tooltip */
.post-reactions-bar {
  margin-top: 16px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-bright);
}

.post-bottom-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.post-actions-left, .post-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-post-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-bright);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.btn-post-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--line-strong);
}

.reacted-active, .btn-react-trigger:hover {
  color: var(--amber) !important;
  border-color: var(--amber) !important;
  background: rgba(255, 157, 22, 0.08) !important;
}

.btn-delete-post {
  color: #fca5a5;
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-delete-post:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #ffffff;
}

/* Floating Reaction Tooltip */
.react-wrapper {
  position: relative;
  display: inline-flex;
}

.tooltip--reaction {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 60;
}

.react-wrapper:hover .tooltip--reaction, .tooltip--reaction.is-active {
  display: block;
}

.reactTooltip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #101b25;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  box-shadow: var(--shadow-modal);
}

.reactTooltip .reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  transition: transform 120ms ease, background 120ms ease;
  text-decoration: none;
}

.reactTooltip .reaction:hover {
  transform: scale(1.3) translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
}

.reactTooltip .emoji-label {
  display: none;
}

/* --------------------------------------------------------------------------
   7. Quick Reply & Froala / XenForo WYSIWYG Editor
   -------------------------------------------------------------------------- */
.quick-reply-wrapper, .reply-section-card {
  margin-top: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--ink-850);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.reply-header {
  padding: 16px 22px;
  background: linear-gradient(180deg, #0e1a26 0%, #09121c 100%);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reply-header-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reply-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  object-fit: cover;
  background: #09131c;
}

.reply-user-info {
  display: grid;
  gap: 2px;
}

.reply-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-header-title i {
  color: var(--amber);
}

.reply-as-text {
  font-size: 12px;
  color: var(--muted);
}

.reply-username {
  color: var(--amber-bright);
  font-weight: 700;
}

.editor-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 157, 22, 0.08);
  border: 1px solid rgba(255, 157, 22, 0.25);
  color: var(--amber-bright);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Froala / XenForo Editor Shell */
.fr-box {
  margin: 16px 20px;
  background: #070e15;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.fr-box:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-glow);
}

.fr-toolbar {
  padding: 8px 12px;
  background: #050a0f;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.fr-btn-grp {
  display: flex;
  align-items: center;
  gap: 3px;
  border-right: 1px solid var(--line);
  padding-right: 8px;
  margin-right: 4px;
}

.fr-grp-right, .fr-float-right {
  margin-left: auto;
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.fr-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  transition: all 120ms ease;
}

.fr-btn:hover {
  background: rgba(255, 157, 22, 0.15);
  color: var(--amber-bright);
  border-color: rgba(255, 157, 22, 0.35);
}

.fr-toggle-bbcode-btn {
  width: auto;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.fr-dropdown-wrap {
  position: relative;
}

.fr-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #101b25;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: var(--shadow-modal);
  z-index: 50;
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.fr-dropdown-menu a {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted-bright);
  border-radius: 3px;
}

.fr-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.fr-color-palette {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  gap: 6px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.fr-smilies-palette {
  display: grid;
  grid-template-columns: repeat(4, 30px);
  gap: 4px;
}

.smilie-item {
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  text-align: center;
  border-radius: 4px;
}

.smilie-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

.fr-wrapper {
  position: relative;
  background: #070e15;
}

.fr-element-contenteditable, .fr-element-raw {
  min-height: 180px;
  max-height: 520px;
  overflow-y: auto;
  padding: 16px 20px;
  color: #f1f5f9;
  font-size: 14.5px;
  line-height: 1.65;
  outline: none;
  border: none;
  width: 100%;
  background: transparent;
  font-family: inherit;
}

.fr-element-raw {
  font-family: monospace;
  font-size: 13px;
  color: var(--amber-bright);
  white-space: pre-wrap;
  resize: vertical;
}

.fr-element-contenteditable.is-empty::before {
  content: attr(data-placeholder);
  color: #475569;
  pointer-events: none;
}

.reply-footer {
  padding: 14px 20px;
  background: #09131d;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reply-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-editor-helper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-bright);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.btn-editor-helper:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--line-strong);
}

.btn-submit-reply-action {
  height: 42px;
  padding: 0 24px;
  background: var(--amber);
  color: #0f0c05;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  border: 1px solid var(--amber);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(255, 157, 22, 0.28);
  transition: all 150ms ease;
}

.btn-submit-reply-action:hover {
  background: var(--amber-bright);
  border-color: var(--amber-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 157, 22, 0.42);
}

.login-to-reply-card {
  padding: 28px;
  text-align: center;
  display: grid;
  gap: 14px;
  place-items: center;
}

.login-to-reply-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted-bright);
}

.login-to-reply-card .btn-group {
  display: flex;
  gap: 10px;
}

.btn-login {
  background: var(--amber);
  color: #111;
  font-weight: 700;
}

.btn-register {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: #fff;
}

/* --------------------------------------------------------------------------
   8. Image Modal with Resizing & Lightbox Overlay
   -------------------------------------------------------------------------- */
.editor-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.editor-modal-dialog {
  background: #101b25;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

.editor-modal-header {
  padding: 16px 20px;
  background: #0c1621;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-modal-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-modal-header h4 i {
  color: var(--amber);
}

.editor-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.editor-modal-body {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.image-size-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.size-pill-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 120ms ease;
}

.size-pill-label:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.modal-preview-box {
  background: #060b10;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.preview-header {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  text-align: left;
  font-weight: 700;
}

.preview-img-container img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 4px;
}

.editor-modal-footer {
  padding: 14px 20px;
  background: #0c1621;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Full-Screen Image Lightbox */
.image-lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 8, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 30px;
  cursor: zoom-out;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 26px;
  font-size: 32px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 120ms ease;
}

.lightbox-close:hover {
  color: var(--amber);
  transform: scale(1.2);
}

.lightbox-content-box {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 157, 22, 0.2);
  cursor: default;
}

/* --------------------------------------------------------------------------
   9. Admin Control Panel (/admin, /admin/roles, /admin/sections, /admin/users)
   -------------------------------------------------------------------------- */
.admin-container {
  display: grid;
  gap: 20px;
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-title h1 {
  margin: 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 32px;
  letter-spacing: -0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-title h1 i {
  color: var(--amber);
}

.admin-title p, .admin-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-quick-links, .admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Stat Cards Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.admin-stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: all 150ms ease;
}

.admin-stat-card:hover {
  border-color: var(--line-strong);
  background: var(--ink-800);
  transform: translateY(-2px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.icon-users { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.icon-threads { background: rgba(255, 157, 22, 0.12); color: var(--amber); }
.icon-posts { background: rgba(79, 226, 110, 0.12); color: var(--green); }
.icon-nodes { background: rgba(192, 132, 252, 0.12); color: var(--purple); }

.stat-info {
  display: grid;
  gap: 2px;
}

.stat-info h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.stat-info span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Infrastructure Health & Guides */
.admin-infra-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.infra-list, .role-guide-list {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.infra-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.infra-label {
  font-size: 13px;
  color: var(--muted-bright);
}

.infra-value {
  font-size: 13px;
}

.guide-item {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 4px;
}

.guide-item p {
  margin: 0;
  font-size: 12px;
  color: var(--muted-bright);
}

/* Admin Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 12px 16px;
  background: var(--ink-950);
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted-bright);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: #e2e8f0;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.table-user-cell, .table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-avatar {
  width: 34px;
  height: 34px;
}

.user-cell-meta {
  display: grid;
  gap: 2px;
}

.user-cell-id {
  font-size: 11px;
  color: var(--muted);
}

.admin-filter-bar {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.admin-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
}

.search-input-wrap .form-input {
  padding-left: 36px;
}

.perm-tags-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.perm-tag {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.perm-yes {
  background: rgba(79, 226, 110, 0.12);
  color: #86efac;
  border: 1px solid rgba(79, 226, 110, 0.25);
}

.status-banned {
  color: #f43f5e;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Sections Permissions Grid */
.sections-perm-container {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.category-perm-card .card-header {
  background: #09131d;
}

.nodes-perm-list {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.node-perm-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 10px;
}

.node-perm-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.node-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 157, 22, 0.08);
  border: 1px solid rgba(255, 157, 22, 0.25);
  color: var(--amber);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.node-perm-info {
  flex: 1;
}

.node-perm-info h4 {
  margin: 0;
  font-size: 15px;
  color: #fff;
}

.node-perm-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.roles-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.roles-label {
  color: var(--amber-bright);
  font-weight: 700;
}

.role-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
  color: #cbd5e1;
}

.role-check-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.perm-grid-checkboxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.perm-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 12px;
  cursor: pointer;
}

.perm-check-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ban-options-box {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.btn-ban-quick {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 11px;
}

.btn-ban-quick:hover {
  background: var(--amber);
  color: #111;
}

/* --------------------------------------------------------------------------
   10. Member Profiles & Account Settings (/member, /account/details)
   -------------------------------------------------------------------------- */
.member-profile-container, .account-settings-wrapper {
  display: grid;
  gap: 16px;
}

.member-header-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.member-header-top {
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.member-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.member-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--amber);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.avatar-edit-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #111;
  color: var(--amber);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.member-info-col {
  display: grid;
  gap: 8px;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.member-username {
  margin: 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 34px;
  line-height: 1;
  color: #fff;
}

.member-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.character-id-pill {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-bright);
}

.member-meta-blurbs {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.member-stats-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: rgba(6, 12, 18, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  text-align: center;
}

.stat-counter-cell {
  display: grid;
  gap: 2px;
  padding: 0 8px;
}

.stat-counter-cell + .stat-counter-cell {
  border-left: 1px solid var(--line);
}

.stat-val {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.stat-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

/* Profile Tabs Navigation */
.profile-tabs-wrapper {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.profile-nav-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.profile-tab-item {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 150ms ease;
  white-space: nowrap;
}

.profile-tab-item:hover, .profile-tab-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.profile-tab-item.active {
  background: var(--amber);
  color: #111;
}

/* Profile Wall & Composer */
.wall-composer-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
  margin-bottom: 16px;
}

.composer-header {
  display: flex;
  gap: 12px;
}

.composer-avatar {
  width: 40px;
  height: 40px;
}

.wall-textarea, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #09131c;
  color: #f3f6f8;
  resize: vertical;
}

.wall-textarea:focus, .form-textarea:focus {
  border-color: var(--amber);
}

.composer-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.wall-posts-list {
  display: grid;
  gap: 12px;
}

.wall-post-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
  display: flex;
  gap: 14px;
}

.author-avatar-sm {
  width: 42px;
  height: 42px;
}

.wall-post-content {
  flex: 1;
  display: grid;
  gap: 6px;
}

.wall-post-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
}

.wall-author-name {
  font-weight: 700;
  color: #fff;
}

.wall-post-date {
  color: var(--muted);
  font-size: 11px;
}

.wall-post-body {
  color: #d1d8dc;
  font-size: 14px;
  line-height: 1.5;
}

/* Activity Feed & Postings List */
.activity-feed-list, .postings-list {
  display: grid;
  gap: 12px;
}

.activity-feed-item, .posting-item-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
  display: flex;
  align-items: center;
  gap: 14px;
}

.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 157, 22, 0.1);
  color: var(--amber);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.activity-details {
  display: grid;
  gap: 3px;
}

.about-profile-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
}

.about-card-body {
  margin-top: 12px;
  line-height: 1.6;
}

/* Account Details Form */
.account-card {
  padding: 24px;
}

.account-form {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.form-group-floating {
  display: grid;
  gap: 6px;
}

.form-group-floating label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-bright);
}

.form-input-box {
  position: relative;
}

.form-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.avatar-preview-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.current-avatar-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
}

/* --------------------------------------------------------------------------
   11. Alerts & Notifications View (/account/alerts)
   -------------------------------------------------------------------------- */
.alerts-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.alerts-title-group h2 {
  margin: 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 28px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alerts-title-group h2 i { color: var(--amber); }

.alerts-title-group p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.alerts-list {
  display: grid;
}

.alert-item-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
  text-decoration: none;
}

.alert-item-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.unread-alert {
  background: rgba(255, 157, 22, 0.03);
  border-left: 3px solid var(--amber);
}

.alert-avatar-col {
  position: relative;
  width: 44px;
  height: 44px;
}

.alert-actor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.alert-type-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  border: 2px solid var(--ink-900);
}

.type-reply { background: var(--amber); color: #111; }
.type-reaction { background: #f43f5e; color: #fff; }
.type-prefix { background: #38bdf8; color: #111; }
.type-lock { background: #6b7280; color: #fff; }

.alert-text-body {
  font-size: 14px;
  color: #f1f5f9;
}

.alert-time-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.alert-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

/* --------------------------------------------------------------------------
   12. Auth Pages (/login, /register)
   -------------------------------------------------------------------------- */
.auth-wrapper {
  padding: 20px 0 40px;
}

.auth-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-850);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.auth-hero-card {
  background: #060c12 url("/static/assets/hero-city.webp") center center / cover no-repeat;
  position: relative;
  padding: 44px;
  display: flex;
  align-items: center;
}

.auth-hero-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 12, 18, 0.88) 0%, rgba(8, 16, 24, 0.96) 100%);
}

.auth-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 24px;
}

.auth-brand-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-brand-badge .brand-text {
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
}

.auth-brand-badge .brand-accent {
  color: var(--orange-brand);
}

.auth-brand-badge .brand-sub {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--amber);
  font-weight: 700;
}

.server-live-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.status-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-info {
  display: grid;
  gap: 2px;
}

.status-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.status-slots {
  font-size: 11px;
  color: var(--green);
}

.auth-features-list {
  display: grid;
  gap: 16px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 157, 22, 0.1);
  border: 1px solid rgba(255, 157, 22, 0.25);
  color: var(--amber);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

.feature-text h4 {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.feature-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.auth-security-notice {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-security-notice i {
  color: var(--amber);
}

.auth-form-card {
  padding: 44px;
  background: var(--ink-800);
  border-left: 1px solid var(--line);
}

.auth-form-header h2 {
  margin: 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 32px;
  letter-spacing: -0.4px;
  color: #fff;
}

.auth-form-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.cyber-auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  right: 14px;
  color: var(--muted);
  pointer-events: none;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.btn-toggle-pwd:hover {
  color: var(--amber);
}

.form-row-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin: 2px 0 6px;
}

.remember-me-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-bright);
  cursor: pointer;
}

.link-switch-auth {
  color: var(--amber);
  font-weight: 600;
}

.link-switch-auth:hover {
  color: var(--amber-bright);
  text-decoration: underline;
}

.btn-auth-primary {
  height: 46px;
  background: var(--amber);
  color: #11100d;
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 150ms ease;
  border: 1px solid var(--amber);
}

.btn-auth-primary:hover {
  background: var(--amber-bright);
  border-color: var(--amber-bright);
  transform: translateY(-1px);
}

.auth-demo-credentials {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
}

.demo-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-bright);
}

.btn-demo-autofill {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(255, 157, 22, 0.15);
  border: 1px solid var(--amber);
  color: var(--amber);
  border-radius: 3px;
}

.btn-demo-autofill:hover {
  background: var(--amber);
  color: #111;
}

.demo-creds-details {
  font-size: 12px;
  color: var(--muted-bright);
}

.demo-creds-details code {
  background: #060c12;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--amber-bright);
}

.auth-card-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.highlight-link {
  color: var(--amber-bright);
  font-weight: 700;
}

.highlight-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   13. Modals & Popups
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(1, 5, 8, 0.82);
  backdrop-filter: blur(10px);
}

.modal, .modal-box {
  width: min(100%, 540px);
  max-height: min(780px, calc(100vh - 44px));
  overflow: auto;
  position: relative;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #101b25;
  box-shadow: var(--shadow-modal);
}

.modal-lg {
  width: min(100%, 720px);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 18px;
}

.modal h2, .modal-header h3 {
  margin: 0 44px 8px 0;
  font-family: "Nimbus Narrow", sans-serif;
  font-size: 32px;
  line-height: 1.05;
  color: #ffffff;
}

.modal-copy {
  color: var(--muted-bright);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-bright);
}

.search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.search-field-large {
  margin: 20px 0 14px;
  padding-left: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #0a131b;
}

.search-field-large input {
  border: 0;
  background: transparent;
  height: 46px;
  color: #fff;
}

.search-results {
  display: grid;
  border-top: 1px solid var(--line);
  max-height: 380px;
  overflow-y: auto;
}

.search-result {
  min-height: 62px;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: all 120ms ease;
  text-decoration: none;
}

.search-result:hover {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.02);
}

.search-result span {
  display: grid;
  gap: 3px;
}

.search-result small {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 130;
  max-width: min(390px, calc(100vw - 48px));
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(79, 226, 110, 0.28);
  border-radius: 6px;
  background: #13251b;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dcf9e3;
  font-size: 13px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   14. Pagination System
   -------------------------------------------------------------------------- */
.pagination-bar, .pagination-container {
  margin: 20px 0;
  padding: 12px 18px;
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.pagination-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.pagination-info strong {
  color: var(--amber-bright);
  font-weight: 700;
}

.pagination-links, .pagination-pages, .xf-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-link, .xf-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-bright);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 120ms ease;
}

.page-link:hover, .xf-page-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.page-active, .page-link.active, .xf-page-btn.active {
  background: var(--amber) !important;
  color: #0c0904 !important;
  border-color: var(--amber) !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(255, 157, 22, 0.35);
}

.page-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-arrow {
  padding: 0 10px;
}

/* Locked & Admin Notices */
.locked-reply-notice {
  border: 1px solid rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.08);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.admin-override-notice {
  border: 1px solid rgba(255, 157, 22, 0.3);
  background: rgba(255, 157, 22, 0.08);
  color: var(--amber-bright);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   15. Thread Creation Form (/thread/create) & Empty Alerts
   -------------------------------------------------------------------------- */
.create-thread-container {
  display: grid;
  gap: 16px;
}

.form-card-xf {
  padding: 24px;
  background: var(--ink-850);
}

.xf-thread-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.prefix-wrap {
  flex-shrink: 0;
}

.xf-prefix-select {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #09131c;
  color: var(--amber-bright);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.xf-prefix-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 157, 22, 0.15);
  border: 1px solid var(--amber);
  color: var(--amber-bright);
  font-size: 13px;
  font-weight: 700;
}

.title-input-wrap {
  flex: 1;
}

.xf-title-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #09131c;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.xf-title-input:focus {
  border-color: var(--amber);
  outline: none;
  box-shadow: 0 0 0 2px var(--amber-glow);
}

.xf-form-table {
  margin-top: 20px;
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.xf-form-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.xf-label-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xf-label-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-bright);
}

.xf-required-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(244, 63, 94, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(244, 63, 94, 0.35);
  text-transform: uppercase;
}

.xf-input-col {
  display: grid;
  gap: 4px;
}

.xf-text-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #060b10;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
}

.xf-text-input:focus {
  border-color: var(--amber);
  outline: none;
}

.xf-sub-hint {
  font-size: 11px;
  color: var(--muted);
}

.xf-submit-row {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.empty-alerts-box {
  padding: 60px 20px;
  text-align: center;
  display: grid;
  gap: 10px;
  place-items: center;
  color: var(--muted);
}

.empty-alerts-box i {
  font-size: 44px;
  color: var(--muted);
  opacity: 0.6;
}

.empty-alerts-box h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer, .main-footer {
  width: min(100% - 48px, 1320px);
  min-height: 72px;
  margin: 0 auto;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer strong, .main-footer strong {
  color: #e5e8ea;
}

.footer-right a, .site-footer a {
  color: var(--muted-bright);
  margin-left: 16px;
  transition: color 120ms ease;
}

.footer-right a:hover, .site-footer a:hover {
  color: var(--amber);
}

/* --------------------------------------------------------------------------
   17. Hero Buttons & Actions
   -------------------------------------------------------------------------- */
.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 5px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, color 160ms ease;
}

.button-primary {
  color: #11100d !important;
  background: var(--amber) !important;
  border-color: var(--amber) !important;
}

.button-primary:hover {
  background: var(--amber-bright) !important;
  border-color: var(--amber-bright) !important;
  transform: translateY(-1px);
}

.button-secondary {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
  background: rgba(7, 14, 20, 0.72) !important;
}

.button-secondary:hover {
  border-color: rgba(255, 255, 255, 0.62) !important;
  background: rgba(16, 27, 37, 0.88) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   18. Member Profile Header & Tab System (/member?id=...)
   -------------------------------------------------------------------------- */
.member-profile-container {
  display: grid;
  gap: 20px;
}

.member-header-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #09131c;
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.member-header-top {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.member-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.member-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--amber);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 150ms ease;
  text-decoration: none;
}

.member-avatar-wrapper:hover .avatar-edit-overlay {
  opacity: 1;
}

.member-info-col {
  display: grid;
  gap: 8px;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.member-username {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.btn-edit-profile {
  font-size: 12px;
  padding: 4px 12px;
  height: 30px;
}

.member-badges-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.character-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-bright);
}

.character-id-pill strong {
  color: var(--amber-bright);
}

.member-meta-blurbs {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.meta-item strong {
  color: #e2e8f0;
}

.member-stats-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(2, 6, 10, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stat-counter-cell {
  padding: 12px 18px;
  display: grid;
  text-align: center;
  gap: 2px;
}

.stat-counter-cell + .stat-counter-cell {
  border-left: 1px solid var(--line);
}

.stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--amber-bright);
}

.stat-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Profile Tab Navigation */
.profile-tabs-wrapper {
  margin-top: 10px;
}

.profile-nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-850);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 0 12px;
  overflow-x: auto;
}

.profile-tab-item {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-bright);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  transition: all 120ms ease;
  white-space: nowrap;
}

.profile-tab-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.profile-tab-item.active {
  color: var(--amber-bright);
  border-bottom-color: var(--amber);
  font-weight: 700;
  background: rgba(255, 157, 22, 0.04);
}

.profile-tab-content-area {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px;
  min-height: 300px;
}

/* Wall Composer & Posts */
.wall-composer-card {
  background: #09131c;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.composer-header {
  display: flex;
  gap: 12px;
}

.composer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wall-textarea {
  width: 100%;
  background: #060b10;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  resize: vertical;
  min-height: 70px;
}

.wall-textarea:focus {
  border-color: var(--amber);
  outline: none;
}

.composer-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.wall-posts-list {
  display: grid;
  gap: 14px;
}

.wall-post-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #09131c;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.wall-post-avatar {
  flex-shrink: 0;
}

.author-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.wall-post-content {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.wall-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.wall-author-name {
  font-weight: 700;
  color: var(--amber-bright);
  text-decoration: none;
}

.wall-role-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
}

.wall-timestamp {
  color: var(--muted);
  font-size: 12px;
}

.wall-post-text {
  color: #d2d7da;
  font-size: 14px;
  line-height: 1.5;
}

.empty-state-wall {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
}

.empty-state-wall i {
  font-size: 40px;
  opacity: 0.5;
}

.empty-state-wall p {
  margin: 0;
  font-size: 14px;
}

/* Activity Tab */
.activities-list {
  display: grid;
  gap: 12px;
}

.activity-card-row {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: #09131c;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  align-items: flex-start;
}

.activity-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.icon-thread {
  background: rgba(255, 157, 22, 0.12);
  color: var(--amber-bright);
  border: 1px solid rgba(255, 157, 22, 0.3);
}

.icon-reply {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.activity-main-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.activity-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.activity-thread-link {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.activity-thread-link:hover {
  color: var(--amber-bright);
}

.activity-snippet {
  color: #95a2ad;
  font-size: 13px;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 2px solid var(--amber);
}

.activity-meta-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.activity-meta-footer a {
  color: var(--amber-bright);
  text-decoration: none;
}

/* About Player Tab */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.about-card-full {
  grid-column: 1 / -1;
}

.about-card {
  background: #09131c;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.about-card-header {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
}

.about-card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-card-header h3 i {
  color: var(--amber-bright);
}

.about-card-body {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
}

.about-pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.about-pair:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pair-lbl {
  color: var(--muted);
  font-weight: 500;
}

.pair-val {
  color: #fff;
  font-weight: 600;
}

.highlight-purple {
  color: #c084fc !important;
  font-weight: 700;
}

.highlight-blue {
  color: #818cf8 !important;
  font-weight: 700;
}

.bio-content-text {
  font-size: 14px;
  line-height: 1.6;
  color: #d2d7da;
}

/* --------------------------------------------------------------------------
   20. Thread Posts Stream, Author Cards, Reactions & Dropdowns
   -------------------------------------------------------------------------- */
.posts-stream {
  display: grid;
  gap: 16px;
}

.post-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: visible; /* Important for tooltips to float above */
  box-shadow: var(--shadow-card);
}

.post-author-box {
  padding: 20px;
  background: rgba(4, 9, 14, 0.45);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.author-avatar-wrapper {
  position: relative;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
}

.author-details {
  display: grid;
  gap: 6px;
  width: 100%;
}

.author-username {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.author-profile-link {
  color: #fff;
  text-decoration: none;
}

.author-profile-link:hover {
  color: var(--amber-bright);
}

.author-role-banner {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.author-extra-stats {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 4px;
  font-size: 11px;
  text-align: left;
}

.extra-stat-item {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.extra-stat-item strong {
  color: var(--muted-bright);
}

.post-content-box {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  position: relative;
  overflow: visible; /* Important for tooltips */
}

.post-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.post-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-number {
  font-weight: 700;
  color: var(--muted-bright);
}

.post-body-text {
  padding: 16px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #d1d8dc;
  flex: 1;
}

/* Post Reactions & XenForo Reaction Tooltip */
.post-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  position: relative;
}

.post-actions-left, .post-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-post-action {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted-bright);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 150ms ease;
}

.btn-post-action:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: var(--line-strong);
}

.btn-post-action.reacted-active {
  background: rgba(255, 157, 22, 0.15);
  border-color: var(--amber);
  color: var(--amber-bright);
}

.btn-delete-post {
  color: #fca5a5;
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.08);
}

.btn-delete-post:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.5);
}

/* React Wrapper & Tooltip Popup */
.react-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip--reaction {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  pointer-events: none;
}

.react-wrapper:hover .tooltip--reaction,
.tooltip--reaction.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.reactTooltip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #0d1722;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 157, 22, 0.15);
  white-space: nowrap;
}

.reactTooltip .reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1), background 140ms ease;
  cursor: pointer;
}

.reactTooltip .reaction:hover {
  transform: scale(1.35) translateY(-4px);
  background: rgba(255, 255, 255, 0.15);
}

.reactTooltip .reaction .emoji-icon {
  font-size: 22px;
  line-height: 1;
}

.reactTooltip .reaction .emoji-label {
  display: none;
}

/* Post Reactions Summary Banner */
.post-reactions-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted-bright);
}

.reaction-emojis-cluster {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
}

.reactors-text strong {
  color: #fff;
}

/* Editor Dropdowns & Palettes */
.fr-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.fr-dropdown-toggle {
  width: auto !important;
  padding: 0 8px !important;
  gap: 4px !important;
}

.fr-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 500;
  background: #0e1924;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-modal);
  min-width: 140px;
  padding: 6px 0;
}

.fr-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.fr-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.fr-color-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  min-width: 130px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 120ms ease;
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: #fff;
}

.fr-smilies-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  min-width: 150px;
}

.smilie-item {
  font-size: 20px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  padding: 4px;
  transition: transform 120ms ease, background 120ms ease;
}

.smilie-item:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   19. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .header-inner, .hero-inner, .content-shell, .site-footer, .main-footer {
    width: min(100% - 36px, 980px);
  }
  .main-nav { gap: 0; }
  .main-nav .nav-link, .main-nav button { min-width: auto; }
  .search-trigger span, .login-trigger span { display: none; }
  .header-link { padding-inline: 11px; }
  .main-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .forum-row { grid-template-columns: 52px minmax(190px, 1fr) 126px; }
  .last-post { display: none; }
  .announcement { grid-template-columns: 156px minmax(0, 1fr); }
  .announcement-link { display: none; }
  .hero-inner, .content-shell { transform: none; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-infra-grid { grid-template-columns: 1fr; }
  .member-header-top { grid-template-columns: 100px minmax(0, 1fr); }
  .member-stats-box { grid-column: span 2; }
  .struct-item { grid-template-columns: 44px minmax(0, 1fr) 120px; }
  .struct-item-latest { display: none; }
  .xf-archive-banner-card { grid-template-columns: minmax(0, 1fr) 130px; }
  .xf-archive-latest { display: none; }
}

@media (max-width: 820px) {
  .site-header { height: 62px; }
  .header-inner, .hero-inner, .content-shell, .site-footer, .main-footer {
    width: min(100% - 28px, 660px);
  }
  .brand { font-size: 25px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    height: auto;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: #081018;
    flex-direction: column;
    align-items: stretch;
    z-index: 60;
  }
  .main-nav.nav-open { display: flex; }
  .main-nav .nav-link, .main-nav button {
    min-height: 45px;
    justify-content: flex-start;
  }
  .main-nav .nav-link::after, .main-nav button::after {
    left: 10px;
    right: auto;
    width: 38px;
  }
  .mobile-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .mobile-nav-actions button, .mobile-nav-actions a {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #f3f6f8;
  }
  .search-trigger, .login-trigger, .register-button { display: none; }
  .mobile-menu { display: inline-grid; }
  .hero { min-height: 430px; background-position: 62% center; }
  .hero h1 {
    white-space: normal;
    max-width: 430px;
    width: auto;
    transform: none;
    font-size: clamp(38px, 8vw, 56px);
  }
  .hero-copy { top: 0; width: min(100%, 560px); }
  .main-grid { grid-template-columns: 1fr; gap: 14px; }
  .latest-panel { order: 2; }
  .auth-layout-grid { grid-template-columns: 1fr; }
  .auth-hero-card { display: none; }
  .post-card { grid-template-columns: 1fr; }
  .post-author-box {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }
  .author-avatar { width: 50px; height: 50px; }
  .author-extra-stats { display: none; }
  .site-footer, .main-footer {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .header-inner, .hero-inner, .content-shell, .site-footer, .main-footer {
    width: calc(100% - 24px);
  }
  .hero { min-height: 480px; background-position: 68% center; }
  .hero h1 { font-size: 42px; line-height: 1; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .member-header-top { grid-template-columns: 1fr; text-align: center; }
  .member-avatar-wrapper { margin: 0 auto; }
  .member-name-row { justify-content: center; }
  .member-badges-row { justify-content: center; }
  .member-meta-blurbs { justify-content: center; }
  .member-stats-box { grid-column: span 1; grid-template-columns: repeat(2, 1fr); }
  .stat-counter-cell:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat-counter-cell:nth-child(4) { border-top: 1px solid var(--line); }
  .forum-row {
    min-height: 88px;
    padding-inline: 12px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .forum-icon { width: 40px; height: 40px; font-size: 16px; }
  .forum-stats { display: none; }
  .row-caret { display: block; color: var(--muted); }
  .latest-item { grid-template-columns: 38px minmax(0, 1fr); }
  .reply-count { display: none; }
  .struct-item { grid-template-columns: 40px minmax(0, 1fr); }
  .struct-item-stats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
