@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #00d4ff;
  --blue-dim: #0088aa;
  --blue-dark: #003344;
  --bg: #000a0f;
  --glow: 0 0 10px #00d4ff, 0 0 20px #00d4ff44;
  --glow-strong: 0 0 15px #00d4ff, 0 0 40px #00d4ff66;
}

body {
  background: var(--bg);
  color: var(--blue);
  font-family: 'Share Tech Mono', monospace;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hud {
  width: 96vw;
  height: 96vh;
  border: 1px solid var(--blue-dim);
  box-shadow: var(--glow);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 12px;
  position: relative;
  background: radial-gradient(ellipse at center, #001a2600 0%, #000a0f 100%);
}

/* Cantos */
.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--blue);
  border-style: solid;
}
.top-left    { top: 8px; left: 8px;  border-width: 2px 0 0 2px; }
.top-right   { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.bottom-left { bottom: 8px; left: 8px;  border-width: 0 0 2px 2px; }
.bottom-right{ bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

/* Header */
#header { text-align: center; }

#title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-shadow: var(--glow-strong);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--blue-dim);
}

#status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

#status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: var(--glow);
  animation: blink 1.5s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Conversa */
#conversation {
  flex: 1;
  border: 1px solid var(--blue-dark);
  border-radius: 4px;
  overflow-y: auto;
  padding: 12px;
  background: #00060a;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-dim) transparent;
}

#messages { display: flex; flex-direction: column; gap: 10px; }

.msg {
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

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

.msg.user {
  background: #001e2b;
  border-left: 3px solid var(--blue);
  align-self: flex-end;
  text-align: right;
}

.msg.jarvis {
  background: #00111a;
  border-left: 3px solid #0055aa;
  align-self: flex-start;
  color: #88ddff;
}

.msg.jarvis .sender {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  color: var(--blue-dim);
  margin-bottom: 4px;
  letter-spacing: 0.15em;
}

.msg.system {
  align-self: center;
  color: var(--blue-dim);
  font-size: 0.75rem;
  font-style: italic;
}

/* Visualizador */
#visualizer {
  height: 50px;
  border: 1px solid var(--blue-dark);
  border-radius: 4px;
  overflow: hidden;
  background: #00060a;
}

#waveform { width: 100%; height: 100%; }

/* Input */
#input-area {
  display: flex;
  gap: 8px;
  align-items: center;
}

#text-input {
  flex: 1;
  background: #00111a;
  border: 1px solid var(--blue-dim);
  color: var(--blue);
  padding: 10px 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.95rem;
  outline: none;
  border-radius: 3px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#text-input:focus {
  border-color: var(--blue);
  box-shadow: var(--glow);
}

#text-input::placeholder { color: var(--blue-dark); }

button {
  background: transparent;
  border: 1px solid var(--blue-dim);
  color: var(--blue);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}

button:hover {
  background: var(--blue-dark);
  border-color: var(--blue);
  box-shadow: var(--glow);
}

button:active { transform: scale(0.97); }

#btn-mic.recording {
  border-color: #ff4444;
  color: #ff4444;
  box-shadow: 0 0 10px #ff444466;
  animation: pulse 0.8s ease-in-out infinite;
}

/* Footer */
#footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--blue-dim);
  letter-spacing: 0.15em;
}

#clock { font-family: 'Orbitron', sans-serif; }
/* Câmera */
#camera-area {
  border: 1px solid var(--blue-dim);
  border-radius: 4px;
  overflow: hidden;
  background: #00060a;
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-feed {
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 3px;
  filter: hue-rotate(180deg) saturate(1.5);
}

#camera-status {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  color: var(--blue);
  text-shadow: var(--glow);
}

#btn-vision {
  white-space: nowrap;
}

#btn-vision.active {
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 10px #00ff8866;
}
