/* ============================================================
   VEXTRIM NETWORK — FULL THEME
   Dark Space-Tech Aesthetic
   Built for: forum.vextrimnetwork.xyz
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Exo+2:wght@300;400;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --bg-void:       #020409;
  --bg-deep:       #050510;
  --bg-surface:    #080820;
  --bg-card:       #0c0c28;
  --bg-elevated:   #10103a;
  --border:        rgba(51, 85, 255, 0.18);
  --border-bright: rgba(51, 85, 255, 0.5);
  --blue-core:     #2244ee;
  --blue-bright:   #3355ff;
  --blue-glow:     #6677ff;
  --blue-pale:     #aabbff;
  --blue-dim:      rgba(51, 85, 255, 0.12);
  --text-primary:  #e8eeff;
  --text-secondary:#9aaac8;
  --text-muted:    #4a5570;
  --glow-soft:     0 0 20px rgba(51, 85, 255, 0.25);
  --glow-mid:      0 0 40px rgba(51, 85, 255, 0.35);
  --glow-hard:     0 0 60px rgba(51, 85, 255, 0.5);
  --font-display:  'Exo 2', sans-serif;
  --font-body:     'Rajdhani', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --radius:        6px;
  --radius-lg:     12px;
  --transition:    all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--bg-void) !important;
  font-family: var(--font-body) !important;
  color: var(--text-primary) !important;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--blue-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-glow); }

/* Starfield background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 20%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 65%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 90%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 70% 5%,  rgba(102,119,255,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 20% 95%, rgba(102,119,255,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 85%, rgba(102,119,255,0.5) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

body.pushable > .pusher {
  background: transparent !important;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

#wrapper { margin-bottom: 1rem; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.ui.header {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
  letter-spacing: 0.03em;
}

a {
  color: var(--blue-glow) !important;
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: #fff !important; text-shadow: 0 0 8px rgba(102,119,255,0.8); }

/* ── NAVIGATION ─────────────────────────────────────────────── */
.ui.secondary.menu {
  background: rgba(5, 5, 20, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-bright) !important;
  box-shadow: 0 1px 0 rgba(51,85,255,0.3), var(--glow-soft) !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ui.secondary.menu .item,
.ui.secondary.menu .item:not(.active) {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
  text-transform: uppercase;
  padding: 8px 14px !important;
  border-radius: var(--radius) !important;
  transition: var(--transition) !important;
}

.ui.secondary.menu .item:hover {
  color: var(--text-primary) !important;
  background: var(--blue-dim) !important;
}

.ui.secondary.menu .item.active,
.ui.secondary.menu .active.item {
  color: #fff !important;
  background: rgba(51, 85, 255, 0.2) !important;
  border-bottom: 2px solid var(--blue-bright) !important;
}

/* Nav logo area */
.ui.secondary.menu .header.item {
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── MASTHEAD / HERO ────────────────────────────────────────── */
.ui.masthead {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(51,85,255,0.3) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 50%, rgba(34,68,238,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(102,119,255,0.1) 0%, transparent 50%),
    linear-gradient(180deg, #050520 0%, #020409 100%) !important;
  border-bottom: 1px solid var(--border-bright) !important;
  box-shadow: 0 4px 60px rgba(51,85,255,0.2) !important;
  padding: 5rem 0 !important;
  position: relative;
  overflow: hidden;
}

/* Animated scan line on hero */
.ui.masthead::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), var(--blue-glow), var(--blue-bright), transparent);
  animation: scanline 4s linear infinite;
  opacity: 0.6;
}

@keyframes scanline {
  0%   { top: -2px; }
  100% { top: 102%; }
}

/* Corner decorations */
.ui.masthead::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(51,85,255,0.08) 0%, transparent 40%),
    linear-gradient(225deg, rgba(51,85,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.ui.masthead .ui.header {
  font-family: var(--font-display) !important;
  font-size: 3rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  text-shadow: var(--glow-mid) !important;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.ui.masthead p {
  color: var(--blue-pale) !important;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

/* Server connect box */
.ui.masthead .connect-server {
  background: rgba(51, 85, 255, 0.1) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.2rem 1.8rem !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--glow-soft), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

.ui.masthead .connect-server .ui.header {
  font-family: var(--font-mono) !important;
  font-size: 1rem !important;
  color: var(--blue-glow) !important;
  letter-spacing: 0.1em;
}

/* ── SEGMENTS & CARDS ───────────────────────────────────────── */
.ui.segment {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.03) !important;
  color: var(--text-primary) !important;
  transition: var(--transition);
}

.ui.segment:hover {
  border-color: var(--border-bright) !important;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.4),
    var(--glow-soft),
    inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.ui.segment .ui.list .list > .item .header,
.ui.segment .ui.list > .item .header {
  display: inline-block;
  color: var(--text-primary) !important;
}

.ui.secondary.segment:not(.inverted) { border-top: none; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.ui.button,
.ui.buttons .button {
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-size: 0.82rem !important;
  border-radius: var(--radius) !important;
  transition: var(--transition) !important;
  border: none !important;
}

.ui.primary.button,
.ui.blue.button,
.ui.button.blue {
  background: var(--blue-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(51,85,255,0.4), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

.ui.primary.button:hover,
.ui.blue.button:hover {
  background: var(--blue-glow) !important;
  box-shadow: 0 0 30px rgba(102,119,255,0.6), inset 0 1px 0 rgba(255,255,255,0.1) !important;
  transform: translateY(-1px);
}

.ui.button:not(.primary):not(.blue):not(.red):not(.green) {
  background: var(--bg-elevated) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
}

.ui.button:not(.primary):not(.blue):not(.red):not(.green):hover {
  background: var(--bg-card) !important;
  border-color: var(--border-bright) !important;
  color: var(--text-primary) !important;
}

/* ── FORMS ──────────────────────────────────────────────────── */
.ui.form input:not([type=checkbox]):not([type=radio]),
.ui.form textarea,
.ui.form select,
.ui.selection.dropdown {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  transition: var(--transition) !important;
}

.ui.form input:focus,
.ui.form textarea:focus {
  border-color: var(--blue-bright) !important;
  box-shadow: 0 0 0 2px rgba(51,85,255,0.2) !important;
  outline: none !important;
}

.ui.form .field > label {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  font-size: 0.82rem !important;
  text-transform: uppercase !important;
}

/* ── TABLES ─────────────────────────────────────────────────── */
.ui.table {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
}

.ui.table thead th {
  background: var(--bg-surface) !important;
  color: var(--blue-glow) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  font-size: 0.78rem !important;
  border-bottom: 1px solid var(--border-bright) !important;
}

.ui.table tbody tr:hover td {
  background: rgba(51, 85, 255, 0.06) !important;
}

.ui.table td {
  border-top: 1px solid rgba(51, 85, 255, 0.08) !important;
}

/* ── FORUM SPECIFIC ─────────────────────────────────────────── */
#forum-node #last-post { width: 250px; }
#forum-node #last-post .avatar { margin: 2px 10px 0 0; }

/* Forum category headers */
.ui.top.attached.header {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-bright) !important;
  border-bottom: 2px solid var(--blue-bright) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* Forum topic list */
#sticky-threads tbody tr td:last-child:not(:first-child),
#normal-threads tbody tr td:last-child:not(:first-child) { text-align: right; }

.forum_post {
  word-wrap: break-word;
  color: var(--text-primary) !important;
  line-height: 1.7;
}

.forum_post img { overflow: auto; max-width: 100%; height: auto; }
#post-content .forum_post { margin-bottom: 1rem; }

/* Post sidebar */
#topic-post #post-sidebar .ui.small.image,
#topic-reply #reply-sidebar .ui.small.image { width: 120px; }

#topic-post #post-sidebar h3,
#topic-reply #reply-sidebar h3 { margin: 1rem 0; color: var(--text-primary) !important; }

@media (min-width: 768px) {
  #topic-post #post-sidebar,
  #topic-reply #reply-sidebar {
    border-right: 1px solid var(--border) !important;
    margin: -1.5rem 0;
    padding: 2rem 0;
  }
}

/* ── PROFILE ────────────────────────────────────────────────── */
#profile-header {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(51,85,255,0.15) 0%, transparent 60%),
    var(--bg-card) !important;
  border-bottom: 1px solid var(--border-bright) !important;
  border-radius: var(--radius-lg) !important;
  padding: 2rem !important;
}

#profile-header .ui.header { margin: 8px 0; color: var(--text-primary) !important; }
#profile-header .ui.label { margin: 0; }
#profile-header .actions { position: absolute; right: 1rem; }
#profile a.ui.circular.image.avatar img { max-height: 35px; }
.ui.image.label img { vertical-align: top !important; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.25em 0.55em;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.badge-primary { background: rgba(51,85,255,0.2) !important; color: var(--blue-glow) !important; border-color: var(--border-bright) !important; }
.badge-success { background: rgba(34,197,94,0.15) !important; color: #4ade80 !important; border-color: rgba(34,197,94,0.3) !important; }
.badge-danger  { background: rgba(239,68,68,0.15) !important; color: #f87171 !important; border-color: rgba(239,68,68,0.3) !important; }
.badge-warning { background: rgba(234,179,8,0.15) !important; color: #facc15 !important; border-color: rgba(234,179,8,0.3) !important; }

/* ── PAGINATION ─────────────────────────────────────────────── */
.ui.pagination.menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.ui.pagination.menu .item {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-weight: 600;
  border-right: 1px solid var(--border) !important;
  transition: var(--transition) !important;
}

.ui.pagination.menu .item:hover {
  background: var(--blue-dim) !important;
  color: var(--text-primary) !important;
}

.ui.pagination.menu .item.active {
  background: var(--blue-bright) !important;
  color: #fff !important;
}

/* ── MODALS ─────────────────────────────────────────────────── */
.ui.modal {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--glow-mid), 0 25px 60px rgba(0,0,0,0.6) !important;
}

.ui.modal > .header {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-bright) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.ui.modal > .content {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.ui.modal > .actions {
  background: var(--bg-surface) !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

/* ── POPUPS & DROPDOWNS ─────────────────────────────────────── */
.ui.popup,
.ui.dropdown .menu {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--glow-soft), 0 10px 40px rgba(0,0,0,0.5) !important;
  color: var(--text-primary) !important;
}

.ui.dropdown .menu > .item {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  border-top: 1px solid var(--border) !important;
  transition: var(--transition) !important;
}

.ui.dropdown .menu > .item:hover {
  background: var(--blue-dim) !important;
  color: var(--text-primary) !important;
}

/* ── LABELS ─────────────────────────────────────────────────── */
.ui.label {
  background: var(--bg-elevated) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  font-size: 0.78rem !important;
}

.ui.blue.label {
  background: rgba(51,85,255,0.2) !important;
  color: var(--blue-glow) !important;
  border-color: var(--border-bright) !important;
}

/* ── MESSAGES ───────────────────────────────────────────────── */
.ui.message {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.ui.info.message {
  background: rgba(51,85,255,0.1) !important;
  border-color: var(--border-bright) !important;
}

.ui.success.message {
  background: rgba(34,197,94,0.1) !important;
  border-color: rgba(34,197,94,0.3) !important;
}

.ui.error.message, .ui.negative.message {
  background: rgba(239,68,68,0.1) !important;
  border-color: rgba(239,68,68,0.3) !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.ui.footer.segment {
  background:
    linear-gradient(0deg, rgba(51,85,255,0.08) 0%, transparent 100%),
    var(--bg-surface) !important;
  border-top: 1px solid var(--border-bright) !important;
  box-shadow: 0 -4px 40px rgba(51,85,255,0.1) !important;
  margin: auto 0 -.5rem 0 !important;
  padding: 3em 0 !important;
  color: var(--text-secondary) !important;
  position: relative;
}

.ui.footer.segment::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-bright), var(--blue-glow), var(--blue-bright), transparent);
  opacity: 0.6;
}

/* ── VERTICAL MENU ──────────────────────────────────────────── */
.ui.vertical.menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}

.ui.vertical.menu .item {
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border) !important;
  font-family: var(--font-body) !important;
  transition: var(--transition) !important;
}

.ui.vertical.menu .item:hover,
.ui.vertical.menu .item.active {
  background: var(--blue-dim) !important;
  color: var(--text-primary) !important;
}

.ui.vertical.menu .active.item {
  border-left: 3px solid var(--blue-bright) !important;
}

/* ── WIDGETS ────────────────────────────────────────────────── */
[id*="widget"] .item .content {
  width: calc(100% - 40px) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[id*="widget"] .item .description {
  width: calc(100% - 120px) !important;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted) !important;
}

/* ── TOP ATTACHED TABS ──────────────────────────────────────── */
.ui.tabular.menu {
  border-bottom: 1px solid var(--border-bright) !important;
}

.ui.tabular.menu .item {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  border: 1px solid transparent !important;
  transition: var(--transition) !important;
}

.ui.tabular.menu .item:hover { color: var(--text-primary) !important; }

.ui.tabular.menu .active.item {
  background: var(--bg-card) !important;
  border-color: var(--border-bright) var(--border-bright) transparent !important;
  color: var(--blue-glow) !important;
}

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.ui.breadcrumb .section { color: var(--text-secondary) !important; }
.ui.breadcrumb .active.section { color: var(--blue-glow) !important; }
.ui.breadcrumb .divider { color: var(--text-muted) !important; }

/* ── COOKIE NOTICE ──────────────────────────────────────────── */
.cc-window.cc-floating {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius-lg) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--glow-soft), 0 10px 40px rgba(0,0,0,0.5) !important;
  font-family: var(--font-body) !important;
}

.cc-window.cc-floating .cc-highlight .cc-btn.cc-allow {
  background: var(--blue-bright) !important;
  color: #fff !important;
  border-radius: var(--radius) !important;
  border: none !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
}

/* ── DARK MODE TOGGLE (force dark always) ───────────────────── */
#darkmode { display: inline-block; }
.darkmode-toggle { opacity: 0; position: absolute; }
.darkmode-toggle:checked + .darkmode-toggle-label .darkmode-ball { transform: translateX(24px); }
.darkmode-toggle-label {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 50px; position: relative; padding: 5px;
  height: 26px; width: 50px; cursor: pointer;
}
.darkmode-ball {
  background: var(--blue-bright) !important;
  border-radius: 50%; position: absolute;
  top: 2px; left: 2px; height: 22px; width: 22px;
  transition: transform 0.2s linear;
  box-shadow: 0 0 8px rgba(51,85,255,0.6);
}

/* ── TOASTR NOTIFICATIONS ───────────────────────────────────── */
.toast-success { background: rgba(34,197,94,0.15) !important; border-left: 4px solid #4ade80 !important; }
.toast-error   { background: rgba(239,68,68,0.15) !important; border-left: 4px solid #f87171 !important; }
.toast-info    { background: rgba(51,85,255,0.15) !important; border-left: 4px solid var(--blue-glow) !important; }
.toast-warning { background: rgba(234,179,8,0.15) !important; border-left: 4px solid #facc15 !important; }

/* ── MISC FIXES ─────────────────────────────────────────────── */
select {
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  padding: 10px !important;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.tox-tinymce { min-height: 300px; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; }
.blockquote { border-left: 3px solid var(--blue-bright); margin: 1.5em 10px; padding: 0.5em 10px; background: var(--blue-dim); border-radius: 0 var(--radius) var(--radius) 0; }

.ui.comments { max-width: none; }
.ui.comments .comment .author { color: var(--blue-pale) !important; font-weight: 600; }
.ui.comments .comment .metadata { color: var(--text-muted) !important; }
.ui.comments .comment .text { color: var(--text-primary) !important; }

/* ── GRID & LAYOUT ──────────────────────────────────────────── */
.ui.grid + .grid { margin-top: 0.3rem; }
.ui.row + .row { padding-top: 0.3rem; }

@media (max-width: 768px) {
  .ui.masthead .ui.header { font-size: 2rem !important; }
  .ui.footer.segment { text-align: center; }
  .ui.secondary.menu .menu, .ui.secondary.menu .item { display: none; }
  .ui.secondary.menu .toc.item { display: block; }
}

/* ── SEARCH ─────────────────────────────────────────────────── */
.ui.search > .results {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--glow-soft) !important;
}

.ui.search > .results .result:hover {
  background: var(--blue-dim) !important;
}

.ui.search > .results .result .title {
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
}

/* ── HOVER GLOW ON FORUM ROWS ───────────────────────────────── */
#sticky-threads tbody tr,
#normal-threads tbody tr {
  transition: var(--transition) !important;
}

#sticky-threads tbody tr:hover,
#normal-threads tbody tr:hover {
  background: rgba(51, 85, 255, 0.05) !important;
}

/* ── ONLINE STATUS INDICATORS ───────────────────────────────── */
.user-online::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-left: 6px;
  box-shadow: 0 0 6px #4ade80;
}

/* ── ACCESSIBILITY ──────────────────────────────────────────── */
.screenreader-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── EMOJI ──────────────────────────────────────────────────── */
.joypixels, .twemoji { height: 1em; width: 1em; vertical-align: middle; }

/* ── REACTIONS ──────────────────────────────────────────────── */
#reactions {
  margin-top: 1rem;
  padding: .7em 1.2em;
  min-height: 32.5px;
  font-size: 12px;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.reaction-button { opacity: 50%; margin: 0 5px; cursor: pointer; transition: var(--transition); }
.reaction-button:hover, .reaction-button-selected { opacity: 100%; }
.reaction-button-selected { filter: drop-shadow(0 0 4px var(--blue-glow)); }

/* ── SPOILER ────────────────────────────────────────────────── */
.spoiler {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: transparent !important;
  cursor: pointer;
  transition: var(--transition);
}
.spoiler:hover { color: var(--text-primary) !important; }
.spoiler-toggle { color: var(--blue-pale) !important; font-size: 0.8rem; font-family: var(--font-mono); }

/* ── LOADING PULSE ──────────────────────────────────────────── */
@keyframes pulse-blue {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── UPDATE MESSAGE ─────────────────────────────────────────── */
#update-message {
  margin-bottom: 1rem;
  background: rgba(51,85,255,0.1) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: var(--radius) !important;
}

/* ── 404 / ERROR PAGES ──────────────────────────────────────── */
#error-403 .ui.segment,
#error-404 .ui.segment {
  position: absolute;
  transform: translate(-50%, -70%);
  top: 50%; left: 50%;
  width: 500px;
  text-align: center;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-bright) !important;
  box-shadow: var(--glow-mid) !important;
}

/* ── MAINTENANCE ────────────────────────────────────────────── */
#maintenance .ui.segment {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-bright) !important;
  box-shadow: var(--glow-mid) !important;
  text-align: center;
}

/* ── MEMBER LIST ────────────────────────────────────────────── */
#new-members-grid { padding: 0.5em; }
#new-members-grid .column { padding: 0.5em; }
.ui.search > .results .result .image { border-radius: 0; }

/* ── FINAL GLOW POLISH ──────────────────────────────────────── */
.ui.secondary.menu .item.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--blue-glow);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--blue-glow);
}

/* ── WIDGET CARDS FIX ───────────────────────────────────────── */
.ui.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
  color: var(--text-primary) !important;
}

.ui.card > .content {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

.ui.card > .content > .header {
  color: var(--blue-glow) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

.ui.card > .content > .description {
  color: var(--text-secondary) !important;
}

.ui.card .content.header {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-bright) !important;
}

/* Hide IE warning */
#ie-message { display: none !important; }

/* ── MODERATION TOOLBAR FIX ─────────────────────────────────── */
#topic-post,
#topic-reply {
  position: relative;
  z-index: 1;
}

#post-content {
  position: relative;
  z-index: 1;
}

.ui.top.right.pointing.dropdown .menu.transition.visible {
  z-index: 99999 !important;
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
}
/* ── MODERATION DROPDOWN FINAL FIX ─────────────────────────── */
.ui.secondary.segment,
.ui.top.attached.segment {
  overflow: visible !important;
}

body > .pusher > #wrapper {
  position: relative;
  z-index: 2;
}

.ui.top.right.pointing.dropdown {
  position: relative;
  z-index: 100000 !important;
}

.ui.top.right.pointing.dropdown .menu.transition.visible {
  z-index: 100001 !important;
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
}
