/* ============================================================
   VibraCanvas — Arte Generativo Vivo
   Duodécima mejora WOW
   ============================================================ */

#vibra-canvas-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
}

/* ── Canvas principal ── */
#vc-main-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Header flotante ── */
.vc-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.vc-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vc-title-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 12px rgba(168,85,247,0.6);
}

.vc-title-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.vc-title-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.vc-nerhia-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(168,85,247,0.2);
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: #c084fc;
  font-weight: 600;
}

.vc-nerhia-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a855f7;
  animation: vc-pulse-dot 1.5s ease-in-out infinite;
}

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

/* ── Selector de modos ── */
.vc-modes {
  position: absolute;
  top: 68px; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}

.vc-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  min-width: 56px;
}

.vc-mode-btn span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.vc-mode-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  transform: translateY(-2px);
}

.vc-mode-btn.active {
  background: linear-gradient(135deg, rgba(168,85,247,0.4), rgba(236,72,153,0.4));
  border-color: rgba(168,85,247,0.7);
  color: #fff;
  box-shadow: 0 0 16px rgba(168,85,247,0.4);
}

/* ── HUD métricas ── */
.vc-hud {
  position: absolute;
  bottom: 100px; left: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 140px;
}

.vc-hud-card {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 10px;
}

.vc-hud-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.vc-hud-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.vc-hud-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  margin-top: 4px;
  overflow: hidden;
}

.vc-hud-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

/* ── Panel de departamentos ── */
.vc-depts {
  position: absolute;
  bottom: 100px; right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 130px;
}

.vc-dept-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.vc-dept-row:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}

.vc-dept-row.active {
  border-color: var(--dept-color);
  background: rgba(var(--dept-rgb), 0.15);
}

.vc-dept-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dept-color);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--dept-color);
}

.vc-dept-name {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  flex: 1;
}

.vc-dept-val {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
}

/* ── Controles inferiores ── */
.vc-controls {
  position: absolute;
  bottom: 60px; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.vc-ctrl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.vc-ctrl-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.vc-ctrl-btn.danger {
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
}

.vc-ctrl-btn.danger:hover {
  background: rgba(239,68,68,0.15);
}

.vc-ctrl-btn.primary {
  background: linear-gradient(135deg, rgba(168,85,247,0.5), rgba(236,72,153,0.5));
  border-color: rgba(168,85,247,0.6);
  color: #fff;
}

.vc-ctrl-btn.primary:hover {
  background: linear-gradient(135deg, rgba(168,85,247,0.7), rgba(236,72,153,0.7));
}

/* ── Speed slider ── */
.vc-speed-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 12px;
}

.vc-speed-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  white-space: nowrap;
}

.vc-speed-slider {
  -webkit-appearance: none;
  width: 70px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  outline: none;
}

.vc-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(168,85,247,0.8);
}

/* ── Toast de captura ── */
.vc-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(168,85,247,0.5);
  border-radius: 16px;
  padding: 20px 28px;
  text-align: center;
  z-index: 50;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.vc-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.vc-toast-icon { font-size: 28px; margin-bottom: 8px; }
.vc-toast-text { font-size: 13px; color: #e9d5ff; font-weight: 600; }

/* ── Overlay de info ── */
.vc-info-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.vc-info-overlay.show { display: flex; }

.vc-info-mode-name {
  font-size: 28px;
  font-weight: 800;
  color: rgba(255,255,255,0.15);
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ── Partícula de click ── */
@keyframes vc-click-burst {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

.vc-click-burst {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(168,85,247,0.8);
  pointer-events: none;
  animation: vc-click-burst 0.5s ease-out forwards;
  z-index: 5;
  margin: -20px 0 0 -20px;
}
