/* ═══════════════════════════════════════════════════
   VIBRA CITY — Ciudad isométrica interactiva
   VibraWorld · Mejora #6
   ═══════════════════════════════════════════════════ */

/* ── Tab button ── */
.bn-tab[data-tab="city"] .bn-icon::before { content: '🏙️'; font-style: normal; }

/* ── Panel wrapper ── */
#panel-city {
  position: fixed;
  inset: 0;
  background: #06040f;
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#panel-city.vc-active { display: flex; }

/* ── Header HUD ── */
.vc-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: env(safe-area-inset-top, 12px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(6,4,15,.95) 60%, transparent);
  pointer-events: none;
}
.vc-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  pointer-events: none;
}
.vc-title span { color: #a78bfa; }
.vc-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
}

/* ── Canvas city ── */
#vc-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#vc-canvas:active { cursor: grabbing; }

/* ── NERHIA live bar ── */
.vc-nerhia-bar {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  left: 12px; right: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}
.vc-metric {
  background: rgba(10,6,25,.82);
  border: 1px solid rgba(167,139,250,.18);
  border-radius: 20px;
  padding: 5px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  backdrop-filter: blur(10px);
  min-width: 44px;
}
.vc-metric-val {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #a78bfa;
  line-height: 1;
}
.vc-metric-label {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  color: rgba(255,255,255,.4);
  letter-spacing: .06em;
}

/* ── Tooltip ── */
.vc-tooltip {
  position: absolute;
  background: rgba(10,6,25,.95);
  border: 1px solid rgba(167,139,250,.35);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 160px;
  max-width: 220px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(16px);
}
.vc-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.vc-tt-name {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.vc-tt-row {
  display: flex;
  justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,.55);
  margin-bottom: 3px;
}
.vc-tt-row span:last-child { color: #a78bfa; }
.vc-tt-btn {
  margin-top: 8px;
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 6px;
  cursor: pointer;
  pointer-events: all;
  letter-spacing: .04em;
}

/* ── District selector ── */
.vc-districts {
  position: absolute;
  top: calc(env(safe-area-inset-top, 12px) + 56px);
  left: 12px; right: 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  z-index: 10;
  padding-bottom: 4px;
  pointer-events: all;
  scrollbar-width: none;
}
.vc-districts::-webkit-scrollbar { display: none; }
.vc-dist-btn {
  flex-shrink: 0;
  background: rgba(10,6,25,.8);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 20px;
  color: rgba(255,255,255,.65);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all .2s ease;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.vc-dist-btn.active,
.vc-dist-btn:hover {
  background: rgba(124,58,237,.35);
  border-color: #a78bfa;
  color: #fff;
}

/* ── Entry panel ── */
.vc-dept-panel {
  position: absolute;
  inset: 0;
  background: rgba(6,4,15,.92);
  backdrop-filter: blur(24px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.vc-dept-panel.show {
  opacity: 1;
  pointer-events: all;
}
.vc-dp-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  animation: vcEmojiFloat 3s ease-in-out infinite;
}
@keyframes vcEmojiFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.vc-dp-name {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  text-align: center;
}
.vc-dp-desc {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,.5);
  text-align: center;
  margin-bottom: 24px;
  max-width: 280px;
  line-height: 1.6;
}
.vc-dp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin-bottom: 24px;
}
.vc-dp-stat {
  background: rgba(167,139,250,.08);
  border: 1px solid rgba(167,139,250,.15);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.vc-dp-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #a78bfa;
}
.vc-dp-stat-lbl {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}
.vc-dp-actions {
  display: flex;
  gap: 10px;
}
.vc-dp-btn {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  letter-spacing: .04em;
}
.vc-dp-btn.outline {
  background: transparent;
  border: 1px solid rgba(167,139,250,.35);
  color: rgba(255,255,255,.7);
}

/* ── Energy flow particles ── */
.vc-energy-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* ── Zoom controls ── */
.vc-zoom {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}
.vc-zoom-btn {
  width: 36px; height: 36px;
  background: rgba(10,6,25,.82);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.vc-zoom-btn:hover { background: rgba(124,58,237,.4); }

/* ── Mini map ── */
.vc-minimap {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 128px);
  right: 14px;
  width: 80px;
  height: 60px;
  background: rgba(10,6,25,.75);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 8px;
  overflow: hidden;
  z-index: 10;
  backdrop-filter: blur(8px);
}
#vc-minimap-canvas { width: 100%; height: 100%; }

/* ── Toast ── */
.vc-toast {
  position: absolute;
  top: calc(env(safe-area-inset-top, 12px) + 120px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(124,58,237,.9);
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  z-index: 25;
  backdrop-filter: blur(12px);
}
.vc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
