/* ==========================================================================
   🗂️ 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%);
  position: relative;
  overflow: hidden;
}

/* ─── 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;
}

.substrip-action-btn.substrip-btn-drawer {
  background: linear-gradient(135deg, rgba(49, 231, 182, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(49, 231, 182, 0.35);
  color: #31e7b6;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.substrip-action-btn.substrip-btn-drawer:hover {
  background: linear-gradient(135deg, rgba(49, 231, 182, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
  border-color: #31e7b6;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(49, 231, 182, 0.3);
}

.substrip-action-btn.substrip-btn-drawer.active {
  background: #31e7b6;
  border-color: #4ef5c7;
  color: #0b141d;
  box-shadow: 0 0 14px rgba(49, 231, 182, 0.45);
}

.substrip-action-btn.substrip-btn-drawer #docksDrawerCaret {
  font-size: 9px;
  margin-left: 2px;
  opacity: 0.85;
}

/* ─── Slide-Down Studio Docks Drawer (from Headerbar) ─────────────────────── */
.sources-docks-drawer {
  position: absolute;
  top: 106px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  display: flex;
  flex-direction: column;
}

.sources-docks-drawer.open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.docks-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sources-docks-drawer.open .docks-drawer-backdrop {
  opacity: 1;
}

.docks-drawer-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 82vh;
  background: linear-gradient(180deg, #0e1724 0%, #080d15 100%);
  border-bottom: 2px solid rgba(49, 231, 182, 0.45);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(49, 231, 182, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.sources-docks-drawer.open .docks-drawer-panel {
  transform: translateY(0);
}

.docks-drawer-header {
  height: 46px;
  min-height: 46px;
  background: rgba(18, 28, 41, 0.95);
  border-bottom: 1px solid rgba(49, 231, 182, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.docks-drawer-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.docks-drawer-icon {
  font-size: 18px;
  line-height: 1;
}

.docks-drawer-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #31e7b6;
  text-transform: uppercase;
  margin-right: 10px;
}

.docks-drawer-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

.docks-drawer-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.docks-drawer-hint {
  font-size: 11px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.docks-drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.docks-drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
}

.docks-drawer-popout-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
}

.docks-drawer-popout-btn:hover {
  background: rgba(49, 231, 182, 0.18);
  border-color: #31e7b6;
  color: #31e7b6;
  transform: translateY(-1px);
}

.docks-drawer-popout-btn.active {
  background: rgba(49, 231, 182, 0.22);
  border-color: #31e7b6;
  color: #31e7b6;
  box-shadow: 0 0 10px rgba(49, 231, 182, 0.3);
}

.substrip-btn-popout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.substrip-btn-popout:hover {
  background: rgba(49, 231, 182, 0.18);
  border-color: #31e7b6;
  color: #31e7b6;
}

.substrip-btn-popout.active {
  background: rgba(49, 231, 182, 0.2);
  border-color: #31e7b6;
  color: #31e7b6;
}

.docks-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 24px;
  max-height: calc(82vh - 46px);
}

.drawer-grid {
  /* Matches bottom production grid: sources on left, mixer on right */
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

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


/* ─── 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);
}

.sources-tab-btn.tab-ads:hover {
  color: #fbbf24;
}

.sources-tab-btn.tab-ads.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
}

.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;
}

.sources-tab-btn.tab-ads.active .tab-badge {
  background: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.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);
  cursor: pointer;
  user-select: none;
}

.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;
  transition: padding 0.3s ease, min-height 0.3s ease;
}

.sources-preview-stage-wrap {
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16 / 9;
  max-height: 390px;
  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;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

/* EXPANDED PREVIEW WHEN POPPED IN (More visible, fills frame room) */
.docks-popped-in .sources-preview-viewport {
  padding: 24px 32px;
  min-height: calc(100vh - 250px);
}

.docks-popped-in .sources-preview-stage-wrap {
  max-width: 1480px;
  max-height: calc(100vh - 270px);
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(49, 231, 182, 0.3), 0 0 40px rgba(49, 231, 182, 0.12);
}

/* COMPACT PREVIEW WHEN POPPED OUT */
.docks-popped-out .sources-preview-stage-wrap {
  max-width: 880px;
  max-height: 390px;
}

.preview-dock-toggle-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-dock-toggle-btn:hover {
  background: rgba(49, 231, 182, 0.18);
  border-color: #31e7b6;
  color: #31e7b6;
}

.preview-dock-toggle-btn.active {
  background: rgba(49, 231, 182, 0.22);
  border-color: #31e7b6;
  color: #31e7b6;
}

.preview-dock-reveal-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 10px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.preview-dock-reveal-bar:hover .reveal-bar-badge {
  background: rgba(49, 231, 182, 0.2);
  border-color: #31e7b6;
  color: #31e7b6;
  box-shadow: 0 0 14px rgba(49, 231, 182, 0.35);
  transform: translateY(-1px);
}

.reveal-bar-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(49, 231, 182, 0.2) 50%, rgba(255, 255, 255, 0.04));
}

.reveal-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.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;
}

.divider-rail-popin-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.divider-rail-popin-btn:hover {
  background: rgba(49, 231, 182, 0.18);
  border-color: #31e7b6;
  color: #31e7b6;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(49, 231, 182, 0.3);
}

.sources-bottom-docks-container {
  width: 100%;
  animation: fadeInBottomDock 0.25s ease-out;
}

.sources-bottom-docks-container.docked-hidden {
  display: none !important;
}

@keyframes fadeInBottomDock {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rack-header-icon-btn.rack-popin-btn:hover {
  border-color: #31e7b6 !important;
  color: #31e7b6 !important;
  background: rgba(49, 231, 182, 0.18) !important;
}

/* ─── 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);
}

/* ══════════════════════════════════════════════════════════════════════════════
   STREAMLABS OBS DESKTOP "ADD SOURCE" MODAL WINDOW
   ══════════════════════════════════════════════════════════════════════════════ */
.slobs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.slobs-add-source-window {
  width: 960px;
  max-width: 96vw;
  height: 680px;
  max-height: 90vh;
  background: #0e1726;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 1px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: slobsWindowPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
}

.slobs-add-source-window.maximized {
  width: 99vw !important;
  height: 98vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
}

@keyframes slobsWindowPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Title Bar */
.slobs-window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090e17;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

.slobs-window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.slobs-title-icon {
  color: #31e7b6;
}

.slobs-window-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.slobs-win-ctrl-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.slobs-win-ctrl-btn:hover {
  background: #1e293b;
  color: #f8fafc;
}

.slobs-win-ctrl-btn.close:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Sub-nav Tabs & Search Bar */
.slobs-subnav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #0c121e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.slobs-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
}

.slobs-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.slobs-tab:hover {
  color: #f1f5f9;
}

.slobs-tab.active {
  color: #ffffff;
  border-bottom-color: #31e7b6;
}

.slobs-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #131d2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 5px 10px;
  width: 210px;
  color: #64748b;
  transition: all 0.15s ease;
}

.slobs-search-wrap:focus-within {
  border-color: #31e7b6;
  color: #31e7b6;
  box-shadow: 0 0 0 2px rgba(49, 231, 182, 0.15);
}

.slobs-search-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: #f1f5f9;
  width: 100%;
}

.slobs-search-input::placeholder {
  color: #64748b;
}

/* Modal Body (Two-Column) */
.slobs-modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #0e1726;
}

/* Left Column: Categorized Source Accordions */
.slobs-catalog-scroll {
  flex: 1.55;
  overflow-y: auto;
  padding: 16px 18px 24px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.slobs-catalog-scroll::-webkit-scrollbar {
  width: 6px;
}

.slobs-catalog-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.12);
}

.slobs-catalog-scroll::-webkit-scrollbar-thumb {
  background: #1e2c3d;
  border-radius: 4px;
}

.slobs-catalog-scroll::-webkit-scrollbar-thumb:hover {
  background: #2b3d54;
}

.slobs-category-group {
  margin-bottom: 22px;
}

.slobs-cat-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 11px;
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}

.slobs-cat-header:hover {
  color: #31e7b6;
}

.slobs-cat-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s ease;
  display: inline-block;
}

.slobs-cat-chevron.collapsed {
  transform: rotate(-90deg);
}

.slobs-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Source Card */
.slobs-source-card {
  background: #16212e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 9px 11px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
  text-align: left;
}

.slobs-source-card:hover {
  background: #1a2839;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.slobs-source-card.active {
  background: #1f3044;
  border-color: #31e7b6;
  box-shadow: 0 0 0 1px #31e7b6, inset 0 0 12px rgba(49, 231, 182, 0.08);
}

.slobs-source-card .card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.slobs-source-card .card-icon {
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.slobs-source-card.active .card-icon {
  color: #31e7b6;
}

.slobs-source-card .card-title {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.slobs-source-card .card-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.slobs-source-card .card-badge.new {
  background: #9333ea;
  color: #ffffff;
}

.slobs-source-card .card-badge.beta {
  background: #2563eb;
  color: #ffffff;
}

.slobs-source-card .card-desc {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 22px;
}

/* Right Column: Selected Source Details Pane */
.slobs-details-column {
  flex: 1;
  background: #090e17;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.slobs-details-column::-webkit-scrollbar {
  width: 5px;
}

.slobs-details-column::-webkit-scrollbar-thumb {
  background: #1c2738;
  border-radius: 3px;
}

/* Preview Stage */
.slobs-preview-stage {
  min-height: 155px;
  max-height: 175px;
  background: #05080e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  padding: 16px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.details-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: -0.2px;
}

.details-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 20px 0;
}

.details-supports-header {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.details-supports-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.details-supports-list li {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.details-supports-list li::before {
  content: "•";
  color: #64748b;
  font-size: 14px;
  line-height: 1;
}

/* Dedicated Previews */
/* 1. Alert Box Preview */
.slobs-alertbox-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.slobs-alert-header {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #f43f5e;
  text-shadow: 0 0 12px rgba(244, 63, 94, 0.9), 0 0 24px rgba(168, 85, 247, 0.7);
  text-transform: uppercase;
}

.slobs-alert-card {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.75) 0%, rgba(30, 27, 75, 0.9) 100%);
  border: 2px solid #a855f7;
  border-radius: 12px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.65), inset 0 0 12px rgba(192, 132, 252, 0.35);
  font-size: 12px;
  position: relative;
}

.slobs-alert-user {
  color: #ffffff;
  font-weight: 700;
}

.slobs-alert-action {
  color: #e9d5ff;
  font-weight: 400;
}

.slobs-sparkle-left, .slobs-sparkle-right {
  color: #fde047;
  font-size: 14px;
  text-shadow: 0 0 8px #facc15;
  animation: slobsSparkle 2s infinite ease-in-out;
}

@keyframes slobsSparkle {
  0%, 100% { opacity: 0.7; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15) rotate(10deg); }
}

/* 2. Viewer Count Preview */
.slobs-viewercount-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.slobs-vc-badge {
  width: 76px;
  height: 56px;
  background: #000000;
  border: 2.5px solid #ea580c;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.45);
}

.slobs-vc-badge.vc-twitch .slobs-vc-icon {
  color: #a855f7;
  width: 18px;
  height: 18px;
}

.slobs-vc-badge.vc-youtube .slobs-vc-icon {
  color: #ef4444;
  width: 18px;
  height: 18px;
}

.slobs-vc-badge.vc-facebook .slobs-vc-icon {
  color: #3b82f6;
  width: 18px;
  height: 18px;
}

.slobs-vc-num {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

/* 3. Chat Box Preview */
.slobs-chatbox-preview {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}

.slobs-chat-line {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 9px;
  border-radius: 4px;
}

.chat-badge {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.chat-badge.mod {
  background: #10b981;
  color: #042f1a;
}

.chat-badge.vip {
  background: #ec4899;
  color: #ffffff;
}

.chat-name.user1 { color: #38bdf8; font-weight: 700; }
.chat-name.user2 { color: #f472b6; font-weight: 700; }
.chat-name.user3 { color: #facc15; font-weight: 700; }
.chat-msg { color: #cbd5e1; }

/* 4. Browser Source Preview */
.slobs-browser-preview {
  width: 88%;
  background: #0b1320;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.browser-topbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: #111a2c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.browser-dot.dot-red { background: #ef4444; }
.browser-dot.dot-yellow { background: #eab308; }
.browser-dot.dot-green { background: #22c55e; }

.browser-url {
  font-size: 9.5px;
  color: #94a3b8;
  background: #090e17;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-content {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(49, 231, 182, 0.15) 0%, transparent 70%);
}

.browser-hero-wave {
  width: 70%;
  height: 24px;
  border-radius: 12px;
  background: linear-gradient(90deg, #31e7b6, #06b6d4, #a855f7);
  box-shadow: 0 0 16px rgba(49, 231, 182, 0.4);
}

/* 5. Video / Cam Preview */
.slobs-videocam-preview {
  width: 88%;
  height: 105px;
  background: #080d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cam-rec-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 3px;
}

.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: slobsSparkle 1.2s infinite ease-in-out;
}

.cam-crosshair {
  width: 32px;
  height: 32px;
  border: 1px dashed rgba(49, 231, 182, 0.6);
  border-radius: 50%;
}

/* 6. Audio Preview */
.slobs-audio-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.audio-spectrum {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
}

.audio-spectrum .bar {
  width: 6px;
  background: linear-gradient(to top, #10b981 0%, #31e7b6 70%, #ef4444 100%);
  border-radius: 2px;
  animation: audioBounce 1.2s infinite ease-in-out alternate;
}

.audio-spectrum .b1 { height: 35%; animation-delay: 0.1s; }
.audio-spectrum .b2 { height: 65%; animation-delay: 0.3s; }
.audio-spectrum .b3 { height: 90%; animation-delay: 0.2s; }
.audio-spectrum .b4 { height: 45%; animation-delay: 0.5s; }
.audio-spectrum .b5 { height: 80%; animation-delay: 0.15s; }
.audio-spectrum .b6 { height: 50%; animation-delay: 0.4s; }
.audio-spectrum .b7 { height: 75%; animation-delay: 0.25s; }
.audio-spectrum .b8 { height: 30%; animation-delay: 0.35s; }

@keyframes audioBounce {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

.audio-db-label {
  font-size: 11px;
  font-weight: 700;
  color: #31e7b6;
  letter-spacing: 0.5px;
}

/* 7. Sponsor Banner Preview */
.slobs-sponsor-preview {
  width: 88%;
}

.sponsor-card-mock {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border: 1.5px solid #6366f1;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.sponsor-badge {
  font-size: 8.5px;
  font-weight: 800;
  color: #818cf8;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.sponsor-logo {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.sponsor-tagline {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

/* 8. Goal Preview */
.slobs-goal-preview {
  width: 88%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goal-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.goal-progress-bar {
  width: 100%;
  height: 12px;
  background: #111a2a;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #31e7b6 100%);
  border-radius: 6px;
}

.goal-days-left {
  font-size: 10px;
  color: #64748b;
  text-align: right;
}

/* 9. Emote Wall Preview */
.slobs-emotewall-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 24px;
}

.float-emote {
  animation: emoteFloat 2s infinite ease-in-out alternate;
}
.float-emote.e1 { animation-delay: 0.1s; }
.float-emote.e2 { animation-delay: 0.4s; }
.float-emote.e3 { animation-delay: 0.2s; }
.float-emote.e4 { animation-delay: 0.5s; }
.float-emote.e5 { animation-delay: 0.3s; }

@keyframes emoteFloat {
  0% { transform: translateY(6px); }
  100% { transform: translateY(-8px); }
}

/* 10. Text Preview */
.slobs-text-preview {
  text-align: center;
  width: 88%;
}

.text-headline {
  font-size: 13px;
  font-weight: 800;
  color: #31e7b6;
  letter-spacing: 0.8px;
  text-shadow: 0 0 10px rgba(49, 231, 182, 0.6);
}

.text-subtitle {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Bottom Action Footer */
.slobs-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #0b101b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.slobs-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 440px;
}

.slobs-name-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.slobs-name-input {
  background: #131d2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
  color: #ffffff;
  flex: 1;
  outline: none;
  transition: border-color 0.15s ease;
}

.slobs-name-input:focus {
  border-color: #31e7b6;
  box-shadow: 0 0 0 2px rgba(49, 231, 182, 0.12);
}

.slobs-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slobs-btn-secondary {
  background: #253342;
  border: none;
  border-radius: 5px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slobs-btn-secondary:hover {
  background: #334458;
  color: #ffffff;
}

.slobs-btn-primary {
  background: #31e7b6;
  border: none;
  border-radius: 5px;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 700;
  color: #0b101b;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(49, 231, 182, 0.25);
}

.slobs-btn-primary:hover {
  background: #22d3a3;
  box-shadow: 0 4px 16px rgba(49, 231, 182, 0.4);
}

/* ─── 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);
}

.rack-header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: #31e7b6 !important;
  color: #31e7b6 !important;
  transform: translateY(-1px);
}
