@charset "UTF-8";
/* Lincoln Alcantarino 06/25 — redesign "voice console" 07/26 */

:root{
  --bg: #050505;
  --green: #33ff66;
  --green-dim: rgba(51,255,102,0.45);
  --green-faint: rgba(51,255,102,0.18);
  --line: rgba(51,255,102,0.35);
}

*{ box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Share Tech Mono', monospace;
  background: #000;
  color: var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
}

/* ---------- popup de boas-vindas (mantido, só re-estilizado) ---------- */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  max-width: 86vw;
  background-color: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 999;
  border: 1px solid var(--green);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(51,255,102,0.25);
  padding: 32px 24px;
  font-family: 'Share Tech Mono', monospace;
  color: var(--green);
}
.popup-title{
  font-size: 18px;
  letter-spacing: 0.14em;
}
.popup-sub{
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--green-dim);
}
.popup-text{
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--green);
}
.popup button {
  position: relative;
  margin-top: 26px;
  padding: 12px 32px;
  background-color: rgba(51,255,102,0.06);
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.popup button:active{
  background-color: rgba(51,255,102,0.16);
}
.popup button .corner{
  position: absolute;
  width: 10px; height: 10px;
  border: 1.5px solid var(--green);
  opacity: 0.8;
}
.popup button .corner.tl{ top: 4px; left: 4px; border-right:none; border-bottom:none; }
.popup button .corner.tr{ top: 4px; right: 4px; border-left:none; border-bottom:none; }
.popup button .corner.bl{ bottom: 4px; left: 4px; border-right:none; border-top:none; }
.popup button .corner.br{ bottom: 4px; right: 4px; border-left:none; border-top:none; }

/* ---------- console principal ---------- */
.console {
  width: 100%;
  max-width: 460px;
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,0.82);
  box-shadow: 0 0 40px rgba(51,255,102,0.08), inset 0 0 60px rgba(51,255,102,0.03);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.console-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.12em;
  font-size: 13px;
}
.console-status{ display:flex; align-items:center; gap:8px; font-size: 12px; }
.status-dot{
  width: 9px; height: 9px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dot-pulse 1.6s ease-in-out infinite;
}
@keyframes dot-pulse{ 0%,100%{opacity:1;} 50%{opacity:0.35;} }

/* ---------- waveform ---------- */
.waveform-box{
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(51,255,102,0.02);
}
#waveform{ width: 100%; height: 100%; display: block; }

/* ---------- caixas de mensagem ---------- */
.message-box{
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 64px;
}
.message-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 8px;
}
.chevron{ color: var(--green-dim); margin-right: 4px; }
.timestamp{ color: var(--green-dim); font-size: 11px; }
.message-body{
  font-size: 15px;
  line-height: 1.5;
  color: var(--green);
  word-wrap: break-word;
  min-height: 1.4em;
}

/* ---------- botões ---------- */
.button-row{
  display: flex;
  gap: 14px;
}
.console-btn{
  position: relative;
  flex: 1;
  background: rgba(51,255,102,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--green);
  padding: 22px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background .15s ease, box-shadow .15s ease;
}
.console-btn svg{ width: 34px; height: 34px; }
.console-btn .btn-label{ font-size: 12px; letter-spacing: 0.1em; }

.console-btn .corner{
  position: absolute;
  width: 12px; height: 12px;
  border: 1.5px solid var(--green);
  opacity: 0.8;
}
.corner.tl{ top: 6px; left: 6px; border-right:none; border-bottom:none; }
.corner.tr{ top: 6px; right: 6px; border-left:none; border-bottom:none; }
.corner.bl{ bottom: 6px; left: 6px; border-right:none; border-top:none; }
.corner.br{ bottom: 6px; right: 6px; border-left:none; border-top:none; }

.console-btn:active,
.console-btn.recording{
  background: rgba(51,255,102,0.14);
  box-shadow: 0 0 20px rgba(51,255,102,0.35);
}

.console-footer{
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--green-dim);
}

@media (max-width: 480px){
  .console{ margin: 10px; padding: 14px; }
  .waveform-box{ height: 90px; }
  .console-btn{ padding: 16px 8px; }
  .console-btn svg{ width: 28px; height: 28px; }
}

/* ---------- textura de fundo ---------- */
.scanlines{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(51,255,102,0.05) 0px,
    rgba(51,255,102,0.05) 1px,
    transparent 1px,
    transparent 3px
  );
}
.console{ position: relative; z-index: 2; }

/* ---------- popup "espere_" ---------- */
.loading-popup{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 18px 28px;
  background: rgba(0,0,0,0.92);
  border: 1px solid var(--green);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(51,255,102,0.25);
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--green);
}
.loading-popup.visible{ display: flex; }
.loading-popup .cursor{
  display: inline-block;
  animation: cursor-blink 1s step-end infinite;
}
@keyframes cursor-blink{
  0%, 49%{ opacity: 1; }
  50%, 100%{ opacity: 0; }
}
