/* ==========================================================================
   FALA TALK - Multi-Channel Realtime Radio & Dual AI Translator (v3.2)
   ========================================================================== */

:root {
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);

  --radio-color: #f59e0b;
  --radio-glow: rgba(245, 158, 11, 0.4);
  --radio-bg: linear-gradient(135deg, #d97706 0%, #b45309 100%);

  --pt-color: #10b981;
  --pt-glow: rgba(16, 185, 129, 0.4);
  --pt-bg-active: linear-gradient(135deg, #059669 0%, #047857 100%);
  --pt-border: #34d399;

  --ja-color: #f43f5e;
  --ja-glow: rgba(244, 63, 94, 0.4);
  --ja-bg-active: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  --ja-border: #fb7185;

  --busy-color: #ef4444;
  --busy-glow: rgba(239, 68, 68, 0.45);

  --primary-accent: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-jp: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(244, 63, 94, 0.08) 0%, transparent 40%);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.65rem;
  overflow-x: hidden;
}

/* Modal de Troca de Nome */
.user-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.user-modal-card {
  background: #0f172a;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.input-group input {
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  color: #ffffff;
  font-family: var(--font-main);
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.btn-save-name {
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* App Wrapper */
.talk-wrapper {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 2rem;
}

/* Header */
.talk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.user-info-chip {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.user-name-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.edit-pen {
  font-size: 0.65rem;
  color: var(--primary-accent);
}

.user-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.ctrl-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* ==========================================================================
   SELETOR DE CANAIS (CANAL 1, CANAL 2, CANAL DIRETO)
   ========================================================================== */
.channels-master-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 0.45rem;
}

.channel-main-tab {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 0.6rem 0.45rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.ch-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.ch-badge.badge-radio {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

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

.ch-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ch-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.channel-main-tab:active {
  transform: scale(0.97);
}

.channel-main-tab.active {
  background: rgba(30, 41, 59, 0.95);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

#tab-canal-direto.active {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

/* Barra de Status do Canal Conectado */
.channel-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  font-size: 0.74rem;
}

.channel-badge-active {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  color: #38bdf8;
}

.members-in-channel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* Painel de Comunicação */
.communicator-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Status Pill & Wave */
.status-container {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-height: 56px;
  justify-content: center;
  transition: all 0.3s ease;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: all 0.3s ease;
}

/* Estados de Canal */
.status-container.channel-busy {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.06);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}
.status-container.channel-busy .status-dot {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse-dot 0.8s infinite;
}
.status-container.channel-busy .status-text {
  color: #f87171;
  font-weight: 700;
}

.status-container.listening-pt {
  border-color: rgba(16, 185, 129, 0.4);
}
.status-container.listening-pt .status-dot {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}
.status-container.listening-pt .status-text {
  color: #34d399;
}

.status-container.listening-ja {
  border-color: rgba(244, 63, 94, 0.4);
}
.status-container.listening-ja .status-dot {
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
}
.status-container.listening-ja .status-text {
  color: #fb7185;
}

.status-container.active-radio {
  border-color: rgba(245, 158, 11, 0.4);
}
.status-container.active-radio .status-dot {
  background: #f59e0b;
}
.status-container.active-radio .status-text {
  color: #fbbf24;
}

.status-container.translating .status-dot {
  background: #38bdf8;
  animation: pulse-dot 0.8s infinite;
}
.status-container.translating .status-text {
  color: #38bdf8;
}

.status-container.speaking .status-dot {
  background: #a855f7;
}
.status-container.speaking .status-text {
  color: #c084fc;
}

/* Waveform */
.voice-wave {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 18px;
}

.status-container.active-wave .voice-wave {
  display: flex;
}

.wave-bar {
  width: 3px;
  height: 4px;
  background: currentColor;
  border-radius: 3px;
  animation: wave 1.2s infinite ease-in-out;
}

.status-container.listening-pt .wave-bar { background: #34d399; }
.status-container.listening-ja .wave-bar { background: #fb7185; }
.status-container.active-radio .wave-bar { background: #fbbf24; }
.status-container.speaking .wave-bar { background: #c084fc; }

.wave-bar:nth-child(1) { animation-delay: 0.0s; }
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }
.wave-bar:nth-child(6) { animation-delay: 0.45s; }
.wave-bar:nth-child(7) { animation-delay: 0.3s; }
.wave-bar:nth-child(8) { animation-delay: 0.15s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

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

/* Live Preview */
.live-preview {
  display: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  max-width: 90%;
  text-align: center;
  word-break: break-word;
}

.live-preview.visible {
  display: block;
}

/* ==========================================================================
   BOTÕES DE TRADUÇÃO IA (CANAL 1 & 2)
   ========================================================================== */
.ptt-action-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.ptt-button {
  background: var(--bg-card);
  border: 2px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: 1.15rem 0.65rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  transition: all 0.15s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.ptt-button:active {
  transform: scale(0.97);
}

.ptt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
}

.ptt-flag-ring {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.mic-icon-bubble {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #ffffff;
}

.ptt-labels {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ptt-title {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.ptt-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.ptt-touch-hint {
  font-size: 0.65rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.ptt-lock-badge {
  display: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Bloqueio de Canal nos Botões de Tradução */
.ptt-button.busy-locked {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.5);
}
.ptt-button.busy-locked .ptt-touch-hint {
  display: none;
}
.ptt-button.busy-locked .ptt-lock-badge {
  display: inline-block;
}

/* Botões Ativos em Gravação */
.btn-portugues.recording {
  background: var(--pt-bg-active);
  border-color: var(--pt-border);
  box-shadow: 0 0 25px var(--pt-glow);
}

.btn-japones.recording {
  background: var(--ja-bg-active);
  border-color: var(--ja-border);
  box-shadow: 0 0 25px var(--ja-glow);
}

/* ==========================================================================
   BOTÃO DE RÁDIO PTT (CANAL DIRETO)
   ========================================================================== */
.radio-ptt-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0.5rem;
  gap: 0.85rem;
}

/* Seletor de Modo no Canal Direto (PTT vs Full Duplex) */
.radio-mode-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
  margin-bottom: 0.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.mode-pill:hover {
  color: #ffffff;
}

.mode-pill.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.45);
}

.mode-pill.duplex-active-tab {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.45);
}

/* Ações da Chamada Full Duplex (Mudo / Desconectar) */
.duplex-call-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
  z-index: 10;
}

.duplex-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-duplex-mute {
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
}
.btn-duplex-mute.muted {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
}

.btn-duplex-hangup {
  background: rgba(220, 38, 38, 0.22);
  border-color: rgba(220, 38, 38, 0.45);
  color: #f87171;
}

.btn-duplex-hangup:hover {
  background: rgba(220, 38, 38, 0.4);
  color: #ffffff;
}

/* Estado Chamada Full Duplex Ativa no Botão Central */
.radio-big-btn.duplex-active {
  background: linear-gradient(145deg, #064e3b, #022c22) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.5) !important;
}

.radio-big-btn.duplex-active .radio-icon {
  color: #10b981 !important;
  animation: pulse-ring-glow 1.5s infinite;
}

.radio-big-btn.duplex-muted {
  background: linear-gradient(145deg, #3f3f46, #18181b) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.35) !important;
}

.radio-big-btn.duplex-muted .radio-icon {
  color: #ef4444 !important;
}

.radio-big-btn {
  position: relative;
  width: 175px;
  height: 175px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 3.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.radio-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  z-index: 2;
  text-align: center;
}

.radio-icon {
  font-size: 2.5rem;
  color: var(--radio-color);
  transition: transform 0.2s ease;
}

.radio-btn-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.radio-btn-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.radio-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.25);
  transition: all 0.3s ease;
}

/* Estado Gravando */
.radio-big-btn.recording {
  background: var(--radio-bg);
  border-color: #fbbf24;
  box-shadow: 0 0 40px var(--radio-glow);
  transform: scale(0.96);
}

.radio-big-btn.recording .radio-icon {
  color: #ffffff;
}

/* Estado Bloqueado por Outro Usuário Falando */
.radio-big-btn.busy-locked {
  background: linear-gradient(145deg, #2d1515, #1a0b0b);
  border-color: #ef4444;
  box-shadow: 0 0 25px var(--busy-glow);
  opacity: 0.75;
  pointer-events: none;
}

.radio-big-btn.busy-locked .radio-icon {
  color: #ef4444;
}

.radio-big-btn.busy-locked .radio-pulse-ring {
  border-color: #ef4444;
}

.radio-interlock-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

.radio-interlock-status.is-busy {
  color: #f87171;
  font-weight: 800;
}

/* Teclado Manual Fallback */
.text-fallback-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.text-fallback-header {
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.text-fallback-body {
  padding: 0.65rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.text-fallback-body textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.55rem;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  resize: none;
  outline: none;
}

.fallback-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.manual-send-btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

.manual-send-btn.send-pt { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.manual-send-btn.send-ja { background: linear-gradient(135deg, #e11d48 0%, #be123c 100%); }

/* Feed / Histórico */
.conversation-feed-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.feed-count {
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 440px;
  overflow-y: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.8rem 1rem;
  gap: 0.45rem;
}

.empty-icon {
  font-size: 2rem;
  color: var(--text-dim);
}

.empty-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
}

.empty-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 280px;
  line-height: 1.4;
}

/* Cartões */
.message-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  animation: slide-in 0.2s ease-out;
}

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

.message-card.from-me { border-left: 3px solid var(--primary-accent); }
.message-card.from-other { border-left: 3px solid #10b981; background: rgba(16, 185, 129, 0.04); }
.message-card.card-radio { border-left: 3px solid var(--radio-color); background: rgba(245, 158, 11, 0.04); }

.msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.msg-sender {
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.msg-sender.sender-me { color: var(--primary-accent); }
.msg-sender.sender-other { color: #34d399; }

.msg-body-translation {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.msg-original {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.msg-translated {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  padding-left: 0.45rem;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.msg-translated.is-jp {
  font-family: var(--font-jp);
}

.msg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}

.btn-replay-audio {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-replay-audio:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.talk-footer {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-dim);
  padding: 0.4rem 0;
}


/* ==========================================================================
   CANAL 2: SELETOR DE IDIOMAS MULTI-LANGUAGE
   ========================================================================== */
.lang-selector-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.25s ease-out;
}

.lang-selector-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}

.lang-select-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
}

.lang-select-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lang-select-box label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-dropdown {
  background: #090e1a;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.5rem;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.lang-dropdown:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-swap-langs {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--primary-accent);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-swap-langs:hover, .btn-swap-langs:active {
  background: rgba(56, 189, 248, 0.2);
  transform: rotate(180deg) scale(1.05);
}

.badge-custom {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #fff !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
