/* Backspace.me — Claude-Inspired Design System (2026) */
/* Clean, warm, modern — Inter typography, soft surfaces, amber accents */

:root {
  --bg-primary: #1A1A1A;
  --bg-secondary: #242424;
  --bg-panel: #1A1A1A;
  --bg-input: #2A2A2A;
  --bg-hover: rgba(245, 158, 11, 0.05);
  --bg-modal: #242424;
  --bg-glass: rgba(26, 26, 26, 0.88);
  --border: #2E2E2E;
  --border-light: #3A3A3A;
  --border-glow: rgba(245, 158, 11, 0.1);
  --text-primary: #ECECEC;
  --text-secondary: #A0A0A0;
  --text-dim: #666666;
  --accent: #F59E0B;
  --accent-dim: #D97706;
  --accent-soft: rgba(245, 158, 11, 0.10);
  --coral: #EF8354;
  --teal: #0D9488;
  --nick-self: #F59E0B;
  --nick-other: #93C5FD;
  --system: #7A7A7A;
  --error: #EF4444;
  --join: #10B981;
  --leave: #EF8354;
  --timestamp: #444444;
  --scrollbar: #1A1A1A;
  --scrollbar-thumb: #3A3A3A;
}

/* Day (Light) Theme — Claude Warm Off-White */
body.day {
  --bg-primary: #FAF9F7;
  --bg-secondary: #FFFFFF;
  --bg-panel: #F5F4F2;
  --bg-input: #FFFFFF;
  --bg-hover: rgba(245, 158, 11, 0.05);
  --bg-modal: #FFFFFF;
  --bg-glass: rgba(250, 249, 247, 0.90);
  --border: #E8E6E3;
  --border-light: #DAD8D4;
  --border-glow: rgba(217, 119, 6, 0.08);
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-dim: #9A9A9A;
  --accent: #D97706;
  --accent-dim: #B45309;
  --accent-soft: rgba(217, 119, 6, 0.08);
  --coral: #DC6B3E;
  --teal: #0D9488;
  --nick-self: #B45309;
  --nick-other: #2563EB;
  --system: #9A9A9A;
  --error: #DC2626;
  --join: #059669;
  --leave: #DC6B3E;
  --timestamp: #D4D4D4;
  --scrollbar: #F5F4F2;
  --scrollbar-thumb: #DAD8D4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: text;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ═══════════════════════════════════════════
   CONNECTION BAR — Clean Header
   ═══════════════════════════════════════════ */
#connection-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  z-index: 300;
  overflow: visible;
}

/* Logo */
#logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
#logo-arrow {
  display: block;
  width: 100%;
  height: 8px;
  color: var(--accent);
  opacity: 0.7;
  margin-top: -1px;
}
#logo-back {
  color: var(--text-primary);
}
#logo-space {
  color: var(--accent);
}
#logo-dot {
  color: var(--text-dim);
  font-weight: normal;
}
#logo-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
  font-weight: normal;
  width: 0;
  display: inline-block;
  overflow: visible;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s ease;
}
.dot.online { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.dot.offline { background: var(--error); box-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
.dot.connecting { background: var(--accent); box-shadow: 0 0 4px var(--accent); animation: pulse-dot 1.5s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Header Buttons (Login, Register, Theme) */
.header-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 6px;
  letter-spacing: 0.3px;
  text-transform: none;
  margin-left: 6px;
  transition: all 0.15s ease;
}
.login-btn {
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
}
.login-btn:hover {
  color: #93C5FD;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}
.register-btn.hidden { display: none; }
.register-btn {
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
}
.register-btn:hover {
  color: #6EE7B7;
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}

.login-btn.logged-in {
  color: var(--text-secondary);
  border-color: var(--border);
  background: transparent;
  opacity: 1;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  padding: 3px 8px;
  text-transform: none;
  letter-spacing: 0;
}
.login-btn.logged-in:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(var(--accent-rgb, 217, 170, 90), 0.08);
  box-shadow: none;
}

/* Day mode header buttons */
body.day .login-btn { color: #2563EB; border-color: rgba(37, 99, 235, 0.2); background: rgba(37, 99, 235, 0.05); }
body.day .login-btn:hover { color: #1D4ED8; border-color: rgba(37, 99, 235, 0.4); background: rgba(37, 99, 235, 0.1); }
body.day .login-btn.logged-in { color: var(--text-secondary); border-color: var(--border); background: transparent; }
body.day .login-btn.logged-in:hover { color: var(--accent); border-color: var(--accent-dim); background: rgba(0,0,0,0.03); }
body.day .register-btn { color: #059669; border-color: rgba(5, 150, 105, 0.2); background: rgba(5, 150, 105, 0.05); }
body.day .register-btn:hover { color: #047857; border-color: rgba(5, 150, 105, 0.4); background: rgba(5, 150, 105, 0.1); }

/* 3-Dot Header Menu */
.header-menu-wrap {
  position: relative;
  display: inline-flex;
  margin-left: 6px;
}
.menu-btn {
  font-size: 14px !important;
  padding: 1px 6px !important;
  letter-spacing: 0 !important;
  line-height: 1;
  color: var(--text-dim) !important;
  border-color: transparent !important;
  background: transparent !important;
}
.menu-btn:hover {
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
}
.header-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  z-index: 9999;
}
.header-menu.hidden { display: none; }
body.day .header-menu { background: #FFFFFF; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1); }

.header-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 450;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.header-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.menu-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}
.menu-logout-item { color: #F87171 !important; }
.menu-logout-item:hover { background: rgba(239, 68, 68, 0.08) !important; color: #FCA5A5 !important; }
body.day .menu-logout-item { color: #DC2626 !important; }
body.day .menu-logout-item:hover { background: rgba(220, 38, 38, 0.06) !important; }

/* Theme Toggle (hidden, replaced by menu) */
.theme-toggle {
  display: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 6px;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-soft);
}

#connection-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════ */
#main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   PANEL HEADERS — Sleek, minimal
   ═══════════════════════════════════════════ */
.panel-header {
  padding: 0 16px;
  height: 36px;
  box-sizing: border-box;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   PANEL HEADER — with collapse button
   ═══════════════════════════════════════════ */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-collapse-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
  font-family: inherit;
}
.panel-collapse-btn:hover { color: var(--accent); }

/* Expand button (visible when panel collapsed) */
.panel-expand-btn {
  position: relative;
  width: 20px;
  background: var(--bg-secondary);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.panel-expand-btn:hover { color: var(--accent); background: var(--bg-hover); }
.panel-expand-btn.hidden { display: none; }
.panel-expand-right {
  border-right: none;
  border-left: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   CHANNEL PANEL (Left) — Room List
   ═══════════════════════════════════════════ */
#channel-panel {
  width: 200px;
  min-width: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
  overflow: hidden;
}
#channel-panel.collapsed {
  width: 0;
  min-width: 0;
  border-right: none;
  opacity: 0;
  pointer-events: none;
}

#channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-item {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
  position: relative;
}
/* Fixed-width icons for aligned sidebar labels */
.channel-item > span:first-child,
.channel-item > .mint-icon,
.channel-item > .games-icon,
.channel-item > .music-icon {
  width: 16px; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-right: 0;
}
}
.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.channel-item.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 550;
}
/* Console tab special styling */
.channel-console {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 4px;
}
.channel-console .hash {
  font-size: 12px !important;
  opacity: 0.7 !important;
}
.channel-console.active {
  color: var(--teal) !important;
  background: rgba(13, 148, 136, 0.08) !important;
}
.channel-console.active .hash {
  color: var(--teal) !important;
}
body.day .channel-console.active {
  background: rgba(13, 148, 136, 0.05) !important;
}

/* Games tab in sidebar */
.channel-games {
  display: flex;
  align-items: center;
  gap: 7px;
}
.channel-games .games-icon {
  display: flex;
  align-items: center;
  opacity: 0.6;
}
.channel-games.active {
  color: #a78bfa !important;
  background: rgba(167, 139, 250, 0.08) !important;
}
.channel-games.active .games-icon {
  color: #a78bfa !important;
  opacity: 1;
}
.channel-games:hover .games-icon { opacity: 0.9; }
body.day .channel-games.active {
  background: rgba(167, 139, 250, 0.06) !important;
}

/* Games container */
.games-container {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}
.games-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.games-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(167, 139, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  flex-shrink: 0;
}
.games-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.games-header-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Game cards grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.game-card {
  position: relative;
  padding: 18px 14px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--game-color);
  opacity: 0;
  transition: opacity 0.2s;
}
.game-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--game-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.game-card:hover::before { opacity: 1; }
.game-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.game-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}
.game-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.game-card-desc {
  font-size: 10px;
  color: var(--text-dim);
}

/* Games footer */
.games-footer {
  text-align: center;
  padding: 16px 0 4px;
}
.games-footer-text {
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
  font-style: italic;
}

/* Game top bar (generic) */
.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.games-back-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.games-back-btn:hover {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.08);
}

/* Snake header */
.snake-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  margin-bottom: 6px;
  margin-right: 230px;
  gap: 12px;
}
.snake-back-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.snake-back-btn:hover {
  color: var(--teal, #10b981);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}
.snake-mute-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}
.snake-mute-btn:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}
.snake-boost-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  font-size: 11px;
  color: #38bdf8;
  animation: boostPulse 1.5s infinite ease-in-out;
}
.snake-boost-icon { font-size: 12px; }
.snake-boost-count { font-weight: 700; font-size: 12px; }
@keyframes boostPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(56, 189, 248, 0.2); }
  50% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
}
.snake-header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.snake-header-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.snake-header-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 14px;
  min-width: 70px;
  flex-shrink: 0;
}
.snake-score-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 2px;
}
.snake-score-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--teal, #10b981);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
  font-variant-numeric: tabular-nums;
}
.snake-controls-hint {
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 0 2px;
  letter-spacing: 1px;
  opacity: 0.6;
}

/* Day mode */
body.day .snake-header-title { text-shadow: none; }
body.day .snake-back-btn { background: rgba(255, 255, 255, 0.5); }
body.day .snake-back-btn:hover { background: rgba(16, 185, 129, 0.08); }
body.day .snake-header-score { background: rgba(255, 255, 255, 0.5); }
body.day .snake-score-num { color: #059669; text-shadow: none; }

/* Minesweeper */
.ms-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin: 10px auto;
}
.ms-row {
  display: flex;
  gap: 1px;
}
.ms-cell {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 3px;
  user-select: none;
}
.ms-hidden {
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.1s;
}
.ms-hidden:hover {
  background: rgba(255, 255, 255, 0.15);
}
.ms-revealed {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.ms-mine {
  background: rgba(239, 68, 68, 0.15) !important;
}

/* Tic Tac Toe */
.ttt-status {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 8px 0;
}
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  gap: 4px;
  justify-content: center;
  margin: 10px auto;
}
.ttt-cell {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.ttt-cell:hover {
  background: rgba(255, 255, 255, 0.08);
}
.ttt-x { color: #38bdf8; }
.ttt-o { color: #ef4444; }

/* Snake game full layout */
.snake-game-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px 12px;
  overflow: hidden;
}
.snake-game-container .game-topbar {
  flex-shrink: 0;
}
.snake-game-container .game-instructions {
  flex-shrink: 0;
  padding: 6px 0 2px;
}
.snake-play-area {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 4px 0;
  overflow: hidden;
}
#snake-canvas {
  display: block;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
}

/* === Arcade Leaderboard (Backspace.me theme) === */
.arcade-lb .music-now-playing-lottie,
.arcade-lb .game-now-playing-badge,
.arcade-lb .activity-swap-badge { display: none !important; }
.arcade-lb {
  width: 220px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0;
  overflow-y: auto;
  align-self: auto;
  position: relative;
}
.arcade-lb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px 10px 0 0;
}
.arcade-lb-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
}
.arcade-lb-live {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal, #10b981);
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.arcade-lb-list {
  display: flex; flex-direction: column;
  padding: 6px 8px;
  gap: 2px;
}
.arcade-lb-empty {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  padding: 20px 10px;
  line-height: 1.6;
}
.arcade-lb-empty span { font-size: 12px; color: var(--text-secondary); }

/* Row base */
.arcade-lb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  transition: transform 400ms cubic-bezier(0.2, 0, 0.2, 1), background 0.2s;
  will-change: transform;
  position: relative;
}
.arcade-lb-row:hover { background: rgba(255, 255, 255, 0.04); }

/* Rank number */
.arcade-lb-num {
  width: 18px; flex-shrink: 0;
  font-size: 11px; font-weight: 600; text-align: center;
  color: var(--text-dim);
}

/* Medal for top 3 */
.arcade-lb-medal {
  width: 20px; flex-shrink: 0;
  font-size: 14px; text-align: center;
}
.arcade-lb-medal.gold { color: #fbbf24; animation: crown-bob 1.5s ease-in-out infinite; filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4)); }
.arcade-lb-medal.silver { color: #94a3b8; }
.arcade-lb-medal.bronze { color: #d97706; }
@keyframes crown-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Nick */
.arcade-lb-nick {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500; font-size: 12px;
}

/* Score */
.arcade-lb-score {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 24px;
}

/* YOU tag */
.arcade-lb-you-tag {
  font-size: 8px; font-weight: 700;
  background: var(--teal, #10b981);
  color: #000;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  font-weight: 700;
}

/* Gold row (#1) */
.arcade-lb-row.gold {
  background: rgba(251, 191, 36, 0.06);
  padding: 8px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.06);
}
.arcade-lb-row.gold .arcade-lb-nick { color: #fbbf24; font-weight: 700; }
.arcade-lb-row.gold .arcade-lb-score { color: #fbbf24; text-shadow: 0 0 6px rgba(251, 191, 36, 0.4); }

/* Silver row (#2) */
.arcade-lb-row.silver {
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.arcade-lb-row.silver .arcade-lb-nick { color: var(--text-primary); }

/* Bronze row (#3) */
.arcade-lb-row.bronze {
  background: rgba(217, 119, 6, 0.04);
  border: 1px solid rgba(217, 119, 6, 0.08);
}
.arcade-lb-row.bronze .arcade-lb-nick { color: #d97706; }

/* YOUR row highlight */
.arcade-lb-row.you {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.06);
}
.arcade-lb-row.you .arcade-lb-nick { color: var(--teal, #10b981); }

/* Friend highlight on leaderboard */
.arcade-lb-row.friend {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
}
.arcade-lb-row.friend .arcade-lb-nick { color: var(--accent); }
.arcade-lb-friend-tag {
  font-size: 8px; font-weight: 700; letter-spacing: 0.5px;
  background: var(--accent); color: #1A1A1A;
  padding: 1px 4px; border-radius: 3px; margin-left: 4px;
  vertical-align: middle;
}
body.day .arcade-lb-row.friend { background: rgba(245, 158, 11, 0.04); border-color: rgba(245, 158, 11, 0.12); }
body.day .arcade-lb-friend-tag { background: #D97706; color: #fff; }

/* Pinned YOU row */
/* Paused player on leaderboard */
.arcade-lb-row.paused { opacity: 0.5; }
.arcade-lb-row.paused .arcade-lb-nick { opacity: 0.6; }
.arcade-lb-row.paused .arcade-lb-score { opacity: 0.4; }
.arcade-lb-paused-tag {
  font-size: 7px; font-weight: 700; font-style: normal;
  letter-spacing: 0.5px; text-transform: uppercase;
  background: rgba(255,255,255,0.08); color: var(--text-dim);
  padding: 1px 4px; border-radius: 3px; margin-left: 4px;
  vertical-align: middle;
}

.arcade-lb-row.pinned {
  border-top: 1px dashed var(--border);
  margin-top: 4px;
  padding-top: 8px;
}

/* Rank-up bounce animation */
.arcade-lb-row.rank-up {
  animation: bounce-pop 500ms ease-out;
}
@keyframes bounce-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.08); }
  50% { transform: scale(0.97); }
  70% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Score gap / proximity bar */
.arcade-lb-gap {
  font-family: 'VT323', monospace;
  font-size: 12px;
  color: #f87171;
  text-align: center;
  padding: 2px 8px;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

/* Pinned YOU section */
#snake-lb-you {
  padding: 4px 8px 8px;
  border-top: 1px solid var(--border);
}

/* Day mode overrides */
body.day .arcade-lb {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
body.day .arcade-lb-header { background: rgba(0, 0, 0, 0.03); }
body.day .arcade-lb-row { color: var(--text-secondary); }
body.day .arcade-lb-row:hover { background: rgba(0, 0, 0, 0.03); }
body.day .arcade-lb-score { color: #059669; text-shadow: none; }
body.day .arcade-lb-row.gold { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.2); }
body.day .arcade-lb-row.gold .arcade-lb-nick { color: #b45309; }
body.day .arcade-lb-row.gold .arcade-lb-score { color: #b45309; }
body.day .arcade-lb-row.you { background: rgba(5, 150, 105, 0.06); border-color: rgba(5, 150, 105, 0.15); }
body.day .arcade-lb-row.you .arcade-lb-nick { color: #059669; }
body.day .arcade-lb-you-tag { background: #059669; color: #fff; }

/* Day mode games */
body.day .game-card { background: rgba(255, 255, 255, 0.7); }
body.day .game-card:hover { background: rgba(255, 255, 255, 0.95); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
body.day .games-header-icon { background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(99, 102, 241, 0.1)); }
body.day .ms-hidden { background: rgba(0, 0, 0, 0.06); border-color: rgba(0, 0, 0, 0.08); }
body.day .ms-hidden:hover { background: rgba(0, 0, 0, 0.12); }
body.day .ms-revealed { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.03); }
body.day .ttt-cell { background: rgba(0, 0, 0, 0.03); }
body.day .ttt-cell:hover { background: rgba(0, 0, 0, 0.06); }
body.day .games-back-btn:hover { background: rgba(167, 139, 250, 0.06); }
body.day #snake-canvas { background: rgba(0, 0, 0, 0.05); }
body.day .snake-leaderboard { background: rgba(0, 0, 0, 0.02); }
body.day .snake-lb-row.gold { background: rgba(245, 158, 11, 0.06); }

/* Flappy Bird canvas */
#flappy-canvas {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #70c5ce;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.08);
  cursor: pointer;
}
body.day #flappy-canvas { background: #70c5ce; box-shadow: none; }

/* Mario game iframe */
.mario-game-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  overflow: hidden;
}
.mario-game-container .game-topbar {
  flex-shrink: 0;
}
.mario-frame-wrap {
  flex: 1;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  margin-top: 6px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.05);
}
.mario-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
body.day .mario-frame-wrap {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Channel section header (collapsible) */
.channel-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s;
  margin-top: 8px;
  user-select: none;
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  padding-bottom: 6px;
  margin-bottom: 2px;
}
.channel-section-header:hover { color: var(--accent); }
.friend-search-bar {
  padding: 4px 10px 6px;
}
.friend-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  box-sizing: border-box;
}
.friend-search-input:focus {
  border-color: var(--accent);
}
.friend-search-input::placeholder {
  color: var(--text-dim);
}
.friend-search-results {
  padding: 0 6px;
}
.friend-search-result {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-secondary);
  transition: background 0.15s;
}
.friend-search-result:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.friend-search-clear:hover {
  color: var(--text-primary) !important;
  background: rgba(255,255,255,0.15) !important;
}
.search-input-clear:hover {
  color: var(--text-primary) !important;
  background: rgba(255,255,255,0.15) !important;
}
.friend-search-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.friend-search-dot.online {
  background: #34D399;
}
.friend-search-dot.offline {
  background: var(--text-dim);
}
.friend-search-nick {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-search-badge {
  font-size: 9px;
  color: var(--accent);
}
.friend-search-tag {
  font-size: 8px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
}
.friend-search-empty {
  padding: 6px 8px;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
}
.section-arrow {
  font-size: 8px;
  opacity: 0.6;
  transition: transform 0.2s;
}
.section-label { flex: 1; }
.section-count {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  padding: 0 6px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  letter-spacing: -0.2px;
}

/* Room items under section */
.channel-room {
  padding-left: 20px !important;
}

/* Empty state */
.channel-empty {
  padding: 6px 20px;
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  opacity: 0.6;
}

/* Friends list items */
.channel-friend {
  padding-left: 20px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}
.channel-friend .friend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  max-width: 6px;
  max-height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 6px;
  vertical-align: middle;
}
.channel-friend .friend-dot.on {
  background: #34D399;
  box-shadow: 0 0 3px rgba(52, 211, 153, 0.5);
}
.channel-friend .friend-dot.off {
  background: var(--text-dim);
  opacity: 0.4;
}
.channel-friend .friend-dot.away {
  background: #fbbf24;
  box-shadow: 0 0 3px rgba(251, 191, 36, 0.5);
}
.channel-friend.online { color: var(--text-primary); }
.channel-friend.offline { color: var(--text-dim); opacity: 0.6; }
.channel-friend.online:hover { color: var(--teal); }
.channel-friend.blocked { color: var(--text-dim); opacity: 0.4; cursor: default; }
.channel-friend.blocked:hover { opacity: 0.55; }
.channel-friend .friend-dot.blocked {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  opacity: 0.5;
}
.friend-blocked-nick {
  text-decoration: line-through;
  opacity: 0.7;
}
.friend-category-header {
  padding-left: 22px !important;
  font-size: 9px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  opacity: 0.7;
  margin-top: 4px;
}

.channel-friend-empty {
  padding-left: 20px !important;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.4;
  cursor: default !important;
}
.channel-friend-empty:hover { background: transparent !important; }
.channel-friend-empty .friend-hint {
  font-style: italic;
  font-family: 'Inter', monospace;
}

/* Friend Requests sub-section */
/* Friend Requests Section */
.channel-subsection-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
  margin-top: 4px;
}
.channel-subsection-header .subsection-label { flex: 1; }
.channel-subsection-header .req-count {
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}

/* Friend request card */
.channel-friend-request {
  display: flex;
  align-items: center;
  padding: 6px 10px !important;
  gap: 8px;
  font-size: 11px;
  color: var(--text-primary);
  margin: 2px 6px;
  border-radius: 6px;
  background: rgba(245, 166, 35, 0.04);
  border: 1px solid rgba(245, 166, 35, 0.12);
  transition: background 0.15s, border-color 0.15s;
}
.channel-friend-request:hover {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.25);
}
.channel-friend-request .req-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  text-transform: uppercase;
}
.channel-friend-request .req-info {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.channel-friend-request .req-nick {
  font-weight: 600;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.channel-friend-request .req-preview {
  font-size: 9px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
  font-style: italic;
  opacity: 0.7;
}
.channel-friend-request .req-actions {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.channel-friend-request .req-accept-btn,
.channel-friend-request .req-decline-btn {
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.channel-friend-request .req-accept-btn {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.channel-friend-request .req-accept-btn:hover {
  background: rgba(16, 185, 129, 0.3);
  transform: scale(1.05);
}
.channel-friend-request .req-decline-btn {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.channel-friend-request .req-decline-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.05);
}

/* DM chat tabs under friends */
.channel-dm {
  padding-left: 32px !important;
  font-size: 11px !important;
  color: var(--accent) !important;
  opacity: 0.7;
}
.channel-dm .dm-arrow {
  color: var(--teal);
  margin-right: 4px;
  font-size: 10px;
}
.channel-dm:hover { opacity: 1; }
.channel-dm.active {
  color: var(--accent) !important;
  opacity: 1;
  background: var(--bg-active) !important;
}
.dm-unread, .unread-badge {
  background: var(--accent);
  color: #000;
  font-size: 8px;
  font-weight: 700;
  padding: 0 4px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 7px;
  margin-left: 6px;
  letter-spacing: -0.3px;
  box-shadow: 0 0 4px rgba(245, 166, 35, 0.3);
}
.channel-room.has-unread { font-weight: 700; }
.dm-close {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.15s;
}
.channel-dm:hover .dm-close { opacity: 0.6; }
.dm-close:hover {
  opacity: 1 !important;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* DM request notification */
.dm-request-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 8px 0;
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-primary);
}
.dm-req-icon { font-size: 18px; }
.dm-req-text { flex: 1; }
.dm-accept-btn, .dm-decline-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.dm-accept-btn {
  background: var(--teal);
  color: #fff;
}
.dm-accept-btn:hover { filter: brightness(1.15); }
.dm-decline-btn {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.dm-decline-btn:hover { color: var(--coral, #EF8354); border-color: var(--coral, #EF8354); }

/* Pending DM banner */
.pending-dm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin: 8px 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.pending-dm-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pending-dm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  animation: pendingPulse 1.5s ease-in-out infinite;
}
@keyframes pendingPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}
.pending-dm-cancel {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  transition: all 0.2s;
  flex-shrink: 0;
}
.pending-dm-cancel:hover {
  color: var(--coral, #EF8354);
  border-color: var(--coral, #EF8354);
  background: rgba(239, 131, 84, 0.08);
}

/* Day mode pending DM */
body.day .pending-dm-banner { background: rgba(56, 189, 248, 0.06); border-color: rgba(56, 189, 248, 0.12); }
body.day .pending-dm-cancel { background: var(--bg-panel); }

/* DM preview banner (accept/decline inside chat) */
.dm-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin: 8px 12px;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.15);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.dm-preview-banner-text {
  flex: 1;
}
.dm-preview-banner-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.dm-preview-accept {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  transition: all 0.15s;
}
.dm-preview-accept:hover {
  filter: brightness(1.15);
  transform: scale(1.02);
}
.dm-preview-decline {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  transition: all 0.15s;
}
.dm-preview-decline:hover {
  color: var(--coral, #EF8354);
  border-color: var(--coral, #EF8354);
  background: rgba(239, 131, 84, 0.08);
}

/* Request new dot / message count in sidebar */
.req-new-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pendingPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent-dim);
}
.req-msg-count {
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  flex-shrink: 0;
  min-width: 16px;
  text-align: center;
  line-height: 13px;
}

/* DM header with both names */
.dm-header-self {
  color: var(--nick-self);
  font-weight: 700;
}
.dm-header-peer {
  color: var(--nick-other);
  font-weight: 700;
}
.dm-header-arrow {
  color: var(--text-dim);
  font-size: 0.85em;
  margin: 0 2px;
  opacity: 0.6;
}

/* Day mode DM preview */
body.day .dm-preview-banner { background: rgba(217, 119, 6, 0.06); border-color: rgba(217, 119, 6, 0.12); }
body.day .dm-preview-accept { background: #059669; }
body.day .dm-preview-decline { background: var(--bg-panel); }

/* Browse rooms button (inside Rooms section) */
/* Browse & Create room actions */
.channel-room-actions {
  display: flex;
  gap: 2px;
  padding: 2px 4px;
}
.channel-browse,
.channel-join,
.channel-create {
  flex: 1;
  justify-content: center;
  padding: 4px 2px !important;
  gap: 3px !important;
  opacity: 0.85;
  font-size: 11px !important;
  font-weight: 700;
  text-align: center;
  min-width: 0;
  color: var(--text-secondary);
}
.channel-browse .hash,
.channel-join .hash,
.channel-create .hash {
  font-size: 11px !important;
  font-weight: 700;
  color: var(--accent) !important;
  opacity: 1 !important;
  min-width: auto !important;
  width: auto !important;
}
.channel-browse:hover,
.channel-join:hover,
.channel-create:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent);
}
.channel-browse.active {
  color: var(--accent) !important;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Node log messages in Console */
.msg.node-log {
  color: var(--teal);
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 11px;
  opacity: 0.8;
  padding: 1px 0;
  line-height: 1.4;
}
.msg.node-success {
  color: var(--teal);
  font-weight: 600;
}

.channel-item .hash {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 400;
  opacity: 0.5;
  transition: all 0.2s;
}
.channel-item:hover .hash { opacity: 0.8; color: var(--text-secondary); }
.channel-item.active .hash { color: var(--accent); opacity: 0.7; }
.channel-item .unread {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

/* Room Browser */
/* ═══════════════════════════════════════════
   CHANNEL LIST BROWSER (mIRC-style, in main chat area)
   ═══════════════════════════════════════════ */
.browser-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
}
.browser-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.browser-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.browser-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.browser-refresh-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.browser-refresh-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-soft);
}
.browser-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 8px;
}
.browser-empty-icon { font-size: 36px; opacity: 0.5; }
.browser-empty-text { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.browser-empty-hint { font-size: 12px; color: var(--text-dim); }

.browser-table-head {
  display: grid;
  grid-template-columns: 1fr 2fr 60px 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.browser-table-head .bt-users,
.browser-table-head .bt-status {
  text-align: center;
}
.browser-room-row {
  display: grid;
  grid-template-columns: 1fr 2fr 60px 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.03));
  transition: all 0.15s ease;
  cursor: pointer;
}
.browser-room-row:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.browser-room-row .br-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.browser-room-row .br-hash {
  color: var(--accent);
  margin-right: 2px;
  opacity: 0.7;
}
.browser-room-row .br-topic {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 12px;
}
.browser-room-row .br-users {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}
.browser-room-row .br-status {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.browser-room-row .br-open { color: var(--teal); }
.browser-room-row .br-locked { color: var(--coral, #EF8354); }
.browser-room-row.browser-room-joined {
  border-left: 2px solid var(--teal);
  background: rgba(16, 185, 129, 0.05);
}
.browser-room-row.browser-room-joined .br-name::after {
  content: ' joined';
  font-size: 9px;
  color: var(--teal);
  font-weight: 500;
  margin-left: 6px;
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Peer Footer — aligned with input bar (both use same height) */
#peer-footer, #input-bar {
  height: 56px;
  box-sizing: border-box;
}
#peer-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-primary);
  flex-shrink: 0;
}
#peer-footer .dot { width: 6px; height: 6px; flex-shrink: 0; }

#connection-status {
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
}

/* ═══════════════════════════════════════════
   CHAT PANEL (Center)
   ═══════════════════════════════════════════ */
#chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  background: var(--bg-primary);
}

#topic-bar {
  padding: 0 16px;
  height: 36px;
  box-sizing: border-box;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

#room-name {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0;
}
#topic-right { display: flex; align-items: center; gap: 4px; }
#room-info {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-input);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  letter-spacing: 0.3px;
}

/* Search Bar */
/* Persistent Announcement Banner */
#announcement-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 166, 35, 0.08);
  border-bottom: 1px solid rgba(245, 166, 35, 0.15);
  font-size: 12px;
  color: var(--text-primary);
}
#announcement-banner.hidden { display: none; }
.ann-icon { font-size: 14px; flex-shrink: 0; }
.ann-text { flex: 1; font-weight: 500; }
.ann-by { color: var(--text-dim); font-size: 11px; font-style: italic; flex-shrink: 0; }
.ann-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.ann-close:hover { opacity: 1; color: var(--coral, #EF8354); }

#search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#search-bar.hidden { display: none; }
#search-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}
#search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
#search-count {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 40px;
  text-align: center;
}
.search-nav-btn, .search-close-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0;
}
.search-nav-btn:hover, .search-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.search-highlight {
  background: #facc15;
  color: #000;
  border-radius: 2px;
  padding: 0 1px;
}
.search-highlight.active {
  background: #f97316;
  box-shadow: 0 0 4px rgba(249, 115, 22, 0.6);
}

/* Emoji Button & Panel */
.emoji-btn { color: var(--text-dim); transition: color 0.15s; }
.emoji-btn:hover { color: var(--accent); }
#emoji-panel {
  position: absolute;
  bottom: 100%;
  right: 40px;
  margin-bottom: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 100;
  width: 320px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#emoji-panel.hidden { display: none; }
.emoji-panel-search-wrap {
  padding: 8px 8px 4px;
}
.emoji-search {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.emoji-search:focus { border-color: var(--accent); }
.emoji-panel-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.emoji-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: 0.5;
  transition: all 0.15s;
  flex-shrink: 0;
}
.emoji-tab:hover { opacity: 0.8; background: var(--bg-hover); }
.emoji-tab.active { opacity: 1; background: var(--bg-hover); }
.emoji-panel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  align-content: flex-start;
}
.emoji-pick {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
}
.emoji-pick:hover { background: var(--bg-hover); transform: scale(1.15); }

/* Animated Emojis (GIF inline) */
.animoji {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin: 0 2px;
  object-fit: contain;
  height: 100% !important;
}

/* Twemoji inline images */
img.emoji {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.2em;
  margin: 0 1px;
  pointer-events: none;
}

/* Larger emojis in picker */
.emoji-pick img.emoji {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  pointer-events: none;
}

/* Emoji-only messages (1-3 emojis, no text) — slightly larger */
.msg-text-emoji-only img.emoji {
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.3em;
}

/* Tab icons */
.emoji-tab img.emoji {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  pointer-events: none;
}

/* Emoji Reactions */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
  padding-left: 50px;
}
.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.reaction-pill:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.reaction-pill.mine {
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.12);
}
.reaction-picker {
  position: fixed;
  z-index: 9999;
  display: flex;
  gap: 2px;
  padding: 4px 6px;
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: reactionPickerIn 0.15s ease;
}
@keyframes reactionPickerIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.reaction-pick-btn {
  font-size: 16px;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 6px;
  transition: background 0.1s, transform 0.1s;
  user-select: none;
}
.reaction-pick-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.25);
}

/* DM status indicators in header */
.status-pending, .status-active, .status-request {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-dot.pending {
  background: #f59e0b;
  animation: statusPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}
.status-dot.active {
  background: #10b981;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}
.status-dot.request {
  background: #38bdf8;
  animation: statusPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(56, 189, 248, 0.4);
}
@keyframes statusPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.status-pending { color: #f59e0b; }
.status-active { color: #10b981; }
.status-request { color: #38bdf8; }

/* ═══════════════════════════════════════════
   TOPIC BAR BUTTONS
   ═══════════════════════════════════════════ */
.topic-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 4px;
  opacity: 0.7;
}
.topic-btn:hover {
  opacity: 1;
}
.topic-btn.hidden { display: none; }

#btn-search-chat {
  background: transparent;
  border: none;
  padding: 4px 6px;
  opacity: 0.4;
  color: var(--text-secondary);
  margin-left: 6px;
}
#btn-search-chat:hover {
  opacity: 1;
  color: var(--accent);
}
#btn-search-chat svg {
  stroke: currentColor;
}

/* Room Settings Button */
#btn-room-settings {
  background: transparent;
  border: none;
  padding: 4px 6px;
  opacity: 0.4;
  color: var(--text-secondary);
  margin-left: 2px;
}
#btn-room-settings:hover {
  opacity: 1;
  color: var(--accent);
}
#btn-room-settings svg { stroke: currentColor; }

/* Room Settings Panel */
.room-settings-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 200;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}
.rs-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.rs-room-name {
  font-size: 11px;
  color: var(--accent);
  opacity: 0.7;
  margin-left: auto;
}
.rs-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.rs-close:hover { opacity: 1; color: var(--coral, #EF8354); }
.rs-body {
  overflow-y: auto;
  padding: 8px 0;
}
.rs-section {
  padding: 8px 16px;
}
.rs-section + .rs-section {
  border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.04));
}
.rs-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.rs-danger-title { color: var(--coral, #EF8354); }
.rs-row {
  margin-bottom: 8px;
}
.rs-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
}
.rs-hint {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
}
.rs-control {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rs-input {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.rs-input:focus { border-color: var(--accent); }
.rs-input-short { max-width: 140px; }
.rs-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.rs-btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.rs-btn-sm { padding: 5px 10px; font-size: 10px; }
.rs-btn-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #EF4444;
}
.rs-btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #EF4444;
}
.rs-btn-full { width: 100%; text-align: center; }
.rs-btn-backspace {
  background: rgba(239, 68, 68, 0.05);
}
.rs-toggle.active {
  background: rgba(245, 166, 35, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* Room Settings Modal (comprehensive admin overlay) */
.room-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: helpFadeIn 0.2s ease;
}
.room-settings-modal {
  width: 440px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: rsModalIn 0.2s ease;
}
@keyframes rsModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.room-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.room-settings-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.room-settings-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.room-settings-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.room-settings-body {
  padding: 12px 18px;
  overflow-y: auto;
  flex: 1;
}
.room-settings-body .rs-section {
  margin-bottom: 16px;
  padding: 0;
  border-top: none;
}
.room-settings-body .rs-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
  margin-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.rs-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  border-radius: 6px;
  transition: background 0.15s;
}
.rs-row-inline:hover {
  background: var(--bg-hover);
}
.rs-row-inline .rs-label {
  flex-direction: row;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.rs-icon { font-size: 14px; display: inline-flex; align-items: center; margin-right: 4px; }
.rs-icon img.emoji { width: 16px; height: 16px; vertical-align: middle; }
.rs-label { display: flex; align-items: center; }
.rs-label img.emoji { width: 16px; height: 16px; vertical-align: middle; }

/* Toggle switch */
.rs-toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}
.rs-toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.rs-slider-track {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border-radius: 11px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
}
.rs-slider-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.rs-toggle-switch input:checked + .rs-slider-track {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.rs-toggle-switch input:checked + .rs-slider-track::before {
  transform: translateX(18px);
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.3);
}

/* Select and input in modal */
.room-settings-body .rs-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 11px;
  padding: 6px 10px;
  height: 32px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.room-settings-body .rs-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15);
}
.rs-input-wide {
  width: 180px;
}
.room-settings-body .rs-input {
  height: 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.room-settings-body .rs-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15);
}
.room-settings-body .rs-input::placeholder { color: var(--text-dim); }

/* Save button */
.room-settings-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.rs-save-btn {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}
.rs-save-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}
.rs-save-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.2);
}

.rs-danger-zone { border-color: rgba(239, 68, 68, 0.15) !important; }
.rs-danger-btn { padding: 6px 14px; border: 1px solid rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.06); color: #ef4444; border-radius: 6px; font-size: 11px; cursor: pointer; transition: all 0.15s; font-weight: 500; }
.rs-danger-btn:hover { background: rgba(239, 68, 68, 0.12); border-color: #ef4444; }
.rs-danger-critical { background: rgba(239, 68, 68, 0.15); font-weight: 600; }
.rs-danger-critical:hover { background: #ef4444; color: #fff; }

/* Custom Confirm Modal */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.confirm-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  width: 360px;
  max-width: 90vw;
  overflow: hidden;
}
.confirm-header {
  padding: 14px 18px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.confirm-body {
  padding: 0 18px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.confirm-btn {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
}
.confirm-btn-cancel {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.confirm-btn-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.confirm-btn-ok {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.confirm-btn-ok:hover {
  filter: brightness(1.1);
}
.confirm-btn-danger {
  background: #EF4444;
  color: #fff;
  border-color: #EF4444;
}
.confirm-btn-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
}

/* Lock Button */
.lock-btn {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}
.lock-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93C5FD;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}
.lock-btn.locked {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}
.lock-btn.locked:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FCA5A5;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

/* Private Button */
.private-btn {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.2);
  color: #A78BFA;
}
.private-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #C4B5FD;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
}
.private-btn.is-private {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}
.private-btn.is-private:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FCA5A5;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

/* Backspace Button */
.backspace-btn {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
  color: #F87171;
}
.backspace-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FCA5A5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Day mode button adjustments */
body.day .lock-btn { background: rgba(37, 99, 235, 0.06); border-color: rgba(37, 99, 235, 0.18); color: #2563EB; }
body.day .lock-btn:hover { background: rgba(37, 99, 235, 0.12); border-color: rgba(37, 99, 235, 0.35); color: #1D4ED8; box-shadow: 0 0 8px rgba(37, 99, 235, 0.1); }
body.day .lock-btn.locked { background: rgba(220, 38, 38, 0.06); border-color: rgba(220, 38, 38, 0.2); color: #DC2626; }
body.day .lock-btn.locked:hover { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.35); color: #B91C1C; }
body.day .private-btn { background: rgba(109, 40, 217, 0.06); border-color: rgba(109, 40, 217, 0.18); color: #7C3AED; }
body.day .private-btn:hover { background: rgba(109, 40, 217, 0.12); border-color: rgba(109, 40, 217, 0.35); color: #6D28D9; }
body.day .private-btn.is-private { background: rgba(220, 38, 38, 0.06); border-color: rgba(220, 38, 38, 0.2); color: #DC2626; }
body.day .backspace-btn { background: rgba(220, 38, 38, 0.06); border-color: rgba(220, 38, 38, 0.18); color: #DC2626; }
body.day .backspace-btn:hover { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.35); color: #B91C1C; }

/* ═══════════════════════════════════════════
   MESSAGES AREA
   ═══════════════════════════════════════════ */
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
#messages.no-scroll {
  overflow: hidden;
  padding: 0;
}

.msg {
  padding: 3px 12px;
  line-height: 1.6;
  word-wrap: break-word;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: border-left-color 0.15s, background 0.15s;
}
.msg:hover {
  border-left-color: var(--accent);
}
.msg-continuation .ts,
.msg-continuation .nick { display: none; }
.msg-continuation .msg { padding-top: 0; }

.msg .ts {
  color: var(--timestamp);
  font-size: 10px;
  margin-right: 6px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-variant-numeric: tabular-nums;
  opacity: 0.4;
}

.msg .nick {
  font-weight: 600;
  font-size: 12px;
  margin-right: 6px;
  transition: opacity 0.15s;
}
.msg .nick:hover {
  opacity: 0.8;
}

.msg .nick.self { color: var(--nick-self); }
.msg .nick.other { color: var(--nick-other); }

.msg.system {
  color: var(--system);
  font-style: italic;
  font-size: 11px;
  opacity: 0.5;
  padding: 2px 12px;
}
.msg.system:hover { border-left-color: transparent; }
.msg.system .nick { color: var(--system); font-weight: normal; }

/* Join/leave messages — very subtle */
.msg.join, .msg.leave,
.join-msg, .leave-msg {
  font-size: 10px;
  opacity: 0.4;
  padding: 1px 12px;
}
.join-msg { color: var(--join, var(--system)); }
.leave-msg { color: var(--leave, var(--system)); }

/* @Mentions — amber pill style */
.mention {
  color: var(--accent);
  font-weight: 600;
  background: rgba(217, 119, 6, 0.15);
  padding: 1px 6px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s;
}
.mention:hover {
  background: rgba(217, 119, 6, 0.3);
}
.mention-self {
  color: #fff;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
}
.mention-self:hover {
  background: #b45309;
}
/* Highlight entire message row when you're mentioned */
.msg-mentioned {
  background: rgba(217, 119, 6, 0.08);
  border-left: 3px solid var(--accent);
  padding-left: 8px !important;
}

/* Message delivery status */
[data-nonce].pending .msg { opacity: 0.6; }
[data-nonce].pending .msg::after { content: ' ⏳'; font-size: 9px; opacity: 0.5; }
[data-nonce].delivered .msg::after { content: ' ✓'; font-size: 9px; color: var(--accent); opacity: 0.7; }
[data-nonce].failed .msg::after { content: ' ⚠ Failed'; font-size: 9px; color: #e74c3c; }
.resend-btn { font-size: 9px; color: var(--accent); cursor: pointer; margin-left: 6px; opacity: 0.8; }
.resend-btn:hover { opacity: 1; text-decoration: underline; }

.msg.join { color: var(--join); }
.msg.leave { color: var(--leave); }
.msg.error { color: var(--error); }

.msg.action { color: var(--nick-other); font-style: italic; }
.msg.action .nick { color: var(--nick-other); }

/* Announcement */
.msg.announcement {
  background: var(--accent-soft);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  line-height: 1.6;
}
.announce-icon { font-size: 14px; margin-right: 2px; }
.announce-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-transform: uppercase;
}
.announce-by { color: var(--accent); font-weight: 600; }
.announce-text { color: var(--text-primary); }

/* ═══════════════════════════════════════════
   INPUT BAR
   ═══════════════════════════════════════════ */
#input-bar {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  position: relative;
}

.nick-label {
  display: none;
}

#input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  outline: none;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#input:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#input::placeholder { color: var(--text-dim); }

/* ═══════════════════════════════════════════
   USER PANEL (Right) — Modern Role System
   ═══════════════════════════════════════════ */
#user-panel {
  width: 200px;
  min-width: 160px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s ease, min-width 0.25s ease, opacity 0.25s ease;
}
#user-panel.hidden, #user-panel.collapsed {
  width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  border-left: none;
  pointer-events: none;
}

#user-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ── User Categories ── */
.user-category {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 6px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  margin-top: 4px;
}
.user-category:first-child { margin-top: 0; }
.user-category::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* Category-specific accent colors */
.user-category.cat-admin {
  color: var(--error);
}
.user-category.cat-admin::after {
  background: linear-gradient(to right, rgba(239, 68, 68, 0.2), transparent);
}
.user-category.cat-op {
  color: var(--accent);
}
.user-category.cat-op::after {
  background: linear-gradient(to right, rgba(245, 158, 11, 0.2), transparent);
}
.user-category.cat-ai {
  color: #60A5FA;
}
.user-category.cat-ai::after {
  background: linear-gradient(to right, rgba(96, 165, 250, 0.2), transparent);
}
.user-category.cat-user {
  color: var(--text-dim);
}

/* ── User Items ── */
.user-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 450;
  color: var(--nick-other);
  cursor: default;
  border-radius: 8px;
  transition: all 0.15s ease;
  position: relative;
}
.user-item:hover {
  background: var(--bg-hover);
}

/* Online indicator dot */
.user-item::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #34D399;
  box-shadow: 0 0 4px rgba(52, 211, 153, 0.4);
  transition: all 0.15s ease;
}
.user-item.away::before {
  background: #F59E0B;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

/* Nick text */
.user-nick-row {
  display: flex; align-items: center; gap: 3px;
  flex: 1; min-width: 0; overflow: hidden;
}
.user-nick {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.user-nick-row .music-now-playing-lottie,
.user-nick-row .game-now-playing-badge,
.user-nick-row .ai-tag { flex-shrink: 0; }
.user-status-msg {
  width: 100%;
  font-size: 9px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 2px;
  margin-top: -6px;
  font-style: italic;
}

/* Role badge */
.user-role-badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1.3;
}
.user-role-badge.badge-admin {
  background: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.user-role-badge.badge-op {
  background: rgba(245, 158, 11, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Self indicator */
.user-item.self { font-weight: 700; }
.user-item.self .user-nick { color: var(--nick-self); }

/* Admin role colors */
.user-item.role-admin .user-nick { color: #F87171; }
.user-item.role-admin.self .user-nick { color: #FCA5A5; }
.user-item.role-admin::before { background: var(--error); }

/* Op role colors */
.user-item.role-op .user-nick { color: #FBBF24; }
.user-item.role-op.self .user-nick { color: #FDE68A; }
.user-item.role-op::before { background: var(--accent); }

/* User role colors */
.user-item.role-user .user-nick { color: var(--nick-other); }
.user-item.role-user.self .user-nick { color: var(--nick-self); }

/* Away state */
.user-item.away { opacity: 0.45; }
.user-item.away .user-nick { font-style: italic; }

/* Nexus Bot */
.user-item.bot .user-nick { color: #60A5FA; }
.user-item.bot::before { background: #60A5FA; }
.bot-icon { display: inline-flex; align-items: center; margin-right: 4px; color: #60A5FA; vertical-align: middle; }
.bot-msg { }
.bot-nick { color: #60A5FA !important; font-weight: 600; }
body.day .user-item.bot .user-nick { color: #2563EB; }
body.day .user-item.bot::before { background: #2563EB; box-shadow: 0 0 4px rgba(37, 99, 235, 0.3); }
body.day .bot-nick { color: #2563EB !important; }
body.day .bot-icon { color: #2563EB; }
.ai-tag {
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: #60A5FA;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: auto;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  line-height: 12px;
}
body.day .ai-tag { background: #2563EB; }

/* Nexus AI thinking animation */
.nexus-thinking-msg { opacity: 0.7; }
.nexus-dots span {
  animation: nexusDot 1.4s infinite;
  font-size: 16px;
  font-weight: bold;
  color: #60A5FA;
}
.nexus-dots span:nth-child(2) { animation-delay: 0.2s; }
.nexus-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes nexusDot {
  0%, 20% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* Nexus Boot Terminal (inline in chat) */
.nexus-boot-terminal {
  margin: 8px 0;
  border-radius: 10px;
  overflow: hidden;
  max-width: 440px;
  border: 1px solid rgba(96, 165, 250, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.nexus-boot-terminal .backspace-term-header { border-bottom-color: rgba(96, 165, 250, 0.15); }
.nexus-boot-terminal .backspace-term-body { min-height: 180px; max-height: 300px; }
.nexus-boot-terminal .backspace-term-line.border { color: #60A5FA; }
.nexus-boot-terminal .backspace-term-line.info { color: #93C5FD; }
.nexus-boot-terminal .backspace-term-line.final { color: #34D399; font-weight: 600; text-shadow: 0 0 8px rgba(52, 211, 153, 0.3); }
.nexus-boot-terminal .backspace-term-bar {
  background: linear-gradient(90deg, #3B82F6, #34D399, #3B82F6);
  background-size: 200% 100%;
  animation: nexusBarShimmer 2s linear infinite;
}
@keyframes nexusBarShimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

/* Nexus Minting Card (inline in chat) */
.nexus-mine-card {
  margin: 8px 0;
  padding: 16px 20px;
  background: var(--bg-modal);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 12px;
  max-width: 340px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.nexus-mine-header {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #60A5FA;
  font-weight: 600;
  margin-bottom: 10px;
  font-family: 'Consolas', 'Courier New', monospace;
}
.nexus-mine-name {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.nexus-mine-details {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
}
.nexus-mine-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--text-dim);
}
.nexus-mine-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.nexus-mine-fill {
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #34D399);
  border-radius: 2px;
  animation: nexusMineGrow 1.5s ease-out forwards;
}
@keyframes nexusMineGrow { from { width: 0%; } to { width: 15%; } }
body.day .nexus-mine-card { background: #fff; border-color: rgba(59, 130, 246, 0.12); }

/* Day theme role overrides */
body.day .user-category.cat-admin { color: #DC2626; }
body.day .user-category.cat-admin::after { background: linear-gradient(to right, rgba(220, 38, 38, 0.15), transparent); }
body.day .user-category.cat-op { color: #B45309; }
body.day .user-category.cat-op::after { background: linear-gradient(to right, rgba(180, 83, 9, 0.15), transparent); }
body.day .user-category.cat-ai { color: #2563EB; }
body.day .user-category.cat-ai::after { background: linear-gradient(to right, rgba(37, 99, 235, 0.15), transparent); }
body.day .user-item.role-admin .user-nick { color: #DC2626; }
body.day .user-item.role-admin.self .user-nick { color: #B91C1C; }
body.day .user-item.role-admin::before { background: #DC2626; box-shadow: 0 0 4px rgba(220, 38, 38, 0.3); }
body.day .user-item.role-op .user-nick { color: #B45309; }
body.day .user-item.role-op.self .user-nick { color: #92400E; }
body.day .user-item.role-op::before { background: #B45309; box-shadow: 0 0 4px rgba(180, 83, 9, 0.3); }
body.day .user-role-badge.badge-admin { background: rgba(220, 38, 38, 0.08); color: #DC2626; border-color: rgba(220, 38, 38, 0.2); }
body.day .user-role-badge.badge-op { background: rgba(180, 83, 9, 0.08); color: #B45309; border-color: rgba(180, 83, 9, 0.2); }

/* ═══════════════════════════════════════════
   USER CONTEXT MENU
   ═══════════════════════════════════════════ */
.user-context-menu {
  position: fixed;
  z-index: 9999;
  background: #1a1a2e;
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  animation: ctxFadeIn 0.12s ease;
  backdrop-filter: blur(8px);
}
@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
body.day .user-context-menu {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ═══════════════════════════════════════════
   TYPING INDICATOR
   ═══════════════════════════════════════════ */
.typing-indicator {
  display: none;
  padding: 4px 14px;
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   MODALS — Frosted Glass
   ═══════════════════════════════════════════ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
#modal-overlay.hidden { display: none; }

#modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 28px;
  width: 400px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-transform: none;
  letter-spacing: 0;
}

#modal label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 14px;
  text-transform: none;
  letter-spacing: 0;
}
#modal label:first-of-type { margin-top: 0; }

.optional { color: var(--text-dim); text-transform: none; letter-spacing: 0; font-weight: 400; }

#modal input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#modal input:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}

.modal-buttons button {
  padding: 9px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

#modal-cancel {
  background: var(--bg-input);
  color: var(--text-secondary);
}
#modal-cancel:hover { color: var(--text-primary); background: var(--bg-hover); }

#modal-join {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 550;
}
#modal-join:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

/* ═══════════════════════════════════════════
   BURN CONFIRMATION MODAL
   ═══════════════════════════════════════════ */
#backspace-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
#backspace-overlay.hidden { display: none; }
body.day #backspace-overlay { background: rgba(80, 0, 0, 0.35); }

#backspace-modal {
  background: var(--bg-secondary);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 28px;
  width: 400px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
body.day #backspace-modal { background: #FFFFFF; border-color: rgba(220, 38, 38, 0.2); }

.backspace-title { color: var(--error) !important; }

.backspace-warning {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.backspace-room-label {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 4px;
}
.backspace-room-label span { color: var(--accent); font-weight: 600; }

.backspace-confirm-btn {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #F87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.backspace-confirm-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #FCA5A5 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}
body.day .backspace-confirm-btn { background: rgba(220, 38, 38, 0.06) !important; color: #DC2626 !important; border-color: rgba(220, 38, 38, 0.2) !important; }
body.day .backspace-confirm-btn:hover { background: rgba(220, 38, 38, 0.12) !important; color: #B91C1C !important; }

/* Backspace Terminal Animation */
#backspace-terminal {
  width: 100%;
}

/* Lock Room Modal */
/* ═══════════════════════════════════════════
   IDENTITY CONFLICT POPUP
   ═══════════════════════════════════════════ */
.identity-conflict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.identity-conflict-popup {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 28px;
  width: 380px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.conflict-icon { font-size: 36px; margin-bottom: 12px; }
.conflict-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}
.conflict-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.conflict-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.conflict-btn {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-input);
  color: var(--text-primary);
}
.conflict-btn:hover { background: var(--bg-hover); }
.conflict-btn-force {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.conflict-btn-force:hover { filter: brightness(1.1); background: var(--accent); }
.conflict-btn-anon {
  background: transparent;
  color: var(--text-secondary);
}
.conflict-btn-cancel {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  font-size: 11px;
}

#lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 30, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
#lock-overlay.hidden { display: none; }
body.day #lock-overlay { background: rgba(0, 20, 60, 0.35); }

#lock-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 28px;
  width: 400px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
body.day #lock-modal { background: #FFFFFF; border-color: rgba(37, 99, 235, 0.2); }

.lock-title { color: #93C5FD !important; }
body.day .lock-title { color: #2563EB !important; }

.lock-description {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}

#lock-modal label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

#lock-password {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
  outline: none;
  box-sizing: border-box;
}
#lock-password:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lock-confirm-btn {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #93C5FD !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}
.lock-confirm-btn:hover {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #BFDBFE !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}
body.day .lock-confirm-btn { background: rgba(37, 99, 235, 0.06) !important; color: #2563EB !important; border-color: rgba(37, 99, 235, 0.2) !important; }
body.day .lock-confirm-btn:hover { background: rgba(37, 99, 235, 0.12) !important; color: #1D4ED8 !important; }

/* ═══════════════════════════════════════════
   LOGIN / RECOVERY MODAL
   ═══════════════════════════════════════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: helpFadeIn 0.15s ease;
}
.login-overlay.hidden { display: none; }

.login-modal-card {
  width: 400px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.login-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.login-modal-icon { font-size: 16px; }
.login-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.login-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.login-modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* Hidden panes */
#login-form.hidden, #login-no-identity.hidden, #login-already.hidden, #login-accounts.hidden,
#login-pw-pane.hidden, #login-recovery-pane.hidden { display: none; }

/* Login form elements */
.login-tabs-bar {
  display: flex;
  gap: 2px;
  background: var(--bg-input);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 16px;
}
.login-tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.login-tab:hover { color: var(--text-secondary); }
.login-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.login-field-group {
  margin-bottom: 12px;
}
.login-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.login-input:focus { border-color: var(--accent); }
.login-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}
.login-textarea:focus { border-color: var(--accent); }

.login-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 12px;
  cursor: pointer;
}

.login-status {
  font-size: 11px;
  margin-bottom: 10px;
  min-height: 16px;
}
.login-status.error { color: #ef4444; }
.login-status.success { color: #10b981; }
.login-status.info { color: var(--accent); }

.login-btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 8px;
}
.login-btn-primary:hover { filter: brightness(1.1); }

.login-btn-secondary {
  padding: 8px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.login-btn-secondary:hover { border-color: var(--accent); }

.login-btn-danger {
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.login-btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

.login-link-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  cursor: pointer;
  text-decoration: underline;
  text-align: center;
  padding: 4px;
  transition: color 0.15s;
}
.login-link-btn:hover { color: var(--accent); }

.login-actions-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.login-empty, .login-logged {
  text-align: center;
  padding: 12px 0;
}
.login-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0;
}
.login-desc.dim { color: var(--text-dim); font-size: 11px; }

.login-avatar-check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.login-identity-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}

/* Account cards */
.login-accounts-block { margin-bottom: 12px; }
.login-accounts-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.acc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all 0.15s;
}
.acc-card:hover { border-color: var(--accent-dim); }
.acc-card-active { border-color: var(--accent); background: var(--accent-dim); }
.acc-info { flex: 1; min-width: 0; }
.acc-nick {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.acc-key {
  font-size: 9px;
  color: var(--text-dim);
  font-family: 'Consolas', monospace;
  margin-top: 2px;
}
.acc-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.acc-status { font-size: 10px; margin-right: 8px; }
.acc-active { color: #10b981; }
.acc-secured { color: var(--accent); }
.acc-unsecured { color: #FBBF24; }
.acc-minting { color: #60A5FA; }
.acc-login-btn {
  padding: 4px 12px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.acc-login-btn:hover { filter: brightness(1.1); }
.acc-setup { color: #FBBF24; border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.06); }
.acc-setup:hover { background: rgba(251, 191, 36, 0.12); }
.acc-footer {
  text-align: center;
  margin-top: 10px;
}

/* Welcome message styling */
.welcome-art {
  color: var(--accent-dim);
  line-height: 1.2;
  font-size: 12px;
  padding: 6px 0;
  white-space: pre;
}

/* ═══════════════════════════════════════════
   CONSOLE DASHBOARD
   ═══════════════════════════════════════════ */
.console-dashboard {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
}
.console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.console-header-left { flex: 1; }
.console-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.console-title-dot { color: var(--accent); }
.console-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.console-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.console-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.console-build {
  font-size: 9px;
  color: var(--text-dim);
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}
.console-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.console-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  background: var(--bg-secondary);
}
.console-stat-icon { font-size: 14px; color: var(--accent); }
.console-stat-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.console-stat-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}
.console-actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}
.console-action-btn {
  flex: 1;
  padding: 6px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.console-action-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent);
}
.console-log-divider {
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  padding: 4px 0 8px;
  letter-spacing: 1px;
  opacity: 0.5;
}

/* Day theme adjustments */
body.day .console-dashboard { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
body.day .console-stats { background: rgba(0,0,0,0.04); }
body.day .console-stat { background: #FFFFFF; }
body.day .console-action-btn { background: #F8F8F8; }
body.day .console-action-btn:hover { background: #F0F0F0; }

/* ═══════════════════════════════════════════
   DASHBOARD TABS (Console / Network / Settings)
   ═══════════════════════════════════════════ */
.dashboard-tabs {
  display: flex;
  gap: 0;
  padding: 0 12px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  min-height: 36px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  overflow-x: auto;
}
.dashboard-tab {
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.03em;
}
.dashboard-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.dashboard-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.dashboard-content {
  padding: 8px 0 0;
  min-height: 100%;
}

/* ═══════════════════════════════════════════
   NETWORK DASHBOARD
   ═══════════════════════════════════════════ */
.network-dashboard {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Health Banner */
.network-health {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.network-health-icon {
  font-size: 24px;
  line-height: 1;
}
.network-health-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.network-health-status {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.network-health-score {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Stats Grid */
.network-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.network-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 8px;
  background: var(--bg-secondary);
}
.network-stat-icon {
  color: var(--accent);
  opacity: 0.8;
}
.network-stat-icon svg {
  display: block;
}
.network-stat-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.network-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
/* Service Status */
.network-services {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.network-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.service-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
  padding: 4px 0;
}
.service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.service-dot.green { background: #34D399; box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
.service-dot.red { background: #EF4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.3); }
.service-dot.yellow { background: #FBBF24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.3); }

/* Peers Panel */
.network-peers-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.network-peers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
}
.network-peer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
  padding: 4px 0;
}
.network-empty-state {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  padding: 8px 0;
}

/* Activity Panel */
.network-activity-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.network-activity-log {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}
.network-activity-entry {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}
.network-activity-entry:last-child {
  border-bottom: none;
}
.network-activity-ts {
  color: var(--text-dim);
  font-size: 10px;
  margin-right: 6px;
}

/* Day theme */
body.day .network-dashboard .network-health,
body.day .network-stats-grid,
body.day .network-services,
body.day .network-peers-panel,
body.day .network-activity-panel { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }
body.day .network-stat-card { background: #FFFFFF; }
body.day .network-stats-grid { background: rgba(0,0,0,0.04); }
body.day .dashboard-tabs { background: #FFFFFF; border-color: rgba(0,0,0,0.08); }

/* ═══════════════════════════════════════════
   COMMAND SUGGESTIONS POPUP
   ═══════════════════════════════════════════ */
#cmd-suggest {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}
#cmd-suggest.show { display: block; }

.cmd-cat {
  padding: 8px 14px 4px;
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cmd-item {
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: inherit;
  border-radius: 6px;
  margin: 0 4px;
  transition: background 0.15s;
}
.cmd-item:hover, .cmd-item.active { background: var(--bg-hover); }
.cmd-item-name { color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; min-width: 160px; }
.cmd-item-desc { color: var(--text-dim); font-size: 11px; }

/* ═══════════════════════════════════════════
   HELP POPUP (inline in chat)
   ═══════════════════════════════════════════ */
.msg-help {
  color: var(--text-secondary);
  font-size: 12px;
  padding: 14px 16px;
  padding-right: 40px;
  margin: 4px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  line-height: 1.8;
  position: relative;
  background: var(--bg-secondary);
}
.msg-help code {
  color: var(--accent);
  font-family: 'Consolas', 'Courier New', monospace;
  cursor: pointer;
  font-size: 12px;
}
.msg-help code:hover { text-decoration: underline; }
.msg-help .help-cat {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 8px;
}

/* Help Center Modal */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: helpFadeIn 0.15s ease;
}
@keyframes helpFadeIn { from { opacity: 0; } to { opacity: 1; } }

.help-modal {
  width: 720px;
  max-width: 90vw;
  height: 520px;
  max-height: 80vh;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.help-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.help-title-icon { font-size: 16px; }
.help-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.help-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.help-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.help-sidebar {
  width: 180px;
  min-width: 180px;
  padding: 10px 8px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  overflow-y: auto;
}
.help-sidebar-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 10px 4px;
  opacity: 0.7;
}
.help-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  margin: 1px 0;
}
.help-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.help-nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.help-nav-icon { font-size: 13px; flex-shrink: 0; }

.help-content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}
.help-tab-content { display: none; }
.help-tab-content.active { display: block; }
.help-tab-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}
.help-tab-content h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin: 16px 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.help-tab-content p { margin: 6px 0; }
.help-tab-content ul, .help-tab-content ol {
  margin: 6px 0;
  padding-left: 20px;
}
.help-tab-content li { margin: 3px 0; }
.help-tab-content code {
  color: var(--accent);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  background: var(--bg-input);
  padding: 1px 5px;
  border-radius: 3px;
}
.help-tab-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.help-tab-content td {
  padding: 4px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.help-tab-content td:first-child { color: var(--accent); font-weight: 600; }

/* Commands section in help */
.help-cmd-section { margin-bottom: 14px; }
.help-cmd-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
}
.help-cmd-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
}
.help-cmd-code {
  color: var(--accent) !important;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px !important;
  background: var(--bg-input) !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 180px;
  transition: background 0.12s;
}
.help-cmd-code:hover {
  background: var(--accent-dim) !important;
  text-decoration: none !important;
}
.help-cmd-desc {
  color: var(--text-dim);
  font-size: 11px;
}

/* Mobile responsive help */
@media (max-width: 600px) {
  .help-modal { width: 95vw; height: 85vh; }
  .help-sidebar { width: 50px; min-width: 50px; }
  .help-nav-item span:not(.help-nav-icon) { display: none; }
  .help-sidebar-label { display: none; }
  .help-nav-item { justify-content: center; padding: 10px; }
  .help-cmd-row { flex-direction: column; gap: 2px; }
  .help-cmd-code { min-width: auto; }
}

.msg-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border: none;
  background: var(--bg-input);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.15s;
  line-height: 1;
  font-family: inherit;
  z-index: 5;
}
.msg-close:hover { opacity: 1; color: var(--error); background: rgba(239, 68, 68, 0.1); }

/* ═══════════════════════════════════════════
   INPUT BUTTONS (Voice)
   ═══════════════════════════════════════════ */
.input-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
}
.input-btn:hover { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-soft); }
.input-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.input-btn.hidden { display: none; }

/* Voice mic SVG icon */
.voice-mic-btn svg { display: block; }
.voice-mic-btn:hover svg { stroke: var(--accent); }

/* ═══════════════════════════════════════════
   VOICE RECORDING OVERLAY
   ═══════════════════════════════════════════ */
.voice-recording {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0 4px;
}
.voice-recording.hidden { display: none; }

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error);
  flex-shrink: 0;
  animation: rec-blink 1s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

#voice-rec-timer {
  color: var(--text-primary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  font-weight: 600;
}
#voice-rec-text {
  color: var(--text-dim);
  font-size: 12px;
  flex: 1;
}

.voice-cancel-btn, .voice-send-btn {
  padding: 5px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.voice-cancel-btn { background: transparent; color: var(--text-secondary); }
.voice-cancel-btn:hover { color: var(--error); border-color: var(--error); background: rgba(239, 68, 68, 0.06); }
.voice-send-btn { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
.voice-send-btn:hover { background: var(--accent-dim); }

/* ═══════════════════════════════════════════
   VOICE MESSAGE PLAYER (in chat)
   ═══════════════════════════════════════════ */
.voice-msg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  max-width: 240px;
  margin: 1px 0;
  margin-left: 4px;
  vertical-align: middle;
}

.voice-play-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
}
.voice-play-btn:hover { background: var(--accent-dim); transform: scale(1.08); }
.voice-play-btn.playing { background: var(--accent-dim); }
.voice-play-btn.playing::after { content: ''; }

.voice-waveform {
  flex: 1;
  height: 22px;
  min-width: 100px;
  cursor: pointer;
  border-radius: 2px;
  opacity: 0.8;
}

.voice-duration {
  font-size: 10px;
  color: var(--text-dim);
  min-width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}


/* ═══════════════════════════════════════════
   DAY MODE — Comprehensive Overrides
   ═══════════════════════════════════════════ */

/* Glassmorphism panels — softer in day mode */
body.day #connection-bar { background: rgba(255, 255, 255, 0.92); border-bottom-color: var(--border); }
body.day #topic-bar { background: rgba(255, 255, 255, 0.92); }
body.day #input-bar { background: rgba(255, 255, 255, 0.92); }
body.day #peer-footer { background: rgba(255, 255, 255, 0.92); }
body.day .panel-header { background: rgba(255, 255, 255, 0.92); }
body.day .browser-table-head { background: rgba(255, 255, 255, 0.92); }

/* Channel panel */
body.day #channel-panel { background: var(--bg-panel); }
body.day .channel-item:hover { background: rgba(217, 119, 6, 0.06); }
body.day .channel-item.active { background: rgba(217, 119, 6, 0.08); color: var(--accent); }
body.day .section-count { background: var(--bg-secondary); }
body.day .channel-browse .hash { color: var(--accent) !important; }

/* Input area */
body.day #input { background: #FFFFFF; border-color: var(--border); }
body.day #input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.1); }
body.day .input-btn { border-color: var(--border); color: var(--text-secondary); }
body.day .input-btn:hover { color: var(--accent); border-color: var(--accent-dim); background: rgba(217, 119, 6, 0.06); }
body.day .input-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(217, 119, 6, 0.08); }

/* Voice recording */
body.day .voice-cancel-btn { border-color: var(--border); color: var(--text-secondary); }
body.day .voice-cancel-btn:hover { color: #DC2626; border-color: #DC2626; background: rgba(220, 38, 38, 0.05); }
body.day .voice-send-btn { background: var(--accent); border-color: var(--accent); }
body.day .voice-msg { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
body.day .voice-play-btn { background: var(--accent); color: #fff; }
body.day .voice-play-btn:hover { background: var(--accent-dim); }

/* User panel */
body.day #user-panel { background: var(--bg-panel); }
body.day .user-item:hover { background: rgba(217, 119, 6, 0.06); }
body.day .user-item::before { box-shadow: 0 0 4px var(--teal); }

/* Messages */
body.day .msg.system { color: #9CA3AF; }
body.day .msg.join { color: #059669; }
body.day .msg.leave { color: #DC6B3E; }
body.day .msg.error { color: #DC2626; }
body.day .msg.action { color: var(--nick-other); }
body.day .msg .ts { color: #D1D5DB; }
body.day .msg .nick.self { color: var(--nick-self); }
body.day .msg .nick.other { color: var(--nick-other); }
body.day .msg.announcement { background: rgba(217, 119, 6, 0.06); border-color: rgba(217, 119, 6, 0.15); }
body.day .announce-label { color: var(--accent); }
body.day .announce-by { color: var(--accent); }

/* Modals */
body.day #modal-overlay { background: rgba(0, 0, 0, 0.3); }
body.day #modal { background: #FFFFFF; border-color: var(--border); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); }
body.day #modal input { background: var(--bg-panel); border-color: var(--border); }
body.day #modal input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.1); }
body.day #modal-cancel { background: var(--bg-panel); color: var(--text-secondary); }
body.day #modal-cancel:hover { color: var(--text-primary); background: rgba(217, 119, 6, 0.06); }
body.day #modal-join { background: var(--accent); color: #fff; }

/* Lock modal day overrides */
body.day #lock-password { background: var(--bg-panel); border-color: var(--border); }
body.day #lock-password:focus { border-color: rgba(37, 99, 235, 0.5); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
body.day .lock-btn.locked { background: rgba(220, 38, 38, 0.06); border-color: rgba(220, 38, 38, 0.2); color: #DC2626; }
body.day .lock-btn.locked:hover { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.35); color: #B91C1C; }

/* Command suggest popup */
body.day #cmd-suggest { background: #FFFFFF; border-color: var(--border); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); }
body.day .cmd-item:hover, body.day .cmd-item.active { background: rgba(217, 119, 6, 0.06); }

/* Help popup */
body.day .msg-help { background: var(--bg-panel); border-color: var(--border); }

/* Message context menu */
body.day .msg-context-menu { background: #FFFFFF; border-color: var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }

/* DM request */
body.day .dm-request-msg { background: rgba(217, 119, 6, 0.06); border-color: rgba(217, 119, 6, 0.2); }
body.day .dm-decline-btn { background: var(--bg-panel); }
body.day .dm-decline-btn:hover { color: #DC6B3E; border-color: #DC6B3E; }

/* Friend request buttons */
body.day .req-accept-btn:hover { background: #059669; }
body.day .req-decline-btn { background: rgba(220, 38, 38, 0.15); color: #DC2626; }
body.day .req-decline-btn:hover { background: rgba(220, 38, 38, 0.25); }

/* Browser room rows */
body.day .browser-room-row:hover { background: rgba(217, 119, 6, 0.04); }
body.day .browser-room-row .br-open { color: #059669; }
body.day .browser-room-row .br-locked { color: #DC6B3E; }
body.day .browser-refresh-btn { background: var(--bg-panel); border-color: var(--border); }
body.day .browser-refresh-btn:hover { color: var(--accent); border-color: var(--accent-dim); background: rgba(217, 119, 6, 0.06); }

/* Unread badge */
body.day .channel-item .unread { background: var(--accent); color: #fff; box-shadow: 0 0 6px rgba(217, 119, 6, 0.2); }
body.day .dm-unread { background: var(--coral); }

/* Panel expand button */
body.day .panel-expand-btn { background: var(--bg-panel); border-right-color: var(--border); }
body.day .panel-expand-btn:hover { color: var(--accent); background: rgba(217, 119, 6, 0.06); }

/* Scrollbars */
body.day ::-webkit-scrollbar-thumb { background: #D6D3CD; }
body.day ::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* Node log */
body.day .msg.node-log { color: #0D9488; }
body.day .msg.node-success { color: #059669; }

/* Welcome art */
body.day .welcome-art { color: var(--accent-dim); }

/* ═══════════════════════════════════════════
   MESSAGE CONTEXT MENU
   ═══════════════════════════════════════════ */
.msg-context-menu {
  position: fixed;
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 4px;
  z-index: 200;
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.msg-menu-reactions {
  display: flex;
  gap: 2px;
  padding: 4px 4px 2px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2px;
}
.msg-menu-react-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s, transform 0.1s;
  user-select: none;
}
.msg-menu-react-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.2);
}
.msg-menu-react-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
}
.msg-menu-item {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
  transition: background 0.12s;
}
.msg-menu-item:hover { background: var(--bg-hover); }
.msg-menu-delete { color: var(--error); }
.msg-menu-delete:hover { background: rgba(239, 68, 68, 0.08); }
body.day .msg-menu-delete:hover { background: rgba(220, 38, 38, 0.06); }

/* ═══════════════════════════════════════════
   REPLY PREVIEW BAR (above input)
   ═══════════════════════════════════════════ */
.reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-hover);
  border-left: 3px solid var(--accent);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
  gap: 8px;
}
.reply-preview.hidden { display: none; }
.reply-preview-content {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.reply-preview-icon { color: var(--accent); font-size: 13px; flex-shrink: 0; }
.reply-preview-label { color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.reply-preview-nick { color: var(--accent); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.reply-preview-text {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reply-preview-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.reply-preview-close:hover { color: var(--text-primary); }

/* ═══════════════════════════════════════════
   REPLY QUOTE (in message)
   ═══════════════════════════════════════════ */
.msg-reply-quote {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin-bottom: 2px;
  font-size: 11px;
  color: var(--text-muted);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  max-width: 100%;
  overflow: hidden;
}
.msg-reply-quote:hover { background: rgba(255, 255, 255, 0.06); }
.reply-bar {
  width: 2px;
  min-height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.reply-nick {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.reply-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}
/* Message highlight when scrolling to replied message */
@keyframes msg-flash {
  0% { background: rgba(var(--accent-rgb, 245, 158, 11), 0.15); }
  100% { background: transparent; }
}
.msg-highlight { animation: msg-flash 2s ease-out; }

/* Day theme adjustments */
body.day .msg-reply-quote { background: rgba(0, 0, 0, 0.04); }
body.day .msg-reply-quote:hover { background: rgba(0, 0, 0, 0.07); }

/* Inline edit input */
.msg-edit-input {
  background: var(--bg-input);
  border: 1px solid var(--accent-dim);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 4px 8px;
  outline: none;
  border-radius: 6px;
  width: 60%;
  min-width: 200px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.msg-edit-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* Edited tag */
.edited-tag {
  font-size: 10px;
  color: var(--text-dim);
  font-style: italic;
  margin-left: 4px;
}

/* Hoverable own messages */
[data-editable="true"] .msg { position: relative; }
[data-editable="true"] .msg:hover { background: var(--bg-hover); border-radius: 6px; }

/* === Mint Dashboard === */
/* ─── Mint Tab — Claude-inspired Design ─── */

.mint-container {
  padding: 32px 28px;
  max-width: 620px;
  margin: 0 auto;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
.mint-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.mint-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.pixel-axe {
  animation: axe-swing 1.8s ease-in-out infinite;
  transform-origin: 4px 11px;
}
.pixel-axe .axe-handle { fill: #8B6914; }
.pixel-axe .axe-head { fill: var(--accent, #f59e0b); }
.pixel-axe .axe-shine {
  fill: #fff;
  opacity: 0.6;
  animation: axe-glint 1.8s ease-in-out infinite;
}
@keyframes axe-swing {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(-18deg); }
  55% { transform: rotate(4deg); }
}
@keyframes axe-glint {
  0%, 35%, 60%, 100% { opacity: 0.2; }
  45% { opacity: 0.9; }
}
.mint-header-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: var(--accent);
}
.title-mint {
  color: var(--text-dim);
  font-weight: 450;
  font-size: 13px;
  letter-spacing: 0.2px;
  margin-left: 6px;
}
.mint-header-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
}
.mint-panel {
  margin-bottom: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.mint-panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 20px 0;
}
.mint-panel-body {
  padding: 12px 20px 18px;
  font-size: 13px;
  line-height: 1.5;
}

/* Tips panel (shared by mint + games) */
.mint-tips-panel {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 166, 35, 0.03) 100%);
  border-color: rgba(245, 166, 35, 0.12);
}
.mint-tips-panel .mint-panel-label {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 1.5px;
}
.mint-tips-panel .mint-panel-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: opacity 0.5s ease;
}
.mint-tips-panel .tip-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 8px;
}
.mint-tips-panel .tip-text {
  flex: 1;
}
.mint-tips-panel .tip-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  justify-content: center;
}
.mint-tips-panel .tip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}
.mint-tips-panel .tip-dot.active {
  background: var(--accent);
  width: 12px;
  border-radius: 3px;
}
.mint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: var(--text-secondary);
}
.mint-label {
  color: var(--text-dim);
  min-width: 110px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 450;
}
.mint-value {
  color: var(--text-primary);
  font-weight: 500;
}
.mint-value.mono {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}
.mint-value.claimed {
  color: var(--accent);
  font-weight: 600;
}
.mint-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}
.mint-link:hover {
  text-decoration: underline;
}
.mint-spacer {
  height: 8px;
}

/* Progress bar — Claude-style thin pill */
.mint-progress-row {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 0 4px;
}
.mint-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}
.mint-progress-label {
  color: var(--text-secondary);
  font-weight: 450;
}
.mint-pct {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.mint-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}
.mint-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Name reveal */
.mint-reveal {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  letter-spacing: 1.5px;
  font-size: 13px;
}
.mint-reveal .rv { color: var(--accent); }
.mint-reveal .nx {
  color: var(--accent);
  animation: neon-pulse 2.5s ease-in-out infinite;
}
.mint-reveal .mk { color: var(--border-light); opacity: 0.35; }
@keyframes neon-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}
.mint-proof-ok {
  color: #10b981;
  margin-right: 4px;
}

/* Actions */
.mint-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
}
.mint-btn {
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-primary);
}
.mint-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.mint-btn:active {
  transform: translateY(0);
}
.mint-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.mint-btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}
.mint-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}
.mint-btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
}
.mint-btn-secondary {
  color: var(--text-secondary);
}
.mint-btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-hover);
}

/* Forms */
.mint-start-form {
  padding: 4px 0;
}
.mint-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.mint-name-input,
.mint-pw-input,
.mint-pw-confirm,
.mint-old-pw,
.mint-new-pw,
.mint-new-pw-confirm {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mint-name-input:focus,
.mint-pw-input:focus,
.mint-pw-confirm:focus,
.mint-old-pw:focus,
.mint-new-pw:focus,
.mint-new-pw-confirm:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mint-name-status {
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
}
.mint-name-status.checking { color: var(--text-dim); }
.name-available { color: #10b981; font-weight: 600; }
.name-taken { color: #ef4444; }
.name-competing { color: var(--accent); }
.mint-pw-status,
.mint-pw-change-status {
  font-size: 12px;
  margin-top: 8px;
  min-height: 14px;
}
.mint-pw-status.error,
.mint-pw-change-status.error { color: #ef4444; }

/* Mnemonic grid */
.mint-mnemonic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
  background: var(--bg-input);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.mnemonic-word {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--text-primary);
  padding: 5px 8px;
}
.mnemonic-num {
  color: var(--text-dim);
  font-size: 10px;
  margin-right: 4px;
}

/* Mint sidebar tab */
.channel-mint .mint-icon {
  font-size: 12px;
}
.channel-nexus { color: #60A5FA !important; }
.channel-nexus.active { color: #93C5FD !important; }
.nexus-sidebar-icon { margin-right: 4px; font-size: 12px; }
.minting-indicator {
  color: var(--accent);
  font-size: 8px;
  animation: minting-pulse 1.5s ease-in-out infinite;
  margin-left: 4px;
}
@keyframes minting-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Nick badges for claimed names */
.nick-claimed { color: #ffd700 !important; }
.nick-claimed::after { content: ' \2713'; font-size: 0.85em; opacity: 0.7; }

/* Day theme adjustments */
body.day .mint-panel {
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
body.day .mint-progress-track { background: rgba(0, 0, 0, 0.06); }
body.day .mint-name-input,
body.day .mint-pw-input,
body.day .mint-pw-confirm { background: #fff; }
body.day .mint-mnemonic { background: rgba(0, 0, 0, 0.03); }
body.day .mint-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body.day .mint-btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

/* === Marketplace === */
.market-container {
  padding: 20px;
  max-width: 580px;
  margin: 0 auto;
  min-height: 100%;
}
.market-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.market-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(13, 148, 136, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  flex-shrink: 0;
}
.market-header-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: var(--text-primary);
}
.market-header-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.market-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.market-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.market-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.market-tab-btn.active {
  color: var(--accent);
  background: var(--bg-primary);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.market-panel {
  margin-bottom: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.market-panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 20px 0;
}
.market-count {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  margin-left: 6px;
}
.market-panel-body {
  padding: 12px 20px 18px;
  font-size: 13px;
  line-height: 1.5;
}
.market-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  color: var(--text-secondary);
}
.market-label {
  color: var(--text-dim);
  min-width: 80px;
  flex-shrink: 0;
}
.market-value { color: var(--text-primary); }
.market-value.claimed { color: #ffd700; font-weight: 600; }
.market-price { color: #10b981; font-weight: 600; }
.market-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.market-tab {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 450;
  cursor: pointer;
  transition: all 0.15s;
}
.market-tab.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}
.market-tab-content.hidden { display: none; }
.market-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.market-price-input,
.market-swap-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.market-price-input:focus,
.market-swap-input:focus { border-color: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12); }
.market-currency-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 11px;
  padding: 7px 8px;
  border-radius: 8px;
  outline: none;
}
.market-actions {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}
.market-btn {
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  color: var(--text-primary);
}
.market-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.market-btn-primary {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.market-btn-primary:hover { background: #059669; border-color: #059669; }
.market-btn-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}
.market-btn-danger:hover { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; }
.market-btn-small {
  padding: 4px 10px;
  font-size: 9px;
  margin-top: 8px;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}
.market-btn-small:hover { background: rgba(16, 185, 129, 0.15); }
.market-btn:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.market-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 24px 0;
  font-style: italic;
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.market-card {
  position: relative;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
}
.market-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-light);
}
.market-card-rarity {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.market-card-rarity.legendary { color: #fbbf24; }
.market-card-rarity.rare { color: #a78bfa; }
.market-card-rarity.uncommon { color: #38bdf8; }
.market-card-rarity.common { color: var(--text-dim); }
.market-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.market-card-meta {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.market-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #10b981;
}
.market-card-currency {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
}
.market-card-swap {
  font-size: 11px;
  color: var(--accent);
}
.market-card-own {
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 8px;
  font-style: italic;
}
.market-footer {
  text-align: center;
  padding: 16px 0 4px;
}
.market-footer-text {
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
  font-style: italic;
}

/* Marketplace sidebar tab */
.channel-market .market-icon {
  margin-right: 4px;
  display: inline-flex;
  vertical-align: middle;
  color: inherit;
}

/* Offer cards */
.market-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 8px;
  margin-bottom: 8px;
  gap: 10px;
}
.market-offer-card:last-child { margin-bottom: 0; }
.market-offer-info {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
}
.market-offer-info .claimed { color: #ffd700; font-weight: 600; }
.market-offer-actions { display: flex; gap: 6px; flex-shrink: 0; }
.market-btn-accept {
  background: rgba(52, 211, 153, 0.1) !important;
  color: #34D399 !important;
  border-color: rgba(52, 211, 153, 0.25) !important;
}
.market-btn-accept:hover {
  background: rgba(52, 211, 153, 0.2) !important;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}
.market-btn-decline {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #F87171 !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
}
.market-btn-decline:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.12);
}

/* Gift input */
.market-gift-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  outline: none;
}
.market-gift-input:focus { border-color: rgba(52, 211, 153, 0.5); box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.08); }

/* Day theme */
body.day .market-panel { border-color: var(--border); }
body.day .market-card { background: rgba(255, 255, 255, 0.5); }
body.day .market-card:hover { background: rgba(255, 255, 255, 0.8); }
body.day .market-price-input,
body.day .market-swap-input,
body.day .market-gift-input { background: #fff; }
body.day .market-offer-card { background: rgba(109, 40, 217, 0.03); border-color: rgba(109, 40, 217, 0.1); }

/* Whack Em All wooden leaderboard */
.whack-lb {
  width: 200px;
  flex-shrink: 0;
  align-self: stretch;
  overflow-y: auto;
  border-radius: 8px;
  background: #2A1508;
  border: 3px solid #8B5E3C;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6), inset 0 -2px 4px rgba(0,0,0,0.3), 0 0 12px rgba(139,94,60,0.15);
  padding: 0;
  position: relative;
}
.whack-lb::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; border-radius: 5px;
  background: repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(139,94,60,0.05) 8px, rgba(139,94,60,0.05) 9px);
}
.whack-lb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 8px;
  border-bottom: 2px solid #5C3317;
  background: linear-gradient(180deg, #6B3F1F, #4A2A12);
  border-radius: 5px 5px 0 0;
  position: relative; z-index: 2;
}
.whack-lb-title {
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  color: #FFD700; letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 6px rgba(255,215,0,0.2);
}
.whack-lb-live {
  font-family: 'VT323', monospace; font-size: 14px; color: #4ade80;
  animation: live-pulse 1.5s ease-in-out infinite;
}
.whack-lb .arcade-lb-list { position: relative; z-index: 2; scrollbar-width: thin; scrollbar-color: #6B3F1F #2A1508; }
.whack-lb .arcade-lb-entry { background: rgba(80,45,15,0.25); border: 1px solid rgba(139,94,60,0.2); color: #D4A574; }
.whack-lb .arcade-lb-entry:hover { background: rgba(100,55,20,0.4); }
.whack-lb .arcade-lb-entry:nth-child(1) .arcade-lb-rank { color: #FFD700; }
.whack-lb .arcade-lb-entry:nth-child(2) .arcade-lb-rank { color: #C0C0C0; }
.whack-lb .arcade-lb-entry:nth-child(3) .arcade-lb-rank { color: #CD7F32; }
.whack-lb .arcade-lb-nick { color: #FFD59E; }
.whack-lb .arcade-lb-score { color: #FFF; text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
.whack-lb .arcade-lb-empty { color: #8B7355; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.whack-lb .arcade-lb-empty span { color: #6B5340; }
.whack-lb .arcade-lb-you { background: linear-gradient(180deg, #4A2A12, #3D1F0D); border-top: 2px solid #6B3F1F; color: #FFD700; position: relative; z-index: 2; }

/* Duck Shooter hunting-themed leaderboard */
.duck-lb {
  width: 200px;
  flex-shrink: 0;
  align-self: stretch;
  overflow-y: auto;
  border-radius: 10px;
  background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 15%, #4a8c3f 15%, #2d5a1e 40%, #1a3310 100%);
  border: 3px solid #3d6b2e;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3), 0 0 12px rgba(61,107,46,0.15);
  padding: 0;
  position: relative;
}
.duck-lb::before {
  content: "🦆"; position: absolute; top: 3px; right: 12px; font-size: 16px; z-index: 3;
  animation: duck-fly 3s ease-in-out infinite;
}
@keyframes duck-fly {
  0%, 100% { transform: translateY(0) scaleX(1); }
  25% { transform: translateY(-4px) scaleX(1); }
  50% { transform: translateY(0) scaleX(-1); }
  75% { transform: translateY(-4px) scaleX(-1); }
}
.duck-lb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 8px;
  border-bottom: 2px solid #2d5a1e;
  background: linear-gradient(180deg, rgba(74,140,63,0.9), rgba(45,90,30,0.95));
  border-radius: 7px 7px 0 0;
  position: relative; z-index: 2;
}
.duck-lb-title {
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  color: #FFD700; letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7), 0 0 6px rgba(255,215,0,0.15);
}
.duck-lb-live {
  font-family: 'VT323', monospace; font-size: 14px; color: #86efac;
  animation: live-pulse 1.5s ease-in-out infinite;
}
.duck-lb .arcade-lb-list { position: relative; z-index: 2; scrollbar-width: thin; scrollbar-color: #3d6b2e #1a3310; }
.duck-lb .arcade-lb-entry { background: rgba(26,51,16,0.4); border: 1px solid rgba(61,107,46,0.3); color: #a8d89a; }
.duck-lb .arcade-lb-entry:hover { background: rgba(45,90,30,0.5); }
.duck-lb .arcade-lb-entry:nth-child(1) .arcade-lb-rank { color: #FFD700; }
.duck-lb .arcade-lb-entry:nth-child(2) .arcade-lb-rank { color: #C0C0C0; }
.duck-lb .arcade-lb-entry:nth-child(3) .arcade-lb-rank { color: #CD7F32; }
.duck-lb .arcade-lb-nick { color: #d4f0c8; }
.duck-lb .arcade-lb-score { color: #FFF; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.duck-lb .arcade-lb-empty { color: #6b9a5e; }
.duck-lb .arcade-lb-empty span { color: #4a7a3e; }
.duck-lb .arcade-lb-you { background: linear-gradient(180deg, #2d5a1e, #1a3310); border-top: 2px solid #3d6b2e; color: #FFD700; position: relative; z-index: 2; }

/* Whisper messages */
.whisper-msg { background: var(--accent-soft); border-left: 2px solid var(--accent); padding-left: 8px; border-radius: 4px; margin: 2px 0; }
.whisper-tag { color: var(--accent); font-size: 11px; font-weight: 600; margin-right: 4px; }
body.day .whisper-msg { background: var(--accent-soft); border-left-color: var(--accent); }

/* Nick action popup */
.nick-action-popup {
  background: #1a1a2e;
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  animation: fadeIn 0.12s ease;
  backdrop-filter: blur(8px);
}
.nick-popup-item {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
}
.nick-popup-item:hover {
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-primary);
}
.nick-popup-item:first-child { border-radius: 6px 6px 0 0; }
.nick-popup-item:last-child { border-radius: 0 0 6px 6px; }
.nick-popup-separator {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 3px 8px;
}
.nick-popup-danger { color: #ef4444 !important; }
.nick-popup-danger:hover { background: rgba(239, 68, 68, 0.1) !important; color: #ff6b6b !important; }
body.day .nick-action-popup { background: #fff; border-color: var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
body.day .nick-popup-item:hover { background: var(--bg-hover); }

/* ═══════════════════════════════════════════
   Profile Page
   ═══════════════════════════════════════════ */
.profile-container { max-width: 480px; margin: 0 auto; padding: 20px; }

.profile-header-card { display: flex; align-items: center; gap: 18px; padding: 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; }
.profile-avatar-wrap { position: relative; width: 80px; height: 80px; flex-shrink: 0; cursor: pointer; border-radius: 50%; overflow: hidden; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.profile-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: rgba(245,158,11,0.15); color: var(--accent); font-size: 28px; font-weight: 700; }
.profile-avatar-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; border-radius: 50%; color: #fff; }
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }
.profile-header-info { flex: 1; min-width: 0; }
.profile-nick { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.profile-editable { background: none; border: none; border-bottom: 1px solid transparent; color: var(--text-primary); font-size: 13px; padding: 3px 0; width: 100%; outline: none; font-family: inherit; transition: border-color 0.15s; }
.profile-editable:hover { border-bottom-color: var(--border); }
.profile-editable:focus { border-bottom-color: var(--accent); }
.profile-editable::placeholder { color: var(--text-dim); opacity: 0.5; }
.profile-status-input { font-size: 12px; color: var(--text-dim); }

.profile-section { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.profile-section-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 10px; }
.profile-bio { width: 100%; min-height: 60px; max-height: 120px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; padding: 10px 12px; resize: vertical; outline: none; font-family: inherit; box-sizing: border-box; transition: border-color 0.15s; }
.profile-bio:focus { border-color: var(--accent); }
.profile-bio::placeholder { color: var(--text-dim); opacity: 0.5; }

.profile-info-grid { display: flex; flex-direction: column; gap: 8px; }
.profile-info-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.profile-info-label { font-size: 12px; color: var(--text-dim); }
.profile-info-value { font-size: 12px; color: var(--text-primary); font-family: monospace; }
.profile-key-copy { cursor: pointer; transition: color 0.12s; }
.profile-key-copy:hover { color: var(--accent); }

.profile-now-playing { display: flex; align-items: center; gap: 12px; padding: 10px; background: rgba(245,158,11,0.06); border-radius: 8px; }
.profile-np-art { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.profile-np-info { flex: 1; min-width: 0; }
.profile-np-track { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-np-artist { font-size: 11px; color: var(--text-dim); }

.profile-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; cursor: pointer; font-size: 13px; color: var(--text-primary); }
.profile-toggle-row input[type="checkbox"] { display: none; }
.profile-toggle-slider { width: 36px; height: 20px; background: var(--border); border-radius: 10px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.profile-toggle-slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--text-dim); border-radius: 50%; transition: all 0.2s; }
.profile-toggle-row input:checked + .profile-toggle-slider { background: var(--accent); }
.profile-toggle-row input:checked + .profile-toggle-slider::after { left: 18px; background: #000; }

/* ═══════════════════════════════════════════
   Settings Panel
   ═══════════════════════════════════════════ */

.settings-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}
.settings-container.settings-tabbed {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100%;
  overflow: hidden; /* Prevent outer #messages scroll — .settings-content handles it */
}
.settings-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  flex-shrink: 0;
  overflow-x: auto;
}
.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.settings-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.settings-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.settings-tab-icon {
  font-size: 13px;
}
.settings-tab-label {
  font-size: 11px;
}
.settings-content {
  flex: 1;
  padding: 20px 28px;
  overflow-y: auto;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.settings-content-title {
  font-size: 18px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}
.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.settings-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}
.settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.settings-header-icon {
  font-size: 24px;
  opacity: 0.8;
}
.settings-header-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: var(--text-primary);
}
.settings-header-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.settings-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.settings-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.settings-row:last-child { border-bottom: none; }

.settings-label {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
}

/* Toggle switch */
.settings-toggle {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.settings-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.settings-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: all 0.25s ease;
}
.settings-slider:before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transition: all 0.25s ease;
}
.settings-toggle input:checked + .settings-slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.settings-toggle input:checked + .settings-slider:before {
  transform: translateX(18px);
  background: var(--accent);
}

/* Select dropdown */
.settings-select {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  min-width: 140px;
}
.settings-select:focus { border-color: var(--accent); }

/* Text input */
.settings-text {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 140px;
}
.settings-text:focus { border-color: var(--accent); }

/* Footer */
.settings-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.settings-btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.settings-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.settings-footer {
  text-align: center;
  padding: 14px 0 4px;
}
.settings-footer-text {
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.4;
}

/* Font size classes */
body.font-small #messages { font-size: 11px; }
body.font-small #messages .msg,
body.font-small #messages .msg-text,
body.font-small #messages .nick,
body.font-small #messages .ts { font-size: 11px; }
body.font-small #input { font-size: 12px; }
body.font-large #messages { font-size: 15px; }
body.font-large #messages .msg,
body.font-large #messages .msg-text,
body.font-large #messages .nick,
body.font-large #messages .ts { font-size: 15px; }
body.font-large #input { font-size: 15px; }

/* Compact mode */
body.compact-mode .msg { padding: 1px 12px; margin: 0; line-height: 1.3; border-left-width: 2px; }
body.compact-mode .messages { gap: 0; }

/* Day mode */
body.day .settings-section { background: #fff; border-color: var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
body.day .settings-section-title { color: var(--text-dim); border-color: var(--border); }
body.day .settings-row { border-color: rgba(0, 0, 0, 0.04); }
body.day .settings-slider { background: rgba(0, 0, 0, 0.08); border-color: rgba(0, 0, 0, 0.1); }
body.day .settings-slider:before { background: rgba(0, 0, 0, 0.25); }
body.day .settings-toggle input:checked + .settings-slider { background: var(--accent-soft); border-color: var(--accent); }
body.day .settings-toggle input:checked + .settings-slider:before { background: var(--accent); }
body.day .settings-select { background: #fff; }
body.day .settings-text { background: #fff; }

/* ═══════════════════════════════════════════════════════════════ */
/* FILE TRANSFER STYLES                                            */
/* ═══════════════════════════════════════════════════════════════ */

.attach-btn { color: var(--text-dim); }
.attach-btn:hover { color: var(--accent); }

/* New messages indicator (floating pill when scrolled up) */
.new-msg-indicator {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent, #6366f1);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  transition: opacity 0.2s, transform 0.2s;
  user-select: none;
  animation: newMsgBounce 0.3s ease;
}
.new-msg-indicator:hover {
  filter: brightness(1.15);
  transform: translateX(-50%) scale(1.05);
}
.new-msg-indicator.hidden { display: none; }
@keyframes newMsgBounce {
  0% { transform: translateX(-50%) translateY(10px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* File drop overlay */
.file-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  pointer-events: none;
}
.file-drop-overlay.hidden { display: none; }
.file-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
}
.file-drop-content svg { stroke: var(--accent); opacity: 0.8; }

/* Inline image preview */
.file-img-wrap { margin-top: 6px; display: block; max-width: 220px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color 0.12s; }
.file-img-wrap:hover { border-color: rgba(245, 158, 11, 0.3); }
.file-img-preview {
  max-width: 220px;
  max-height: 160px;
  display: block;
  object-fit: cover;
  transition: opacity 0.15s;
}
.file-img-preview:hover { opacity: 0.85; }
.file-img-caption { padding: 6px 10px; font-size: 12px; color: var(--text-primary); line-height: 1.3; }
.file-img-footer { padding: 4px 10px 6px; font-size: 10px; color: var(--text-dim); display: flex; align-items: center; justify-content: space-between; }

/* Full-size image lightbox */
.file-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 99999; display: flex; align-items: center; justify-content: center; cursor: zoom-out; animation: fadeIn 0.15s ease; }
.file-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }

/* File preview dialog */
.file-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 99999; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.15s ease; }
.file-preview-dialog { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; width: 420px; max-width: 90vw; max-height: 85vh; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.file-preview-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.file-preview-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.file-preview-close { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 4px 8px; transition: color 0.12s; }
.file-preview-close:hover { color: var(--text-primary); }
.file-preview-body { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.file-preview-img { max-width: 100%; max-height: 300px; border-radius: 8px; object-fit: contain; }
.file-preview-file-icon { font-size: 48px; padding: 20px; }
.file-preview-name { font-size: 12px; color: var(--text-dim); text-align: center; word-break: break-all; }
.file-preview-caption-row { padding: 0 18px 14px; }
.file-preview-caption { width: 100%; padding: 10px 14px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; outline: none; font-family: inherit; box-sizing: border-box; transition: border-color 0.15s; }
.file-preview-caption:focus { border-color: var(--accent); }
.file-preview-caption::placeholder { color: var(--text-dim); opacity: 0.6; }
.file-preview-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 16px; }
.file-preview-cancel { padding: 8px 20px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); cursor: pointer; font-size: 13px; font-family: inherit; transition: all 0.12s; }
.file-preview-cancel:hover { color: var(--text-primary); border-color: var(--text-dim); }
.file-preview-send { padding: 8px 24px; background: var(--accent); border: none; border-radius: 6px; color: #000; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; transition: opacity 0.12s; }
.file-preview-send:hover { opacity: 0.85; }

/* Inline video */
.file-video-wrap { margin-top: 4px; }
.file-video-preview {
  max-width: 400px;
  max-height: 300px;
  border-radius: 8px;
  display: block;
  background: #000;
}

/* Inline audio */
.file-audio-wrap { margin-top: 4px; }
.file-audio-wrap audio {
  height: 32px;
  max-width: 320px;
}

/* File card (documents, generic files) */
.file-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 360px;
}
.file-icon { font-size: 24px; flex-shrink: 0; }
.file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.file-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size {
  font-size: 10px;
  color: var(--text-dim);
}
.file-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.file-download-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.file-download-btn:hover {
  background: var(--bg-hover);
}

/* Progress bar for chunked transfers */
.file-transfer { min-width: 240px; }
.file-progress-bar {
  height: 4px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.file-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease;
}
.file-progress-text {
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
}

/* Day theme overrides */
body.day .file-card { background: #f5f5f5; border-color: rgba(0,0,0,0.08); }
body.day .file-download-btn { border-color: rgba(0,0,0,0.1); }
body.day .file-download-btn:hover { background: rgba(0,0,0,0.05); }
body.day .file-progress-bar { background: rgba(0,0,0,0.06); }
body.day .file-drop-overlay { background: rgba(255,255,255,0.85); }

/* === Music Tab === */
.channel-music { min-height: 0; }
.channel-music .music-icon { opacity: 0.7; }
.channel-music .sidebar-music-anim { position: relative; top: -1px; }
.channel-music.active { color: var(--accent) !important; background: rgba(245, 158, 11, 0.08) !important; }
.channel-music.active .music-icon { color: var(--accent) !important; opacity: 1; }
.channel-music:hover { color: var(--text-primary); }
.music-playing-dot { color: var(--accent); font-size: 8px; margin-left: 4px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.music-container { padding: 32px 28px; max-width: 620px; margin: 0 auto; font-family: 'Inter', system-ui, sans-serif; }
.music-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.music-header-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft, rgba(245, 158, 11, 0.10)); border: 1px solid rgba(245, 158, 11, 0.2); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; }
.music-header-title { font-size: 17px; font-weight: 650; color: var(--accent); letter-spacing: 0.3px; }
.music-header-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.title-music { color: var(--text-dim); font-weight: 450; font-size: 13px; letter-spacing: 0.2px; margin-left: 6px; }

/* Music Panels (mirrors Mint Dashboard) */
.music-panel { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; margin-bottom: 16px; }
.music-panel-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); padding: 16px 20px 0; }
.music-panel-body { padding: 12px 20px 18px; }

.music-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.music-tab { display: flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 12px; font-weight: 500; transition: all 0.15s; }
.music-tab:hover { border-color: var(--text-dim); color: var(--text-primary); }
.music-tab.active { background: rgba(245, 158, 11, 0.1); color: var(--accent); border-color: rgba(245, 158, 11, 0.3); }

.music-section.hidden { display: none; }

.music-connect-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 20px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }
.music-connect-text { font-size: 13px; color: var(--text-dim); max-width: 280px; line-height: 1.5; }
.music-connect-btn { padding: 10px 28px; border: none; border-radius: 24px; font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.music-spotify-connect { background: #1DB954; color: #fff; }
.music-spotify-connect:hover { background: #1ed760; transform: scale(1.02); }

.music-user-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15); border-radius: 10px; margin-bottom: 14px; }
.music-user-info { display: flex; align-items: center; gap: 10px; }
.music-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.music-user-avatar-placeholder { width: 28px; height: 28px; border-radius: 50%; background: rgba(245, 158, 11, 0.15); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.music-user-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.music-disconnect-btn { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 4px 12px; border-radius: 6px; font-size: 10px; cursor: pointer; transition: all 0.15s; }
.music-disconnect-btn:hover { border-color: #ef4444; color: #ef4444; }

.music-device-status { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); }
.music-device-dot { font-size: 10px; flex-shrink: 0; }
.music-device-dot.checking { color: var(--accent); animation: pulse 1s infinite; }
.music-device-dot.online { color: var(--accent); }
.music-device-dot.offline { color: #ef4444; }
.music-device-text { flex: 1; color: var(--text-secondary); font-size: 11px; }
.music-device-status.online { border-color: rgba(245, 158, 11, 0.2); background: rgba(245, 158, 11, 0.04); }
.music-device-status.offline { border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.04); }
.music-open-spotify-btn { background: #1DB954; color: #fff; border: none; border-radius: 14px; padding: 5px 14px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.music-open-spotify-btn:hover { background: #1ed760; }

.music-section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin: 16px 0 10px; }

.music-playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.music-playlist-card { display: flex; flex-direction: column; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: all 0.15s; }
.music-playlist-card:hover { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.04); transform: translateY(-1px); }
.music-playlist-card.playing { border-color: var(--accent); box-shadow: 0 0 12px rgba(245, 158, 11, 0.15); }
.music-playlist-cover { width: 100%; aspect-ratio: 1; background: rgba(255,255,255,0.02); overflow: hidden; }
.music-playlist-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-playlist-cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 32px; background: rgba(245, 158, 11, 0.08); }
.music-playlist-info { padding: 8px 10px; }
.music-playlist-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-playlist-tracks { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

.music-player-frame { border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.music-player-frame iframe { border: none; border-radius: 12px; width: 100%; }

.music-empty { padding: 20px; text-align: center; color: var(--text-dim); font-size: 12px; }
.music-loading { padding: 24px; text-align: center; color: var(--text-dim); font-size: 12px; }

/* User strip */
.music-user-strip { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

/* Now playing strip */
.music-now-strip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15); border-radius: 10px; margin-bottom: 12px; position: relative; overflow: hidden; }
.music-now-strip-art { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.music-now-strip-info { flex: 1; min-width: 0; }
.music-now-strip-controls { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.music-now-strip-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.music-now-strip-progress .music-progress-fill { height: 100%; background: var(--accent); border-radius: 1px; transition: width 0.5s linear; }

/* Service tabs (Spotify / YouTube) */
.music-service-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.music-service-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-dim); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.music-service-tab:hover { border-color: var(--text-dim); color: var(--text-primary); }
.music-service-tab.active { border-color: var(--accent); color: var(--text-primary); background: rgba(245,158,11,0.06); }

/* Sub-tabs */
.music-sub-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.music-sub-tab { background: none; border: none; color: var(--text-dim); font-size: 13px; font-weight: 500; padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; font-family: inherit; }
.music-sub-tab:hover { color: var(--text-primary); }
.music-sub-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Section titles */
.music-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 20px 0 12px; }
.music-section-title:first-child { margin-top: 0; }

/* Top tracks horizontal scroll */
.music-horizontal-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.music-horizontal-scroll::-webkit-scrollbar { height: 4px; }
.music-horizontal-scroll::-webkit-scrollbar-track { background: transparent; }
.music-horizontal-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.music-top-card { min-width: 140px; max-width: 140px; cursor: pointer; transition: transform 0.12s; flex-shrink: 0; }
.music-top-card:hover { transform: translateY(-2px); }
.music-top-card-art { width: 140px; height: 140px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.music-top-card-art img { width: 100%; height: 100%; object-fit: cover; }
.music-top-card-art-ph { width: 100%; height: 100%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.music-top-card-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-top-card-artist { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* Track rows (shared) */
.music-track-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; cursor: pointer; transition: background 0.12s; }
.music-track-row:hover { background: rgba(245, 158, 11, 0.06); }
.music-track-row.playing { background: rgba(245, 158, 11, 0.1); }
.music-track-row.playing .music-search-track { color: var(--accent); }
.music-track-num { font-size: 11px; color: var(--text-dim); min-width: 20px; text-align: right; }
.music-artist-link { cursor: pointer; transition: color 0.12s; }
.music-artist-link:hover { color: var(--accent); text-decoration: underline; }

/* Album grid */
.music-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.music-album-card { cursor: pointer; transition: transform 0.12s; }
.music-album-card:hover { transform: translateY(-2px); }
.music-album-card-art { width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.music-album-card-art img { width: 100%; height: 100%; object-fit: cover; }
.music-album-card-art-ph { width: 100%; height: 100%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 8px; }
.music-album-card-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-album-card-artist { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* Category grid */
.music-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.music-category-card { height: 80px; border-radius: 8px; background: var(--bg-secondary); border: 1px solid var(--border); display: flex; align-items: flex-end; padding: 10px 12px; cursor: pointer; transition: transform 0.12s, border-color 0.12s; overflow: hidden; }
.music-category-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.music-category-name { font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

/* Artist page */
.music-artist-header { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.music-artist-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.music-artist-meta { flex: 1; min-width: 0; }
.music-artist-name { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.music-artist-followers { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.music-artist-genres { font-size: 11px; color: var(--accent); margin-top: 4px; text-transform: capitalize; }

/* Album page header */
.music-album-header { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.music-album-header-art { width: 160px; height: 160px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.music-album-header-meta { flex: 1; min-width: 0; padding-top: 8px; }
.music-album-header-name { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.music-album-header-artist { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.music-album-header-info { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.music-play-all-btn { margin-top: 12px; padding: 8px 24px; background: var(--accent); border: none; border-radius: 20px; color: #000; font-weight: 600; font-size: 13px; cursor: pointer; transition: opacity 0.15s; }
.music-play-all-btn:hover { opacity: 0.85; }

/* Back button */
.music-back-btn { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); font-size: 12px; padding: 5px 14px; cursor: pointer; margin-bottom: 14px; transition: all 0.12s; font-family: inherit; }
.music-back-btn:hover { color: var(--text-primary); border-color: var(--accent); }

/* Context menu */
.music-context-menu { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); overflow: hidden; min-width: 160px; }
.music-ctx-item { padding: 10px 16px; font-size: 13px; color: var(--text-primary); cursor: pointer; transition: background 0.1s; }
.music-ctx-item:hover { background: rgba(245, 158, 11, 0.1); }

/* Toast */
.music-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent); color: #000; font-size: 13px; font-weight: 600; padding: 10px 24px; border-radius: 20px; opacity: 0; transition: all 0.3s; z-index: 99999; pointer-events: none; }
.music-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Search */
.music-search-bar { display: flex; align-items: center; gap: 8px; }
.music-search-input { flex: 1; padding: 10px 14px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; outline: none; font-family: inherit; transition: border-color 0.15s; }
.music-search-input:focus { border-color: var(--accent); }
.music-search-input::placeholder { color: var(--text-dim); opacity: 0.6; }
.music-search-btn { background: var(--accent); border: none; border-radius: 8px; padding: 9px 14px; color: #000; cursor: pointer; display: flex; align-items: center; transition: opacity 0.15s; }
.music-search-btn:hover { opacity: 0.85; }
.music-search-clear { background: none; border: none; color: var(--text-dim); font-size: 14px; cursor: pointer; padding: 8px; transition: color 0.15s; }
.music-search-clear:hover { color: var(--text-primary); }
.music-search-loading, .music-search-empty { padding: 16px; text-align: center; color: var(--text-dim); font-size: 12px; }
.music-search-results { margin-top: 10px; max-height: 400px; overflow-y: auto; }
.music-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.12s; }
.music-search-item:hover { background: rgba(245, 158, 11, 0.06); }
.music-search-item.playing { background: rgba(245, 158, 11, 0.1); }
.music-search-item.playing .music-search-track { color: var(--accent); }
.music-search-art { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.music-search-art img { width: 100%; height: 100%; object-fit: cover; }
.music-search-art-ph { width: 100%; height: 100%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.music-search-info { flex: 1; min-width: 0; }
.music-search-track { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-search-artist { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.music-search-dur { font-size: 11px; color: var(--text-dim); flex-shrink: 0; min-width: 36px; text-align: right; }
.music-search-play { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 6px; border-radius: 50%; transition: all 0.15s; display: flex; align-items: center; }
.music-search-play:hover { color: var(--accent); background: rgba(245, 158, 11, 0.1); }
.music-search-item.playing .music-search-play { color: var(--accent); }

/* Now Playing Panel */
.music-now-playing { margin-bottom: 16px; }
.music-now-playing-card { display: flex; align-items: center; gap: 14px; padding: 14px; background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15); border-radius: 10px; }
.music-now-art { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.music-now-art-large { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.music-now-info { flex: 1; min-width: 0; }
.music-now-track { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-now-artist { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.music-now-controls { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.music-progress-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.music-progress-time { font-size: 10px; color: var(--text-dim); min-width: 32px; }
.music-progress-track { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.music-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s linear; }

/* Music Mini Player */
.music-mini-player { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--bg-secondary); border-top: 1px solid var(--border); flex-shrink: 0; z-index: 200; height: 48px; position: relative; }
/* Mini player progress bar — thin line at top */
.music-mini-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.music-mini-progress-fill { height: 100%; background: var(--accent); transition: width 4.5s linear; border-radius: 0 1px 1px 0; }
.music-mini-progress-fill.paused { transition: none; }
/* Volume control */
.music-mini-volume { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; height: 14px; }
.music-mini-volume-icon { cursor: pointer; display: inline-flex; align-items: center; }
.music-mini-volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 50px; height: 2px; border-radius: 1px;
  background: var(--border); outline: none; cursor: pointer;
  margin: 0; vertical-align: middle;
}
.music-mini-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  margin-top: -3px;
}
.music-mini-volume-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.music-mini-volume-slider::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; }
.music-mini-player.hidden { display: none; }
.music-mini-icon { flex-shrink: 0; display: flex; align-items: center; }
.music-mini-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.music-mini-art { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.music-mini-track { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.music-mini-track-name { font-size: 11px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-mini-track-artist { font-size: 10px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-mini-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; transition: color 0.15s; }
.music-mini-btn:hover { color: var(--accent); }
.music-share-btn { color: var(--text-dim); }
.music-share-btn:hover { color: var(--accent); }

/* Track list view */
.music-track-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.music-back-btn { background: none; border: 1px solid var(--border); color: var(--accent); padding: 6px 8px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; transition: all 0.15s; }
.music-back-btn:hover { border-color: var(--accent); background: rgba(245, 158, 11, 0.08); }
.music-track-header-text { flex: 1; }
.music-play-all-btn { background: var(--accent); color: #1A1A1A; border: none; border-radius: 20px; padding: 8px 20px; font-weight: 600; font-size: 12px; cursor: pointer; transition: all 0.15s; }
.music-play-all-btn:hover { background: #D97706; transform: scale(1.02); }

.music-track-list { display: flex; flex-direction: column; gap: 2px; }
.music-track-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; transition: background 0.15s; }
.music-track-item:hover { background: rgba(255,255,255,0.04); }
.music-track-item.playing { background: rgba(245, 158, 11, 0.08); border-left: 2px solid var(--accent); }
.music-track-item.playing .music-track-name { color: var(--accent); }
.music-track-num { width: 20px; font-size: 11px; color: var(--text-dim); text-align: center; flex-shrink: 0; }
.music-track-art { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.music-track-art-placeholder { width: 36px; height: 36px; border-radius: 4px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.music-track-info { flex: 1; min-width: 0; }
.music-track-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-track-artist { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.music-track-duration { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }

/* Music Tips Panel */
.music-tips-panel { background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0.02)); border: 1px solid rgba(245, 158, 11, 0.12); border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; }
.music-tips-panel .music-panel-label { padding: 0; margin-bottom: 10px; }
.music-tip-content { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.music-tip-icon { font-size: 16px; flex-shrink: 0; }
.music-tip-dots { display: flex; gap: 4px; justify-content: center; margin-top: 10px; }
.music-tip-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); opacity: 0.4; }
.music-tip-dot.active { background: var(--accent); opacity: 1; }

/* Now Playing Chat Embed */
.now-playing-embed { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15); border-radius: 8px; max-width: 320px; vertical-align: middle; }
.np-embed-anim { display: inline-flex; width: 16px; height: 12px; overflow: hidden; flex-shrink: 0; filter: sepia(1) saturate(5) hue-rotate(0deg) brightness(1.4); }
.np-embed-anim svg { width: 16px !important; height: 16px !important; margin-top: -2px; }
.np-embed-art { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.np-embed-info { flex: 1; min-width: 0; }
.np-embed-track { font-size: 11px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-embed-artist { font-size: 9px; color: var(--text-dim); }
.np-embed-play { font-size: 9px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; padding: 2px 8px; border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 10px; flex-shrink: 0; transition: all 0.15s; }
.np-embed-play:hover { background: rgba(245, 158, 11, 0.15); border-color: var(--accent); }

/* Now Playing Badge — Lottie animated icon (sidebar only) */
.music-now-playing-lottie {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 14px; overflow: hidden;
  margin-left: 4px; vertical-align: middle;
  cursor: default;
  filter: sepia(1) saturate(5) hue-rotate(0deg) brightness(1.4);
}
.music-now-playing-lottie svg { width: 20px !important; height: 20px !important; margin-top: -3px; }
.sidebar-music-anim { margin-left: 3px !important; vertical-align: middle !important; }
/* Minting activity dot — pulsing amber with glow */
.minting-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  margin-left: 5px; vertical-align: middle; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
  animation: minting-pulse 1.5s ease-in-out infinite;
}
@keyframes minting-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
  50% { opacity: 0.4; box-shadow: 0 0 2px rgba(245, 158, 11, 0.2); }
}

/* User activity status line (below nick in user list) */
.user-activity-line {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--accent); opacity: 0.85;
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-activity-line .activity-lottie {
  display: inline-flex; width: 14px; height: 10px; overflow: hidden;
  filter: sepia(1) saturate(5) hue-rotate(0deg) brightness(1.4);
  flex-shrink: 0;
}
.user-activity-line .activity-lottie svg { width: 14px !important; height: 14px !important; margin-top: -2px; }
.user-activity-line .activity-game { cursor: pointer; }
.user-activity-line .activity-game:hover { text-decoration: underline; }

/* Game Playing Badge — shaking animation */
.game-now-playing-badge {
  font-size: 11px; margin-left: 3px; vertical-align: baseline;
  cursor: default; display: inline;
  filter: grayscale(1) brightness(2.5);
  animation: game-shake 1.5s ease-in-out infinite;
  line-height: 1;
}
.game-now-playing-badge.clickable { cursor: pointer; }
.game-now-playing-badge.clickable:hover { animation: none; transform: scale(1.3); filter: brightness(1.3); }
@keyframes game-shake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-2px) rotate(-5deg); }
  20% { transform: translateX(2px) rotate(5deg); }
  30% { transform: translateX(-2px) rotate(-3deg); }
  40% { transform: translateX(1px) rotate(2deg); }
  50%, 100% { transform: translateX(0) rotate(0deg); }
}

/* Activity swap badge — alternates music/game icons */
.activity-swap-badge { display: inline-flex; align-items: center; flex-shrink: 0; margin-left: 3px; }
.swap-icon { transition: opacity 0.3s ease; }
.swap-icon.swap-hidden { display: none !important; }

/* Combo Badge — Music + Game together */
.activity-combo-badge {
  display: inline-flex; align-items: center; gap: 2px;
  margin-left: 4px; vertical-align: middle;
  padding: 1px 4px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.2);
  animation: combo-glow 2s ease-in-out infinite;
  cursor: default;
}
.activity-combo-badge .combo-music { display: inline-flex; align-items: center; }
.activity-combo-badge .combo-game {
  font-size: 11px; cursor: pointer; transition: transform 0.15s;
}
.activity-combo-badge .combo-game:hover { transform: scale(1.3); }
.activity-combo-badge .music-now-playing-lottie {
  width: 16px; height: 12px; margin-left: 0;
}
@keyframes combo-glow {
  0%, 100% { border-color: rgba(245, 158, 11, 0.25); box-shadow: 0 0 4px rgba(245, 158, 11, 0.1); }
  50% { border-color: rgba(168, 85, 247, 0.25); box-shadow: 0 0 4px rgba(168, 85, 247, 0.1); }
}

/* Now Playing Badge — Animated Equalizer Bars (friend list, sidebar) */
.music-now-playing-badge {
  display: inline-flex; align-items: flex-end; gap: 1px;
  margin-left: 5px; height: 12px; vertical-align: middle;
  cursor: default;
}
.music-now-playing-badge .eq-bar {
  width: 2px; background: var(--accent); border-radius: 1px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.music-now-playing-badge .eq-bar:nth-child(1) { height: 4px; animation-delay: 0s; }
.music-now-playing-badge .eq-bar:nth-child(2) { height: 8px; animation-delay: 0.2s; }
.music-now-playing-badge .eq-bar:nth-child(3) { height: 5px; animation-delay: 0.4s; }
.music-now-playing-badge .eq-bar:nth-child(4) { height: 10px; animation-delay: 0.1s; }
@keyframes eq-bounce {
  0% { height: 2px; }
  100% { height: 12px; }
}

/* Day theme */
body.day .music-container { }
body.day .music-connect-card { border-color: rgba(0,0,0,0.1); }
body.day .music-playlist-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
body.day .music-playlist-card:hover { background: rgba(245, 158, 11, 0.04); }
body.day .music-user-bar { background: rgba(245, 158, 11, 0.04); border-color: rgba(245, 158, 11, 0.1); }
body.day .music-mini-player { background: rgba(255, 255, 255, 0.95); }
body.day .music-panel { background: #fff; border-color: rgba(0,0,0,0.08); }
body.day .now-playing-embed { background: rgba(245, 158, 11, 0.04); border-color: rgba(245, 158, 11, 0.1); }

/* === Development Tab — Community Suggestions Board === */
.dev-container { padding: 20px; max-width: 700px; margin: 0 auto; }
.dev-header { margin-bottom: 20px; }
.dev-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.dev-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.dev-tabs { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.dev-tab {
  padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.dev-tab:hover { color: var(--text-secondary); }
.dev-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dev-content { min-height: 200px; }

/* Offer form */
.dev-offer-form { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.dev-form-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.dev-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-size: 12px; color: var(--text-primary); font-family: inherit;
  outline: none; margin-bottom: 8px;
}
.dev-input:focus, .dev-textarea:focus { border-color: var(--accent); }
.dev-textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-size: 12px; color: var(--text-primary); font-family: inherit;
  outline: none; resize: vertical; margin-bottom: 10px;
}
.dev-submit-btn {
  background: var(--accent); color: #000; border: none; border-radius: 6px;
  padding: 8px 20px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.dev-submit-btn:hover { opacity: 0.85; }

/* Section title */
.dev-section-title { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 8px; }

/* Suggestion cards */
.dev-suggestion-card {
  display: flex; gap: 12px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; margin-bottom: 8px; transition: border-color 0.15s;
}
.dev-suggestion-card:hover { border-color: rgba(245, 158, 11, 0.3); }
.dev-suggestion-card.top10 { border-left: 3px solid var(--accent); }
.dev-suggestion-card.reviewed { opacity: 0.6; }
.dev-suggestion-card.mine { flex-direction: column; gap: 4px; }

/* Vote column */
.dev-vote-col { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 36px; }
.dev-vote-btn {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-dim); cursor: pointer; font-size: 10px; padding: 3px 8px;
  transition: all 0.12s;
}
.dev-vote-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.dev-vote-btn.active.up { background: rgba(52, 211, 153, 0.15); border-color: #34D399; color: #34D399; }
.dev-vote-btn.active.down { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; color: #ef4444; }
.dev-vote-btn:disabled { opacity: 0.3; cursor: default; }
.dev-vote-count { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.dev-vote-count.positive { color: #34D399; }
.dev-vote-count.negative { color: #ef4444; }

/* Card body */
.dev-card-body { flex: 1; min-width: 0; }
.dev-card-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.dev-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.dev-card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 4px; }
.dev-card-meta { font-size: 10px; color: var(--text-dim); }
.dev-rank { font-size: 11px; font-weight: 700; color: var(--accent); }
.dev-vote-score { font-size: 12px; font-weight: 700; color: var(--accent); }

/* Badges */
.dev-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.dev-badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
.dev-badge.approved { background: rgba(52, 211, 153, 0.15); color: #34D399; }
.dev-badge.denied { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Admin */
.dev-admin-actions { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.dev-admin-note-input {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 8px; font-size: 11px; color: var(--text-primary); font-family: inherit; outline: none;
}
.dev-admin-btn {
  padding: 4px 10px; font-size: 10px; font-weight: 600; border: none; border-radius: 4px;
  cursor: pointer; transition: opacity 0.15s;
}
.dev-admin-btn.approve { background: #34D399; color: #000; }
.dev-admin-btn.deny { background: #ef4444; color: #fff; }
.dev-admin-btn.delete { background: var(--text-dim); color: #fff; }
.dev-admin-btn:hover { opacity: 0.8; }
.dev-admin-note { font-size: 11px; color: var(--accent); margin-top: 4px; font-style: italic; }

/* Empty state */
.dev-empty { text-align: center; color: var(--text-dim); font-size: 13px; padding: 40px 0; }

/* Sidebar icon */
.dev-icon { margin-right: 4px; }

/* Day theme */
body.day .dev-suggestion-card { background: #fff; }
body.day .dev-offer-form { background: #fff; }
body.day .dev-input, body.day .dev-textarea { background: var(--bg-input); }
