/* =========================================================
   Vcell System — CSS - Clean & Minimalist Design
   Cores neutras, tipografia limpa, espaçamento generoso
   ========================================================= */

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

:root {
  /* Paleta neutra e elegante */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  
  --border-subtle: #e9ecef;
  --border-medium: #dee2e6;
  --border-strong: #ced4da;
  
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-tertiary: #adb5bd;
  
  /* Acento sutil - preto/cinza escuro */
  --accent-primary: #212529;
  --accent-secondary: #343a40;
  --accent-hover: #000000;
  
  --success: #198754;
  --success-bg: #d1e7dd;
  --error: #dc3545;
  --error-bg: #f8d7da;
  --warning: #ffc107;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* Scrollbar minimalista */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { 
  background: var(--border-medium); 
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

a { color: inherit; text-decoration: none; }

/* =========================================================
   HOME PAGE
   ========================================================= */
.home-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 60px 24px;
}

.home-layout {
  display: flex;
  align-items: center;
  gap: 120px;
  max-width: 1100px;
  width: 100%;
}

/* Brand - minimalista */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}
.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}
.brand-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.brand-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-left: 1px solid var(--border-medium);
  padding-left: 12px;
  margin-left: 4px;
  font-weight: 400;
}

/* Heading - clean e moderno */
.home-title {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.home-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 40px;
  font-weight: 400;
}

/* Feature list - minimalista */
.home-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.home-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 0;
}
.home-features li svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--accent-primary);
  opacity: 0.7;
}

/* Watermark removido - mais clean */

/* ── Entry card - minimalista ───────────────────────── */
.home-right { flex-shrink: 0; }

.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 380px;
  box-shadow: var(--shadow-lg);
}

.entry-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.entry-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

.field-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}
.nick-count { color: var(--text-tertiary); }

.nick-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 14px;
  margin-bottom: 20px;
  gap: 12px;
  transition: border-color 0.2s ease;
}
.nick-wrap:focus-within {
  border-color: var(--border-strong);
  background: var(--bg-tertiary);
}
.nick-avatar {
  font-size: 1.4rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  flex-shrink: 0;
  position: relative;
}
.nick-avatar::after {
  content: '↻';
  position: absolute;
  bottom: -1px; right: -1px;
  font-size: 0.5rem;
  background: var(--bg-card);
  border-radius: 50%;
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-medium);
  color: var(--text-tertiary);
}
.nick-avatar:hover { transform: scale(1.15); }
.input-nick {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  min-width: 0;
  padding: 10px 4px;
  font-weight: 400;
}
.input-nick::placeholder { color: var(--text-tertiary); }

/* Botão principal - clean */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary:hover { 
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Divider - minimalista */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 24px 0;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Join row - clean */
.join-row {
  display: flex;
  gap: 10px;
}
.input-code {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 0;
  font-weight: 500;
  text-transform: uppercase;
}
.input-code::placeholder { 
  color: var(--text-tertiary); 
  letter-spacing: 0.5px; 
  font-size: 0.85rem;
  text-transform: none;
}
.input-code:focus { 
  border-color: var(--border-strong);
  background: var(--bg-tertiary);
}

.btn-join {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.btn-join svg { width: 16px; height: 16px; }
.btn-join:hover { 
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
}

.error-msg {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.hidden { display: none !important; }

/* =========================================================
   ROOM PAGE
   ========================================================= */
.room-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Topbar - clean ─────────────────────────────────── */
.topbar {
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 50;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.room-code-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
}
.btn-lock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.btn-lock svg { width: 14px; height: 14px; }
.btn-lock:hover { 
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
}
.btn-lock.locked { 
  color: var(--error); 
  border-color: var(--error);
  background: var(--error-bg);
}

.peer-count {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.peer-count svg { width: 16px; height: 16px; opacity: 0.7; }

.conn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}
.conn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: background 0.3s ease;
}
.conn-dot.connected { background: var(--success); }
.conn-dot.connecting { background: var(--warning); animation: pulse 1.5s infinite; }
.conn-dot.error { background: var(--error); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Room layout ────────────────────────────────────── */
.room-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar - clean ────────────────────────────────── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-block {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.sb-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.sb-code {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.btn-copy-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.btn-copy-link svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7; }
.btn-copy-link:hover { 
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Peers list - clean */
.peers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.peer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}
.peer-item:hover {
  background: var(--bg-secondary);
}
.peer-avatar-sm {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  position: relative;
}
.peer-sharing-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}
.peer-info { flex: 1; min-width: 0; }
.peer-name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.peer-badges {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.badge-host { 
  background: var(--bg-tertiary); 
  color: var(--text-secondary);
}
.badge-you { 
  background: var(--success-bg); 
  color: var(--success);
}
.badge-live { 
  background: var(--error-bg); 
  color: var(--error);
}

/* Sidebar footer */
.sidebar-footer { margin-top: auto; padding: 16px; }
.btn-scan {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.btn-scan svg { width: 14px; height: 14px; opacity: 0.7; }
.btn-scan:hover { 
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Sidebar toast */
.sidebar-toast {
  padding: 0 16px 16px;
  font-size: 0.8rem;
  color: var(--success);
  min-height: 20px;
  transition: opacity 0.3s;
  font-weight: 500;
}

/* ── Stage (área de vídeo) - clean ─────────────────── */
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}

/* Empty state - clean */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 40px;
  max-width: 480px;
}
.empty-icon {
  width: 64px; height: 64px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  border: 1px solid var(--border-medium);
}
.empty-icon svg { width: 32px; height: 32px; color: var(--text-tertiary); }
.empty-title { 
  font-size: 1rem; 
  font-weight: 600; 
  color: var(--text-primary);
}
.empty-sub { 
  font-size: 0.9rem; 
  color: var(--text-secondary); 
  line-height: 1.6;
}
.empty-actions { 
  display: flex; 
  gap: 12px; 
  margin-top: 12px; 
  flex-wrap: wrap; 
  justify-content: center;
}

/* ── Streams grid - clean ───────────────────────────── */
.streams-grid {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 12px;
  padding: 12px;
  box-sizing: border-box;
}
.streams-grid.count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.streams-grid.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.streams-grid.count-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.streams-grid.count-3 .video-card:first-child { grid-column: 1 / -1; }
.streams-grid.count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

/* Video card - clean */
.video-card {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-md);
}
.video-card:hover { 
  border-color: var(--border-medium);
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Overlay info - clean */
.video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}
.video-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.video-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--error);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: white;
}
.video-live-dot {
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
  animation: liveblink 1.5s infinite;
}
@keyframes liveblink { 0%,100%{opacity:1} 50%{opacity:0.4} }

.video-mute-badge {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.75rem;
  color: white;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s ease;
  font-weight: 500;
}
.video-mute-badge:hover {
  background: rgba(0,0,0,0.85);
}
.video-bottom-bar {
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 10px 10px 6px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-user-av {
  font-size: 0.9rem;
  width: 26px; height: 26px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.video-user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
}
.video-controls-overlay {
  pointer-events: all;
  margin-left: auto;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.video-card:hover .video-controls-overlay { opacity: 1; }
.vctrl-btn {
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 0.8rem;
  transition: background 0.2s ease;
}
.vctrl-btn:hover { 
  background: rgba(255,255,255,0.2);
}
.vctrl-btn svg { width: 13px; height: 13px; }

/* ── Bottom bar - clean ─────────────────────────────── */
.bottom-bar {
  height: 60px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 50;
}

.btn-share-screen {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s ease;
}
.btn-share-screen svg { width: 16px; height: 16px; }
.btn-share-screen:hover { 
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-share-screen.sharing {
  background: var(--error);
}
.btn-share-screen:active { transform: translateY(0); }

.btn-icon {
  width: 40px; height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.btn-icon svg { width: 18px; height: 18px; opacity: 0.7; }
.btn-icon:hover { 
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-icon.btn-leave:hover { 
  background: var(--error-bg); 
  color: var(--error); 
  border-color: var(--error);
}

/* ── QR Modal - clean ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  width: 300px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: color 0.2s ease;
  border-radius: var(--radius-sm);
}
.modal-close:hover { 
  color: var(--text-primary);
  background: var(--bg-secondary);
}
.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
#qrCanvas {
  border-radius: var(--radius-md);
  background: white;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

/* ── Modal de Nickname ───────────────────────────────── */
.nick-modal {
  width: 380px;
}
.nick-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 8px;
}
.nick-wrap-modal {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 14px;
  gap: 12px;
  width: 100%;
  transition: border-color 0.2s ease;
}
.nick-wrap-modal:focus-within {
  border-color: var(--border-strong);
  background: var(--bg-tertiary);
}
.nick-wrap-modal .nick-avatar {
  font-size: 1.4rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  flex-shrink: 0;
  position: relative;
}
.nick-wrap-modal .nick-avatar::after {
  content: '↻';
  position: absolute;
  bottom: -1px; right: -1px;
  font-size: 0.5rem;
  background: var(--bg-card);
  border-radius: 50%;
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-medium);
  color: var(--text-tertiary);
}
.nick-wrap-modal .nick-avatar:hover { transform: scale(1.15); }
.input-nick-modal {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  min-width: 0;
  padding: 10px 4px;
  font-weight: 400;
}
.input-nick-modal::placeholder { color: var(--text-tertiary); }
.qr-url {
  font-size: 0.75rem;
  color: var(--text-secondary);
  word-break: break-all;
  text-align: center;
  line-height: 1.5;
}

/* ── Join log - clean ───────────────────────────────── */
.join-log {
  position: fixed;
  bottom: 72px;
  left: 230px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}
.join-log-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  animation: slideIn 0.3s ease;
  pointer-events: none;
  max-width: 280px;
  box-shadow: var(--shadow-md);
}
.join-log-entry .hi { color: var(--text-primary); font-weight: 500; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Help Banner - clean ─────────────────────────────── */
.help-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 24px 0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--warning);
  border: 1px solid var(--warning);
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
  position: relative;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.help-banner-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.help-banner-text {
  flex: 1;
}
.help-banner-dismiss {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: opacity 0.2s ease;
}
.help-banner-dismiss:hover {
  opacity: 0.7;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .home-layout { flex-direction: column; gap: 48px; }
  .entry-card { width: 100%; max-width: 380px; }
  .home-left { order: 2; text-align: center; }
  .home-right { order: 1; width: 100%; }
  .home-features { align-items: center; }
  
  .sidebar { width: 200px; }
  .join-log { left: 210px; }
}

@media (max-width: 600px) {
  .sidebar { display: none; }
  .join-log { left: 10px; right: 10px; }
  .join-log-entry { max-width: none; }
  
  .topbar { padding: 0 12px; }
  .room-code-pill { display: none; }
  
  .streams-grid { gap: 8px; padding: 8px; }
  
  .btn-share-screen { padding: 10px 16px; font-size: 0.85rem; }
  .btn-icon { width: 36px; height: 36px; }
}
