/* ============================================================
   J.A.R.V.I.S. v6.0 — Iron Man Voice Engine UI
   ============================================================ */

/* Banner de "JARVIS está ouvindo" mais discreto + visual de instant-stop */
.jarvis-v6-status {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0,212,255,0.95), rgba(0,80,160,0.95));
  color: #001020;
  padding: 8px 18px;
  border-radius: 30px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  z-index: 9990;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.jarvis-v6-status.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.jarvis-v6-status.speaking {
  background: linear-gradient(90deg, rgba(255,181,71,0.95), rgba(255,140,0,0.95));
}

.jarvis-v6-status.stopped {
  background: linear-gradient(90deg, rgba(255,71,87,0.95), rgba(200,40,60,0.95));
  color: #fff;
}

/* Indicador de voz ativa (waveform pequeno) */
.jarvis-v6-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 6px;
}

.jarvis-v6-wave span {
  display: inline-block;
  width: 3px;
  height: 10px;
  background: currentColor;
  border-radius: 1px;
  animation: jv6wave 0.9s ease-in-out infinite;
}

.jarvis-v6-wave span:nth-child(2) { animation-delay: 0.15s; }
.jarvis-v6-wave span:nth-child(3) { animation-delay: 0.3s; }
.jarvis-v6-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes jv6wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.2); }
}

/* Aviso visual de STOP instantâneo */
@keyframes jv6flash-stop {
  0% { box-shadow: inset 0 0 0 0 rgba(255,71,87,0); }
  20% { box-shadow: inset 0 0 0 4px rgba(255,71,87,0.8); }
  100% { box-shadow: inset 0 0 0 0 rgba(255,71,87,0); }
}

body.jarvis-stopped {
  animation: jv6flash-stop 0.6s ease-out;
}

/* Listener badge melhorias */
#listener-badge.awake {
  background: linear-gradient(90deg, rgba(255,181,71,0.3), rgba(255,140,0,0.3));
  border-color: #ffb547;
  color: #ffb547;
  animation: jv6pulse 1.2s infinite;
}

#listener-badge.listening {
  background: linear-gradient(90deg, rgba(0,255,136,0.2), rgba(0,200,100,0.2));
  border-color: #00ff88;
  color: #00ff88;
}

#listener-badge.speaking {
  background: linear-gradient(90deg, rgba(255,181,71,0.3), rgba(255,140,0,0.3));
  border-color: #ffb547;
  color: #ffb547;
}

@keyframes jv6pulse {
  0%, 100% { box-shadow: 0 0 8px currentColor; }
  50% { box-shadow: 0 0 24px currentColor; }
}

/* Visualizer da fala do JARVIS no centro do chat */
.jarvis-v6-speaking-overlay {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 5, 15, 0.85);
  border: 1px solid rgba(0,212,255,0.5);
  border-radius: 24px;
  color: #00d4ff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  z-index: 9989;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.jarvis-v6-speaking-overlay.visible {
  opacity: 1;
}

.jarvis-v6-speaking-overlay .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 12px #00ff88;
  animation: jv6dot 0.7s ease-in-out infinite;
}

@keyframes jv6dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

/* Tela de login: indicador "JARVIS escutando voz aqui" */
.login-mic-hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Rajdhani', sans-serif;
  color: rgba(0, 212, 255, 0.7);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-mic-hint .mic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  animation: jv6dot 1.4s ease-in-out infinite;
}
