/* ==========================================================================
   🗂️ HEARTBEAT.FM — DEDICATED SOURCES & OVERLAYS STUDIO SCREEN STYLING
   ========================================================================== */

#screen-sources {
  display: none;
  width: 100vw;
  height: 100vh;
  background: #090c14;
  color: #f1f5f9;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
}

#screen-sources.active {
  display: block;
}

.sources-screen-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 60% 0%, #111a2d 0%, #070911 75%);
}

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.sources-topbar {
  height: 64px;
  background: rgba(11, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 10;
}

.sources-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sources-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #06b6d4;
  color: #fff;
  transform: translateX(-2px);
}

.sources-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sources-brand-icon {
  font-size: 22px;
}

.sources-brand-info {
  display: flex;
  flex-direction: column;
}

.sources-brand-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}

.sources-brand-sub {
  font-size: 11px;
  color: #94a3b8;
}

.scene-switcher-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
}

.switcher-label {
  font-size: 11px;
  font-weight: 800;
  color: #67e8f9;
  letter-spacing: 0.5px;
}

.scene-switcher-select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.scene-switcher-select option {
  background: #111827;
  color: #fff;
}

.sources-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sources-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.sources-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.sources-btn-primary {
  background: #06b6d4;
  border: 1px solid #22d3ee;
  color: #042f2e;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.sources-btn-primary:hover {
  background: #0891b2;
  color: #fff;
  transform: translateY(-1px);
}

/* ─── Substrip ───────────────────────────────────────────────────────────── */
.sources-substrip {
  height: 42px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  font-size: 12px;
  flex-shrink: 0;
}

.substrip-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s;
}

.substrip-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.substrip-action-btn.substrip-btn-primary {
  background: #06b6d4;
  border-color: #22d3ee;
  color: #042f2e;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

.substrip-action-btn.substrip-btn-primary:hover {
  background: #0891b2;
  color: #fff;
  border-color: #06b6d4;
}

/* ─── Main Viewport Grid ─────────────────────────────────────────────────── */
.sources-main-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.sources-production-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .sources-production-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Layers Rack ────────────────────────────────────────────────────────── */
.sources-rack-container {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── Layer Rack Tabs ────────────────────────────────────────────────────────── */
.sources-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 0;
  background: rgba(11, 15, 26, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sources-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.sources-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.sources-tab-btn.active {
  color: #31e7b6;
  background: rgba(49, 231, 182, 0.12);
  border-color: rgba(49, 231, 182, 0.4);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.sources-tab-btn.active .tab-badge {
  background: rgba(49, 231, 182, 0.25);
  color: #31e7b6;
}

.rack-header {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

.rack-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.rack-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.rack-hint {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.rack-header-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rack-header-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.rack-header-icon-btn:hover {
  background: rgba(49, 231, 182, 0.15);
  border-color: #31e7b6;
  color: #31e7b6;
  transform: translateY(-1px);
}

.rack-header-icon-btn:active {
  transform: scale(0.96);
}

.sources-layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.source-layer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(22, 30, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.source-layer-card:hover {
  background: rgba(30, 41, 66, 0.85);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateX(2px);
}

.source-layer-card.hidden-layer {
  opacity: 0.55;
  background: rgba(15, 20, 32, 0.4);
}

.layer-drag-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.layer-order-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #64748b;
}

.layer-reorder-buttons {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reorder-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 9px;
  cursor: pointer;
  padding: 1px 4px;
  line-height: 1;
}

.reorder-btn:hover:not(:disabled) {
  color: #06b6d4;
}

.reorder-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.layer-type-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.layer-type-avatar.browser { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.layer-type-avatar.speakers, .layer-type-avatar.audio { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.layer-type-avatar.image { color: #a855f7; background: rgba(168, 85, 247, 0.1); }
.layer-type-avatar.mic { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.layer-type-avatar.text { color: #ec4899; background: rgba(236, 72, 153, 0.1); }
.layer-type-avatar.ad { color: #eab308; background: rgba(234, 179, 8, 0.1); }

.layer-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.layer-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layer-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layer-name.text-struck {
  text-decoration: line-through;
  color: #94a3b8;
}

.layer-type-chip {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.layer-details-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.layer-audio-badge {
  color: #4ade80;
  font-weight: 700;
}

/* Audio VU simulation bar */
.layer-vu-meter {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  padding: 0 8px;
}

.vu-bar {
  width: 3px;
  height: 60%;
  border-radius: 1px;
}

.vu-green { background: #22c55e; animation: vuAnim 0.8s infinite alternate; }
.vu-yellow { background: #eab308; animation: vuAnim 0.6s infinite alternate; }
.vu-red { background: #ef4444; animation: vuAnim 0.9s infinite alternate; }

@keyframes vuAnim {
  0% { height: 20%; }
  100% { height: 95%; }
}

.layer-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.layer-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.layer-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.layer-action-btn.active {
  color: #f59e0b;
  border-color: #f59e0b;
}

.layer-action-btn.visible {
  color: #06b6d4;
}

.layer-action-btn.hidden {
  color: #64748b;
}

/* ─── Streamlabs OBS Live Broadcast Program Preview ─────────────────────── */
.sources-preview-dock-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.sources-preview-card {
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.sources-preview-header {
  padding: 10px 18px;
  background: #060a10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sources-preview-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: previewDotPulse 1.8s infinite;
}

@keyframes previewDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.preview-status-badge {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.preview-scene-badge {
  font-size: 11px;
  font-weight: 600;
  color: #31e7b6;
  background: rgba(49, 231, 182, 0.12);
  border: 1px solid rgba(49, 231, 182, 0.25);
  padding: 2px 10px;
  border-radius: 12px;
}

.sources-preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-meta-pill {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.preview-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preview-reload-btn:hover {
  background: rgba(49, 231, 182, 0.15);
  color: #31e7b6;
  border-color: #31e7b6;
}

.sources-preview-viewport {
  background: #030508;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 18px;
  min-height: 240px;
}

.sources-preview-stage-wrap {
  width: 100%;
  max-width: 840px;
  aspect-ratio: 16 / 9;
  max-height: 380px;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
}

.sources-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

/* ─── Streamlabs OBS Rail Divider All The Way Across ────────────────────── */
.sources-dock-divider-rail {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 20px 0;
}

.divider-rail-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(49, 231, 182, 0.05), rgba(255, 255, 255, 0.14) 50%, rgba(49, 231, 182, 0.05));
}

.divider-rail-center {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #718096;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.divider-rail-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #31e7b6;
  box-shadow: 0 0 6px #31e7b6;
}

/* ─── Streamlabs OBS Mixer Panel ────────────────────────────────────────── */
.sources-monitor-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.slobs-mixer-card {
  background: #111c24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.slobs-mixer-header {
  padding: 12px 16px;
  background: #0d151c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slobs-mixer-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slobs-mixer-header-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.slobs-mixer-header-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.slobs-mixer-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.slobs-mixer-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slobs-mixer-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slobs-mixer-name {
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.slobs-mixer-db {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Audio VU Peak Meter Bar */
.slobs-vu-meter-bar {
  width: 100%;
  height: 4px;
  background: #1a2732;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.slobs-vu-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #10b981 68%, #f59e0b 68%, #f59e0b 86%, #ef4444 86%, #ef4444 100%);
  border-radius: 2px;
  transition: width 0.12s ease-out;
  position: relative;
}

.slobs-vu-meter-fill.is-active {
  animation: slobsVuPulse 2.4s infinite ease-in-out;
}

@keyframes slobsVuPulse {
  0% { opacity: 0.95; filter: brightness(1); }
  25% { opacity: 0.8; filter: brightness(0.9); }
  50% { opacity: 1; filter: brightness(1.1); }
  75% { opacity: 0.85; filter: brightness(0.95); }
  100% { opacity: 0.95; filter: brightness(1); }
}

.slobs-vu-meter-fill.is-muted {
  width: 0% !important;
  animation: none !important;
}

/* Controls: Slider + Mute + Gear */
.slobs-mixer-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slobs-slider-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
}

.slobs-slider-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 3px;
  background: #172430;
  overflow: hidden;
  pointer-events: none;
}

.slobs-slider-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #31e7b6 100%);
  border-radius: 3px;
  transition: width 0.05s ease;
}

/* Custom Streamlabs slider */
.slobs-volume-slider {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  background: transparent !important;
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.slobs-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  border: 2px solid #0f172a;
  margin-top: 0;
}

.slobs-volume-slider:hover::-webkit-slider-thumb {
  background: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(49, 231, 182, 0.4), 0 2px 8px rgba(0, 0, 0, 0.8);
}

.slobs-volume-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(49, 231, 182, 0.5), 0 2px 8px rgba(0, 0, 0, 0.8);
}

.slobs-volume-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 100%;
  background: transparent !important;
}

.slobs-volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #0f172a;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.slobs-volume-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #22313f;
}

/* dB label colour coding */
.slobs-mixer-db.db-hot   { color: #ef4444 !important; }
.slobs-mixer-db.db-warn  { color: #f59e0b !important; }
.slobs-mixer-db.db-ok    { color: #10b981 !important; }
.slobs-mixer-db.db-muted { color: #475569 !important; }

.slobs-mixer-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.slobs-mixer-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.09);
}

.slobs-mixer-btn.is-muted {
  color: #ef4444;
}

.slobs-mixer-btn.is-muted:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.slobs-mixer-empty {
  padding: 28px 12px;
  text-align: center;
  color: #475569;
  font-size: 12px;
  font-style: italic;
}

/* Desktop Audio separator */
#slobs-row-master {
  border-bottom: 1px solid rgba(49, 231, 182, 0.15) !important;
  margin-bottom: 4px;
}

/* Mixer body scrollbar */
.slobs-mixer-body::-webkit-scrollbar {
  width: 4px;
}
.slobs-mixer-body::-webkit-scrollbar-track {
  background: transparent;
}
.slobs-mixer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.slobs-mixer-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ─── DEDICATED MODALS STYLING ───────────────────────────────────────────── */
.sources-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sources-modal-window {
  width: 95%;
  max-width: 580px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.15);
  color: #fff;
  overflow: hidden;
  animation: modalPopIn 0.2s ease-out;
}

.sources-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.sources-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.source-types-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.source-type-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.2s;
}

.source-type-card:hover {
  border-color: rgba(6, 182, 212, 0.5);
  background: #1e293b;
}

.source-type-card.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: #06b6d4;
}

.st-icon {
  font-size: 20px;
}

.st-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.st-desc {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

.sources-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

/* ─── Folder Layers & Nested Hierarchy ──────────────────────────────────── */
.folder-layer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f1722;
  border: 1px solid rgba(49, 231, 182, 0.25);
  border-left: 4px solid #31e7b6;
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.folder-layer-card:hover {
  background: #142232;
  border-color: #31e7b6;
}

.folder-layer-card.hidden-layer {
  opacity: 0.55;
  background: rgba(15, 20, 32, 0.4);
}

.folder-toggle-caret {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  flex-shrink: 0;
}

.folder-toggle-caret:hover {
  color: #31e7b6;
}

.folder-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(49, 231, 182, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.folder-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.folder-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(49, 231, 182, 0.15);
  color: #31e7b6;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(49, 231, 182, 0.3);
}

.folder-add-btn:hover {
  color: #31e7b6 !important;
  border-color: #31e7b6 !important;
}

.folder-del-btn:hover {
  color: #ef4444 !important;
  border-color: #ef4444 !important;
}

/* Child item indented under a folder */
.source-layer-card.in-folder-child {
  margin-left: 28px;
  position: relative;
  border-left: 2px solid rgba(49, 231, 182, 0.3);
  background: rgba(16, 23, 36, 0.85);
}

.source-layer-card.in-folder-child:hover {
  border-left-color: #31e7b6;
}

.in-folder-tag {
  font-size: 10px;
  color: #31e7b6;
  background: rgba(49, 231, 182, 0.1);
  border: 1px solid rgba(49, 231, 182, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

/* ─── Streamlabs OBS Replica "Name Folder" Modal ───────────────────────── */
.name-folder-dialog {
  width: 440px;
  max-width: 90vw;
  background: #111a24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
}

.name-folder-titlebar {
  background: #090e15;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.titlebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.titlebar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.titlebar-ctrl-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.titlebar-ctrl-btn:hover {
  color: #ffffff;
}

.titlebar-ctrl-btn.close-x:hover {
  color: #ef4444;
}

.name-folder-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.name-folder-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
}

.prompt-flower {
  color: #31e7b6;
  font-size: 14px;
}

.name-folder-input {
  background: #0b1219;
  border: 1.5px solid #31e7b6;
  border-radius: 4px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 14px;
  outline: none;
  width: 100%;
  box-shadow: 0 0 10px rgba(49, 231, 182, 0.15);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.name-folder-input:focus {
  border-color: #4ef5c7;
  box-shadow: 0 0 14px rgba(49, 231, 182, 0.35);
}

.name-folder-footer {
  padding: 12px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
}

.name-folder-btn {
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  padding: 7px 18px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.name-folder-btn.btn-close {
  background: #253443;
  color: #cbd5e1;
}

.name-folder-btn.btn-close:hover {
  background: #314356;
  color: #ffffff;
}

.name-folder-btn.btn-done {
  background: #31e7b6;
  color: #0b141d;
  font-weight: 700;
}

.name-folder-btn.btn-done:hover {
  background: #4ef5c7;
  box-shadow: 0 0 12px rgba(49, 231, 182, 0.4);
}
