:root {
  --bg-primary: #313338;
  --bg-secondary: #2b2d31;
  --bg-tertiary: #1e1f22;
  --bg-user-bar: #232428;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --bg-input: #383a40;
  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --text-header: #f2f3f5;
  --brand: #5865f2;
  --brand-hover: #4752c4;
  --green: #23a55a;
  --red: #f23f43;
  --yellow: #f1c40f;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #1a1b1e transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #111214;
}

body {
  font-family: var(--font);
  background-color: var(--bg-tertiary);
  color: var(--text-normal);
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.hidden {
  display: none !important;
}

.modal-backdrop.hidden {
  display: none !important;
}

.voice-connection-panel.hidden {
  display: none !important;
}

.modal {
  background: var(--bg-primary);
  width: 100%;
  max-width: 440px;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-header h2 {
  color: var(--text-header);
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--brand);
  color: #fff;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.input-group label .req {
  color: var(--red);
}

.input-group input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text-header);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--brand);
}

.error-msg {
  color: var(--red);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.btn {
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.btn-primary.btn-success {
  background: #23a55a !important;
  color: #fff !important;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  width: 100%;
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #949ba4;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-normal);
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary:hover {
  text-decoration: underline;
}

.full-width {
  width: 100%;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Radio Cards */
.channel-type-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.radio-label input {
  display: none;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.radio-label input:checked + .radio-card {
  border-color: var(--brand);
  background: var(--bg-hover);
}

.type-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-card small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* App Layout */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.nav-drawer {
  display: flex;
  height: 100%;
  flex-shrink: 0;
}

/* 1. SERVERS RAIL */
.servers-rail {
  width: 72px;
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
}

.server-item {
  position: relative;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill {
  position: absolute;
  left: 0;
  width: 4px;
  height: 0;
  background: #fff;
  border-radius: 0 4px 4px 0;
  transition: height 0.15s ease-out;
}

.server-item:hover .pill {
  height: 20px;
}

.server-item.active .pill {
  height: 40px;
}

.server-icon-inner {
  width: 48px;
  height: 48px;
  background: var(--bg-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-normal);
  transition: all 0.2s;
}

.server-item:hover .server-icon-inner,
.server-item.active .server-icon-inner {
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
}

.add-server-btn .server-icon-inner {
  color: var(--green);
  font-size: 28px;
  font-weight: 300;
}

.add-server-btn:hover .server-icon-inner {
  background: var(--green);
  color: #fff;
}

.server-separator {
  width: 32px;
  height: 2px;
  background: var(--bg-hover);
  border-radius: 1px;
}

.servers-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 2. CHANNELS SIDEBAR */
.channels-sidebar {
  width: 256px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-top-left-radius: 8px;
}

.server-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.server-header h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--text-header);
}

.channels-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.channel-category {
  margin-bottom: 16px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 4px 8px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 2px;
  transition: all 0.15s;
}

.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-normal);
}

.channel-item.active {
  background: var(--bg-active);
  color: var(--text-header);
  font-weight: 500;
}

.channel-hash {
  font-size: 18px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}

.voice-connected-users {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 0;
}

.voice-chan-status-row {
  margin-left: 28px;
  margin-top: -2px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
}

.voice-chan-status-row:hover {
  color: var(--text-normal);
}

.voice-chan-actions {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 4px;
}

.channel-item:hover .voice-chan-actions {
  display: flex;
}

.chan-act-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.chan-act-btn:hover {
  color: var(--text-header);
  background: rgba(255, 255, 255, 0.08);
}

.voice-user-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.voice-user-sub:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-header);
}

.voice-user-sub-avatar-wrap {
  position: relative;
  width: 22px;
  height: 22px;
}

.voice-user-sub-avatar-wrap img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  transition: box-shadow 0.15s;
}

.voice-user-sub.speaking .voice-user-sub-avatar-wrap img {
  box-shadow: 0 0 0 2px var(--green);
}

.voice-user-sub.speaking {
  color: var(--green);
  font-weight: 600;
}

.voice-user-sub-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.btn-voice-invite-row {
  margin-left: 20px;
  margin-top: 2px;
  margin-bottom: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  width: calc(100% - 28px);
  text-align: left;
  transition: all 0.15s;
}

.btn-voice-invite-row:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-header);
}

.btn-voice-invite-row .invite-chevron {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.6;
}

/* Detected Game / Activity Bar */
.detected-activity-bar {
  background: #111214;
  margin: 6px 8px;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-bar-icon {
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-bar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.activity-bar-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-bar-status {
  font-size: 10.5px;
  color: var(--text-muted);
}

.activity-bar-stream-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.activity-bar-stream-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-header);
}

/* Voice Connection Panel */
.voice-connection-panel {
  background: #111214;
  padding: 8px 12px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.voice-conn-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.voice-conn-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.rtc-signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  padding: 0 2px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.rtc-signal-bars:hover {
  transform: scale(1.15);
}

.rtc-bar {
  width: 3.5px;
  background: var(--green);
  border-radius: 1px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.rtc-bar.bar-1 { height: 6px; }
.rtc-bar.bar-2 { height: 11px; }
.rtc-bar.bar-3 { height: 16px; }

/* 1. Good Ping (< 85ms): 3 Green bars */
.rtc-signal-bars.ping-good .rtc-bar {
  background-color: #23a55a;
  box-shadow: 0 0 5px rgba(35, 165, 90, 0.45);
}

/* 2. Medium Ping (85-180ms): 2 Yellow bars, 3rd dimmed */
.rtc-signal-bars.ping-medium .rtc-bar.bar-1,
.rtc-signal-bars.ping-medium .rtc-bar.bar-2 {
  background-color: #f0b232;
  box-shadow: 0 0 5px rgba(240, 178, 50, 0.45);
}
.rtc-signal-bars.ping-medium .rtc-bar.bar-3 {
  background-color: #4e5058;
  opacity: 0.35;
  box-shadow: none;
}

/* 3. Poor / Bad Ping (> 180ms): 1 Red bar, others dimmed */
.rtc-signal-bars.ping-poor .rtc-bar.bar-1 {
  background-color: #f23f43;
  box-shadow: 0 0 5px rgba(242, 63, 67, 0.45);
}
.rtc-signal-bars.ping-poor .rtc-bar.bar-2,
.rtc-signal-bars.ping-poor .rtc-bar.bar-3 {
  background-color: #4e5058;
  opacity: 0.35;
  box-shadow: none;
}

.voice-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.conn-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.conn-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.1px;
}

.conn-timer {
  background: rgba(255, 255, 255, 0.08);
  color: #dbdee1;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.conn-subline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.conn-channel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b5bac1;
  font-weight: 500;
  max-width: 90px;
}

.conn-slash {
  opacity: 0.4;
  flex-shrink: 0;
}

.conn-server {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
  max-width: 80px;
}

.voice-conn-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-disconnect {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(242, 63, 67, 0.12);
  color: #f23f43;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
  flex-shrink: 0;
}

.btn-disconnect:hover {
  background: #f23f43;
  color: #ffffff;
  transform: scale(1.06);
}

.voice-panel-quick-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.quick-action-btn {
  flex: 1;
  height: 32px;
  background: #2b2d31;
  border: none;
  border-radius: 6px;
  color: #b5bac1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-action-btn:hover {
  background: #35373c;
  color: #ffffff;
  transform: translateY(-1px);
}

.quick-action-btn:hover {
  background: #35373c;
  color: #fff;
}

.quick-action-btn.active {
  background: #fff;
  color: #111214;
}

/* User Footer */
.user-footer {
  height: 54px;
  background: var(--bg-user-bar);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-user-bar);
}

.status-online {
  background: var(--green);
}

.status-offline {
  background: #747f8d;
}

.user-name-tag {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
  min-width: 0;
}

.user-footer .custom-badge {
  margin-left: 2px;
  padding: 1px 4px;
  font-size: 9.5px;
  flex-shrink: 0;
}

.display-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-subline-activity {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #b5bac1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  min-width: 0;
}

.user-activity-icon {
  font-size: 11px;
  flex-shrink: 0;
}

.user-activity-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.control-btn-split {
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background 0.15s;
}

.control-btn-split:hover {
  background: var(--bg-hover);
}

.control-chevron {
  font-size: 10px;
  color: var(--text-muted);
  padding: 0 2px 0 0;
  cursor: pointer;
  user-select: none;
}

.control-chevron:hover {
  color: var(--text-header);
}

.control-btn {
  background: none;
  border: none;
  outline: none;
  color: var(--text-muted);
  width: 26px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.control-btn:hover {
  color: var(--text-normal);
}

.control-btn.muted {
  color: var(--red);
}

/* 3. CHAT AREA */
.chat-area {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chan-icon {
  font-size: 22px;
  color: var(--text-muted);
}

.chat-header-title h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
}

.header-divider {
  width: 1px;
  height: 16px;
  background: var(--bg-hover);
}

.chan-topic {
  font-size: 13px;
  color: var(--text-muted);
}

.chat-header-tools {
  display: flex;
  align-items: center;
}

.tool-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.tool-btn.active, .tool-btn:hover {
  color: var(--text-header);
}

/* Chat Body */
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.message-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.msg-content {
  flex: 1;
}

.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-header);
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
}

.msg-text {
  font-size: 14px;
  color: var(--text-normal);
  line-height: 1.4;
  word-break: break-word;
}

/* Message Input Form */
.message-input-form {
  padding: 0 16px 20px;
}

.message-input-wrapper {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  height: 44px;
  gap: 6px;
}

.message-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-header);
  font-size: 14px;
}

/* Discord sleek input buttons */
.chat-attach-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4e5058;
  color: #dbdee1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  margin-right: 6px;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
  padding: 0;
  outline: none;
}

.chat-attach-btn:hover {
  background: #b5bac1;
  color: #111214;
  transform: scale(1.08);
}

.chat-tool-btn {
  background: none;
  border: none;
  outline: none;
  color: #b5bac1;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, transform 0.12s;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.chat-tool-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.08);
}

.chat-tool-btn:active {
  transform: scale(0.95);
}

.chat-tool-btn.send-btn {
  color: var(--brand);
}

.chat-tool-btn.send-btn:hover {
  color: var(--brand-hover);
  background: rgba(88, 101, 242, 0.15);
}

/* Voice Note Recording Bar (Discord style) */
.voice-note-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #2b2d31;
  border: 1px solid rgba(242, 63, 67, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.2s ease;
}

.voice-note-bar.hidden {
  display: none !important;
}

.vn-rec-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vn-rec-dot {
  width: 12px;
  height: 12px;
  background: #f23f43;
  border-radius: 50%;
  box-shadow: 0 0 10px #f23f43;
  animation: recPulse 1.2s infinite ease-in-out;
}

@keyframes recPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
  100% { transform: scale(1); opacity: 1; }
}

.vn-timer {
  font-family: monospace;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
}

.vn-rec-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  height: 24px;
  padding: 0 12px;
}

.vn-rec-wave span {
  width: 3px;
  height: 8px;
  background: #5865f2;
  border-radius: 3px;
  animation: waveAnim 1s infinite ease-in-out;
}

.vn-rec-wave span:nth-child(2) { animation-delay: 0.15s; }
.vn-rec-wave span:nth-child(3) { animation-delay: 0.3s; }
.vn-rec-wave span:nth-child(4) { animation-delay: 0.45s; }
.vn-rec-wave span:nth-child(5) { animation-delay: 0.6s; }
.vn-rec-wave span:nth-child(6) { animation-delay: 0.2s; }
.vn-rec-wave span:nth-child(7) { animation-delay: 0.35s; }
.vn-rec-wave span:nth-child(8) { animation-delay: 0.5s; }

@keyframes waveAnim {
  0%, 100% { height: 6px; background: #5865f2; }
  50% { height: 22px; background: #f23f43; }
}

.vn-rec-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vn-cancel-btn {
  background: rgba(242, 63, 67, 0.15);
  border: 1px solid rgba(242, 63, 67, 0.4);
  color: #f23f43;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.vn-cancel-btn:hover {
  background: #f23f43;
  color: #fff;
}

.vn-send-btn {
  background: #23a55a;
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(35, 165, 90, 0.3);
  transition: all 0.15s ease;
}

.vn-send-btn:hover {
  background: #1b8747;
  transform: translateY(-1px);
}

/* Chat Message Stickers */
.chat-sticker-wrap {
  margin-top: 6px;
  display: inline-block;
}

.chat-sticker-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.chat-sticker-img:hover {
  transform: scale(1.06);
}

/* Voice Room Stage View */
.voice-room-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #111214;
  overflow: hidden;
}

.voice-room-view.hidden {
  display: none !important;
}

/* 1. DISCONNECTED PREVIEW STAGE (media_1792477332206_e2c942ca.png) */
.voice-stage-preview {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e2029 0%, #111214 85%);
  padding: 32px;
}

.voice-stage-preview.hidden {
  display: none !important;
}

.preview-center-box {
  text-align: center;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.preview-subtitle {
  font-size: 14.5px;
  color: #949ba4;
  margin-bottom: 24px;
  line-height: 1.4;
}

.btn-join-voice-stage {
  background: #ffffff;
  color: #111214;
  border: none;
  border-radius: 28px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.btn-join-voice-stage:hover {
  background: #e3e5e8;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}

.btn-join-voice-stage:active {
  transform: translateY(0);
}

/* 2. ACTIVE CALL STAGE (media_1792477279004_155abbfc.png & media_1792477299961_f8a48d44.png) */
.voice-stage-active {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 96px 20px;
  overflow-y: auto;
  position: relative;
}

.voice-stage-active.hidden {
  display: none !important;
}

.voice-participants-grid {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-content: center;
  justify-content: center;
  min-height: 240px;
}

/* Participant 16:9 Tiles */
.voice-stage-tile {
  background: #2b2d31;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.voice-stage-tile.speaking {
  border-color: #23a55a;
  box-shadow: 0 0 20px rgba(35, 165, 90, 0.45);
}

.tile-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}

.tile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  transition: box-shadow 0.15s;
}

.voice-stage-tile.speaking .tile-avatar {
  box-shadow: 0 0 0 4px #23a55a;
}

.tile-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  z-index: 2;
}

.tile-user-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  z-index: 5;
}

.tile-mic-icon {
  font-size: 11px;
}

.tile-mic-icon.muted {
  color: #f23f43;
}

/* Activity Promo Card (like Discord screenshot) */
.voice-activity-promo-tile {
  background: linear-gradient(135deg, #232533 0%, #1a1b24 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 16px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.promo-tile-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.promo-tile-icon {
  font-size: 32px;
  background: rgba(255, 255, 255, 0.06);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-tile-text {
  flex: 1;
}

.promo-tile-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.promo-tile-sub {
  font-size: 12.5px;
  color: #949ba4;
}

.promo-tile-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-promo-white {
  background: #ffffff;
  color: #111214;
  border: none;
  border-radius: 20px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-promo-white:hover {
  background: #dbdee1;
}

.btn-promo-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-promo-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Floating Bottom Call Dock (media_1792477299961_f8a48d44.png) */
.voice-call-dock-wrap {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: auto;
}

.voice-call-dock {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dock-pill-group {
  background: rgba(24, 25, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  overflow: visible;
}

.dock-split-btn {
  display: flex;
  align-items: center;
  border-radius: 20px;
  transition: background 0.15s ease;
}

.dock-split-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dock-pill-btn {
  background: none;
  border: none;
  outline: none !important;
  color: #dbdee1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dock-pill-btn:focus,
.dock-pill-btn:focus-visible,
.dock-btn-round:focus,
.dock-btn-round:focus-visible,
.dock-chevron:focus,
.dock-hangup-btn:focus {
  outline: none !important;
  box-shadow: none;
}

.dock-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.dock-pill-btn.muted {
  color: #f23f43 !important;
  background: rgba(242, 63, 67, 0.15) !important;
}

.dock-pill-btn.muted:hover {
  background: rgba(242, 63, 67, 0.25) !important;
}

.dock-pill-btn.active {
  background: #23a55a !important;
  color: #fff !important;
}

.dock-chevron {
  background: transparent;
  border: none;
  outline: none !important;
  color: #949ba4;
  padding: 0 6px 0 2px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.dock-chevron:hover {
  color: #fff;
}

.dock-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

.dock-hangup-btn {
  background: #da373b;
  color: #fff;
  border: none;
  outline: none !important;
  border-radius: 20px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-hangup-btn:hover {
  background: #c02e32;
  transform: scale(1.05);
}

.dock-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(24, 25, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: none !important;
  color: #dbdee1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.dock-btn-round:hover {
  background: rgba(45, 47, 54, 0.95);
  color: #fff;
  transform: translateY(-1px);
}

/* Maximized Voice Stage Mode */
body.voice-stage-maximized .servers-rail,
body.voice-stage-maximized .channels-sidebar,
body.voice-stage-maximized .members-sidebar,
body.voice-stage-maximized .chat-header {
  display: none !important;
}

.dock-btn-round.active {
  background: var(--brand);
  color: #fff;
}

/* Floating More Popover Menu */
.dock-more-menu {
  position: absolute;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  background: #232428;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px;
  width: 240px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dock-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  color: #dbdee1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dock-menu-item:hover {
  background: var(--brand);
  color: #fff;
}

.dock-menu-item .dmenu-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.dock-menu-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(35, 165, 90, 0.2);
  color: #23a55a;
}

.dock-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* Stage Layout Focus Mode */
.voice-participants-grid.layout-focus-mode {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.voice-participants-grid.layout-focus-mode .voice-stage-tile {
  max-width: 600px !important;
  height: 380px !important;
}

.dock-pill-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Voice Side Chat Drawer */
.voice-side-chat {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  background: #2b2d31;
  border-left: 1px solid rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 200;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.voice-side-chat-open .voice-call-dock-wrap {
  transform: translate(-50%, 0) translateX(-180px);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.voice-side-chat.hidden {
  display: none !important;
}

.voice-side-chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: 700;
  color: #fff;
  font-size: 14px;
}

.voice-side-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.voice-side-form {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.voice-side-form input {
  flex: 1;
  background: #1e1f22;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

/* Activities Grid Modal */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.activity-card {
  background: #2b2d31;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
}

.activity-card:hover {
  background: #313338;
  border-color: rgba(255, 255, 255, 0.15);
}

.act-card-banner {
  height: 64px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.act-card-banner.youtube { background: linear-gradient(135deg, #c4302b 0%, #7d1c19 100%); }
.act-card-banner.gartic { background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%); }
.act-card-banner.poker { background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%); }
.act-card-banner.chess { background: linear-gradient(135deg, #6d4c41 0%, #3e2723 100%); }
.act-card-banner.skribbl { background: linear-gradient(135deg, #fbc02d 0%, #f57f17 100%); }
.act-card-banner.vimeworld { background: linear-gradient(135deg, #5865f2 0%, #3c45a5 100%); }

.act-card-info strong {
  display: block;
  font-size: 13.5px;
  color: #fff;
}

.act-card-info span {
  font-size: 11.5px;
  color: #949ba4;
}

.btn-launch-act {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}

.btn-launch-act:hover {
  background: var(--brand-hover);
}

/* Soundboard Modal */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.sound-chip {
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.sound-chip:hover {
  background: #35373c;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.sound-chip:active {
  transform: scale(0.95);
}

.sound-emoji {
  font-size: 26px;
}

.sound-title {
  font-size: 12px;
  font-weight: 600;
  color: #dbdee1;
  text-align: center;
}

/* Status Suggestions */
.status-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.status-sugg-chip {
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbdee1;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.status-sugg-chip:hover {
  background: #35373c;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* 4. MEMBERS SIDEBAR */
.members-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 16px 8px;
}

.members-sidebar.hidden {
  display: none !important;
}

.member-role-group {
  margin-bottom: 16px;
}

.member-role-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 4px 8px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.member-row:hover {
  background: var(--bg-hover);
}

.member-row.offline {
  opacity: 0.5;
}

.member-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.member-info-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.member-name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
}

.member-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-activity-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.member-act-icon {
  font-size: 10.5px;
  flex-shrink: 0;
}

.member-act-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-act-text strong {
  color: #b5bac1;
  font-weight: 600;
}

/* USER SETTINGS MODAL */
.settings-modal-box {
  max-width: 500px;
  padding: 24px;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.settings-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-header);
}

.settings-profile-card {
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-banner {
  height: 105px;
  background: linear-gradient(135deg, var(--brand), #805ad5);
  background-size: cover;
  background-position: center;
  position: relative;
}

.preview-banner-action-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}

.preview-banner-action-btn:hover {
  background: rgba(0, 0, 0, 0.88);
  border-color: rgba(255, 255, 255, 0.4);
}

.settings-avatar-row {
  padding: 0 16px 16px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.settings-avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  border: 6px solid var(--bg-tertiary);
  background: var(--bg-tertiary);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-lg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 50%;
}

.settings-avatar-wrapper:hover .avatar-overlay {
  opacity: 1;
}

.settings-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
}

.settings-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-header);
}

.success-msg {
  color: var(--green);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

/* SETTINGS WINDOW (DISCORD STYLE) */
.settings-window {
  max-width: 960px;
  width: 94vw;
  height: 680px;
  max-height: 92vh;
  padding: 0;
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-nav-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.settings-nav-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 6px 12px;
  text-transform: uppercase;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.15s ease;
}

.settings-nav-item:focus,
.settings-nav-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-normal);
}

.settings-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

.settings-nav-item svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.settings-nav-item:hover svg,
.settings-nav-item.active svg {
  opacity: 1;
}

.settings-nav-item.danger {
  color: var(--red);
}

.settings-nav-item.danger:hover {
  background: rgba(242, 63, 67, 0.12);
  color: #ff5c5c;
}

.settings-nav-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 10px 6px;
}

/* Close ESC Pill */
.settings-close-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  user-select: none;
}

.settings-close-wrap:hover .settings-close-circle {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.settings-close-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5bac1;
  transition: all 0.15s ease;
}

.settings-close-esc {
  font-size: 10px;
  font-weight: 700;
  color: #949ba4;
  letter-spacing: 0.5px;
}

.settings-content-area {
  flex: 1;
  padding: 28px 36px 36px;
  overflow-y: auto;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.settings-tab-panel {
  display: flex;
  flex-direction: column;
}

.settings-status-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-card-box {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-section-title {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  display: block;
}

.settings-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.settings-item-label strong {
  display: block;
  font-size: 13px;
  color: var(--text-header);
  font-weight: 600;
}

.settings-item-label span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-item-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 14px 0;
}

.settings-sub-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.btn-solid {
  background: #4e5058;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.btn-solid:hover {
  background: #6d6f78;
}

.btn-icon-danger {
  background: rgba(242, 63, 67, 0.12);
  color: #f23f43;
  border: 1px solid rgba(242, 63, 67, 0.25);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
}

.btn-icon-danger:hover {
  background: #f23f43;
  color: #fff;
}

.banner-color-picker-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.banner-color-picker-wrap input[type="color"] {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 44px;
  height: 44px;
  border: none;
  cursor: pointer;
  background: none;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.settings-sticky-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ACCOUNT TAB HERO CARD */
.account-card-hero {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.account-card-banner {
  height: 100px;
  background-color: var(--brand);
  background-size: cover;
  background-position: center;
}

.account-card-header {
  padding: 0 20px 16px;
  margin-top: -36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.account-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid var(--bg-secondary);
  background: var(--bg-secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.account-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.account-avatar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg-secondary);
}

.account-user-meta {
  flex: 1;
  min-width: 160px;
  margin-bottom: 4px;
}

.account-meta-names {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.account-username-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-header);
}

.account-meta-sub {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-verified-pill {
  font-size: 11px;
  color: #23a55a;
  background: rgba(35, 165, 90, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.btn-edit-profile-action {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.account-card-details {
  background: var(--bg-tertiary);
  margin: 0 16px 16px;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-detail-info {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-header);
  margin-top: 2px;
}

.detail-val-code {
  font-size: 13px;
  color: var(--text-header);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  margin-top: 2px;
  display: inline-block;
}

.btn-solid-sm {
  background: #4e5058;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-solid-sm:hover {
  background: #6d6f78;
}

.detail-badge-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
}

/* SLIDER CONTROL CARDS & PILLS */
.slider-control-card {
  background: var(--bg-tertiary);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.slider-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slider-val-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  background: rgba(88, 101, 242, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}

/* TOGGLE CARD ITEM */
.toggle-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.toggle-card-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* DISCORD RANGE SLIDERS */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #4e5058;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: 8px 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #4e5058;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  margin-top: -5px;
  transition: transform 0.12s ease, background 0.12s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  background: #f2f3f5;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: var(--brand);
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #4e5058;
  border-radius: 4px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.danger-box {
  border: 1px solid var(--red);
  background: rgba(242, 63, 67, 0.08);
  border-radius: 8px;
  padding: 20px;
}

.mic-meter-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
}

.mic-meter-fill {
  height: 100%;
  background: var(--green);
  transition: width 0.08s ease-out;
  box-shadow: 0 0 8px var(--green);
}

/* Server Channel & Member Managers */
.srv-channels-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.srv-chan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: 6px;
}

.srv-chan-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srv-chan-badge {
  font-size: 11px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-delete-chan {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.btn-delete-chan:hover {
  color: var(--red);
  background: rgba(242, 63, 67, 0.1);
}

.srv-members-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.srv-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: 6px;
}

.srv-member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srv-member-role-select {
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  color: var(--text-header);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.srv-member-role-select:focus {
  border-color: var(--brand);
}

/* PING TOOLTIP & INDICATOR */
.voice-conn-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
  user-select: none;
}

.voice-conn-info:hover {
  background: rgba(255, 255, 255, 0.06);
}

.voice-conn-info:hover .conn-title {
  text-decoration: underline;
}

.status-indicator-wrap {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ping-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: -2px;
  background: #111214;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  width: max-content;
  max-width: 215px;
}

.ping-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 10px;
  border-width: 6px;
  border-style: solid;
  border-color: #111214 transparent transparent transparent;
}

.voice-conn-info:hover .ping-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.ping-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ping-status-label-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ping-indicator-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 6px rgba(35, 165, 90, 0.8);
  display: inline-block;
  flex-shrink: 0;
}

.ping-tooltip-status {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.ping-tooltip-val {
  font-size: 11px;
  font-weight: 700;
  color: #23a55a;
  background: rgba(35, 165, 90, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.ping-tooltip-quality {
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
  color: #23a55a;
  white-space: nowrap;
}

.ping-tooltip-footer {
  margin-top: 4px;
  font-size: 10px;
  color: #949ba4;
  font-weight: 500;
  white-space: nowrap;
}

/* RTC STATUS MODAL */
.rtc-status-modal-box {
  width: 480px;
  max-width: 95vw;
  background: #2b2d31;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  padding: 0 !important;
}

.rtc-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1e1f22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rtc-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rtc-pulse-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(35, 165, 90, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rtc-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.rtc-modal-sub {
  font-size: 12px;
  color: #949ba4;
  margin-top: 2px;
  display: block;
}

.btn-close-rtc {
  background: none;
  border: none;
  color: #949ba4;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-close-rtc:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.rtc-modal-content {
  padding: 20px;
}

.rtc-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.rtc-metric-card {
  background: #1e1f22;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-card-label {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.rtc-val-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.rtc-big-val {
  font-size: 34px;
  font-weight: 800;
  color: #23a55a;
  line-height: 1;
}

.rtc-unit {
  font-size: 14px;
  font-weight: 600;
  color: #949ba4;
}

.rtc-quality-badge {
  font-size: 11px;
  font-weight: 700;
  color: #23a55a;
  background: rgba(35, 165, 90, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.rtc-sub-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-sub-metric:last-child {
  border-bottom: none;
}

.rtc-sub-metric .rtc-card-label {
  margin-bottom: 0;
  font-size: 10.5px;
}

.rtc-mid-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #dbdee1;
}

.rtc-mid-val.text-green {
  color: #23a55a;
}

.rtc-graph-box {
  background: #1e1f22;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rtc-graph-title {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  letter-spacing: 0.5px;
}

.rtc-graph-legend {
  font-size: 11px;
  font-weight: 600;
  color: #23a55a;
}

.rtc-canvas-wrap {
  margin-top: 10px;
  background: #111214;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#rtc-ping-canvas {
  width: 100%;
  height: 120px;
  display: block;
}

.rtc-info-table {
  background: #1e1f22;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rtc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.rtc-row-label {
  color: #949ba4;
}

.rtc-row-val {
  color: #dbdee1;
  font-weight: 500;
}

.rtc-code {
  background: #111214;
  color: #5865F2;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11.5px;
}

.rtc-tag-loc {
  font-size: 11px;
  color: #949ba4;
  margin-left: 4px;
}

/* SETTINGS SELECT & SWITCHES */
.device-col-label {
  display: block;
  min-height: 18px;
  line-height: 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.settings-select {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  background: #1e1f22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23949ba4'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 0 36px 0 14px;
  color: var(--text-header);
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-select:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background-color: #2b2d31;
}

.settings-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}

/* SCREEN SHARE MODAL STYLES (Discord Native - Screenshot media_1792514529658_9d6c1b73.png) */
.discord-screen-modal {
  max-width: 680px;
  width: 95vw;
  background: #313338;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.d-ss-header {
  padding: 14px 18px 12px;
  background: #313338;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.d-ss-tabs-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.d-ss-tab-pill-bar {
  display: flex;
  align-items: center;
  background: #1e1f22;
  padding: 4px;
  border-radius: 8px;
  flex: 1;
  gap: 4px;
}

.d-ss-tab-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #b5bac1;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
}

.d-ss-tab-item:hover {
  color: #dbdee1;
  background: rgba(255, 255, 255, 0.04);
}

.d-ss-tab-item.active {
  background: #35373c;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.d-ss-body {
  padding: 18px;
  max-height: 440px;
  min-height: 280px;
  overflow-y: auto;
  background: #313338;
}

.d-ss-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 540px) {
  .d-ss-grid {
    grid-template-columns: 1fr;
  }
}

.d-ss-card {
  background: #2b2d31;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.d-ss-card:hover {
  background: #2f3136;
  border-color: #5865f2;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.d-ss-card.selected {
  border-color: #5865f2;
  box-shadow: 0 0 0 1px #5865f2, 0 6px 20px rgba(88, 101, 242, 0.3);
}

.d-ss-card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  background: #111214;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.d-ss-preview-mock-bar {
  height: 18px;
  background: #1e1f22;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 5px;
}

.d-ss-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4e5058;
}

.d-ss-preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e1f22 0%, #111214 100%);
  color: #80848e;
  font-size: 32px;
  position: relative;
}

.d-ss-preview-lines {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.25;
}

.d-ss-preview-line {
  height: 5px;
  background: #fff;
  border-radius: 3px;
}

.d-ss-card-footer {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2b2d31;
}

.d-ss-card-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.d-ss-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #dbdee1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.d-ss-footer {
  background: #2b2d31;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  position: relative;
}

.d-ss-footer-quality {
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.d-ss-footer-quality:hover {
  background: rgba(255, 255, 255, 0.04);
}

.d-ss-quality-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.d-ss-quality-badge {
  font-size: 11.5px;
  color: #949ba4;
  margin-top: 2px;
}

.d-ss-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.d-ss-gear-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #35373c;
  border: none;
  color: #b5bac1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.d-ss-gear-btn:hover {
  background: #3d3f45;
  color: #ffffff;
}

.d-ss-golive-btn {
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35);
  transition: all 0.15s ease;
}

.d-ss-golive-btn:hover {
  background: #4752c4;
}

.d-ss-quality-popover {
  position: absolute;
  bottom: 64px;
  left: 18px;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  width: 270px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.ss-pill-btn {
  background: #2b2d31;
  border: 2px solid transparent;
  color: #dbdee1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.ss-pill-btn:hover {
  background: #35373c;
  color: #fff;
}

.ss-pill-btn.active {
  background: #5865f2 !important;
  color: #fff !important;
  border-color: #5865f2 !important;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.45);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-text strong {
  color: var(--text-header);
  font-size: 14px;
  display: block;
}

.toggle-text p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #80848e;
  transition: .2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--green) !important;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.radio-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e1f22;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-normal);
  transition: all 0.15s ease;
}

.radio-chip:hover {
  background: #2b2d31;
  border-color: rgba(255, 255, 255, 0.14);
}

.radio-chip:has(input:checked) {
  background: rgba(88, 101, 242, 0.12);
  border-color: var(--brand);
  color: #ffffff;
}

.radio-chip input {
  accent-color: var(--brand);
}

/* ============================================================
   DISCORD MINI PROFILE POPOVER CARD
   ============================================================ */
.mini-profile-card {
  position: fixed;
  bottom: 64px;
  left: 80px;
  width: 320px;
  background: #232428;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  z-index: 2500;
  animation: popIn 0.16s cubic-bezier(0.18, 0.89, 0.32, 1.25);
  user-select: none;
}

.mini-profile-banner {
  height: 105px;
  background-color: #5865f2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.mini-profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
}

.mini-profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 16px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.mini-profile-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
}

.mini-profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 5px solid #232428;
  object-fit: cover;
  background: #1e1f22;
  display: block;
}

.mini-profile-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3.5px solid #232428;
}

.mini-profile-bubble-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  margin-left: 12px;
  margin-bottom: 6px;
  min-width: 0;
}

.mini-profile-bubble {
  background: #111214;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #dbdee1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-profile-bubble .bubble-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-profile-body {
  padding: 12px 16px 16px;
  background: #232428;
}

.mini-profile-name-row {
  margin-bottom: 12px;
}

.mini-profile-display-name {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.mini-profile-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.mini-profile-handle {
  font-size: 13px;
  color: #949ba4;
  font-weight: 500;
}

.mini-profile-badge-nova {
  background: rgba(147, 51, 234, 0.18);
  color: #c084fc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.mini-profile-badge-owner {
  font-size: 13px;
}

.mp-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 5px;
}

.mini-profile-roles-section {
  margin-bottom: 12px;
}

.mini-profile-bio-section {
  margin-bottom: 12px;
}

.mini-profile-bio-text {
  font-size: 12.5px;
  color: #dbdee1;
  line-height: 1.45;
  white-space: pre-line;
  background: #1e1f22;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  max-height: 120px;
  overflow-y: auto;
}

.mini-profile-activity-box {
  background: #1e1f22;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.mp-activity-header {
  font-size: 10.5px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.mp-activity-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-game-icon {
  width: 36px;
  height: 36px;
  background: #2b2d31;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5865F2;
  flex-shrink: 0;
}

.mp-game-details strong {
  font-size: 13px;
  color: #fff;
  display: block;
  line-height: 1.2;
}

.mp-game-time {
  font-size: 11.5px;
  color: #23a55a;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.mini-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 9px 12px;
  color: #dbdee1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.mp-action-btn:hover {
  background: #35373c;
  color: #fff;
}

.mp-status-dropdown-wrap {
  position: relative;
}

.mp-action-btn.status-trigger {
  justify-content: space-between;
}

.mp-status-dropdown-wrap .chevron-right {
  font-size: 16px;
  color: #949ba4;
}

.mp-status-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #111214;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  z-index: 2600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.mp-status-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #dbdee1;
  cursor: pointer;
  transition: background 0.12s;
}

.mp-status-opt:hover {
  background: #232428;
  color: #fff;
}

/* Status dots */
.status-dot.status-idle {
  background-color: #f0b232;
}

.status-dot.status-dnd {
  background-color: #f23f43;
}

/* CUSTOM BADGE (CLAN TAG / ROLE BADGE) */
.custom-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(147, 51, 234, 0.22);
  color: #c084fc;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 6.5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.3px;
  line-height: 1.25;
  border: 1px solid rgba(192, 132, 252, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* MINI PROFILE BANNER EDIT BUTTON */
.mp-banner-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.mini-profile-banner:hover .mp-banner-edit-btn {
  opacity: 1;
}

.mp-banner-edit-btn:hover {
  background: rgba(0, 0, 0, 0.88);
}

/* ==========================================
   APP WALLPAPER & TRANSLUCENT GLASS THEME
   ========================================== */
.app-wallpaper-preview-box {
  position: relative;
  height: 125px;
  border-radius: 8px;
  background-color: #1e1f22;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: background-image 0.25s ease-in-out;
}

.wallpaper-preview-overlay {
  width: 86%;
  height: 78%;
  background: rgba(20, 21, 24, 0.65);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mockup-header-bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-body-row {
  flex: 1;
  display: flex;
}

.mockup-sidebar {
  width: 34px;
  background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-chat {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mockup-msg-line {
  height: 6px;
  width: 72%;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px;
}

.mockup-msg-line.short {
  width: 44%;
  background: rgba(255, 255, 255, 0.12);
}

.mockup-members {
  width: 28px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-badge-label {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 7px;
  border-radius: 4px;
}

.wallpaper-presets-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.wp-preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.18s ease;
}

.wp-preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.wp-preset-card.active {
  border-color: var(--brand);
  background: rgba(88, 101, 242, 0.15);
}

.wp-preset-thumb {
  width: 100%;
  height: 48px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-preset-thumb.dark-default {
  background: #1e1f22;
}

.wp-preset-card span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.wp-preset-card.active span {
  color: var(--text-header);
  font-weight: 600;
}

/* LIVE APP WALLPAPER WITH FROSTED GLASS PANELS */
body.has-custom-wallpaper {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-color: #1e1f22 !important;
}

body.has-custom-wallpaper .app-layout {
  background: rgba(14, 15, 17, 0.40) !important;
  backdrop-filter: blur(var(--custom-wallpaper-blur, 0px));
  -webkit-backdrop-filter: blur(var(--custom-wallpaper-blur, 0px));
}

body.has-custom-wallpaper .servers-rail {
  background: rgba(20, 21, 24, 0.72) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .channels-sidebar {
  background: rgba(35, 36, 40, var(--custom-panel-opacity, 0.70)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

body.has-custom-wallpaper .chat-area {
  background: rgba(40, 42, 47, var(--custom-panel-opacity, 0.65)) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.has-custom-wallpaper .chat-header {
  background: rgba(35, 36, 40, 0.78) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .server-header {
  background: rgba(30, 31, 35, 0.80) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .members-sidebar {
  background: rgba(35, 36, 40, var(--custom-panel-opacity, 0.70)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

body.has-custom-wallpaper .user-footer {
  background: rgba(24, 25, 28, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .voice-connection-panel {
  background: rgba(24, 25, 28, 0.88) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .message-input-wrapper {
  background: rgba(45, 47, 53, 0.82) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.has-custom-wallpaper .message-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.has-custom-wallpaper .member-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.has-custom-wallpaper .channel-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.has-custom-wallpaper .channel-item.active {
  background: rgba(255, 255, 255, 0.12);
}

/* User Volume Popover / Modal Styles */
.user-volume-dialog {
  background: #2b2d31 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6) !important;
}

.uvol-preset-btn {
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbdee1;
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
}

.uvol-preset-btn:hover {
  background: #35373c;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.uvol-preset-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Tile Volume Trigger on Participant Cards */
.tile-vol-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dbdee1;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s;
}

.tile-vol-trigger:hover {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  border-color: var(--brand);
  transform: scale(1.05);
}

.tile-vol-trigger.muted {
  background: rgba(242, 63, 67, 0.85);
  color: #fff;
}

.invite-dialog {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7) !important;
  animation: modalScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-volume-dialog {
  background: #2b2d31 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7) !important;
  animation: modalScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* =========================================================
   ACTIVITY STATUS SETTINGS TAB & CONTROLS
   ========================================================= */
.settings-active-game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(30, 31, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s;
}

.settings-active-game-card.playing {
  background: linear-gradient(135deg, rgba(35, 165, 90, 0.14) 0%, rgba(30, 31, 34, 0.9) 100%);
  border-color: rgba(35, 165, 90, 0.4);
}

.sag-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(88, 101, 242, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.settings-active-game-card.playing .sag-icon {
  background: #23a55a;
  box-shadow: 0 4px 14px rgba(35, 165, 90, 0.35);
}

.sag-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sag-info strong {
  font-size: 14.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sag-info span {
  font-size: 12px;
  color: #23a55a;
  font-weight: 500;
}

.settings-active-game-card:not(.playing) .sag-info span {
  color: var(--text-muted);
}

.btn-stop-game {
  background: rgba(242, 63, 67, 0.16);
  color: #ff7b7e;
  border: 1px solid rgba(242, 63, 67, 0.38);
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-stop-game:hover {
  background: #f23f43;
  color: #fff;
  border-color: #f23f43;
}

.quick-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.quick-game-chip {
  background: #1e1f22;
  color: #dbdee1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-game-chip:hover {
  background: rgba(88, 101, 242, 0.18);
  color: #fff;
  border-color: var(--brand);
}

.quick-game-chip.active {
  background: rgba(35, 165, 90, 0.2);
  color: #23a55a;
  border-color: #23a55a;
}

.mp-stop-activity-btn {
  background: rgba(242, 63, 67, 0.16);
  color: #ff7b7e;
  border: 1px solid rgba(242, 63, 67, 0.35);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-stop-activity-btn:hover {
  background: #f23f43;
  color: #fff;
}

.activity-bar-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #949ba4;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.activity-bar-close-btn:hover {
  background: rgba(242, 63, 67, 0.2);
  color: #f23f43;
}

/* =========================================================
   DOCK DEVICE POPOVER (CAMERA / MIC SELECTOR) & STREAM MENU
   ========================================================= */
.dock-device-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 265px;
  background: rgba(24, 25, 28, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.78);
  z-index: 200;
  animation: dockMenuPop 0.14s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.dock-device-popover.hidden,
.dock-stream-popover.hidden {
  display: none !important;
}

.ddp-section-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px 4px;
}

.ddp-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 180px;
  overflow-y: auto;
}

.ddp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #dbdee1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.ddp-item:hover {
  background: #5865f2;
  color: #fff;
}

.ddp-item.active {
  background: rgba(88, 101, 242, 0.18);
  color: #fff;
  font-weight: 600;
}

.ddp-item.active:hover {
  background: #5865f2;
}

.ddp-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.ddp-check {
  color: #5865f2;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.ddp-item:hover .ddp-check {
  color: #fff;
}

.ddp-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 5px 4px;
}

/* Discord Stream Options Popup (Matching Screenshot 4) */
.dock-stream-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  background: rgba(28, 29, 34, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.85);
  z-index: 210;
  animation: dockMenuPop 0.14s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dock-stream-popover button,
.dock-device-popover button {
  font-family: inherit;
  outline: none;
  box-shadow: none;
}

.dsp-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  background: transparent !important;
  border: none !important;
  font-family: inherit;
  text-align: left;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  color: #dbdee1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  user-select: none;
  position: relative;
  box-sizing: border-box;
}

.dsp-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.dsp-item.danger {
  color: #f23f43;
}

.dsp-item.danger:hover {
  background: rgba(242, 63, 67, 0.18) !important;
  color: #ff6b6e !important;
}

.dsp-icon {
  flex-shrink: 0;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dsp-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 5px 4px;
}

.dsp-arrow,
.dsp-chevron,
.dsp-item .dsp-checkbox {
  margin-left: auto;
}

.dsp-arrow,
.dsp-chevron {
  font-size: 16px;
  color: #b5bac1;
  line-height: 1;
}

.dsp-quality-wrap {
  position: relative;
  width: 100%;
}

.dsp-quality-submenu {
  position: absolute;
  left: calc(100% + 8px);
  bottom: -6px;
  width: 190px;
  background: rgba(24, 25, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dsp-quality-submenu.hidden {
  display: none !important;
}

.dsp-q-opt {
  width: 100%;
  background: transparent !important;
  border: none !important;
  font-family: inherit;
  text-align: left;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #dbdee1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.dsp-q-opt:hover {
  background: #5865f2 !important;
  color: #fff !important;
}

.dsp-q-opt.active {
  color: #fff;
  font-weight: 700;
  background: rgba(88, 101, 242, 0.22) !important;
}

.dsp-q-opt.active::after {
  content: '✓';
  color: #5865f2;
  font-weight: 800;
}

.dsp-q-opt.active:hover::after {
  color: #fff;
}

.dsp-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #949ba4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all 0.12s;
  flex-shrink: 0;
  box-sizing: border-box;
}

.dsp-checkbox svg {
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.12s;
}

.dsp-checkbox.checked {
  background: #5865f2;
  border-color: #5865f2;
}

.dsp-checkbox.checked svg {
  opacity: 1;
  transform: scale(1);
}

/* Screen Share Tile Badges */
.voice-stage-tile.screen-share-tile {
  background: #111214;
  border: 1.5px solid rgba(88, 101, 242, 0.45);
}

.stream-live-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  background: #f23f43;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(242, 63, 67, 0.45);
}

.tile-expand-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #dbdee1;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  z-index: 12;
  transition: all 0.15s;
}

.tile-expand-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  border-color: #5865f2;
}

/* =========================================================
   INTERACTIVE VOICE CHANNEL ACTIVITY STAGE
   ========================================================= */
.voice-activity-stage {
  width: 100%;
  max-width: 920px;
  margin: 0 auto 14px;
  background: #1e1f22;
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 15;
  flex-shrink: 0;
}

.voice-activity-stage.hidden {
  display: none !important;
}

.voice-stage-active.has-active-activity .voice-participants-grid {
  min-height: auto !important;
  flex: 0 0 auto !important;
  padding: 4px 16px 10px !important;
  gap: 10px !important;
}

.voice-stage-active.has-active-activity .voice-stage-tile {
  height: 120px !important;
  max-width: 210px !important;
  min-width: 160px !important;
}

.voice-stage-active.has-active-activity .voice-stage-tile .tile-avatar {
  width: 48px !important;
  height: 48px !important;
}

.vas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(88, 101, 242, 0.22) 0%, rgba(30, 31, 34, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vas-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vas-badge {
  background: #23a55a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.vas-title-wrap strong {
  color: #fff;
  font-size: 15px;
}

.vas-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vas-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #dbdee1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.vas-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.vas-btn.danger {
  background: rgba(242, 63, 67, 0.16);
  color: #ff7b7e;
  border-color: rgba(242, 63, 67, 0.35);
}

.vas-btn.danger:hover {
  background: #f23f43;
  color: #fff;
}

.vas-body {
  padding: 14px 16px;
  min-height: 360px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #16171a;
}

/* Drawing Studio (Gartic Phone / Skribbl.io) */
.vas-draw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #232428;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.vas-draw-canvas-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(88, 101, 242, 0.4);
  cursor: crosshair;
}

.vas-draw-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.vas-draw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #232428;
  padding: 8px 12px;
  border-radius: 8px;
}

.vas-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.12s;
}

.vas-color-swatch.active {
  transform: scale(1.22);
  border-color: #fff;
  box-shadow: 0 0 0 2px #5865f2;
}

/* Chess Board */
.vas-chess-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.vas-chess-board {
  display: grid;
  grid-template-columns: repeat(8, 38px);
  grid-template-rows: repeat(8, 38px);
  border: 3px solid #3b3d44;
  border-radius: 6px;
  overflow: hidden;
  user-select: none;
}

.vas-chess-cell {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  cursor: pointer;
  transition: background 0.1s;
}

.vas-chess-cell.light {
  background: #e2d6b5;
  color: #1e1f22;
}

.vas-chess-cell.dark {
  background: #8b6946;
  color: #1e1f22;
}

.vas-chess-cell.selected {
  background: #5865f2 !important;
  color: #fff !important;
}

/* Poker Table */
.vas-poker-table {
  background: radial-gradient(circle, #1f5c3a 0%, #113823 100%);
  border: 6px solid #3e2723;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 310px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.vas-playing-card {
  width: 48px;
  height: 68px;
  background: #fff;
  border-radius: 6px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #111;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.vas-playing-card.red {
  color: #d92626;
}

.vas-playing-card.hidden-card {
  background: linear-gradient(135deg, #5865f2 0%, #313896 100%);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

/* =========================================================
   NOISE SUPPRESSION 3 LEVELS (ЛЕГКИЙ / СРЕДНИЙ / ВЫСОКИЙ)
   ========================================================= */
.dock-noise-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px 6px 6px;
}

.dock-noise-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b5bac1;
  border-radius: 6px;
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s;
  text-align: center;
}

.dock-noise-pill:hover {
  background: rgba(88, 101, 242, 0.25);
  color: #fff;
  border-color: rgba(88, 101, 242, 0.5);
}

.dock-noise-pill.active {
  background: #5865f2;
  color: #fff;
  border-color: #5865f2;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.45);
}

.noise-level-card {
  background: #1e1f22;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 11px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none !important;
  user-select: none;
}

.noise-level-card strong {
  font-size: 13px;
  font-weight: 700;
  color: #dbdee1;
}

.noise-level-card span {
  font-size: 10.5px;
  color: #949ba4;
}

.noise-level-card:hover {
  background: #2b2d31;
  border-color: rgba(88, 101, 242, 0.6);
}

.noise-level-card.active {
  background: #5865f2 !important;
  border-color: #5865f2 !important;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.45) !important;
}

.noise-level-card.active strong {
  color: #ffffff !important;
}

.noise-level-card.active span {
  color: #e0e4ff !important;
}

.noise-level-card:focus,
.noise-level-card:focus-visible {
  outline: none !important;
}

/* =========================================================
   DISCORD STREAM HERO STAGE & PARTICIPANT FILMSTRIP (SCREENSHOT 3)
   ========================================================= */
.voice-stage-active.has-active-stream .voice-activity-promo-tile {
  display: none !important;
}

.voice-participants-grid.has-active-stream {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  gap: 12px !important;
  padding: 8px 16px 12px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.voice-stream-hero-stage {
  flex: 1 1 auto;
  width: 100%;
  min-height: 280px;
  max-height: calc(100vh - 240px);
  position: relative;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.voice-stream-hero-stage video.stream-hero-video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #000000;
}

.stream-hero-header {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 15;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  padding: 4px 10px 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.stream-hero-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.stream-hero-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 15;
}

.stream-hero-btn {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #dbdee1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stream-hero-btn:hover {
  background: rgba(88, 101, 242, 0.9);
  color: #fff;
  border-color: #5865f2;
  transform: translateY(-1px);
}

/* Bottom Filmstrip */
.voice-participants-filmstrip {
  flex: 0 0 120px;
  height: 120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 8px;
  box-sizing: border-box;
}

.voice-participants-filmstrip .voice-stage-tile {
  width: 180px !important;
  height: 110px !important;
  min-width: 160px !important;
  max-width: 210px !important;
  flex: 0 0 auto !important;
  border-radius: 8px !important;
  background: #2b2d31 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.voice-participants-filmstrip .voice-stage-tile .tile-avatar {
  width: 48px !important;
  height: 48px !important;
}

.voice-participants-filmstrip .voice-stage-tile .tile-user-badge {
  font-size: 11px !important;
  padding: 3px 6px !important;
}

.stream-mini-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #111214 !important;
  border: 1.5px solid rgba(88, 101, 242, 0.6) !important;
}

.stream-mini-center-icon {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: -6px;
}

/* Fullscreen / Maximized Theater Mode (Screenshot 3) */
body.voice-stage-maximized .chat-main {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  background: #000000 !important;
}

body.voice-stage-maximized .voice-stage-active {
  background: #000000 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 12px 16px 20px !important;
}

body.voice-stage-maximized .voice-stream-hero-stage {
  max-height: calc(100vh - 180px) !important;
  border-radius: 10px !important;
  border: none !important;
}

body.voice-stage-maximized .voice-call-dock-wrap {
  bottom: 14px !important;
}

/* =========================================================
   DISCORD FEATURE PACK: PINS, VOICE NOTES, REACTIONS, ATTACHMENTS,
   ROLES, MENTIONS, SOUNDBOARD
   ========================================================= */

/* 1. PINNED MESSAGES POPOVER */
.pins-popover {
  position: absolute;
  top: 48px;
  right: 16px;
  width: 420px;
  max-width: 90vw;
  max-height: 520px;
  background: #2b2d31;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 2000;
  animation: modalPopIn 0.16s ease;
}

.pins-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #1e1f22;
  border-radius: 8px 8px 0 0;
}

.pins-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pins-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pin-item {
  background: #1e1f22;
  border-radius: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s ease;
  position: relative;
}

.pin-item:hover {
  background: #232428;
  border-color: rgba(88, 101, 242, 0.4);
}

.pin-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pin-author {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.pin-date {
  font-size: 10.5px;
  color: #949ba4;
}

.pin-content {
  font-size: 13px;
  color: #dbdee1;
  line-height: 1.4;
  word-break: break-word;
}

.pin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.pin-action-btn {
  background: transparent;
  border: none;
  color: #949ba4;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s;
}

.pin-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.pin-action-btn.unpin:hover {
  color: #f23f43;
}

.pins-empty {
  text-align: center;
  padding: 40px 20px;
  color: #949ba4;
  font-size: 13px;
}

/* 2. ATTACHMENT PREVIEW (Ctrl+V paste & upload) */
.chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #2b2d31;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-att-thumb-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-att-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-att-info {
  flex: 1;
  overflow: hidden;
}

.chat-att-filename {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-att-sub {
  font-size: 11px;
  color: #949ba4;
  margin-top: 2px;
}

.chat-att-remove-btn {
  background: #da373c;
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s;
}

.chat-att-remove-btn:hover {
  transform: scale(1.1);
}

/* Chat Image In-Message */
.chat-img-thumb {
  max-width: 380px;
  max-height: 280px;
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.chat-img-thumb:hover {
  filter: brightness(1.08);
  transform: scale(1.01);
}

/* 3. VOICE NOTES (RECORDING BAR & PLAYER) */
.voice-note-recording-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #2b2d31;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.voice-note-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f23f43;
  animation: pulseRecording 1s infinite alternate;
}

@keyframes pulseRecording {
  from { opacity: 0.3; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}

.voice-note-timer {
  font-family: monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #f23f43;
}

.voice-note-waveform-anim {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}

.vn-bar {
  width: 3px;
  background: #5865f2;
  border-radius: 2px;
  animation: vnWave 0.6s infinite ease-in-out alternate;
}

.vn-bar:nth-child(2) { animation-delay: 0.15s; }
.vn-bar:nth-child(3) { animation-delay: 0.3s; }
.vn-bar:nth-child(4) { animation-delay: 0.45s; }

@keyframes vnWave {
  from { height: 4px; }
  to { height: 18px; }
}

/* In-chat Voice Note Player */
.voice-note-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2b2d31;
  padding: 8px 14px;
  border-radius: 24px;
  max-width: 360px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.vn-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.12s, background 0.12s;
  flex-shrink: 0;
}

.vn-play-btn:hover {
  transform: scale(1.08);
  background: #4752c4;
}

.vn-track {
  flex: 1;
  position: relative;
  height: 6px;
  background: #1e1f22;
  border-radius: 3px;
  cursor: pointer;
}

.vn-track-progress {
  height: 100%;
  background: #5865f2;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.vn-duration {
  font-size: 11.5px;
  font-family: monospace;
  color: #949ba4;
  min-width: 36px;
  text-align: right;
}

/* 4. REACTIONS ROW & PILLS */
.msg-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.msg-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 12px;
  color: #dbdee1;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}

.msg-reaction-pill:hover {
  background: #35373c;
  border-color: rgba(255, 255, 255, 0.2);
}

.msg-reaction-pill.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865f2;
  color: #5865f2;
}

.msg-reaction-count {
  font-size: 11.5px;
  font-weight: 700;
}

/* 5. MESSAGE HOVER ACTION BAR (Discord style) */
.message {
  position: relative;
}

.message-hover-actions {
  position: absolute;
  top: -14px;
  right: 14px;
  display: none;
  align-items: center;
  background: #313338;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 50;
}

.message:hover .message-hover-actions {
  display: flex;
}

.msg-hover-btn {
  background: transparent;
  border: none;
  color: #b5bac1;
  padding: 6px 9px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}

.msg-hover-btn:hover {
  background: #35373c;
  color: #fff;
}

.msg-hover-btn.danger:hover {
  color: #f23f43;
}

/* Quick Emoji Picker Popover */
.quick-emoji-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.quick-emoji-item {
  background: transparent;
  border: none;
  font-size: 18px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
}

.quick-emoji-item:hover {
  background: #35373c;
  transform: scale(1.2);
}

/* 6. MENTIONS AUTOCOMPLETE POPUP & PILLS */
.mentions-autocomplete-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 16px;
  width: 260px;
  max-height: 220px;
  background: #2b2d31;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  z-index: 1500;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mention-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.selected {
  background: #35373c;
}

.mention-item-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.mention-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Mention Pill In Message */
.mention-pill {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  transition: background 0.12s, color 0.12s;
}

.mention-pill:hover {
  background: #5865f2;
  color: #fff;
}

.mention-pill.me {
  background: rgba(240, 178, 50, 0.35);
  color: #ffe699;
}

.message.has-mention {
  background: rgba(240, 178, 50, 0.08) !important;
  border-left: 3px solid #f0b232 !important;
}

/* 7. ROLES MANAGEMENT UI & MEMBERS GROUPING */
.srv-roles-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.srv-role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1f22;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.srv-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
}

.srv-role-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.member-role-group-header {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 12px 6px;
}

/* 8. SOUNDBOARD CUSTOM SOUNDS SECTION */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.sound-chip {
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #fff;
  transition: all 0.14s ease;
}

.sound-chip:hover {
  background: #35373c;
  border-color: #5865f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.25);
}

.sound-chip:active {
  transform: scale(0.96);
}

.sound-emoji {
  font-size: 22px;
}

.sound-title {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Mobile Navigation Toggle Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-normal);
  font-size: 20px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 6px;
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
  color: #fff;
}

/* Mobile Nav Overlay Backdrop */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

body.mobile-nav-open .mobile-nav-overlay,
body.mobile-members-open .mobile-nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Discord Emoji Picker Popover */
.chat-emoji-popover {
  position: fixed;
  width: 320px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  animation: popIn 0.15s ease-out;
}

.chat-emoji-popover.hidden {
  display: none !important;
}

.emoji-picker-header {
  padding: 10px 12px 6px 12px;
}

.emoji-picker-search {
  width: 100%;
  box-sizing: border-box;
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.emoji-picker-search:focus {
  border-color: var(--brand);
}

.emoji-picker-categories {
  display: flex;
  gap: 2px;
  padding: 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #232428;
}

.emoji-cat-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.15s;
}

.emoji-cat-btn:hover, .emoji-cat-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.emoji-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 12px 10px;
  max-height: 260px;
}

.emoji-picker-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #949ba4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 8px 0 6px 4px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}

.emoji-grid-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}

.emoji-grid-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.18);
}

/* Emoji & Stickers Picker Top Tabs */
.picker-top-tabs {
  display: flex;
  background: #1e1f22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.picker-mode-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #949ba4;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.picker-mode-tab:hover {
  color: #dbdee1;
  background: rgba(255, 255, 255, 0.04);
}

.picker-mode-tab.active {
  color: #fff;
  border-bottom: 2px solid var(--brand);
  background: rgba(88, 101, 242, 0.08);
}

.picker-panel-content.hidden {
  display: none !important;
}

.sticker-picker-header {
  padding: 10px 12px 6px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.sticker-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  max-height: 270px;
}

.stickers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sticker-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  background: #1e1f22;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.sticker-item-card:hover {
  background: #313338;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sticker-img-preview {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.sticker-name-label {
  font-size: 11px;
  color: #dbdee1;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sticker-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(242, 63, 67, 0.85);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sticker-item-card:hover .sticker-del-btn {
  display: flex;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Mobile App Layout & Locked Viewport */
  html, body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    height: 100dvh;
    touch-action: pan-y;
  }

  .app-layout {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    height: 100dvh;
  }

  /* Unified Mobile Drawer (Servers Rail + Channels Sidebar) */
  .nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 312px;
    max-width: 86vw;
    display: flex;
    z-index: 950;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.65);
    background: var(--bg-tertiary);
    will-change: transform;
  }

  body.mobile-nav-open .nav-drawer {
    transform: translateX(0);
  }

  .nav-drawer .servers-rail {
    position: static;
    width: 72px;
    height: 100%;
    flex-shrink: 0;
    transform: none;
    box-shadow: none;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .nav-drawer .channels-sidebar {
    position: static;
    flex: 1;
    min-width: 0;
    height: 100%;
    margin-left: 0;
    transform: none;
    box-shadow: none;
    border-top-left-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .channels-sidebar .user-footer {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  /* Chat Area on Mobile - 100% full screen when closed, pushed slightly like Discord when drawer opens */
  .chat-area {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    flex: 1;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.28s ease;
    will-change: transform;
  }

  body.mobile-nav-open .chat-area {
    transform: translateX(min(312px, 86vw));
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    overflow: hidden;
  }

  body.mobile-members-open .chat-area {
    transform: translateX(max(-260px, -82vw));
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    overflow: hidden;
  }

  /* Members Sidebar as right drawer on mobile */
  .members-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 260px;
    max-width: 82vw;
    z-index: 950;
    display: flex !important;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.65);
    background: var(--bg-secondary);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    will-change: transform;
  }

  body.mobile-members-open .members-sidebar {
    transform: translateX(0);
  }

  /* Mobile Backdrop Overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 940;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  body.mobile-nav-open .mobile-nav-overlay,
  body.mobile-members-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Chat Header on Mobile */
  .chat-header {
    height: 48px;
    padding: 0 10px;
    flex-shrink: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-right: 8px;
    color: var(--text-normal);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
  }

  /* Floating Call Dock on mobile */
  .voice-call-dock-wrap {
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)) !important;
    width: auto !important;
    max-width: 96vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 120 !important;
  }

  body.voice-side-chat-open .voice-call-dock-wrap {
    transform: translateX(-50%) !important;
  }

  .voice-call-dock {
    gap: 0 !important;
    justify-content: center !important;
  }

  /* Hide outer invite & layout buttons on mobile for clean pill look */
  .dock-btn-round {
    display: none !important;
  }

  /* Hide small chevron drop-arrows on mobile to save precious screen space */
  .dock-chevron {
    display: none !important;
  }

  .dock-pill-group {
    padding: 6px 8px !important;
    gap: 4px !important;
    border-radius: 28px !important;
    max-width: 96vw !important;
    background: rgba(20, 21, 24, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75) !important;
  }

  .dock-pill-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .dock-hangup-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .dock-divider {
    height: 22px !important;
    margin: 0 3px !important;
  }

  .dock-more-menu,
  .dock-stream-popover,
  .dock-device-popover {
    max-width: 92vw !important;
    bottom: 58px !important;
  }

  /* Fullscreen Voice Side Chat on mobile */
  .voice-side-chat {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 300 !important;
  }

  /* Chat Input on mobile */
  .message-input-form {
    padding: 6px 8px max(12px, env(safe-area-inset-bottom)) 8px !important;
    flex-shrink: 0 !important;
  }

  .message-input-wrapper {
    height: 44px !important;
    padding: 0 8px !important;
    gap: 4px !important;
  }

  .chat-tool-btn {
    font-size: 16px !important;
    padding: 6px 5px !important;
  }

  /* Modal dialogs responsiveness on mobile */
  .modal-content, .settings-modal-box, .auth-modal-box, .soundboard-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 92vh !important;
    padding: 16px !important;
  }

  /* Settings Window (Discord Style) responsiveness on mobile */
  .settings-window {
    flex-direction: column !important;
    width: 96vw !important;
    max-width: 96vw !important;
    height: 94dvh !important;
    max-height: 94dvh !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    margin: auto !important;
  }

  .settings-nav-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    flex-direction: row !important;
    flex-shrink: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 10px 10px !important;
    gap: 8px !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #1e1f22 !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .settings-nav-sidebar::-webkit-scrollbar {
    display: none !important;
  }

  .settings-nav-header {
    display: none !important;
  }

  .settings-nav-separator {
    display: none !important;
  }

  .settings-nav-item {
    flex-shrink: 0 !important;
    width: auto !important;
    padding: 7px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #949ba4 !important;
    gap: 6px !important;
  }

  .settings-nav-item.active {
    background: #5865f2 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
  }

  .settings-nav-item.danger {
    background: rgba(242, 63, 67, 0.15) !important;
    color: #f23f43 !important;
  }

  .settings-content-area {
    flex: 1 !important;
    width: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px 32px 14px !important;
    box-sizing: border-box !important;
  }

  .settings-modal-header {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
  }

  .settings-modal-header h2 {
    font-size: 18px !important;
  }

  .settings-card-box {
    padding: 14px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Single column grids for mobile */
  .settings-content-area div[style*="grid-template-columns: 1fr 1fr"],
  .settings-content-area div[style*="grid-template-columns:1fr 1fr"],
  .settings-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .quick-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 6px !important;
  }

  .quick-game-chip {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  .wallpaper-presets-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .settings-avatar-row {
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 10px 12px !important;
  }

  .settings-avatar-wrapper {
    width: 64px !important;
    height: 64px !important;
  }

  .settings-avatar-wrapper .avatar-lg {
    width: 64px !important;
    height: 64px !important;
  }

  .settings-sticky-footer {
    position: sticky !important;
    bottom: -16px !important;
    background: var(--bg-primary) !important;
    padding: 12px 0 0 0 !important;
    margin-top: 14px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 5 !important;
  }

  .chat-emoji-popover {
    width: 92vw;
    max-width: 320px;
    left: 4vw !important;
    right: 4vw !important;
  }
}



