/* ─── VibraMind – Neural Consciousness Panel ─── */
#vibra-mind-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #04050d;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  color: #e2e8ff;
}
#vibra-mind-panel.active { display: flex; }

/* ── Header ── */
.vm-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  position: relative;
  z-index: 10;
}
.vm-back {
  background: rgba(255,255,255,.08);
  border: none;
  color: #e2e8ff;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.vm-back:hover { background: rgba(255,255,255,.15); }
.vm-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #a78bfa, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vm-state-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .5s;
}

/* ── Brainwave canvas ── */
.vm-wave-container {
  width: 100%;
  height: 140px;
  position: relative;
  margin: 0;
  flex-shrink: 0;
}
.vm-wave-container canvas {
  width: 100%;
  height: 100%;
}

/* ── State selector ── */
.vm-states {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  width: 100%;
  justify-content: center;
  flex-shrink: 0;
}
.vm-state-btn {
  flex: 1;
  max-width: 80px;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.6);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.vm-state-btn .vm-hz { font-size: 13px; font-weight: 800; color: rgba(255,255,255,.4); }
.vm-state-btn.active {
  border-color: var(--vm-color, #a78bfa);
  background: rgba(167,139,250,.15);
  color: #fff;
}
.vm-state-btn.active .vm-hz { color: var(--vm-color, #a78bfa); }

/* ── Breathing circle ── */
.vm-breath-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
  flex-shrink: 0;
}
.vm-breath-ring {
  width: 130px; height: 130px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.vm-breath-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.06);
  animation: vm-pulse-outer 4s ease-in-out infinite;
}
.vm-breath-mid {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(167,139,250,.2);
  animation: vm-pulse-mid 4s ease-in-out infinite .5s;
}
.vm-breath-core {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(167,139,250,.9), rgba(96,165,250,.6) 60%, rgba(52,211,153,.3));
  box-shadow: 0 0 30px rgba(167,139,250,.5), 0 0 60px rgba(96,165,250,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  text-align: center;
  transition: all 1s ease;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
@keyframes vm-pulse-outer {
  0%, 100% { transform: scale(1); opacity: .4; }
  50% { transform: scale(1.08); opacity: .15; }
}
@keyframes vm-pulse-mid {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.12); opacity: .2; }
}
.vm-breath-label {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  letter-spacing: 1px;
  text-transform: uppercase;
  height: 16px;
}
.vm-breath-toggle {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  padding: 7px 22px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.vm-breath-toggle:hover { background: rgba(255,255,255,.12); }
.vm-breath-toggle.active {
  background: rgba(167,139,250,.2);
  border-color: #a78bfa;
  color: #a78bfa;
}

/* ── NERHIA analysis ── */
.vm-nerhia-section {
  width: 100%;
  padding: 0 16px 8px;
  flex-shrink: 0;
}
.vm-nerhia-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 12px 16px;
}
.vm-nerhia-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 8px;
}
.vm-nerhia-msg {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
  min-height: 36px;
  transition: all .5s;
}
.vm-metrics {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.vm-metric {
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 7px 4px;
}
.vm-metric-val {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vm-metric-lbl {
  font-size: 9px;
  color: rgba(255,255,255,.35);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Sound toggle ── */
.vm-sound-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 16px;
  width: 100%;
}
.vm-sound-label { font-size: 12px; color: rgba(255,255,255,.5); }
.vm-sound-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.vm-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .2s;
}
.vm-chip.active {
  background: rgba(167,139,250,.2);
  border-color: #a78bfa;
  color: #c4b5fd;
}
