/* ═══════════════════════════════════════════════════════════════
   OmicsLab — 360° Virtual Genomics Lab CSS
   Interior panorama: user stands inside, machines on the walls.
   ═══════════════════════════════════════════════════════════════ */

.vl-page { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }

/* Header */
.vl-header { text-align: center; margin-bottom: 1.5rem; }
.vl-title {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800;
  background: linear-gradient(135deg, #3fb950, #58a6ff, #a371f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin: 0 0 0.4rem;
}
.vl-subtitle { font-size: 0.86rem; color: #8b949e; max-width: 600px; margin: 0 auto; }

/* Workspace layout */
.vl-workspace {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

/* ── ROOM VIEWPORT ── */
.vl-room {
  position: relative;
  width: 100%;
  height: 520px;
  perspective: 1200px;
  perspective-origin: 50% 42%;
  overflow: hidden;
  border-radius: 14px;
  background: #0d1117;
  border: 1px solid #21262d;
  cursor: grab;
  user-select: none;
}
.vl-room:active { cursor: grabbing; }

/* Drag hint overlay */
.vl-drag-hint {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.9rem; border-radius: 20px;
  background: rgba(13,17,23,0.75); border: 1px solid #30363d;
  color: #8b949e; font-size: 0.75rem;
  pointer-events: none; z-index: 10;
  transition: opacity 0.6s;
}

/* Scene wrapper — centred in viewport */
.vl-scene-wrap {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
}

/* 3D scene container */
.vl-scene {
  position: absolute;
  transform-style: preserve-3d;
}

/* Individual instrument panels */
.vl-panel {
  position: absolute;
  top: -240px;   /* half of PANEL_H: 480/2 */
  left: -190px;  /* half of PANEL_W: 380/2 */
  border: 1px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s;
  backface-visibility: visible;
}
.vl-panel:hover { border-color: rgba(255,255,255,0.18); }
.vl-panel.vl-panel-active { border-color: rgba(255,255,255,0.32); }

/* Machine name bar at bottom of each panel */
.vl-panel-name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.5rem 0.75rem;
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 0.1rem;
}
.vl-panel-cat  { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.vl-panel-title { font-size: 0.82rem; font-weight: 700; color: #c9d1d9; }

/* ── NAV BAR (dots + arrows) ── */
.vl-room-nav {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.45rem 0.9rem; border-radius: 24px;
  background: rgba(13,17,23,0.85); border: 1px solid #30363d;
  z-index: 20;
}
.vl-nav-btn {
  background: none; border: none; color: #8b949e; cursor: pointer;
  display: flex; align-items: center; padding: 0.15rem;
  transition: color 0.18s;
}
.vl-nav-btn:hover { color: #c9d1d9; }
.vl-dots { display: flex; gap: 0.35rem; align-items: center; }
.vl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid; background: transparent;
  cursor: pointer; padding: 0; transition: all 0.2s;
  opacity: 0.45;
}
.vl-dot.vl-dot-active { opacity: 1; transform: scale(1.35); }

/* ── STATION COUNTER (right edge, scrollable list) ── */
.vl-station-counter {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 480px; overflow-y: auto;
  z-index: 20;
}
.vl-station-counter::-webkit-scrollbar { display: none; }

.vl-counter-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.55rem; background: rgba(13,17,23,0.88);
  border: none; border-left: 3px solid; border-radius: 0 5px 5px 0;
  cursor: pointer; text-align: left; transition: background 0.15s;
}
.vl-counter-item:hover { background: rgba(33,38,45,0.95); }
.vl-counter-num { font-size: 0.7rem; font-weight: 800; font-family: monospace; min-width: 18px; }
.vl-counter-name { font-size: 0.65rem; color: #8b949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 135px; }

/* ── INFO PANEL ── */
.vl-info-panel {
  background: var(--bg-card, #161b22);
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 1.25rem;
  min-height: 520px;
  position: sticky; top: 1rem;
  overflow-y: auto; max-height: 520px;
}
.vl-info-panel::-webkit-scrollbar { width: 4px; }
.vl-info-panel::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

.vl-info-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 300px; gap: 1rem;
  text-align: center; color: #8b949e; font-size: 0.84rem; line-height: 1.6;
}

.vl-info-close {
  float: right; background: none; border: 1px solid #30363d;
  border-radius: 5px; padding: 0.3rem; color: #8b949e; cursor: pointer;
  transition: all 0.15s; margin-bottom: 0.5rem;
}
.vl-info-close:hover { background: #21262d; color: #c9d1d9; }

.vl-info-cat {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 0.2rem; clear: right;
}
.vl-info-name {
  font-size: 1.05rem; font-weight: 800; color: #c9d1d9;
  margin-bottom: 0.85rem; line-height: 1.3;
}
.vl-info-desc {
  font-size: 0.82rem; color: #8b949e; line-height: 1.65;
  margin: 0 0 1rem; border-bottom: 1px solid #21262d; padding-bottom: 1rem;
}
.vl-info-sub {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: #8b949e; margin-bottom: 0.5rem; margin-top: 0.75rem;
}
.vl-info-specs { padding-left: 1.1rem; margin: 0 0 0.75rem; list-style: disc outside; }
.vl-info-specs li { font-size: 0.8rem; color: #c9d1d9; line-height: 1.5; margin-bottom: 0.25rem; }
.vl-info-usage { font-size: 0.8rem; color: #8b949e; line-height: 1.65; margin: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .vl-workspace { grid-template-columns: 1fr; }
  .vl-info-panel { min-height: 300px; max-height: none; position: static; }
  .vl-room { height: 420px; }
  .vl-station-counter { display: none; }
}
@media (max-width: 640px) {
  .vl-room { height: 340px; perspective: 800px; }
  .vl-page { padding: 1.25rem 0.75rem 3rem; }
  .vl-title { font-size: 1.2rem; }
}
