/* DISCORD CLONE - JOGOS BOLADOS / GAMEZEDA - TEMA ESCURO OFICIAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  user-select: none;
}

:root {
  --app-height: 100dvh;
  --bg-primary: #313338;
  --bg-secondary: #2b2d31;
  --bg-tertiary: #1e1f22;
  --bg-user-bar: #232428;
  --bg-channel-hover: #35373c;
  --bg-channel-active: #404249;
  --bg-input: #383a40;
  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --text-header: #f2f3f5;
  --accent-blurple: #5865f2;
  --accent-blurple-hover: #4752c4;
  --accent-green: #23a55a;
  --accent-red: #f23f43;
  --border-subtle: #202225;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-tertiary);
  color: var(--text-normal);
  display: flex;
}

/* MODAL DE ENTRADA (SEM LOGIN, SÓ NOME) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.welcome-modal {
  background: var(--bg-primary);
  width: 440px;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: popIn 0.25s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header h2 {
  color: var(--text-header);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.avatar-preview-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 3px solid var(--accent-blurple);
  object-fit: cover;
}

.form-group {
  text-align: left;
  margin-bottom: 20px;
}

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

.form-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: none;
  padding: 12px 14px;
  border-radius: 4px;
  color: var(--text-header);
  font-size: 16px;
  outline: none;
  transition: border 0.15s;
}

.form-input:focus {
  outline: 2px solid var(--accent-blurple);
}

.btn-enter {
  width: 100%;
  background: var(--accent-blurple);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-enter:hover {
  background: var(--accent-blurple-hover);
}

/* APP LAYOUT PRINCIPAL */
#app {
  display: flex;
  width: 100%;
  height: 100%;
  height: 100vh;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
}

/* BARRA DE CANAIS (LATERAL ESQUERDA) */
.channels-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.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.25);
  font-weight: 700;
  color: var(--text-header);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}

.server-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.server-badge {
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 12px;
  margin: 10px 10px 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.channels-scroll::-webkit-scrollbar {
  width: 4px;
}
.channels-scroll::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 2px;
}

.channel-category {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 8px 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.channel-category:hover {
  color: var(--text-normal);
}

.category-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow: hidden;
  pointer-events: none;
}

.category-header-left * {
  pointer-events: none;
}

.category-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  pointer-events: none;
}

.channel-category.collapsed .category-chevron {
  transform: rotate(-90deg);
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: auto;
}

.channel-category:hover .category-actions,
.channel-category:focus-within .category-actions {
  opacity: 1;
}

.btn-cat-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  pointer-events: auto;
}

.btn-cat-action svg,
.btn-cat-action i {
  pointer-events: none;
}

.btn-cat-action:hover {
  color: var(--text-header);
  background: rgba(255, 255, 255, 0.1);
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.1s, color 0.1s;
  position: relative;
  user-select: none;
}

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

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

.channel-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.channel-item-left * {
  pointer-events: none;
}

.channel-item .channel-icon {
  font-size: 16px;
  opacity: 0.7;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.channel-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.channel-voice-meta,
.channel-voice-meta * {
  pointer-events: none;
}

.channel-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: auto;
}

.channel-item:hover .channel-item-actions,
.channel-item:focus-within .channel-item-actions,
.channel-item.active .channel-item-actions {
  opacity: 1;
}

.btn-channel-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  pointer-events: auto;
}

.btn-channel-delete svg,
.btn-channel-delete i {
  pointer-events: none;
}

.btn-channel-delete:hover {
  color: #ed4245;
  background: rgba(237, 66, 69, 0.15);
}

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

.voice-user-pill {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #949ba4;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.voice-user-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #dbdee1;
}

.voice-user-pill img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  transition: box-shadow 0.15s;
}

.voice-user-pill.speaking img {
  box-shadow: 0 0 0 2px var(--accent-green);
}

.voice-user-pill .pill-name {
  color: #dbdee1;
  font-size: 14px;
  font-weight: 500;
}

.voice-user-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  flex-shrink: 0;
}

.voice-status-icon {
  width: 14px;
  height: 14px;
  color: #ffffff;
  stroke: #ffffff;
  opacity: 0.95;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.card-name .voice-user-status-icons {
  margin-left: 6px;
}

/* ==========================================
   PAINEL DE CONEXÃO DE VOZ (LAYOUT FIXO ESTILO DISCORD)
   ========================================== */
.voice-connection-status {
  background: #111214;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 12px 10px 12px;
  display: none;
  flex-direction: column;
  position: relative;
}

.voice-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

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

.voice-signal-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(35, 165, 90, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.voice-signal-icon-box svg,
.voice-signal-icon-box i {
  pointer-events: none;
}

.voice-status-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.voice-status-title {
  color: #23a55a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.voice-status-sub {
  font-size: 11.5px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.btn-voice-header-action {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: #949ba4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-voice-header-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #dbdee1;
}

.btn-voice-header-action.active {
  color: #23a55a;
}

.btn-voice-header-action.danger:hover {
  background: rgba(237, 66, 69, 0.15);
  color: #ed4245;
}

.btn-voice-header-action svg,
.btn-voice-header-action i {
  pointer-events: none;
}

/* Grade de Ações Rápidas (3 botões: Câmera, Tela, Som) */
.voice-tiles-row {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.voice-tile-btn {
  flex: 1;
  height: 32px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dbdee1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.08s;
}

.voice-tile-btn:hover {
  background: #35373c;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.voice-tile-btn:active {
  transform: scale(0.96);
}

.voice-tile-btn.active-stream {
  background: rgba(35, 165, 90, 0.2);
  color: #23a55a;
  border-color: rgba(35, 165, 90, 0.4);
}

.voice-tile-btn svg,
.voice-tile-btn i {
  pointer-events: none;
}

/* POPOVER DO SUPRESSOR DE RUÍDO */
.noise-suppression-popover {
  position: fixed;
  bottom: 120px;
  left: 245px;
  width: 320px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10003;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  animation: noisePopoverFadeIn 0.15s ease-out;
}

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

.noise-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.noise-popover-body {
  display: flex;
  flex-direction: column;
}

.rnnoise-status-badge-box {
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.28);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.rnnoise-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 6px #23a55a;
  display: inline-block;
  transition: background-color 0.2s, box-shadow 0.2s;
}

@media (max-width: 768px) {
  .noise-suppression-popover {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 110px;
  }
}

/* BARRA DO USUÁRIO LOGADO */
.user-panel {
  position: relative;
  height: 52px;
  background: var(--bg-user-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.user-info:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-avatar-wrap {
  position: relative;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
}

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

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  color: var(--text-header);
  font-size: 14px;
  font-weight: 600;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.user-controls {
  display: flex;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s, color 0.15s;
}

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

.icon-btn.active-muted {
  color: var(--accent-red);
}

/* ÁREA PRINCIPAL CENTRAL (CHAT / PALCO DE TELA) */
.main-content {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

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

.chat-header-title {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--text-header);
  font-size: 16px;
}

.chat-header-title .hash {
  color: var(--text-muted);
  font-size: 20px;
  margin-right: 8px;
}

.chat-header-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.chat-header-icons input {
  background: var(--bg-tertiary);
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-normal);
  font-size: 13px;
  outline: none;
  width: 140px;
}

/* PALCO DE COMPARTILHAMENTO DE TELA E VÍDEO (DISCORD STAGE) */
.video-stage {
  display: none;
  flex-direction: column;
  background: #111214;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.stream-switcher-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(17, 18, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  z-index: 20;
}

.stream-switcher-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.stream-switcher-pill:hover {
  background: var(--bg-channel-active);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.stream-switcher-pill.active {
  background: rgba(88, 101, 242, 0.25);
  border-color: var(--accent-blurple);
  color: #fff;
}

.stream-switcher-pill img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.video-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.screen-tile {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  height: 500px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  border: 2px solid transparent;
}

.screen-tile.focused {
  max-width: 100%;
  height: 100%;
}

.screen-tile video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.screen-tile-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  z-index: 10;
}

.live-indicator {
  background: var(--accent-red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.screen-tile-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.screen-btn {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.screen-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* CONTROLE DE VOLUME DA TRANSMISSÃO NO QUADRO DE TELA */
.screen-volume-control-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border-radius: 4px;
  padding: 0 8px 0 0;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.screen-volume-control-box:hover {
  background: rgba(0, 0, 0, 0.88);
  border-color: rgba(255, 255, 255, 0.2);
}

.screen-volume-control-box .screen-btn {
  background: transparent;
  border-radius: 4px 0 0 4px;
}

.screen-volume-control-box .screen-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.screen-volume-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-volume-slider {
  width: 76px;
  height: 5px;
  cursor: pointer;
}

.screen-volume-val {
  font-size: 11px;
  font-weight: 700;
  color: #dbdee1;
  min-width: 34px;
  font-family: Consolas, monospace;
  text-align: right;
  user-select: none;
}

/* QUADRO DE USUÁRIO DE VOZ NA GRADE */
.user-voice-card {
  width: 220px;
  height: 140px;
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.user-voice-card:hover {
  background: var(--bg-channel-hover);
  transform: translateY(-2px);
}

.user-voice-card.has-stream {
  border-color: var(--accent-red);
}

.user-voice-card.has-stream::after {
  content: '🔴 ASSISTIR LIVE';
  position: absolute;
  bottom: 8px;
  background: var(--accent-red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.user-voice-card.speaking {
  box-shadow: 0 0 0 2px var(--accent-green);
}

.user-voice-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 8px;
}

.user-voice-card .card-name {
  color: var(--text-header);
  font-size: 14px;
  font-weight: 600;
}

/* BARRA FLUTUANTE DE CONTROLES DO DISCORD NA LIVE */
.stage-control-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(43, 45, 49, 0.95);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.stage-btn {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-header);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
}

.stage-btn:hover {
  background: var(--bg-channel-active);
  transform: translateY(-2px);
}

.stage-btn.active-stream {
  background: var(--accent-green);
  color: white;
}

.stage-btn.danger {
  background: var(--accent-red);
  color: white;
}

.stage-btn.danger:hover {
  background: #d83a3e;
}

.stage-btn svg,
.stage-btn i {
  pointer-events: none;
}

/* FEED DE CHAT */
.messages-container {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.messages-container.is-empty {
  justify-content: flex-end;
}

.messages-container::-webkit-scrollbar {
  width: 8px;
}
.messages-container::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.message-item {
  display: flex;
  padding: 4px 0;
  margin-top: 8px;
  border-radius: 4px;
}

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

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 16px;
  flex-shrink: 0;
}

.message-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

.message-author {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.message-author:hover {
  text-decoration: underline;
}

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

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

/* MENSAGEM DO SISTEMA (ENTROU NO GRUPO COMO NO PRINT) */
.system-message {
  display: flex;
  align-items: center;
  padding: 8px 0;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.system-icon {
  color: var(--accent-green);
  font-size: 16px;
  margin-right: 12px;
}

.system-btn-hello {
  margin-left: 12px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-header);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.system-btn-hello:hover {
  background: var(--bg-channel-hover);
}

/* CAMPO DE DIGITAÇÃO */
.chat-input-wrapper {
  position: relative;
  flex-shrink: 0;
  padding: 0 16px 20px 16px;
  box-sizing: border-box;
}

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

.chat-plus-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.chat-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-normal);
  font-size: 15px;
}

.chat-input-bar input::placeholder {
  color: var(--text-muted);
}

.chat-actions {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

/* LISTA DE MEMBROS (LATERAL DIREITA) */
.members-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  padding: 16px 8px;
  overflow-y: auto;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
}

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

.member-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}

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

.member-avatar-wrap {
  position: relative;
  margin-right: 10px;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
}

.member-info {
  display: flex;
  flex-direction: column;
}

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

.member-activity {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* MENU DE CONTEXTO DO DISCORD (BOTÃO DIREITO NO USUÁRIO) */
.discord-context-menu {
  position: fixed;
  background: #111214;
  border-radius: 6px;
  padding: 8px 10px;
  width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: contextMenuFade 0.1s ease-out;
}

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

.context-menu-slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 6px;
}

.context-menu-label {
  font-size: 13px;
  font-weight: 700;
  color: #f2f3f5;
}

.discord-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #5865F2 0%, #5865F2 50%, #4e5058 50%, #4e5058 100%);
  outline: none;
  cursor: pointer;
}

.discord-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease;
}

.discord-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.discord-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.context-menu-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 4px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #dbdee1;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.context-menu-item:hover {
  background: #4752c4;
  color: #ffffff;
}

.context-menu-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #80848e;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  background: transparent;
  flex-shrink: 0;
}

.context-menu-item:hover .context-menu-checkbox {
  border-color: #ffffff;
}

.context-menu-checkbox.checked {
  background: #5865F2;
  border-color: #5865F2;
}

.context-menu-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

/* ==========================================
   MODAIS MODERNIZADOS (SETTINGS & SOUNDBOARD)
   ========================================== */
.discord-modal {
  background: #313338;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.15s ease-out;
}

.modal-header-with-close {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.btn-close-modal {
  background: none;
  border: none;
  color: #949ba4;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.12s;
}

.btn-close-modal:hover {
  color: #fff;
}

/* Settings Elements */
.settings-section {
  margin-bottom: 18px;
}

.settings-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #b5bac1;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.settings-select {
  width: 100%;
  padding: 10px 12px;
  background: #1e1f22;
  border: 1px solid #111214;
  border-radius: 4px;
  color: #dbdee1;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.settings-select:focus {
  border-color: #5865F2;
}

.mic-test-container {
  margin-top: 10px;
}

.mic-meter-bar {
  width: 100%;
  height: 8px;
  background: #1e1f22;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.mic-meter-fill {
  height: 100%;
  width: 0%;
  background: #23a55a;
  transition: width 0.08s ease;
}

.btn-subtle {
  background: #2b2d31;
  border: 1px solid #383a40;
  color: #dbdee1;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

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

/* Toggle Switch */
.discord-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.discord-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #4e5058;
  transition: 0.2s;
  border-radius: 22px;
}

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

.discord-toggle input:checked + .toggle-slider {
  background-color: #23a55a;
}

.discord-toggle input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

/* ==========================================
   SOUNDBOARD POPOVER / FLUTUANTE (ESTILO DISCORD)
   ========================================== */
.soundboard-popover {
  position: fixed;
  bottom: 60px;
  left: 245px;
  width: 480px;
  max-width: calc(100vw - 260px);
  max-height: 480px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 10002;
  overflow: hidden;
  animation: soundboardFadeIn 0.15s ease-out;
}

@keyframes soundboardFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.soundboard-popover-header {
  padding: 12px 14px 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #2b2d31;
}

.soundboard-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: #1e1f22;
  border-radius: 6px;
  padding: 0 10px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s;
}

.soundboard-search-box:focus-within {
  border-color: #5865F2;
}

.soundboard-search-icon {
  width: 15px;
  height: 15px;
  color: #80848e;
  flex-shrink: 0;
}

.soundboard-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #dbdee1;
  font-size: 13px;
  padding-left: 8px;
}

.soundboard-search-box input::placeholder {
  color: #80848e;
}

.soundboard-header-btn {
  background: transparent;
  border: none;
  color: #b5bac1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.soundboard-popover-body {
  padding: 12px 14px;
  overflow-y: auto;
  max-height: 400px;
  flex: 1;
}

.soundboard-popover-body::-webkit-scrollbar {
  width: 6px;
}
.soundboard-popover-body::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: 4px;
}

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

.soundboard-tile {
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  height: 42px;
  padding: 0 6px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

.soundboard-tile:hover {
  background: #35373c;
  border-color: rgba(255, 255, 255, 0.1);
}

.soundboard-tile:active {
  transform: scale(0.97);
}

.soundboard-tile-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  height: 100%;
}

.soundboard-tile-emoji {
  font-size: 16px;
  flex-shrink: 0;
}

.soundboard-tile-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #dbdee1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.soundboard-tile-preview {
  background: transparent;
  border: none;
  color: #949ba4;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
  opacity: 0.6;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.soundboard-tile:hover .soundboard-tile-preview {
  opacity: 1;
}

.soundboard-tile-preview:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.soundboard-tile-preview svg,
.soundboard-tile-preview i {
  pointer-events: none;
}

.soundboard-tile.soundboard-add-tile {
  border: 1px dashed #4e5058;
  background: transparent;
  justify-content: center;
  color: #949ba4;
  gap: 6px;
}

.soundboard-tile.soundboard-add-tile:hover {
  border-color: #5865F2;
  background: rgba(88, 101, 242, 0.08);
  color: #fff;
}

@media (max-width: 768px) {
  .soundboard-popover {
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    bottom: 60px;
  }
}

@media (max-width: 520px) {
  .soundboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sound-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111214;
  border: 1px solid #5865F2;
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Search Box & Header Icons */
.header-icon-btn {
  background: none;
  border: none;
  color: #b5bac1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, background 0.12s;
}

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

/* Botões de Download Windows e Mobile no Header (Padrão Neutro Discord) */
.btn-download-desktop,
.btn-download-mobile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #dbdee1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-download-desktop:hover,
.btn-download-mobile:hover {
  background: #35373c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-download-desktop:active,
.btn-download-mobile:active {
  background: #2b2d31;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .btn-download-desktop .desktop-btn-text,
  .btn-download-mobile .mobile-btn-text {
    display: none;
  }
  .btn-download-desktop,
  .btn-download-mobile {
    padding: 5px;
  }
}

/* Modal Mobile & QR Code Styles */
.mobile-platform-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: #1e1f22;
  padding: 4px;
  border-radius: 8px;
}

.platform-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #949ba4;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.platform-tab-btn:hover {
  color: #dbdee1;
  background: rgba(255, 255, 255, 0.05);
}

.platform-tab-btn.active {
  background: #5865F2;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(88, 101, 242, 0.35);
}

.platform-tab-btn.active.tab-ios {
  background: #23a55a;
  box-shadow: 0 2px 6px rgba(35, 165, 90, 0.35);
}

.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.qr-code-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 214px;
  height: 214px;
  margin-bottom: 12px;
  position: relative;
}

.qr-code-image {
  width: 190px;
  height: 190px;
  display: block;
  border-radius: 4px;
}

.qr-code-caption {
  font-size: 13.5px;
  font-weight: 600;
  color: #f2f3f5;
  margin-bottom: 6px;
  text-align: center;
}

.qr-code-url-pill {
  font-size: 11px;
  font-family: monospace;
  background: #1e1f22;
  color: #949ba4;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-modal-actions > * {
  flex: 1;
}

.mobile-platform-tip {
  font-size: 12px;
  color: #949ba4;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid #5865F2;
  line-height: 1.45;
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-wrapper input {
  background: #1e1f22;
  border: none;
  border-radius: 4px;
  padding: 4px 28px 4px 8px;
  color: #dbdee1;
  font-size: 13px;
  width: 140px;
  transition: width 0.2s ease;
  outline: none;
}

.search-box-wrapper input:focus {
  width: 200px;
}

.search-box-wrapper i {
  position: absolute;
  right: 8px;
  color: #949ba4;
  pointer-events: none;
}

/* Chat Attachments */
.message-attachment {
  margin-top: 8px;
  max-width: 400px;
  border-radius: 6px;
  overflow: hidden;
}

.message-attachment img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  display: block;
}

.message-attachment audio {
  width: 100%;
  margin-top: 4px;
}

/* ==========================================
   ABAS DE CONFIGURAÇÃO E ABA CADASTRO
========================================== */
.settings-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  color: #949ba4;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.settings-tab-btn.active {
  color: #fff;
  background: #35373c;
  border-bottom: 2px solid #5865F2;
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1e1f22;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2b2d31;
}

.account-profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-username {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  width: fit-content;
}

.account-status-badge.pending {
  background: rgba(240, 178, 50, 0.15);
  color: #f0b232;
  border: 1px solid rgba(240, 178, 50, 0.35);
}

.account-status-badge.verified {
  background: rgba(35, 165, 90, 0.15);
  color: #23a55a;
  border: 1px solid rgba(35, 165, 90, 0.35);
}

.account-info-box {
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  color: #dbdee1;
  line-height: 1.5;
  margin-bottom: 18px;
}

.account-alert {
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.account-alert.error {
  background: rgba(237, 66, 69, 0.15);
  border: 1px solid rgba(237, 66, 69, 0.4);
  color: #f23f43;
}

.account-alert.success {
  background: rgba(35, 165, 90, 0.15);
  border: 1px solid rgba(35, 165, 90, 0.4);
  color: #23a55a;
}

/* Alertas de Autenticação */
.login-alert-box {
  background: rgba(237, 66, 69, 0.15);
  border: 1px solid rgba(237, 66, 69, 0.35);
  color: #f23f43;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 14px;
  text-align: left;
}

/* Botão de Envio na Aba de Cadastro */
.btn-account-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent-blurple);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 6px;
  margin-bottom: 8px;
}

.btn-account-submit:hover {
  background: var(--accent-blurple-hover);
}

.btn-account-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Rodapé do Modal com Botão Pronto */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-modal-done {
  background: #4e5058;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 9px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

/* Popover Flutuante de Perfil / Logout */
.user-profile-popover {
  position: absolute;
  bottom: 58px;
  left: 8px;
  width: 224px;
  background: #232428;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: modalFadeIn 0.12s ease-out;
}

.user-popover-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
}

.user-popover-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-popover-username {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-popover-badge {
  font-size: 11px;
  color: #23a55a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-popover-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.user-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #dbdee1;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.user-popover-item:hover {
  background: #35373c;
  color: #fff;
}

.user-popover-item.danger {
  color: #f23f43;
}

.user-popover-item.danger:hover {
  background: #da373c;
  color: #ffffff;
}

/* ==========================================
   MENU DROPDOWN DO SERVIDOR & CANAIS
   ========================================== */
.server-dropdown-menu {
  position: absolute;
  top: 52px;
  left: 10px;
  width: 220px;
  background: #111214;
  border-radius: 4px;
  padding: 6px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.server-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: #949ba4;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.server-menu-item:hover {
  background: #5865F2;
  color: #ffffff;
}

/* ==========================================
   MODAIS MODERNIZADOS (CRIAR CANAL, CRIAR CATEGORIA, EXCLUIR CANAL - ESTILO DISCORD)
   ========================================== */
.discord-modal.channel-create-modal {
  max-width: 460px;
  width: 92%;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 8px;
  background: #313338;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-body-clean {
  padding: 24px 24px 20px 24px;
  display: flex;
  flex-direction: column;
}

.modal-header-clean h3 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
  line-height: 24px;
}

.modal-subtitle {
  color: #949ba4;
  font-size: 12px;
  margin: 0;
}

.form-section-title {
  display: block;
  color: #b5bac1;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

/* Seletor de Tipo de Canal (Texto vs Voz) */
.channel-type-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-type-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #2b2d31;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.channel-type-option:hover {
  background: #35373c;
}

.channel-type-option.active {
  background: #2b2d31;
  border-color: #5865F2;
}

.channel-type-icon {
  font-size: 18px;
  font-weight: 700;
  color: #949ba4;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-type-option.active .channel-type-icon {
  color: #ffffff;
}

.channel-type-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.channel-type-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.channel-type-desc {
  color: #949ba4;
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.3;
}

.channel-type-radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #80848e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.channel-type-option.active .channel-type-radio-dot {
  border-color: #5865F2;
  background: #5865F2;
}

.channel-type-option.active .channel-type-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

/* Input do Nome do Canal com Prefixo Embutido */
.channel-name-input-wrapper {
  display: flex;
  align-items: center;
  background: #1e1f22;
  border-radius: 4px;
  padding: 0 12px;
  border: 1px solid #1e1f22;
  box-sizing: border-box;
  height: 42px;
  transition: border-color 0.15s ease;
}

.channel-name-input-wrapper:focus-within {
  border-color: #5865F2;
}

.channel-name-prefix {
  color: #949ba4;
  font-size: 16px;
  font-weight: 700;
  margin-right: 8px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.channel-name-input {
  flex: 1;
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #dbdee1 !important;
  font-size: 15px !important;
  font-weight: 500;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
  font-family: inherit;
  box-sizing: border-box;
}

.channel-name-input:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.channel-name-input::placeholder {
  color: #5c5e66;
}

.form-help-text {
  color: #80848e;
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.3;
}

/* Select de Categoria Estilo Discord */
.discord-select {
  width: 100%;
  height: 42px;
  background: #1e1f22;
  color: #dbdee1;
  border: 1px solid #1e1f22;
  border-radius: 4px;
  padding: 0 36px 0 12px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23949ba4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.discord-select:focus {
  border-color: #5865F2;
}

/* Rodapé dos Modais (Alinhamento e Estilização Fiel ao Discord) */
.modal-footer-clean {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  background: #2b2d31;
  padding: 16px 24px;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

/* Botão Cancelar (Texto transparente com hover no estilo Discord) */
.btn-cancel {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: text-decoration 0.15s ease, background-color 0.15s ease;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.btn-cancel:hover {
  text-decoration: underline;
  background: rgba(255, 255, 255, 0.05);
}

.btn-cancel:active {
  background: rgba(255, 255, 255, 0.1);
}

/* Botão Primário Discord (Blurple) */
.btn-primary {
  background: #5865F2;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  font-family: inherit;
}

.btn-primary:hover {
  background: #4752c4;
}

.btn-primary:active {
  background: #3c45a5;
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Botão de Excluir / Perigo Discord (Vermelho) */
.btn-danger-confirm {
  background: #da373c;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  font-family: inherit;
}

.btn-danger-confirm:hover {
  background: #b2272c;
}

.btn-danger-confirm:active {
  background: #901f23;
  transform: scale(0.98);
}

.btn-danger-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   ESTILOS DE DRAWERS E RESPONSIVIDADE MOBILE (DISCORD MOBILE)
   ========================================================================== */
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-header-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.channel-header-chevron {
  display: none;
}

.channel-header-subinfo {
  display: none;
}

.mobile-menu-arrow {
  display: none;
}

.desktop-menu-bars {
  display: inline-block;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  color: var(--text-header);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   RESPONSIVIDADE COMPLETA PARA CELULAR (LAYOUT DISCORD MOBILE OFICIAL)
   ========================================================================== */
@media (max-width: 768px) {
  /* Layout Base */
  #app {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100vh;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    overflow: hidden;
    overflow-x: hidden;
    display: flex;
  }

  /* Gaveta Lateral de Canais (Off-Canvas Drawer da Esquerda) */
  .channels-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 84vw;
    height: 100%;
    z-index: 1000;
    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);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
  }

  .channels-sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Gaveta Lateral de Membros (Off-Canvas Drawer da Direita) */
  .members-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 270px;
    max-width: 80vw;
    height: 100%;
    z-index: 1000;
    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);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    display: flex !important;
    flex-direction: column;
  }

  .members-sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Botão Menu Hamburger no Cabeçalho */
  .mobile-menu-btn {
    display: inline-flex;
  }

  /* Conteúdo Principal (Chat e Palco) Ocupa 100% da Largura e Altura Dinâmica */
  .main-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100vh;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-x: hidden;
  }

  /* Cabeçalho do Chat estilo Discord Mobile Oficial */
  .chat-header {
    flex-shrink: 0;
    padding: 0 12px;
    height: 52px;
    background: #1e1f22;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .mobile-menu-btn {
    display: inline-flex;
    padding: 6px 4px 6px 0;
    color: #dbdee1;
  }

  .mobile-menu-arrow {
    display: inline-block;
  }

  .desktop-menu-bars {
    display: none;
  }

  .chat-header-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    user-select: none;
  }

  .chat-header-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    max-width: 180px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-header-title .hash {
    font-size: 18px;
    margin-right: 4px;
    color: #949ba4;
    font-weight: 600;
  }

  .channel-header-chevron {
    display: inline-block;
    color: #949ba4;
    font-size: 16px;
    font-weight: 600;
    margin-left: 4px;
  }

  .channel-header-subinfo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #949ba4;
    font-weight: 500;
    margin-top: 1px;
    cursor: pointer;
  }

  .header-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #23a55a;
    display: inline-block;
  }

  /* Oculta botões de download e soundboard do header no celular */
  .chat-header-icons .btn-download-desktop,
  .chat-header-icons .btn-download-mobile,
  .chat-header-icons #btn-open-soundboard-header {
    display: none !important;
  }

  .chat-header-icons {
    gap: 10px;
  }

  .search-box-wrapper {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    cursor: pointer;
  }

  .search-box-wrapper input {
    display: none !important;
  }

  .search-box-wrapper i {
    width: 20px !important;
    height: 20px !important;
    color: #b5bac1;
  }

  /* Feed de mensagens no celular */
  .messages-container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .messages-container.is-empty {
    justify-content: flex-end;
  }

  /* Banner de boas-vindas no estilo do print 2 */
  .channel-welcome-banner {
    padding: 24px 8px 16px 8px;
    display: flex;
    flex-direction: column;
  }

  .channel-welcome-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #313338;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
  }

  .channel-welcome-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.25;
  }

  .channel-welcome-desc {
    color: #949ba4;
    font-size: 14px;
    line-height: 20px;
  }

  /* Mensagens do sistema no estilo do print 1 */
  .system-message {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    color: #dbdee1;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 6px;
  }

  .system-arrow {
    color: #23a55a;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
  }

  .system-content {
    flex: 1;
    word-break: break-word;
  }

  .system-username {
    color: #ffffff;
    font-weight: 600;
  }

  .system-time {
    font-size: 11.5px;
    color: #949ba4;
    margin-left: 4px;
    font-weight: normal;
  }

  /* Barra de digitação formato pílula como nos prints 1 e 2 */
  .chat-input-wrapper {
    flex-shrink: 0;
    width: 100%;
    padding: 6px 12px 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    background: #1e1f22;
    box-sizing: border-box;
    z-index: 20;
  }

  .chat-input-bar {
    background: #2b2d31;
    border-radius: 24px;
    padding: 0 12px;
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
  }

  .chat-plus-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #383a40;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b5bac1;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 18px;
  }

  .chat-plus-btn:hover {
    color: #ffffff;
    background: #4e5058;
  }

  .chat-input-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f2f3f5;
    font-size: 14.5px;
    padding: 0 4px;
  }

  .chat-input-bar input::placeholder {
    color: #949ba4;
    font-size: 14.5px;
  }

  .chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b5bac1;
    font-size: 20px;
  }

  /* Palco de Vídeo / Transmissão / Voz */
  .video-stage {
    padding: 0;
  }

  .video-grid {
    padding: 8px;
    gap: 8px;
    align-content: flex-start;
  }

  .screen-tile {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    max-height: 40vh;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  }

  .screen-tile-badge {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 3px 6px;
    gap: 4px;
  }

  .screen-tile-controls {
    top: 8px;
    right: 8px;
    gap: 4px;
  }

  .screen-btn {
    width: 28px;
    height: 28px;
  }

  .screen-volume-control-box {
    padding-right: 4px;
  }

  .screen-volume-slider-wrap {
    width: 50px;
  }

  .screen-volume-val {
    display: none;
  }

  /* Cards de Usuários na Chamada de Voz */
  .user-voice-card {
    width: 105px;
    height: 95px;
    padding: 8px 6px;
  }

  .user-voice-card img {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
  }

  .user-voice-card .card-name {
    font-size: 12px;
    max-width: 90px;
  }

  /* Barra Flutuante de Controles de Voz estilo Discord Mobile */
  .stage-control-bar {
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 30px;
    gap: 8px;
    max-width: 96vw;
    background: rgba(30, 31, 34, 0.96);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  }

  .stage-btn {
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
  }

  /* Modais no Mobile */
  .welcome-modal {
    width: 92vw;
    max-width: 380px;
    padding: 22px 16px;
  }

  .discord-modal {
    width: 94vw !important;
    max-width: 94vw !important;
    max-height: 90vh !important;
    padding: 16px !important;
    overflow-y: auto !important;
  }

  .discord-modal.channel-create-modal {
    width: 94vw !important;
    max-width: 94vw !important;
  }

  .modal-body-clean {
    padding: 16px 14px 12px 14px;
  }

  .modal-footer-clean {
    padding: 12px 14px;
    gap: 8px;
  }

  .btn-cancel,
  .btn-primary,
  .btn-danger-confirm {
    padding: 8px 16px;
    font-size: 13.5px;
  }

  /* ==========================================================================
     AJUSTES ESPECÍFICOS PARA O APLICATIVO APK (ANDROID WEBVIEW / EXPO)
     Compensa a barra de status do Android (relógio/notificações) e navegação
     ========================================================================== */
  body.is-mobile-app .chat-header {
    padding-top: max(28px, env(safe-area-inset-top, 28px)) !important;
    height: calc(52px + max(28px, env(safe-area-inset-top, 28px))) !important;
    box-sizing: border-box !important;
  }

  body.is-mobile-app .channels-sidebar {
    padding-top: max(28px, env(safe-area-inset-top, 28px)) !important;
    box-sizing: border-box !important;
  }

  body.is-mobile-app .members-sidebar {
    padding-top: max(28px, env(safe-area-inset-top, 28px)) !important;
    box-sizing: border-box !important;
  }

  body.is-mobile-app .chat-input-wrapper {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
    box-sizing: border-box !important;
  }

  body.is-mobile-app .messages-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }
}

/* Telas Ultra-Pequenas (max-width: 480px) */
@media (max-width: 480px) {
  .chat-header-icons .search-box-wrapper {
    display: flex !important;
  }

  .stage-btn span {
    display: none;
  }

  .stage-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .user-voice-card {
    width: 90px;
    height: 85px;
  }

  .user-voice-card img {
    width: 38px;
    height: 38px;
  }

  .user-voice-card .card-name {
    font-size: 11px;
    max-width: 78px;
  }
}

/* ==========================================
   BARRA DE TÍTULO PERSONALIZADA (CLIENTE DESKTOP ELECTRON)
   Estilo minimalista, sem menu nativo e botões elegantes
   ========================================== */
.desktop-titlebar {
  display: none;
  height: 28px;
  min-height: 28px;
  width: 100vw;
  background-color: #111214;
  user-select: none;
  -webkit-user-select: none;
  align-items: center;
  justify-content: space-between;
  z-index: 99999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.desktop-titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  pointer-events: none;
  -webkit-app-region: drag;
}

.desktop-titlebar-logo {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.desktop-titlebar-brand {
  font-size: 11.5px;
  font-weight: 700;
  color: #949ba4;
  letter-spacing: 0.3px;
}

.desktop-titlebar-drag {
  flex: 1;
  height: 100%;
  -webkit-app-region: drag;
}

.desktop-titlebar-controls {
  display: flex;
  align-items: center;
  height: 100%;
  -webkit-app-region: no-drag;
}

.desktop-control-btn {
  background: transparent;
  border: none;
  color: #949ba4;
  width: 44px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  padding: 0;
  margin: 0;
}

.desktop-control-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.desktop-control-btn.close:hover {
  background-color: #ed4245;
  color: #ffffff;
}

.desktop-control-btn.close:active {
  background-color: #c03537;
}

/* Regras quando rodando dentro do cliente Electron Desktop */
body.is-electron {
  flex-direction: column !important;
}

body.is-electron .desktop-titlebar {
  display: flex !important;
}

body.is-electron #app {
  height: calc(100vh - 28px) !important;
  max-height: calc(100vh - 28px) !important;
}

/* Oculta botão de download para Windows na versão Desktop */
body.is-electron #btn-download-desktop {
  display: none !important;
}

/* ==========================================
   WIDGET DO PLAYER DE MÚSICA ALFREDO (DISCORD)
   ========================================== */
.music-player-widget {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 31, 34, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 95;
  width: calc(100% - 48px);
  max-width: 680px;
  box-sizing: border-box;
  animation: slideUpWidget 0.25s ease-out;
}

@keyframes slideUpWidget {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.music-widget-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.music-widget-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  background: #1e1f22;
}

.music-widget-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.music-widget-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.music-widget-artist {
  font-size: 11px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.music-widget-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.music-widget-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-btn {
  background: #313338;
  border: none;
  color: #dbdee1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.music-btn:hover {
  background: #5865F2;
  color: #ffffff;
  transform: scale(1.08);
}

.music-btn.danger:hover {
  background: #da373c;
  color: #ffffff;
}

.music-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-time {
  font-size: 10.5px;
  color: #949ba4;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: center;
}

.music-progress-bar-wrap {
  width: 140px;
  height: 5px;
  background: #4e5058;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.music-progress-bar-fill {
  height: 100%;
  background: #5865F2;
  width: 0%;
  border-radius: 3px;
  transition: width 0.25s linear;
}

.music-widget-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-quick-search-form {
  display: flex;
  align-items: center;
  background: #1e1f22;
  border-radius: 6px;
  padding: 3px 4px 3px 10px;
  border: 1px solid #383a40;
}

.music-quick-search-form input {
  background: none;
  border: none;
  color: #dbdee1;
  font-size: 12px;
  outline: none;
  width: 115px;
}

.music-quick-search-form input::placeholder {
  color: #80848e;
}

.music-btn-add {
  background: #5865F2;
  border: none;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s;
}

.music-btn-add:hover {
  opacity: 0.85;
}

/* BADGE [BOT] ESTILO DISCORD OFICIAL */
.bot-tag {
  background: #5865F2;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4.5px;
  border-radius: 3px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 5px;
}

/* Responsivo para celulares */
@media (max-width: 768px) {
  .music-player-widget {
    bottom: 76px;
    width: calc(100% - 24px);
    padding: 8px 12px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .music-widget-right {
    display: none;
  }
  .music-widget-title,
  .music-widget-artist {
    max-width: 130px;
  }
  .music-progress-bar-wrap {
    width: 100px;
  }
}

/* ==========================================================================
   WATCH PARTY (ASSISTIR JUNTOS YOUTUBE)
   ========================================================================== */
.watch-party-tile {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  height: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.watch-party-tile.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  border: none !important;
}

.watch-party-player-wrapper {
  width: 100%;
  height: 100%;
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watch-party-player-wrapper iframe,
.watch-party-player-wrapper #yt-player {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
}

.watch-party-results-list::-webkit-scrollbar {
  width: 6px;
}
.watch-party-results-list::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: 3px;
}

.watch-party-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #2b2d31;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.watch-party-item:hover {
  background: #35373c;
  border-color: rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.watch-party-item-thumb-box {
  position: relative;
  width: 100px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #111214;
}

.watch-party-item-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.watch-party-item-duration {
  position: absolute;
  bottom: 3px;
  right: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: Consolas, monospace;
}

.watch-party-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.watch-party-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f2f3f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.watch-party-item-author {
  font-size: 11.5px;
  color: #949ba4;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-party-btn-action {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.watch-party-btn-action:hover {
  background: #dc2626;
  transform: scale(1.02);
}

.watch-party-btn-action:active {
  transform: scale(0.98);
}

/* ==========================================================================
   POPOVER DE EMOJIS (ESTILO DISCORD)
   ========================================================================== */
.emoji-picker-popover {
  position: absolute;
  bottom: calc(100% - 6px);
  right: 16px;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 400px;
  background: #2b2d31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  animation: emojiPopoverFadeIn 0.15s ease-out;
}

@keyframes emojiPopoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.emoji-picker-header {
  padding: 10px 12px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.emoji-search-wrapper {
  display: flex;
  align-items: center;
  background: #1e1f22;
  border-radius: 4px;
  padding: 6px 10px;
  gap: 8px;
}

.emoji-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #dbdee1;
  font-size: 13.5px;
  flex: 1;
  width: 100%;
}

.emoji-search-input::placeholder {
  color: #949ba4;
}

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

.emoji-categories-nav::-webkit-scrollbar {
  display: none;
}

.emoji-nav-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
  line-height: 1;
}

.emoji-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.1);
}

.emoji-nav-btn.active {
  background: rgba(88, 101, 242, 0.25);
}

.emoji-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 10px 10px;
}

.emoji-picker-body::-webkit-scrollbar {
  width: 6px;
}

.emoji-picker-body::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: 3px;
}

.emoji-category-section {
  margin-bottom: 10px;
}

.emoji-category-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #949ba4;
  letter-spacing: 0.4px;
  margin: 6px 4px 4px 4px;
}

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

.emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  height: 34px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s, transform 0.1s;
}

.emoji-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.22);
}

.emoji-item:active {
  transform: scale(0.95);
}

.emoji-no-results {
  text-align: center;
  padding: 30px 10px;
  color: #949ba4;
  font-size: 13px;
}

/* ==========================================
   SELETOR DE TELAS E JANELAS (ELECTRON SCREEN SHARE)
   ========================================== */
.screen-picker-modal {
  width: 680px;
  max-width: 95vw;
  max-height: 85vh;
  padding: 22px 24px 16px;
  display: flex;
  flex-direction: column;
  background: #313338;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.screen-picker-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.screen-picker-tab {
  background: none;
  border: none;
  color: #949ba4;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

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

.screen-picker-tab.active {
  color: #ffffff;
  background: rgba(88, 101, 242, 0.2);
  border-bottom: 2px solid #5865F2;
}

.screen-picker-badge {
  background: #232428;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  color: #b5bac1;
}

.screen-picker-tab.active .screen-picker-badge {
  background: #5865F2;
  color: #ffffff;
}

.screen-picker-grid-container {
  flex: 1;
  min-height: 280px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
  margin-right: -4px;
}

.screen-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.screen-picker-card {
  background: #2b2d31;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
  user-select: none;
}

.screen-picker-card:hover {
  background: #35373c;
  border-color: rgba(88, 101, 242, 0.4);
  transform: translateY(-2px);
}

.screen-picker-card.selected {
  background: #35373c;
  border-color: #5865F2;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.35);
}

.screen-picker-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1e1f22;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111214;
}

.screen-picker-info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.screen-picker-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 3px;
  object-fit: contain;
}

.screen-picker-title {
  font-size: 12.5px;
  font-weight: 500;
  color: #dbdee1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-picker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 10px;
}

.screen-picker-quality {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #b5bac1;
}

.screen-picker-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
