/*
  BijuLink CSS - Premium Dark Theme & Glassmorphism Design System
  Author: Antigravity AI
  Date: 24/05/2026
*/

:root {
  --bg-gradient: linear-gradient(135deg, #090b11 0%, #121520 50%, #1b1a2e 100%);
  --surface-glow: rgba(124, 58, 237, 0.05);
  --glass-bg: rgba(20, 24, 39, 0.65);
  --glass-bg-hover: rgba(28, 33, 53, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(124, 58, 237, 0.4);
  
  /* Cores Temáticas */
  --biju-purple: #7d52f4;
  --biju-pink: #ec4899;
  --biju-blue: #3b82f6;
  --biju-gradient: linear-gradient(102deg, #7d52f4 0%, #5b64e8 33%, #ec4899 100%);
  --biju-gradient-hover: linear-gradient(102deg, #916bf6 0%, #6d75eb 33%, #f064ab 100%);
  
  /* Feedback Semântico */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Tipografia */
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Plus Jakarta Sans', sans-serif;
}

/* ==================== GLOBAL & RESET ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-gradient);
  color: #f3f4f6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Ocultar elementos */
.hidden {
  display: none !important;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 82, 244, 0.4);
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(125, 82, 244, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(125, 82, 244, 0.5), 0 0 10px rgba(236, 72, 153, 0.3);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== COMPONENTES PREMIUM ==================== */

/* Botão Premium */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 28px;
  height: 52px;
  border-radius: 12px;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-premium.primary {
  background: var(--biju-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(125, 82, 244, 0.3);
}

.btn-premium.primary:hover:not(.disabled) {
  background: var(--biju-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(125, 82, 244, 0.45);
}

.btn-premium.primary:active:not(.disabled) {
  transform: translateY(0);
}

.btn-premium.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #f3f4f6;
  border: 1px solid var(--glass-border);
}

.btn-premium.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-premium.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #27273a;
  color: #6b7280;
  box-shadow: none;
}

/* Input com Glow */
.input-glow-wrapper {
  position: relative;
  width: 100%;
}

.input-glow-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 0px rgba(125, 82, 244, 0);
  transition: all 0.3s ease;
}

.input-glow-wrapper:focus-within::after {
  box-shadow: 0 0 15px rgba(125, 82, 244, 0.25);
}

input[type="text"] {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: rgba(15, 18, 30, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-family: var(--font-secondary);
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  border-color: var(--biju-purple);
}

/* Seletores Select Premium */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: var(--biju-purple);
}

.premium-select {
  background: rgba(15, 18, 30, 0.6);
  border: 1px solid var(--glass-border);
  color: #e5e7eb;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.premium-select:focus {
  border-color: var(--biju-purple);
  box-shadow: 0 0 10px rgba(125, 82, 244, 0.15);
}

.premium-select option {
  background: #111422;
  color: #e5e7eb;
}

/* ==================== NOTIFICAÇÕES (TOAST) ==================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(15, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 16px 24px;
  border-radius: 12px;
  min-width: 320px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slide-in 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transition: all 0.3s ease;
}

.toast.removing {
  opacity: 0;
  transform: translateX(50px) scale(0.9);
}

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

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--biju-purple); }

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: #e5e7eb;
  flex: 1;
}

/* ==================== LAUNCHER / LANDING SCREEN ==================== */
.launcher-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.launcher-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(125, 82, 244, 0.15) 0%, transparent 60%);
  z-index: -1;
}

.launcher-container {
  max-width: 640px;
  width: 100%;
  text-align: center;
  animation: slide-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.launcher-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  animation: float 4s ease-in-out infinite;
}

.launcher-logo span {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--biju-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.launcher-container h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.launcher-container p {
  font-size: 17px;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.launcher-actions {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  flex-direction: row;
  align-items: stretch;
}

.launcher-actions .input-glow-wrapper {
  flex: 1;
}

.launcher-actions .input-glow-wrapper input {
  height: 100%;
}

@media (max-width: 560px) {
  .launcher-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==================== TELA DE STATUS / ERRO ==================== */
.status-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(9, 11, 17, 0.95);
  backdrop-filter: blur(8px);
}

.status-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 48px;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: slide-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.status-glow {
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.status-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

.status-icon-wrapper.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-card h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}

.status-card p {
  color: #9ca3af;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 36px;
}

/* ==================== LOBBY / PREPARAÇÃO SCREEN ==================== */
.lobby-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  overflow-y: auto;
}

.lobby-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 10% 10%, rgba(125, 82, 244, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 90%, rgba(236, 72, 153, 0.08) 0%, transparent 40%);
  z-index: -1;
}

.lobby-container {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  width: 100%;
  max-width: 1000px;
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: slide-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lobby-left {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--glass-border);
}

@media (max-width: 880px) {
  .lobby-left {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 30px;
  }
}

.preview-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 16/9;
}

.preview-glow {
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--biju-purple), var(--biju-pink));
  opacity: 0.15;
  filter: blur(15px);
  z-index: 1;
}

.preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.preview-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Efeito espelho */
}

/* Avatar para câmera desligada no lobby */
.lobby-avatar {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0f17;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.lobby-avatar-initials {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--biju-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: white;
  box-shadow: 0 10px 25px rgba(125, 82, 244, 0.3);
}

/* Guia de Erros / Diagnóstico no Lobby */
.lobby-error-guide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 11, 20, 0.94);
  backdrop-filter: blur(8px);
  z-index: 20;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border-radius: 16px;
  animation: fade-in 0.3s ease;
}

.error-guide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 360px;
}

.error-guide-icon {
  font-size: 36px;
  color: var(--danger);
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.4));
  margin-bottom: 4px;
}

.error-guide-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: #f3f4f6;
  font-family: var(--font-secondary);
  margin: 0;
}

.error-guide-content p {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
  margin: 0;
}

.btn-small {
  height: 36px !important;
  padding: 0 16px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  margin-top: 8px;
}


.preview-indicators {
  position: absolute;
  top: 15px; left: 15px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.preview-indicator {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: rgba(15, 18, 30, 0.7);
  border: 1px solid var(--glass-border);
  color: white;
  transition: all 0.3s ease;
}

.preview-indicator.muted {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.preview-controls {
  position: absolute;
  bottom: -24px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 10;
}

.btn-lobby-control {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #181c2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-lobby-control:hover {
  transform: translateY(-3px) scale(1.05);
  background: var(--biju-purple);
  border-color: var(--biju-purple);
  box-shadow: 0 10px 20px rgba(125, 82, 244, 0.3);
}

.btn-lobby-control.off {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-lobby-control.off:hover {
  background: #f87171;
  border-color: #f87171;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* Direita do Lobby */
.lobby-right {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 880px) {
  .lobby-right {
    padding: 40px 30px;
  }
}

.lobby-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.lobby-logo span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: white;
}

.lobby-right h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.lobby-right p {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 30px;
}

.lobby-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.device-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .device-selects {
    grid-template-columns: 1fr;
  }
}

/* ==================== TELA DE CHAMADA ATIVA ==================== */
.call-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Topo da Chamada */
.call-header {
  height: 64px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 12, 22, 0.6);
  border-bottom: 1px solid var(--glass-border);
  z-index: 10;
}

.call-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-logo span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--biju-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.call-timer {
  font-family: var(--font-secondary);
  font-size: 15px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 20px;
  color: #FFA5F6;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.participant-count {
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 20px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 8px;
}

.participant-count span {
  color: white;
  font-weight: 600;
}

/* Botão Ícone Redondo Premium */
.btn-icon-premium {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-icon-premium:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
  transform: scale(1.05);
}

/* Conteúdo Principal */
.call-main {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  padding-bottom: 110px; /* Espaço para a barra de controle flutuante */
}

/* Sidebar de Participantes sem Vídeo */
.participants-sidebar {
  width: 260px;
  background: rgba(13, 16, 28, 0.7);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 15px;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.participants-sidebar h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 1px;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Grid de Vídeo */
.video-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

/* Grid com Destaque (Spotlight Mode) */
.video-grid.spotlight-active {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(auto-fit, minmax(140px, 1fr));
  align-content: stretch;
  height: 100%;
  position: relative;
  box-sizing: border-box;
  padding: 24px 24px 24px calc(100% - 280px - 24px);
  gap: 16px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .video-grid.spotlight-active {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* Video Tile (Card de Vídeo) */
.video-tile {
  position: relative;
  background: rgba(20, 24, 40, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  min-width: 280px;
  max-width: 640px;
  flex: 1 1 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

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

.video-tile.local:not(.screen) video {
  transform: scaleX(-1); /* Vídeo local espelhado apenas para câmera, não para tela compartilhada */
}

/* Avatar para câmera desligada */
.video-tile .avatar-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #0f121e;
  z-index: 2;
  transition: all 0.3s ease;
}

.video-tile .avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--biju-gradient);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
  box-shadow: 0 8px 25px rgba(125, 82, 244, 0.25);
  margin-bottom: 12px;
}

.video-tile .avatar-info {
  font-size: 14px;
  color: #e5e7eb;
  font-weight: 500;
}

/* Controlar a visibilidade de Câmera VS Avatar */
.video-tile.camera-off video {
  display: none;
}

.video-tile:not(.camera-off) .avatar-container {
  opacity: 0;
  pointer-events: none;
}

/* Nome do participante sobreposto */
.participant-name {
  position: absolute;
  bottom: 15px; left: 15px;
  background: rgba(10, 12, 22, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #f3f4f6;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ações de Hover no Vídeo */
.tile-actions {
  position: absolute;
  top: 15px; right: 15px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.video-tile:hover .tile-actions {
  opacity: 1;
  transform: translateY(0);
}

.tile-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(15, 18, 30, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: #d1d5db;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
}

.tile-action-btn:hover {
  background: var(--biju-purple);
  color: white;
  border-color: var(--biju-purple);
  transform: scale(1.05);
}

/* Comportamento de Destaque (Spotlight Active) */
.video-grid.spotlight-active .video-tile:not(.spotlight) {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  flex: none;
  aspect-ratio: 16/9;
  height: auto;
}

.video-grid.spotlight-active .video-tile.spotlight {
  position: absolute;
  top: 24px;
  left: 24px;
  bottom: 24px;
  width: calc(100% - 280px - 72px);
  height: calc(100% - 48px);
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .video-grid.spotlight-active .video-tile:not(.spotlight) {
    grid-column: 1;
    aspect-ratio: 16/9;
    width: 100%;
  }
  
  .video-grid.spotlight-active .video-tile.spotlight {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    margin-bottom: 16px;
  }
}

/* Tile Estilo Pílula na Sidebar */
.participants-sidebar .video-tile {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 52px;
  aspect-ratio: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: none;
  display: flex;
  justify-content: flex-start;
  padding: 0 12px;
  border-color: var(--glass-border);
}

.participants-sidebar .video-tile .avatar-container {
  position: static;
  background: transparent;
  flex-direction: row;
  justify-content: flex-start;
  width: auto;
}

.participants-sidebar .video-tile .avatar-circle {
  width: 32px;
  height: 32px;
  font-size: 12px;
  margin-bottom: 0;
  margin-right: 12px;
}

.participants-sidebar .video-tile .avatar-info {
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
}

.participants-sidebar .video-tile .participant-name,
.participants-sidebar .video-tile video {
  display: none;
}

.participants-sidebar .video-tile .tile-actions {
  opacity: 0.5;
  transform: none;
}

.participants-sidebar .video-tile:hover .tile-actions {
  opacity: 1;
}

/* Compartilhamento de Tela */
.video-tile.screen {
  background: rgba(20, 24, 40, 0.4);
  border: 1px solid var(--glass-border);
  aspect-ratio: 16/9;
}

.video-tile.screen video {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.video-tile.screen .participant-name {
  background: rgba(236, 72, 153, 0.85); /* Destaque rosa */
}

/* Destaque de Compartilhamento de Tela */
.video-grid.spotlight-active .video-tile.spotlight.screen {
  background: transparent;
  border: none;
  box-shadow: none;
}

.video-grid.spotlight-active .video-tile.spotlight.screen video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

/* ==================== CONTROLES FLUTUANTES (RODAPÉ) ==================== */
.call-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 100%;
  max-width: 680px;
  padding: 0 20px;
  pointer-events: none;
}

.controls-bar {
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 24px;
  background: rgba(13, 16, 28, 0.75);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  animation: pulse-glow 5s infinite;
}

.control-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: #e5e7eb;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.control-btn:hover {
  background: var(--biju-purple);
  border-color: var(--biju-purple);
  color: white;
  transform: translateY(-3px);
}

.control-btn:active {
  transform: translateY(0);
}

.control-btn.off {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.control-btn.off:hover {
  background: #f87171;
  border-color: #f87171;
}

.control-btn.share-btn {
  width: auto;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
}

.control-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
  width: 52px;
  border-radius: 16px;
}

.control-btn.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

/* ==================== OVERLAYS & MODAIS ==================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(8, 10, 18, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--biju-purple);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-close-modal:hover {
  color: white;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
}

/* Área do Link de Cópia */
.copy-link-wrapper {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.copy-link-wrapper input[type="text"] {
  background: rgba(0,0,0,0.3);
  font-family: var(--font-secondary);
  font-size: 13px;
  color: #9ca3af;
}

/* ==================== MÓVEL & RESPONSIVIDADE ==================== */
@media (max-width: 768px) {
  .call-header {
    padding: 0 16px;
  }
  
  .call-main {
    flex-direction: column;
  }
  
  .participants-sidebar {
    width: 100%;
    height: 90px;
    border-left: none;
    border-top: 1px solid var(--glass-border);
    flex-direction: row;
    align-items: center;
    padding: 10px 16px;
  }
  
  .participants-sidebar h3 {
    margin-right: 15px;
    white-space: nowrap;
  }
  
  .sidebar-list {
    flex-direction: row;
  }
  
  .call-footer {
    bottom: 16px;
  }
  
  .controls-bar {
    padding: 10px 16px;
    gap: 8px;
  }
  
  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .control-btn.share-btn span {
    display: none;
  }
  
  .control-btn.share-btn {
    width: 40px;
    padding: 0;
  }
}
