:root {
  --bg-base: #080a0f;
  --bg-surface: #10141e;
  --bg-elevated: #171d2b;
  --bg-card-hover: #1d2537;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.65);

  --text-primary: #f3f5f9;
  --text-secondary: #9ba4b8;
  --text-muted: #646e85;

  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.25);

  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  overflow: hidden;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* TOPBAR */
.topbar {
  height: 62px;
  background: rgba(16, 20, 30, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  backdrop-filter: blur(12px);
}

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

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-accent {
  color: #818cf8;
}

.badge-env {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ROOM HEADER BAR */
.room-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-code-box {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 4px 6px 4px 12px;
  border-radius: var(--radius-md);
  gap: 10px;
}

.room-code-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.7px;
}

.room-code-value {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 16px;
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: 2px;
  user-select: text;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
}

.room-status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--emerald-bg);
  color: #34d399;
  font-size: 12px;
  font-weight: 600;
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot.connected {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.status-dot.disconnected {
  background: var(--danger);
}

/* LOBBY VIEW */
.lobby-container {
  height: calc(100vh - 62px);
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.lobby-grid {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
}

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.card-header h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.card-header p {
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group.compact {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
.select-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-input.sm {
  padding: 8px 10px;
  font-size: 12.5px;
}

input[type="text"]:focus,
.select-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* QUALITY CARDS (LOBBY) */
.quality-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quality-card {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 12px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quality-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.quality-card.active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.q-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.q-badge.accent {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.q-badge.ultra {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
}

.q-title {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.q-title span {
  font-size: 13px;
  font-weight: 700;
  color: #818cf8;
}

.q-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.q-meta strong {
  color: #34d399;
}

.q-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* CREATE / JOIN ACTIONS */
.lobby-actions-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 680px) {
  .quality-cards,
  .lobby-actions-split {
    grid-template-columns: 1fr;
  }
}

.action-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.action-box h3 {
  font-size: 15px;
  font-weight: 700;
}

.action-box p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.join-input-row {
  display: flex;
  gap: 8px;
}

.code-input {
  text-transform: uppercase;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  font-size: 15px !important;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #fff;
}

.btn-lg {
  padding: 11px 18px;
  font-size: 14px;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.full-width {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

/* SERVER CONFIG DETAILS */
.server-config-details {
  margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.server-config-details summary {
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
}

.server-config-body {
  margin-top: 10px;
}

.server-config-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.lan-urls-info {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  user-select: text;
}

/* SPECS CARD */
.specs-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.specs-intro {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.spec-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 10px;
}

.spec-item.highlight {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
}

.spec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.spec-title {
  font-weight: 700;
  font-size: 13.5px;
}

.spec-bitrate {
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  background: var(--emerald-bg);
  padding: 2px 8px;
  border-radius: 99px;
}

.spec-item p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.codec-info-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.codec-info-box h4 {
  font-size: 12.5px;
  margin-bottom: 6px;
  color: #a5b4fc;
}

.codec-info-box ul {
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.codec-info-box li {
  margin-bottom: 4px;
}

/* ROOM WORKSPACE */
.room-workspace {
  height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}

.room-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px;
  gap: 14px;
}

@media (max-width: 860px) {
  .topbar {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .brand-subtitle {
    display: none;
  }

  .room-workspace {
    height: calc(100vh - 58px);
    display: flex;
    flex-direction: column-reverse;
    overflow-y: auto;
  }

  .stage-area {
    min-height: 48vh;
    flex-shrink: 0;
  }

  .room-sidebar {
    border-right: none;
    border-top: 1px solid var(--border-subtle);
    overflow-y: visible;
  }
}

.sidebar-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.share-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-control {
  width: 100%;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 10px 13px;
}

.btn-control:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
}

.btn-control.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.55);
  color: #34d399;
}

/* PRESET PILLS IN ROOM */
.preset-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 5px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.preset-pill strong {
  font-size: 11px;
}

.preset-pill span {
  font-size: 10px;
  color: #34d399;
}

.preset-pill.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: var(--accent);
}

/* TELEMETRY */
.telemetry-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.telemetry-badge.live {
  background: var(--emerald-bg);
  color: #34d399;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.stat-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
}

.stat-value {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

/* PARTICIPANTS LIST */
.count-pill {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
}

.participants-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.participant-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.participant-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-badges {
  display: flex;
  gap: 4px;
}

.mini-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.mini-tag.webcam {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

/* STAGE AREA */
.stage-area {
  display: grid;
  grid-template-rows: 1fr auto;
  background: #05070b;
  padding: 14px;
  gap: 12px;
  overflow: hidden;
}

.main-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mainStageVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

#mainStageVideo.fit-cover {
  object-fit: cover;
}

/* PIP WEBCAM OVERLAY */
.pip-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 240px;
  aspect-ratio: 16 / 9;
  background: #090c12;
  border: 2px solid rgba(99, 102, 241, 0.7);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  z-index: 5;
}

.pip-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pip-label {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 7px;
  border-radius: 5px;
}

/* STAGE OVERLAY TOP */
.stage-overlay-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 6;
}

.stage-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 19, 29, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
}

.live-indicator {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.stage-actions {
  pointer-events: auto;
  display: flex;
  gap: 8px;
}

.btn-stage-icon {
  background: rgba(15, 19, 29, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-stage-icon:hover {
  background: rgba(99, 102, 241, 0.35);
}

/* EMPTY STAGE */
.empty-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at center, #111624 0%, #07090e 100%);
  z-index: 4;
}

.empty-stage-icon {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.empty-stage h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.empty-stage p {
  max-width: 460px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 18px;
}

.empty-invite-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-md);
}

.empty-invite-banner strong {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 16px;
  color: #a5b4fc;
  letter-spacing: 2px;
}

/* STREAMS STRIP (THUMBNAILS) */
.streams-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  min-height: 118px;
  max-height: 126px;
  padding-bottom: 2px;
}

.streams-strip:empty {
  display: none;
}

.stream-thumb {
  position: relative;
  width: 210px;
  height: 116px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.stream-thumb:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.stream-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.stream-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-thumb-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.72);
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ELECTRON PICKER MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-content {
  width: 100%;
  max-width: 920px;
  max-height: 84vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 18px;
}

.modal-header p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.picker-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.picker-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.picker-tab.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
}

.sources-grid {
  padding: 18px 22px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.source-card {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.source-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.source-thumb-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.source-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.source-meta {
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-meta img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.source-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: rgba(23, 29, 43, 0.96);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.2s ease;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.success {
  border-left-color: var(--emerald);
}

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

/* CONTROLES DE ÁUDIO DO COMPARTILHAMENTO */
.audio-capture-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.audio-capture-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.modal-audio-toggle {
  margin-left: 12px;
  padding: 5px 10px;
}

.stage-volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 19, 29, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px 4px 6px;
  border-radius: 8px;
}

.stage-volume-control .btn-stage-icon {
  background: transparent;
  border: none;
  padding: 3px 6px;
}

#stageVolumeSlider {
  width: 76px;
  accent-color: var(--accent);
  cursor: pointer;
}

.unmute-banner-btn {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(99, 102, 241, 0.55);
  transition: transform 0.15s ease, background 0.15s ease;
}

.unmute-banner-btn:hover {
  background: var(--accent-hover);
  transform: translateX(-50%) scale(1.03);
}

