/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
/* ═══════════════════════════════════════════════════════════════
   NEXIO DESIGN SYSTEM v2 — Dark & Premium
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Backgrounds ──────────────────────────────────────────── */
  --bg-deep:       #090a0b;
  --bg-rail:       #0d0e10;
  --bg-primary:    #111214;
  --bg-secondary:  #161719;
  --bg-tertiary:   #1a1b1e;
  --bg-elevated:   #202224;
  --bg-surface:    #161719;
  --bg-surface-alt:#1a1b1e;
  --bg-float:      #111214;
  --bg-input:      #252729;
  --bg-hover:      rgba(255,255,255,0.045);
  --bg-active:     rgba(245,166,35,0.09);
  --bg-active-str: rgba(245,166,35,0.14);

  /* ── Amber Accent ─────────────────────────────────────────── */
  --accent:        #f5a623;
  --accent-hover:  #f0a020;
  --accent-dim:    rgba(245,166,35,0.1);
  --accent-dim2:   rgba(245,166,35,0.16);
  --accent-border: rgba(245,166,35,0.28);
  --accent-glow:   0 0 24px rgba(245,166,35,0.2);

  /* ── Status ───────────────────────────────────────────────── */
  --green:         #3ba55d;
  --green-dim:     rgba(59,165,93,0.12);
  --red:           #ed4245;
  --red-dim:       rgba(237,66,69,0.1);
  --yellow:        #faa81a;
  --blue:          #5865f2;
  --blue-dim:      rgba(88,101,242,0.12);

  /* ── Text ─────────────────────────────────────────────────── */
  --text-primary:  #e6e8ec;
  --text-secondary:#9499a5;
  --text-muted:    #525660;
  --text-link:     #f5a623;

  /* ── Borders ──────────────────────────────────────────────── */
  --border:        rgba(255,255,255,0.055);
  --border-strong: rgba(255,255,255,0.09);
  --border-accent: rgba(245,166,35,0.28);

  /* ── Radius ───────────────────────────────────────────────── */
  --r-xs:   3px;
  --r-sm:   5px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  20px;
  --r-full: 9999px;

  /* ── Shadows ──────────────────────────────────────────────── */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.45);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.55);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.65);
  --shadow-xl: 0 16px 60px rgba(0,0,0,0.75);

  /* ── Transitions ──────────────────────────────────────────── */
  --t-fast: 100ms ease;
  --t-mid:  160ms ease;
  --t-slow: 260ms ease;
}

/* ═══════════════════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════
   WORKSPACE MOCK
   ═══════════════════════════════════════════════════════════════ */
.nexio-workspace {
  min-height: 100%;
  overflow: hidden;
  color: #e4e4e7;
  font-family: var(--font-display, var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif));
  background-color: #050507;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(139, 92, 246, 0.1), transparent 30%),
    radial-gradient(circle at 90% 100%, rgba(236, 72, 153, 0.08), transparent 30%);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.nexio-workspace .no-drag {
  -webkit-app-region: no-drag;
}

.nexio-workspace .titlebar {
  -webkit-app-region: drag;
}

.nexio-workspace .glass-panel {
  background: rgba(20, 20, 23, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nexio-workspace ::-webkit-scrollbar { width: 5px; }
.nexio-workspace ::-webkit-scrollbar-track { background: transparent; }
.nexio-workspace ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

@keyframes nx-pop-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes nx-fade-out {
  to { opacity: 0; transform: scale(0.95); }
}

@keyframes nx-pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes nx-live-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.18);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.04);
    box-shadow: 0 0 0 8px rgba(237, 66, 69, 0.05);
  }
}

.nexio-workspace .animate-pop-in {
  animation: nx-pop-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nexio-workspace .animate-fade-out {
  animation: nx-fade-out 0.2s ease forwards;
  pointer-events: none;
}

.nexio-workspace .pulse-soft {
  animation: nx-pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.nexio-workspace .sidebar-left,
.nexio-workspace .sidebar-right {
  position: relative;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexio-workspace .sidebar-left { width: 16rem; }
.nexio-workspace .sidebar-right { width: 14rem; }

.nexio-workspace .sidebar-left.collapsed {
  width: 0;
  margin-right: -1rem;
}

.nexio-workspace .sidebar-right.collapsed {
  width: 0;
  margin-left: -1rem;
}

.nexio-workspace .sidebar-content {
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexio-workspace .sidebar-left.collapsed .sidebar-content {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}

.nexio-workspace .sidebar-right.collapsed .sidebar-content {
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
}

.nexio-workspace .toggle-arrow {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexio-workspace .sidebar-left.collapsed .toggle-arrow,
.nexio-workspace .sidebar-right.collapsed .toggle-arrow {
  transform: rotate(180deg);
}

.nexio-workspace .chevron-rotate {
  transition: transform 0.3s ease;
}

.nexio-workspace .menu-open {
  transform: rotate(180deg);
}

.nexio-workspace .pane-container {
  flex: 1 1;
  min-width: 300px;
  transition: all 0.3s ease;
}

.nexio-workspace input {
  -webkit-user-select: text;
     -moz-user-select: text;
          user-select: text;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */
input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
input::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ═══════════════════════════════════════════════════════════════
   SERVER RAIL
   ═══════════════════════════════════════════════════════════════ */
.nx-server-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer; flex-shrink: 0; overflow: hidden;
  transition: border-radius var(--t-mid), border-color var(--t-mid),
              background var(--t-mid), color var(--t-mid), box-shadow var(--t-mid);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.nx-server-icon:hover {
  border-radius: 14px;
  border-color: var(--accent-border);
  color: var(--accent);
}
.nx-server-icon.active {
  border-radius: 14px;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.nx-server-icon.home-icon { background: var(--bg-secondary); }
.nx-server-icon.home-icon.active { background: var(--accent-dim); }
.nx-server-icon.add-icon {
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--text-muted);
  font-size: 22px; font-weight: 300;
  margin-top: auto;
}
.nx-server-icon.add-icon:hover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.nx-rail-divider {
  width: 26px; height: 1px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--r-full);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.sidebar-header {
  padding: 0 16px;
  height: 52px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.2px;
  gap: 6px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.sidebar-header-gear {
  margin-left: auto;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 15px; padding: 4px 6px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
  opacity: 0;
}
.sidebar-header:hover .sidebar-header-gear { opacity: 1; }
.sidebar-header-gear:hover { color: var(--text-primary); background: var(--bg-hover); }

.sidebar-category {
  padding: 16px 16px 4px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: space-between;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  transition: color var(--t-fast);
}
.sidebar-category:hover { color: var(--text-secondary); }
.sidebar-add-btn {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: 15px; font-weight: 400;
  cursor: pointer; color: inherit;
  transition: color var(--t-fast), background var(--t-fast);
  line-height: 1;
}
.sidebar-add-btn:hover {
  color: var(--text-primary); background: var(--bg-hover);
}

/* ═══════════════════════════════════════════════════════════════
   CHANNEL ITEMS
   ═══════════════════════════════════════════════════════════════ */
.ch-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 12px;
  margin: 1px 6px;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative; -webkit-user-select: none; -moz-user-select: none; user-select: none;
}
.ch-item:hover { background: var(--bg-hover); color: var(--text-secondary); }
.ch-item.active { background: var(--bg-active); color: var(--text-primary); }
.ch-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 55%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.ch-item.dnd-over { background: var(--accent-dim); border-top: 2px solid var(--accent); color: var(--accent); }
.ch-type-icon {
  font-size: 15px; line-height: 1;
  color: inherit; flex-shrink: 0;
  transition: color var(--t-fast);
}
.ch-unread-badge {
  background: var(--red);
  color: #fff; border-radius: var(--r-full);
  font-size: 10px; font-weight: 700;
  padding: 1px 5px; line-height: 1.4;
  flex-shrink: 0;
}
.ch-count-badge {
  font-size: 10px; color: var(--text-muted);
  font-weight: 600; flex-shrink: 0;
}
.ch-live-badge {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(59,165,93,0.25);
  border-radius: var(--r-xs);
  font-size: 9px; font-weight: 800;
  padding: 1px 4px; letter-spacing: .5px;
  flex-shrink: 0;
}

/* Voice peer row inside sidebar */
.voice-peer-row {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 10px 3px 30px;
  color: var(--text-muted); font-size: 12px;
}
.voice-peer-avatar {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.voice-peer-name {
  flex: 1 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.voice-peer-badge-live {
  font-size: 9px;
  background: rgba(237,66,69,.18); color: var(--red);
  border-radius: var(--r-xs); padding: 0 3px;
  font-weight: 700; flex-shrink: 0;
}

/* ── Voice Peer Wrap ─────────────────────────────────────────── */
.voice-peer-wrap {
  position: relative;
}

/* ── Stream-Thumbnail Hover-Overlay ──────────────────────────── */
.stream-watch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background 200ms ease;
  border-radius: 6px;
}
.stream-watch-overlay:hover {
  background: rgba(0,0,0,0.55);
}
.stream-watch-btn {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms ease;
  background: #23a55a;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: none;
}
.stream-watch-overlay:hover .stream-watch-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════
   USER PANEL (bottom of sidebar)
   ═══════════════════════════════════════════════════════════════ */
.user-panel {
  padding: 8px 10px;
  background: var(--bg-rail);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.user-panel-name {
  font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-panel-sub {
  font-size: 11px; color: var(--text-muted);
}
.user-panel-btn {
  background: none; border: none;
  padding: 6px; border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 16px;
  cursor: pointer; flex-shrink: 0;
  transition: color var(--t-fast), background var(--t-fast);
  display: flex; align-items: center; justify-content: center;
}
.user-panel-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.user-panel-btn.danger:hover { color: var(--red); background: var(--red-dim); }

/* ═══════════════════════════════════════════════════════════════
   VOICE CONTROLS (above user panel)
   ═══════════════════════════════════════════════════════════════ */
.voice-controls {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.voice-controls-label {
  font-size: 11px; color: var(--green); font-weight: 600;
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 5px;
}
.voice-controls-label .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2.4s ease infinite;
}
.voice-ctrl-row { display: flex; gap: 5px; }
.voice-ctrl-btn {
  flex: 1 1; padding: 7px 4px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  display: flex; align-items: center; justify-content: center;
}
.voice-ctrl-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-ctrl-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }
.voice-ctrl-btn.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }
.voice-ctrl-btn.leave {
  background: var(--red-dim); border-color: rgba(237,66,69,0.22);
  color: var(--red);
}
.voice-ctrl-btn.leave:hover { background: var(--red); color: #fff; box-shadow: 0 0 12px rgba(237,66,69,0.3); }

/* ═══════════════════════════════════════════════════════════════
   CHANNEL TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.channel-header {
  height: 52px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; gap: 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 var(--border);
}
.channel-header-hash {
  color: var(--text-muted); font-size: 20px; font-weight: 600;
  line-height: 1; flex-shrink: 0;
}
.channel-header-name {
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.channel-header-divider {
  width: 1px; height: 20px;
  background: var(--border-strong);
  flex-shrink: 0;
}
.channel-header-topic {
  font-size: 13px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   CHAT AREA
   ═══════════════════════════════════════════════════════════════ */
.msg-row {
  display: flex; gap: 14px;
  padding: 2px 20px;
  transition: background var(--t-fast);
  position: relative;
}
.msg-row:hover { background: rgba(0,0,0,0.12); }
.msg-row.grouped { padding-left: 72px; }
.msg-row:hover .msg-actions { opacity: 1; }

.msg-actions {
  position: absolute; right: 14px; top: 2px;
  display: flex; gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2px 4px;
  opacity: 0;
  transition: opacity var(--t-fast);
  z-index: 10;
}
.msg-action-btn {
  background: none; border: none; padding: 3px 5px;
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.msg-action-btn:hover { color: var(--text-primary); background: var(--bg-hover); }

.msg-username { font-weight: 600; font-size: 14px; }
.msg-timestamp { font-size: 11px; color: var(--text-muted); }
.msg-content { font-size: 14px; line-height: 1.55; word-break: break-word; }
.msg-content code {
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(0,0,0,0.35);
  padding: 1px 5px; border-radius: 3px;
  color: var(--accent);
}

.date-divider {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 8px;
  color: var(--text-muted); font-size: 11px; font-weight: 600;
  letter-spacing: .5px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.date-divider-line {
  flex: 1 1; height: 1px; background: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   CHAT INPUT
   ═══════════════════════════════════════════════════════════════ */
.chat-input-wrap { padding: 0 16px 16px; flex-shrink: 0; }
.chat-input-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  display: flex; align-items: center;
  gap: 6px; padding: 0 8px 0 16px;
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.chat-input-bar:focus-within {
  border-color: rgba(245,166,35,0.35);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.07);
}
.chat-input-bar input {
  flex: 1 1; background: transparent; border: none;
  padding: 12px 0; font-size: 14px; outline: none;
  box-shadow: none !important;
  color: var(--text-primary);
}
.chat-send-btn {
  background: transparent; border: none;
  border-radius: var(--r-md); padding: 7px 10px;
  color: var(--text-muted); font-size: 16px;
  transition: background var(--t-fast), color var(--t-fast);
}
.chat-send-btn.has-text { background: var(--accent); color: #fff; }
.chat-send-btn.has-text:hover { background: var(--accent-hover); }

/* Reaction buttons */
.reaction-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 8px;
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.reaction-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.reaction-btn.mine { background: var(--accent-dim); border-color: var(--accent-border); }
.reaction-btn.mine:hover { background: var(--accent-dim2); }
.reaction-count { font-size: 12px; color: var(--text-muted); }
.reaction-add-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 8px;
  font-size: 13px; cursor: pointer; color: var(--text-muted);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.reaction-add-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }

/* Emoji Picker */
.emoji-picker {
  position: absolute; z-index: 100;
  background: var(--bg-rail);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 8px;
  display: flex; gap: 4px; flex-wrap: wrap;
  max-width: 228px;
  box-shadow: var(--shadow-md);
  animation: slideUp 120ms ease;
}
.emoji-btn {
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  border-radius: var(--r-sm); padding: 4px 6px;
  transition: background var(--t-fast);
  line-height: 1;
}
.emoji-btn:hover { background: var(--bg-elevated); }

/* ═══════════════════════════════════════════════════════════════
   VOICE CHANNEL VIEW
   ═══════════════════════════════════════════════════════════════ */
.voice-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  min-width: 90px;
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.voice-card.speaking { border-color: var(--accent); box-shadow: var(--accent-glow); }
.voice-card.muted { border-color: rgba(237,66,69,0.35); }
.voice-card.has-video { border-color: rgba(88,101,242,0.45); }

.voice-stream-area {
  flex: 1 1; background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; min-height: 0;
}
.voice-empty-state {
  text-align: center; color: var(--text-muted); padding: 40px;
}
.voice-empty-icon { font-size: 52px; opacity: .18; margin-bottom: 12px; }
.voice-bar {
  padding: 14px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════════════════ */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-status {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-rail);
}

/* ═══════════════════════════════════════════════════════════════
   MODALS & OVERLAYS
   ═══════════════════════════════════════════════════════════════ */
.nx-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 150ms ease;
}
.nx-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 28px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.03);
  animation: slideUp 160ms ease;
}
.nx-modal-wide { max-width: 520px; }
.nx-modal-title {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.3px; margin-bottom: 4px;
}
.nx-modal-sub {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 22px; line-height: 1.55;
}
.nx-modal-footer {
  display: flex; gap: 8px; margin-top: 4px;
}
.nx-modal-footer .nx-btn { flex: 2 1; padding: 10px; }
.nx-modal-footer .nx-btn-ghost { flex: 1 1; }
.nx-form-label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-muted); margin-bottom: 6px;
}

/* Tabs inside modal */
.nx-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.nx-tab {
  flex: 1 1; padding: 8px 12px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.nx-tab:hover { background: var(--bg-hover); color: var(--text-secondary); }
.nx-tab.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════════════════════ */
.ctx-menu {
  position: fixed; z-index: 9999;
  background: var(--bg-rail);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 4px; min-width: 180px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 100ms ease;
}
.ctx-item {
  padding: 7px 12px; border-radius: var(--r-md);
  cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  transition: background var(--t-fast), color var(--t-fast);
}
.ctx-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.ctx-danger:hover { background: rgba(237,66,69,.12); color: var(--red); }
.ctx-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.nx-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 20px;
  border: none; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; color: #000;
  background: var(--accent);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.nx-btn:hover { background: var(--accent-hover); box-shadow: var(--accent-glow); }
.nx-btn:active { transform: scale(0.98); }
.nx-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.nx-btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 20px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.nx-btn-ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-primary); }

.nx-btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(237,66,69,0.22);
  border-radius: var(--r-md);
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.nx-btn-danger:hover { background: var(--red); color: #fff; box-shadow: 0 0 16px rgba(237,66,69,.25); }

.nx-icon-btn {
  background: none; border: none;
  padding: 6px; border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--t-fast), background var(--t-fast);
}
.nx-icon-btn:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ═══════════════════════════════════════════════════════════════
   LABELS & BADGES
   ═══════════════════════════════════════════════════════════════ */
.nx-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 6px;
}
.nx-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.nx-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   FRIENDS VIEW
   ═══════════════════════════════════════════════════════════════ */
.friends-tab-bar {
  display: flex; gap: 4px;
}
.friends-tab {
  padding: 5px 14px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: none; border: 1px solid transparent;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.friends-tab:hover { background: var(--bg-hover); color: var(--text-secondary); }
.friends-tab.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

/* Friend / DM row */
.friend-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer;
  border-radius: var(--r-md); margin: 1px 8px;
  transition: background var(--t-fast);
}
.friend-row:hover { background: var(--bg-hover); }
.friend-row-name { font-size: 14px; font-weight: 600; }
.friend-row-sub { font-size: 12px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════ */
.nx-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center;
  color: var(--text-muted); -webkit-user-select: none; -moz-user-select: none; user-select: none;
}
.nx-empty-icon { font-size: 52px; opacity: .18; margin-bottom: 14px; line-height: 1; }
.nx-empty-title { font-size: 18px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.nx-empty-sub { font-size: 13px; line-height: 1.6; max-width: 280px; }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-fade-in { animation: fadeIn 180ms ease forwards; }
.animate-slide-up { animation: slideUp 180ms ease forwards; }
.animate-pulse { animation: pulse 2.4s ease infinite; }
.animate-spin { animation: spin 0.8s linear infinite; }

/* ═══════════════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════════════ */
.nx-divider { height: 1px; background: var(--border); margin: 8px 0; }
.nx-error-text { font-size: 13px; color: var(--red); }
.nx-success-text { font-size: 13px; color: var(--green); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════
   MODAL UTILITIES
   ═══════════════════════════════════════════════════════════════ */

/* (nx-btn-ghost defined above; nx-modal-sub and nx-modal-footer defined in modal section) */

/* Scrollable list inside a modal */
.nx-modal-list {
  max-height: 340px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}

/* Member / role card row */
.nx-list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast);
}
.nx-list-row:hover { border-color: var(--border-strong); }

/* Delete icon button (danger variant) */
.nx-icon-btn.danger:hover { color: var(--red); background: var(--red-dim); }

/* Checkbox option row */
.nx-check-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-md); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.nx-check-row:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.nx-check-row input[type="checkbox"] { cursor: pointer; accent-color: var(--accent); }
.nx-check-row-label { flex: 1 1; font-size: 13px; font-weight: 500; }
.nx-check-row-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Quality / radio-style option button */
.nx-quality-option {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--bg-elevated); border: 1px solid var(--border);
  cursor: pointer; text-align: left;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.nx-quality-option.selected {
  background: var(--accent-dim); border-color: var(--accent-border);
}
.nx-quality-option-radio {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border-strong); background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.nx-quality-option.selected .nx-quality-option-radio {
  border-color: var(--accent); background: var(--accent);
}
.nx-quality-option-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #000;
}
.nx-quality-option-label {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  transition: color var(--t-fast);
}
.nx-quality-option.selected .nx-quality-option-label { color: var(--accent); }
.nx-quality-option-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Info / hint box */
.nx-hint-box {
  background: rgba(245,166,35,.08); border: 1px solid rgba(245,166,35,.2);
  border-radius: var(--r-md); padding: 10px 12px;
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 8px; line-height: 1.5;
}
.nx-hint-box strong { color: var(--text-primary); }

/* Small action button inside a list row */
.nx-row-btn {
  background: none; border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 4px 10px;
  font-size: 12px; cursor: pointer; color: var(--text-muted);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.nx-row-btn:hover { border-color: var(--border-strong); color: var(--text-primary); background: var(--bg-hover); }
.nx-row-btn.danger { border-color: var(--red-dim); color: var(--red); }
.nx-row-btn.danger:hover { background: var(--red-dim); border-color: var(--red); }

/* Stream play overlay button */
.nx-play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(245,166,35,0.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(245,166,35,0.4);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.nx-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(245,166,35,0.55);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE LAYOUT (≤ 768px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Gesamtlayout: Stack statt Flex-Row */
  body { overflow: hidden; }

  /* Rail (Server-Icons) — horizontal oben */
  .nx-rail-mobile {
    position: fixed; bottom: 0; left: 0; right: 0; height: 56px;
    background: var(--bg-rail); border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 1000; padding: 0 8px;
  }

  /* Sidebar — fullscreen slide-in */
  .nx-sidebar-mobile-open {
    position: fixed; inset: 0; bottom: 56px; z-index: 800;
    transform: translateX(0);
    transition: transform 0.2s ease;
  }
  .nx-sidebar-mobile-closed {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  /* Chat-Bereich bekommt Padding für mobile Rail */
  .nx-chat-area-mobile {
    padding-bottom: 56px;
  }

  /* Server-Icons in der Rail mobil kleiner */
  .nx-server-icon {
    width: 36px; height: 36px; font-size: 13px;
  }

  /* Channel-Sidebar kleiner */
  .nx-sidebar-width { width: 100% !important; }

  /* Nachrichteninput anpassen */
  .nx-input-bar { margin-bottom: 0; }

  /* Member-Liste auf Mobile ausblenden */
  .nx-members-panel { display: none; }

  /* Voice-Controls auf Mobile */
  .nx-voice-controls-mobile {
    position: fixed; bottom: 56px; left: 0; right: 0;
    background: var(--bg-secondary); border-top: 1px solid var(--border);
    padding: 6px 12px; display: flex; gap: 8px; align-items: center;
    z-index: 900;
  }

  /* Stream-Popup auf Mobile: full width */
  .stream-popup-mobile {
    left: 0 !important; right: 0 !important; width: auto !important;
    bottom: 60px; top: auto !important;
  }

  /* Modalfenster: full-screen auf Mobile */
  .nx-modal-content {
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; border-radius: 0 !important;
    margin: 0 !important;
  }

  /* Hamburger-Menü Button (oben links im Chat) */
  .nx-hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; cursor: pointer;
    color: var(--text-secondary); font-size: 20px;
    flex-shrink: 0;
  }
}

/* Desktop: Hamburger ausblenden */
@media (min-width: 769px) {
  .nx-hamburger { display: none; }
  .nx-rail-mobile { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE CUSTOMIZATION — Avatar Effects, Frames, Animations
   ═══════════════════════════════════════════════════════════════ */

/* ── Basis-Wrapper ────────────────────────────────────────────── */
.nx-profile-avatar-wrap {
  position: relative;
  display: inline-flex;
  border-radius: 50%;
  overflow: visible;
  flex-shrink: 0;
}
.nx-profile-avatar-wrap img,
.nx-profile-avatar-wrap > div:first-child {
  border-radius: inherit;
  width: 100%; height: 100%;
  display: block;
  position: relative;
  z-index: 1;
}

/* ── Avatar Frames ────────────────────────────────────────────── */
.nx-avatar-frame-circle  { border-radius: 50%; }
.nx-avatar-frame-hexagon { border-radius: 30% / 50%; -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }
.nx-avatar-frame-star    { -webkit-clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border-radius: 4px; }
.nx-avatar-frame-diamond { -webkit-clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); border-radius: 4px; }

/* ── Glow ─────────────────────────────────────────────────────── */
.nx-avatar-effect-glow::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: transparent;
  box-shadow: 0 0 12px 4px rgba(88, 101, 242, 0.8), 0 0 28px 8px rgba(88, 101, 242, 0.4);
  z-index: 0;
  pointer-events: none;
  animation: nx-glow-pulse 2s ease-in-out infinite;
}
@keyframes nx-glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* ── Rainbow ──────────────────────────────────────────────────── */
.nx-avatar-effect-rainbow::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: conic-gradient(
    #ff0000, #ff7700, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
  );
  z-index: 0;
  pointer-events: none;
  animation: nx-rainbow-spin 3s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), white calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), white calc(100% - 4px));
}
@keyframes nx-rainbow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Pulse ────────────────────────────────────────────────────── */
.nx-avatar-effect-pulse::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 3px solid rgba(88, 101, 242, 0.9);
  z-index: 0;
  pointer-events: none;
  animation: nx-pulse-ring 1.5s ease-out infinite;
}
@keyframes nx-pulse-ring {
  0%   { transform: scale(1);    opacity: 1; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* ── Sparkle ──────────────────────────────────────────────────── */
.nx-avatar-effect-sparkle {
  animation: nx-sparkle-rotate 4s linear infinite;
}
.nx-avatar-effect-sparkle::before,
.nx-avatar-effect-sparkle::after {
  content: '✦';
  position: absolute;
  font-size: 10px;
  color: #fff;
  z-index: 2;
  pointer-events: none;
  animation: nx-sparkle-blink 1.2s ease-in-out infinite;
}
.nx-avatar-effect-sparkle::before {
  top: -6px; right: -4px;
  animation-delay: 0s;
}
.nx-avatar-effect-sparkle::after {
  bottom: -4px; left: -6px;
  animation-delay: 0.6s;
}
@keyframes nx-sparkle-blink {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%       { opacity: 1; transform: scale(1.2); }
}

/* ── Fire ─────────────────────────────────────────────────────── */
.nx-avatar-effect-fire::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg, #ff6b00, #ff3d00, #ff0000, #ff6b00, #ffb700, #ff6b00, #ff3d00, #ff0000
  );
  z-index: 0;
  pointer-events: none;
  filter: blur(3px);
  animation: nx-fire-flicker 0.6s ease-in-out infinite alternate, nx-rainbow-spin 4s linear infinite;
  opacity: 0.9;
}
@keyframes nx-fire-flicker {
  from { filter: blur(2px); opacity: 0.8; }
  to   { filter: blur(5px); opacity: 1;   }
}

/* ── Ice ──────────────────────────────────────────────────────── */
.nx-avatar-effect-ice::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: conic-gradient(#a8d8ea, #c9e8f5, #60b8d4, #a8d8ea);
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
  animation: nx-rainbow-spin 6s linear infinite;
  opacity: 0.85;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), white calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), white calc(100% - 5px));
}

/* ── Galaxy ───────────────────────────────────────────────────── */
.nx-avatar-effect-galaxy::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: conic-gradient(
    #a78bfa, #60a5fa, #f472b6, #a78bfa, #818cf8, #34d399, #a78bfa
  );
  z-index: 0;
  pointer-events: none;
  filter: blur(2px);
  animation: nx-rainbow-spin 5s linear infinite;
  opacity: 0.9;
}

/* Wichtig: img bleibt über den Pseudo-Elementen */
.nx-avatar-effect-glow     > :first-child,
.nx-avatar-effect-rainbow  > :first-child,
.nx-avatar-effect-pulse    > :first-child,
.nx-avatar-effect-sparkle  > :first-child,
.nx-avatar-effect-fire     > :first-child,
.nx-avatar-effect-ice      > :first-child,
.nx-avatar-effect-galaxy   > :first-child { position: relative; z-index: 1; }

/* ── Profile Card ─────────────────────────────────────────────── */
.nx-profile-card {
  width: 280px;
  background: #1e1f22;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
  font-family: var(--profile-font, 'Inter', sans-serif);
  position: relative;
}

/* ── Rainbow name animation ───────────────────────────────────── */
@keyframes nx-rainbow-shift {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

/* ═══════════════════════════════════════════════════════════════
   MESSAGE ACTIONS — Hover-Menü (Edit / Delete)
   ═══════════════════════════════════════════════════════════════ */

.nx-msg-actions {
  position: absolute;
  top: -4px;
  right: 12px;
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

.nx-msg-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 3px 5px;
  border-radius: var(--r-sm);
  opacity: 0.75;
  transition: opacity var(--t-fast), background var(--t-fast);
  line-height: 1;
}
.nx-msg-action-btn:hover        { opacity: 1; background: var(--bg-hover); }
.nx-msg-action-btn.danger:hover { background: var(--red-dim); }

/* ═══════════════════════════════════════════════════════════════
   TYPING INDICATOR
   ═══════════════════════════════════════════════════════════════ */

.nx-typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 2px;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 20px;
}

.nx-typing-dots {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.nx-typing-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: nx-typing-bounce 1.2s ease-in-out infinite;
}
.nx-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.nx-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes nx-typing-bounce {
  0%, 60%, 100% { transform: translateY(0);    opacity: 0.4; }
  30%           { transform: translateY(-4px);  opacity: 1;   }
}

