/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
  --bg-primary: #09090b;
  --bg-secondary: #121214;
  --primary: #7c3aed; /* Violet */
  --primary-glow: rgba(124, 58, 237, 0.4);
  --secondary: #2563eb; /* Blue */
  --accent: #10b981; /* Emerald Green */
  --danger: #ef4444; /* Red */
  --danger-glow: rgba(239, 68, 68, 0.4);
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --glass-bg: rgba(18, 18, 22, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  --font-family: 'Cairo', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- BACKGROUND GLOW ANIMATIONS --- */
.bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
  animation: float-glow 20s infinite alternate;
}

.bg-glow-1 {
  background: var(--primary);
  top: -10%;
  right: -10%;
}

.bg-glow-2 {
  background: var(--secondary);
  bottom: -10%;
  left: -10%;
  animation-delay: -10s;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.2); }
}

/* --- MAIN CONTAINER --- */
#app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

/* --- GLASS CONTAINER CARD (LOBBY) --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 550px;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  position: absolute;
}

.glass-card.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
  position: relative;
}

/* --- LOBBY HEADER --- */
.lobby-header {
  text-align: center;
}

.app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 5px;
}

.logo-icon {
  font-size: 2.3rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px var(--primary-glow));
  animation: logo-bounce 2s infinite alternate;
}

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

.app-logo h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(to left, var(--text-main), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

/* --- LOBBY PREVIEW & DEVICES SETTINGS --- */
.lobby-preview-container {
  width: 100%;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: #0c0c0e;
  border: 1px solid var(--glass-border);
  position: relative;
  margin-bottom: 5px;
}

.lobby-video-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
}

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

.lobby-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0c0c0e;
  gap: 10px;
  color: var(--text-muted);
  z-index: 5;
  transition: var(--transition-smooth);
}

.lobby-placeholder.hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
}

.lobby-placeholder i {
  font-size: 2.2rem;
}

.lobby-audio-bar-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.lobby-audio-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s ease;
  box-shadow: 0 0 10px var(--accent);
}

.devices-settings {
  display: flex;
  gap: 12px;
  margin-bottom: 5px;
}

.devices-settings .selector-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.devices-settings label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.device-select:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

/* --- LOBBY BODY & INPUTS --- */
.lobby-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 12px 18px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-group input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px var(--primary-glow);
}

.action-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 5px 0;
}

.action-divider::before, .action-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.action-divider:not(:empty)::before { margin-left: 1em; }
.action-divider:not(:empty)::after { margin-right: 1em; }

/* Room Input Wrapper */
.room-input-wrapper {
  display: flex;
  gap: 10px;
  position: relative;
}

.room-input-wrapper input {
  flex-grow: 1;
}

#btn-generate-id {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

#btn-generate-id:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* --- BUTTONS --- */
.btn {
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: white;
  box-shadow: 0 4px 20px var(--danger-glow);
}

.btn-danger:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px var(--danger-glow);
}

.lobby-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 5px;
}

.lobby-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* --- CALL SCREEN --- */
#call-screen {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* --- VIDEO GRID --- */
.video-grid {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #050507;
  overflow: hidden;
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}

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

/* Remote Video (Full Screen) */
.remote-video-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Local Video (Floating Card) */
.local-video-wrapper {
  position: absolute;
  bottom: 100px;
  left: 24px; /* Align to left because of RTL layout */
  width: 240px;
  height: 150px;
  z-index: 100;
  border: 2px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  cursor: grab;
  transition: width 0.3s ease, height 0.3s ease;
}

.local-video-wrapper:active {
  cursor: grabbing;
}

/* Label on Videos */
.user-label {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(18, 18, 22, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  padding: 6px 14px;
  border-radius: var(--border-radius-md);
  font-size: 0.8rem;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto; /* Allow clicks */
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}

.voice-name-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(8px);
  margin-top: 5px;
}

.label-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
}

.label-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.1);
}

.label-btn.muted {
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
}

/* Placeholders when Video is Off */
.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background-color: #0c0c0e;
  z-index: 5;
  transition: var(--transition-smooth);
}

.video-placeholder.hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
}

.placeholder-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--text-muted);
}

.local-video-wrapper .placeholder-avatar {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
}

.video-placeholder span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.animate-ring-icon {
  animation: float-avatar 3s infinite alternate;
}

@keyframes float-avatar {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* --- OVERLAYS & TOP INFO --- */
.room-info-overlay {
  position: absolute;
  top: 24px;
  right: 24px; /* Right for RTL */
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-tag {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Connection diagnostics quality style */
.connection-quality {
  cursor: help;
  transition: var(--transition-smooth);
}

.connection-quality.excellent i { color: var(--accent); }
.connection-quality.good i { color: #f59e0b; } /* Orange */
.connection-quality.poor i { color: var(--danger); }

.btn-icon-overlay {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-icon-overlay:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* --- BOTTOM CONTROLS BAR --- */
.controls-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 12px 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
  position: relative;
}

.btn-control:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1) translateY(-2px);
}

/* Recording call state button styles */
#btn-record-call i {
  color: #ef4444; /* Default red dot */
}

#btn-record-call.recording {
  background: var(--danger);
  border-color: var(--danger);
  animation: record-pulse 1.5s infinite alternate;
  box-shadow: 0 0 15px var(--danger-glow);
}

#btn-record-call.recording i {
  color: white;
}

@keyframes record-pulse {
  0% { box-shadow: 0 0 5px var(--danger-glow); }
  100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

/* Muted/Disabled Control state */
.btn-control.muted {
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 15px var(--danger-glow);
}

.btn-control.muted:hover {
  background: #dc2626;
}

/* Danger Button Control (Hangup) */
.btn-control.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  font-size: 1.4rem;
}

.btn-control.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 20px var(--danger-glow);
}

/* Badge on Chat button */
.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

.chat-badge.hidden {
  display: none !important;
}

/* --- CHAT & FILE SIDEBAR PANEL --- */
#chat-sidebar {
  position: absolute;
  top: 0;
  left: 0; /* Slide in from Left for RTL layout */
  width: 360px;
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  border-right: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  z-index: 120;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-100%); /* Start offscreen */
}

#chat-sidebar.active {
  transform: translateX(0); /* Slide in */
}

/* Chat Header */
.chat-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

#btn-close-chat {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

#btn-close-chat:hover {
  color: white;
  transform: scale(1.1);
}

/* Chat Messages */
.chat-messages {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom Scrollbar for Chat */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Message Styles */
.msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-incoming {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  align-self: flex-start;
  border-bottom-right-radius: 4px;
}

.msg-outgoing {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-left-radius: 4px;
}

.msg-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.msg-outgoing .msg-meta {
  color: rgba(255, 255, 255, 0.7);
}

.system-msg {
  align-self: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* File Message block */
.file-message-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 10px;
  margin-top: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
}

.file-message-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

.file-message-link i {
  font-size: 1.3rem;
  color: var(--accent);
}

/* --- TYPING INDICATOR STYLE --- */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: blink-dot 1.4s infinite both;
}

.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes blink-dot {
  0% { opacity: .2; }
  20% { opacity: 1; }
  100% { opacity: .2; }
}

/* --- FILE UPLOAD PROGRESS STYLE --- */
.file-progress-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 24px 10px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeInSlide 0.3s ease-out;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

#file-progress-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 3px;
  transition: width 0.1s ease;
}

/* --- EMOJI PANEL TRAY STYLE --- */
.emoji-panel {
  position: absolute;
  bottom: 80px;
  left: 20px;
  right: 20px;
  background: rgba(18, 18, 22, 0.95);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  padding: 10px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  z-index: 130;
  box-shadow: var(--glass-shadow);
  animation: fadeInSlide 0.2s ease-out;
}

.emoji-item {
  font-size: 1.4rem;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.emoji-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

/* Chat Input Form Controls */
.chat-input-area {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  display: block !important;
}

#btn-select-file, #btn-capture-photo, #btn-emoji {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  outline: none;
  padding: 0;
}

#btn-select-file:hover, #btn-capture-photo:hover, #btn-emoji:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.chat-input-area input[type="text"] {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.chat-input-area input[type="text"]:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

#btn-send-message {
  background: var(--primary);
  border: none;
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

#btn-send-message:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* --- INCOMING CALL MODAL POPUP --- */
.incoming-call-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in 0.3s ease-out;
}

.call-modal-card {
  width: 90%;
  max-width: 400px;
  text-align: center;
  padding: 40px 30px !important;
  transform: scale(0.9);
  opacity: 0;
  animation: modal-card-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
}

.call-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.caller-avatar-glow {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: white;
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
  animation: ring-pulse 1.5s infinite;
}

.phone-ringing-icon {
  animation: phone-shake 0.5s infinite alternate;
}

@keyframes ring-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 20px rgba(124, 58, 237, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
  }
}

@keyframes phone-shake {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(15deg); }
}

.call-status-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: -10px;
}

.call-modal-actions {
  display: flex;
  gap: 24px;
  margin-top: 10px;
}

.btn-call {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-call.accept {
  background: var(--accent);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-call.accept:hover {
  background: #059669;
  transform: scale(1.15) translateY(-3px);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
}

.btn-call.decline {
  background: var(--danger);
  box-shadow: 0 0 15px var(--danger-glow);
}

.btn-call.decline:hover {
  background: #dc2626;
  transform: scale(1.15) translateY(-3px);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

/* Animations for modal popup */
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-card-pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- TOAST NOTIFICATIONS --- */
#toast {
  position: absolute;
  bottom: 100px;
  right: 50%;
  transform: translateX(50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  z-index: 200;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#toast.active {
  opacity: 1;
  transform: translateX(50%) translateY(-10px);
}

/* --- UTILITY & ANIMATION CLASSES --- */
.hidden {
  display: none !important;
}

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

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .glass-card {
    padding: 20px 20px;
    gap: 15px;
  }
  
  .lobby-video-wrapper {
    height: 140px;
  }
  
  .local-video-wrapper {
    width: 140px;
    height: 90px;
    bottom: 120px;
    left: 16px;
  }
  
  .controls-bar {
    width: 95%;
    padding: 10px 14px;
    gap: 8px;
  }
  
  .btn-control {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  
  #chat-sidebar {
    width: 100%;
    border-right: none;
  }
  
  .room-info-overlay {
    top: 16px;
    right: 16px;
    flex-wrap: wrap;
    max-width: 80%;
  }
  
  .info-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Screen Share Active state */
.btn-control.active-share {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.btn-control.active-share:hover {
  background: #1d4ed8;
}

/* Light Mode Overrides */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(248, 250, 252, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
  }
}

/* --- CONNECTION STATUS BAR & DIAGNOSTICS PANEL --- */
.lobby-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.lobby-status-bar.online {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.lobby-status-bar.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.lobby-status-bar.connecting {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.lobby-status-bar i {
  font-size: 0.65rem;
  animation: pulse-glow 1.5s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.diagnostics-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 120;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  width: 280px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.diagnostics-header {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.diagnostics-header:hover {
  background: rgba(255, 255, 255, 0.07);
}

.diagnostics-header .toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.diagnostics-header.open .toggle-icon {
  transform: rotate(180deg);
}

.diagnostics-content {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diagnostics-content.hidden {
  display: none;
}

.diagnostics-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-badge.connecting {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.diagnostics-logs {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px;
  max-height: 120px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  color: #a3e635; /* Lime green for signaling/webrtc success */
  word-break: break-all;
  direction: rtl;
  text-align: right;
}

.log-entry.system {
  color: #94a3b8; /* Muted slate for status info */
}

.log-entry.error {
  color: #f87171; /* red-pink for failure/warning */
}

@media (max-width: 768px) {
  .diagnostics-panel {
    top: 75px;
    left: 16px;
    width: calc(100% - 32px);
  }
}

/* --- LOBBY DEVICE TOGGLES & PREMIUM SELECTS --- */
.lobby-device-toggles {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--glass-border);
}

.lobby-btn-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.lobby-btn-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.lobby-btn-toggle.muted {
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 12px var(--danger-glow);
}

.call-type-group {
  margin-top: 5px;
  margin-bottom: 5px;
}

.premium-select {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: white;
  font-weight: 600;
}

.premium-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* --- VOICE-ONLY CARD & ANIMATIONS --- */
.voice-only-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 450px;
  background: rgba(18, 18, 22, 0.65) !important;
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  display: none !important; /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 105;
}

/* When voice-only-mode class is active, display the voice card and hide video wrappers */
.voice-only-mode #voice-only-card {
  display: flex !important;
}

.voice-only-mode #remote-video-container,
.voice-only-mode #local-video-container {
  display: none !important;
}

.voice-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.avatar-wave-container {
  position: relative;
  width: 280px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

/* Pulsing/breathing ripples */
.wave-ripple {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary-glow);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.ripple-1 {
  animation: ripple-pulse 4s infinite linear;
}

.ripple-2 {
  animation: ripple-pulse 4s infinite linear;
  animation-delay: 1.3s;
}

.ripple-3 {
  animation: ripple-pulse 4s infinite linear;
  animation-delay: 2.6s;
}

@keyframes ripple-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(2.3);
    opacity: 0;
  }
}

/* Avatars styling */
.avatars-wrapper {
  display: flex;
  gap: 40px;
  z-index: 10;
  position: relative;
}

.avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: avatar-float 4s infinite ease-in-out alternate;
}

.local-avatar {
  animation-delay: -2s;
}

.avatar-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  color: white;
  transition: var(--transition-smooth);
}

.avatar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

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

/* Audio waves indicator */
.audio-waves-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  margin-bottom: 5px;
}

.audio-waves-indicator span {
  width: 4px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave-bar-anim 1.2s infinite ease-in-out alternate;
}

.audio-waves-indicator span:nth-child(1) { animation-delay: 0.1s; }
.audio-waves-indicator span:nth-child(2) { animation-delay: 0.3s; }
.audio-waves-indicator span:nth-child(3) { animation-delay: 0.5s; }
.audio-waves-indicator span:nth-child(4) { animation-delay: 0.2s; }
.audio-waves-indicator span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave-bar-anim {
  0% { height: 6px; transform: scaleY(1); }
  100% { height: 26px; transform: scaleY(1.2); }
}

.voice-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#voice-status-text {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
  letter-spacing: 0.5px;
}

/* --- MODAL OVERLAYS (GLASSMORPHIC) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.btn-close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
  z-index: 1010;
}

.btn-close-modal:hover {
  background: var(--danger);
  border-color: var(--danger);
  transform: scale(1.1);
}

/* Lightbox Modal Specific */
#lightbox-modal {
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: zoom-in-bounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

#lightbox-caption {
  margin-top: 15px;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes zoom-in-bounce {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* PDF Preview Modal Specific */
.pdf-modal-content {
  width: 90%;
  max-width: 900px;
  height: 85vh;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-lg);
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: zoom-in-bounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.pdf-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.pdf-modal-header .btn-close-modal {
  position: static;
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.pdf-modal-body {
  flex-grow: 1;
  width: 100%;
  height: calc(100% - 69px);
  background: rgba(0, 0, 0, 0.2);
}

#pdf-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive Modal Styling */
@media (max-width: 768px) {
  .pdf-modal-content {
    width: 95%;
    height: 90vh;
  }
  
  .btn-close-modal {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* Inline Chat Player Containers and elements */
.chat-inline-image {
  max-width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.chat-inline-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chat-inline-video {
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: black;
  display: block;
}

audio.chat-inline-audio {
  width: 100%;
  max-width: 250px;
  margin-top: 8px;
  display: block;
}

/* Custom styles for audio control inside bubbles */
.msg-bubble audio {
  outline: none;
}

/* PDF Preview Card */
.pdf-preview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.pdf-meta {
  flex-grow: 1;
  overflow: hidden;
}

.pdf-meta strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.pdf-meta small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.msg-outgoing .pdf-meta small {
  color: rgba(255, 255, 255, 0.7);
}

.btn-preview-pdf {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-preview-pdf:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* --- REMOTE MUTE & VIDEO BLOCK BANNERS --- */
#remote-mute-banners-container {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.remote-mute-banner {
  pointer-events: auto;
  background: rgba(239, 68, 68, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: var(--glass-shadow);
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: banner-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
}

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

.remote-mute-banner i {
  color: #ef4444;
  font-size: 1.15rem;
}

.remote-mute-banner span {
  flex-grow: 1;
  text-align: right;
}

.remote-mute-banner .btn-close-banner {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 4px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.remote-mute-banner .btn-close-banner:hover {
  color: white;
  transform: scale(1.1);
}

.remote-mute-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(239, 68, 68, 0.6);
  width: 100%;
  animation: banner-timeout 20s linear forwards;
  border-bottom-left-radius: var(--border-radius-md);
  border-bottom-right-radius: var(--border-radius-md);
}

@keyframes banner-timeout {
  from { width: 100%; }
  to { width: 0%; }
}

/* Recording Consent Pulse Animation */
.red-record-glow {
  animation: pulse-red-glow 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-red-glow {
  0% { transform: scale(0.9); opacity: 0.8; filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.4)); }
  100% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.9)); }
}



