/* ==========================================================================
   ClearFlow Meet — Stylesheet (Mobile-First & 2026 Ultra-Responsive)
   Dark Glassmorphism, Matching clearflowai.in branding
   ========================================================================== */

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-solid: #111827;
  --bg-input: #1a2234;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(59, 130, 246, 0.5);

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);

  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-gold: #fbbf24;
  --wa-green: #25d366;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --dock-bg: rgba(15, 23, 42, 0.94);
  --dock-border: rgba(255, 255, 255, 0.1);

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-main);
  color: var(--text-main);
  user-select: none;
}

.hidden { display: none !important; }
.flex-1 { flex: 1; }
.text-green { color: var(--accent-green) !important; }
.text-yellow { color: var(--accent-yellow) !important; }
.text-red { color: var(--accent-red) !important; }

/* SCREEN SWITCHER */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
}
.screen.active {
  display: flex;
}

/* ==========================================================================
   PWA SMART INSTALL BANNER
   ========================================================================== */
.pwa-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 520px;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slide-down 0.3s ease-out;
}
@keyframes slide-down {
  from { transform: translate(-50%, -100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.pwa-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pwa-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.pwa-text {
  display: flex;
  flex-direction: column;
}
.pwa-text strong {
  font-size: 0.88rem;
  color: #fff;
}
.pwa-text span {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.pwa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pwa-btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-btn-primary:hover {
  background: var(--primary-hover);
}
.pwa-btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
}

/* ==========================================================================
   WAITING ROOM & HOST ADMIT BANNER
   ========================================================================== */
.waiting-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #1e1b4b 0%, #07090e 70%);
  padding: 24px;
  z-index: 900;
}
.waiting-card {
  max-width: 440px;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.waiting-pulse {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulse-ring-expand 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
@keyframes pulse-ring-expand {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}
.waiting-icon {
  font-size: 2.2rem;
  z-index: 2;
}
.waiting-card h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.waiting-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.waiting-room-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #93c5fa;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
}

.host-admit-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 540px;
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.85);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 2500;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.35);
  animation: slide-down 0.25s ease-out;
}
.admit-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.admit-icon { font-size: 1.3rem; }
.admit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-admit-yes {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-admit-no {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   LOBBY SCREEN (Privacy-First)
   ========================================================================== */
.lobby-screen {
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 50% 15%, #172554 0%, #07090e 70%);
}

.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  z-index: 10;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
  flex-shrink: 0;
}
.brand-titles {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.brand-name span { color: var(--primary); }
.brand-sub {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-weight: 500;
}
.lobby-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.host-auth-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  padding: 4px 10px;
}
.host-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.host-email {
  font-size: 0.78rem;
  color: #93c5fa;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-auth-header {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fa;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-auth-header:hover {
  background: var(--primary);
  color: #fff;
}
.btn-subtle-sm {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  cursor: pointer;
}
.btn-subtle-sm:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}
.pulse-green {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lobby-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  z-index: 5;
  width: 100%;
}
/* ==========================================================================
   VIEW 1: GOOGLE MEET STYLE RESPONSIVE DESKTOP/MOBILE HERO LANDING
   ========================================================================== */
.view-hero-landing {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.hero-split-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding: 16px 20px;
}

.hero-left-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-main-title {
  font-size: 2.65rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8, #3b82f6, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-main-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 580px;
}

.hero-main-desc strong {
  color: var(--text-main);
}

.hero-actions-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

.btn-hero-cta {
  padding: 13px 22px;
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  cursor: pointer;
}

.hero-join-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 8px 4px 14px;
  backdrop-filter: blur(12px);
  transition: all 0.2s;
}

.hero-join-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.join-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-subtle);
}

.join-input-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.92rem;
  font-family: var(--font-main);
  width: 230px;
}

.join-input-box input::placeholder {
  color: var(--text-subtle);
}

.btn-hero-join {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hero-join:not(:disabled) {
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-hero-join:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hero-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trust-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Feature Showcase Card */
.hero-right-column {
  display: flex;
  justify-content: center;
}

.showcase-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(18, 24, 38, 0.92), rgba(11, 15, 26, 0.88));
  backdrop-filter: blur(24px);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.showcase-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.showcase-slides {
  position: relative;
  min-height: 200px;
}

.showcase-slide {
  display: none;
  flex-direction: column;
  animation: fadeIn 0.4s ease;
}

.showcase-slide.active {
  display: flex;
}

.slide-icon-halo {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.showcase-slide h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.showcase-slide p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.slide-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 0.74rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #cbd5e1;
}

.showcase-nav-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.showcase-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.showcase-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 5px;
}

/* ==========================================================================
   VIEW 2: GOOGLE MEET / ZOOM "GREEN ROOM" PRE-JOIN STAGE
   ========================================================================== */
.view-green-room {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.green-room-container {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 36px;
  align-items: center;
  padding: 16px 20px;
}

.green-room-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gr-video-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b0f19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.gr-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.gr-media-controls {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(7, 9, 14, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 6px 16px;
  z-index: 5;
}

.gr-ctrl-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.gr-ctrl-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.gr-ctrl-btn.off {
  background: var(--accent-red) !important;
  color: #fff;
}

.gr-ctrl-btn.off .icon-on {
  display: none !important;
}

.gr-ctrl-btn.off .icon-off {
  display: block !important;
}

.gr-mic-badge {
  font-size: 0.75rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.gr-stage-hint {
  font-size: 0.76rem;
  color: var(--text-subtle);
  text-align: center;
}

.green-room-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.green-room-panel h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.gr-room-identifier {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 8px;
}

.gr-room-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.gr-room-pill {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.5px;
}

.input-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.btn-gr-join {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  cursor: pointer;
}

.gr-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.btn-subtle-link {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-back-home {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.link-back-home:hover {
  color: #fff;
}

/* Responsive queries */
@media (max-width: 900px) {
  .hero-split-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 10px 12px;
  }
  .hero-main-title {
    font-size: 1.85rem;
  }
  .hero-actions-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-join-input-group {
    width: 100%;
    justify-content: space-between;
  }
  .join-input-box {
    flex: 1;
  }
  .join-input-box input {
    width: 100%;
  }
  .green-room-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 8px 12px;
  }
  .showcase-card {
    max-width: 100%;
  }
}

/* Form Container */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.input-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}
.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.input-row {
  display: flex;
  gap: 8px;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Quick Share Row (WhatsApp & Copy) */
.quick-share-row {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 8px;
}
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: all 0.2s;
}
.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

/* Pre-join Privacy Switches */
.prejoin-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
  cursor: pointer;
}
.checkbox-pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Device Preview Drawer */
.preview-collapse-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-subtle-link {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-subtle-link:hover { color: #93c5fd; }

.test-preview-box {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-mini-video {
  width: 100%;
  height: 180px;
  background: #000;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.preview-mini-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.preview-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.preview-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.preview-btn.disabled, .preview-btn:not(.active) {
  background: var(--accent-red);
  border-color: var(--accent-red);
}
.mic-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: #e2e8f0;
}
.audio-wave {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}

/* Network Mode */
.network-profile-select label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.preset-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preset-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}
.preset-btn .p-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}
.preset-btn .p-sub {
  font-size: 0.7rem;
  color: var(--text-subtle);
  margin-top: 2px;
}
.preset-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}
.preset-btn.active .p-title { color: #93c5fd; }

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: all 0.25s ease;
  margin-top: 6px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.5);
}

/* ==========================================================================
   IN-MEETING SCREEN (Mobile-First 100dvh Layout)
   ========================================================================== */
.meeting-screen {
  flex-direction: column;
  background: #090c15;
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

.meeting-header {
  height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  z-index: 20;
  flex-shrink: 0;
}
.meeting-header-left, .meeting-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary);
}
.room-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.room-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-icon-subtle {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 4px;
}
.btn-icon-subtle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.badge-role {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}
.host-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
}
.meeting-timer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.quality-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.quality-good {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.quality-medium {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.quality-poor {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}
.signal-bars i {
  width: 2.5px;
  background: currentColor;
  border-radius: 1px;
}
.signal-bars i:nth-child(1) { height: 25%; }
.signal-bars i:nth-child(2) { height: 50%; }
.signal-bars i:nth-child(3) { height: 75%; }
.signal-bars i:nth-child(4) { height: 100%; }

.header-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

/* Meeting Body */
.meeting-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  height: calc(100% - 52px - 68px);
}
.video-stage {
  flex: 1;
  position: relative;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

/* CINEMA STAGE */
.cinema-stage {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.spotlight-frame {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spotlight-frame video,
.spotlight-frame img {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 8px;
}
.wb-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}
.stage-overlay-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 10;
}

/* Whiteboard */
.whiteboard-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  overflow: hidden;
  box-sizing: border-box;
}
.whiteboard-toolbar {
  flex: 0 0 50px !important;
  min-height: 50px !important;
  height: 50px !important;
  width: 100% !important;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex !important;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  z-index: 25 !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-sizing: border-box !important;
}
.whiteboard-toolbar::-webkit-scrollbar {
  display: none;
}
.wb-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.wb-icon {
  font-size: 1.15rem;
}
.wb-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
}
.wb-tool-group, .wb-width-group, .wb-color-group, .wb-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wb-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.wb-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.wb-tool-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}
.wb-width-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.wb-width-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.wb-width-btn.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: var(--primary);
  color: #60a5fa;
}
.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.color-dot:hover {
  transform: scale(1.15);
}
.color-dot.active {
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.wb-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.wb-btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}
.wb-btn-subtle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.wb-btn-subtle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.wb-btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.wb-btn-close:hover {
  color: #f87171;
}
#whiteboard-canvas {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  cursor: crosshair;
  background: #0f172a;
  display: block;
  box-sizing: border-box !important;
}

/* VIDEO GRID & TILES */
.video-grid {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 12px;
  align-content: center;
  justify-content: center;
  position: relative;
}
.video-grid.filmstrip {
  height: 96px !important;
  max-height: 96px !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 4px 0 !important;
  align-items: center !important;
  justify-content: center !important;
}
.video-grid.filmstrip .video-tile {
  width: 150px !important;
  height: 85px !important;
  flex-shrink: 0 !important;
}

/* Desktop Grid Layouts */
/* Desktop Grid Layouts */
@media (min-width: 769px) {
  .video-grid[data-count="1"]:not(.filmstrip) {
    grid-template-columns: minmax(320px, 960px);
    grid-template-rows: minmax(260px, 600px);
  }
  .video-grid[data-count="2"]:not(.filmstrip) {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    grid-template-rows: minmax(260px, 580px);
  }
  .video-grid[data-count="3"]:not(.filmstrip),
  .video-grid[data-count="4"]:not(.filmstrip) {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    grid-template-rows: repeat(2, minmax(220px, 1fr));
  }
  .video-grid[data-count="5"]:not(.filmstrip),
  .video-grid[data-count="6"]:not(.filmstrip) {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    grid-template-rows: repeat(2, minmax(200px, 1fr));
  }
  .video-grid[data-count="7"]:not(.filmstrip),
  .video-grid[data-count="8"]:not(.filmstrip),
  .video-grid[data-count="9"]:not(.filmstrip) {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    grid-template-rows: repeat(3, minmax(180px, 1fr));
  }
  .video-grid[data-count="10"]:not(.filmstrip),
  .video-grid[data-count="11"]:not(.filmstrip),
  .video-grid[data-count="12"]:not(.filmstrip),
  .video-grid[data-count="13"]:not(.filmstrip),
  .video-grid[data-count="14"]:not(.filmstrip),
  .video-grid[data-count="15"]:not(.filmstrip),
  .video-grid[data-count="16"]:not(.filmstrip) {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    grid-template-rows: repeat(4, minmax(140px, 1fr));
  }
}

.video-tile {
  background: #080c14;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
  max-height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.video-tile.speaking {
  border-color: var(--accent-green);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.5);
}
.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #06090e;
  transition: object-fit 0.2s ease;
}
/* When user toggles full-frame zoom mode */
.video-tile.fill-frame video {
  object-fit: cover !important;
}
.local-tile video {
  transform: scaleX(-1);
}

/* 1-Click Tile Fit/Fill Toggle Button */
.btn-tile-fit {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 15;
  padding: 0;
}
.video-tile:hover .btn-tile-fit,
.video-tile:focus-within .btn-tile-fit,
.btn-tile-fit.visible {
  opacity: 1;
}
.btn-tile-fit:hover {
  background: rgba(37, 99, 235, 0.9);
  border-color: rgba(56, 189, 248, 0.6);
  transform: scale(1.08);
}

.avatar-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}
.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

.tile-hand-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(245, 158, 11, 0.95);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 5;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.tile-bar {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.tile-user {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #f1f5f9;
}
.tile-user .user-role {
  color: var(--primary);
  font-size: 0.7rem;
}
.tile-icons { display: flex; gap: 4px; }
.tile-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.tile-indicator.muted { background: var(--accent-red); }

/* ==========================================================================
   MOBILE VIDEO LAYOUTS (1, 2 with PiP Swap, 3, 4, 6+ Multi-User Grids)
   ========================================================================== */
@media (max-width: 768px) {
  /* ─── 1 PARTICIPANT (Alone) ─── */
  .video-grid[data-count="1"]:not(.filmstrip) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
  }
  .video-grid[data-count="1"]:not(.filmstrip) .local-tile {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
  }

  /* ─── 2 PARTICIPANTS (Speaker Full Stage + Floating PiP with 1-Tap Swap) ─── */
  .video-grid[data-count="2"]:not(.filmstrip) {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
  }
  /* Default: Remote is Full Stage */
  .video-grid[data-count="2"]:not(.filmstrip):not(.swapped) .video-tile:not(.local-tile) {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: var(--radius-md) !important;
    aspect-ratio: auto !important;
    z-index: 1 !important;
  }
  /* Default: Local is Floating PiP Window */
  .video-grid[data-count="2"]:not(.filmstrip):not(.swapped) .local-tile {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    width: 105px !important;
    height: 150px !important;
    z-index: 20 !important;
    border-radius: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  /* SWAPPED STATE (When Mobile User taps their small PiP to make it big) */
  .video-grid[data-count="2"]:not(.filmstrip).swapped .local-tile {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: var(--radius-md) !important;
    border: none !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
    z-index: 1 !important;
  }
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile) {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    width: 105px !important;
    height: 150px !important;
    z-index: 20 !important;
    border-radius: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  /* PiP Tile Badges & Avatar scaling */
  .video-grid[data-count="2"]:not(.filmstrip):not(.swapped) .local-tile .avatar-circle,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile) .avatar-circle {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2rem !important;
  }
  .video-grid[data-count="2"]:not(.filmstrip):not(.swapped) .local-tile .tile-bar,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile) .tile-bar {
    bottom: 4px !important;
    left: 4px !important;
    right: 4px !important;
  }
  .video-grid[data-count="2"]:not(.filmstrip):not(.swapped) .local-tile .tile-user,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile) .tile-user {
    padding: 2px 4px !important;
    font-size: 0.65rem !important;
  }

  /* ─── 3 PARTICIPANTS (1 Top Large, 2 Side-by-Side Bottom) ─── */
  .video-grid[data-count="3"]:not(.filmstrip) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1.25fr 1fr !important;
    gap: 8px !important;
    padding: 6px !important;
    width: 100% !important;
    height: 100% !important;
  }
  .video-grid[data-count="3"]:not(.filmstrip) .video-tile:first-child {
    grid-column: span 2 !important;
  }
  .video-grid[data-count="3"]:not(.filmstrip) .video-tile {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 10px !important;
  }

  /* ─── 4 PARTICIPANTS (2x2 Equal Grid) ─── */
  .video-grid[data-count="4"]:not(.filmstrip) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    gap: 8px !important;
    padding: 6px !important;
    width: 100% !important;
    height: 100% !important;
  }
  .video-grid[data-count="4"]:not(.filmstrip) .video-tile {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 10px !important;
  }

  /* ─── 5 PARTICIPANTS (2 Columns x 3 Rows with 5th tile beautifully centered) ─── */
  .video-grid[data-count="5"]:not(.filmstrip) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 6px !important;
    width: 100% !important;
    height: 100% !important;
  }
  .video-grid[data-count="5"]:not(.filmstrip) .video-tile {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 10px !important;
  }
  .video-grid[data-count="5"]:not(.filmstrip) .video-tile:nth-child(5) {
    grid-column: 1 / span 2 !important;
    width: 65% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    justify-self: center !important;
  }

  /* ─── 6 PARTICIPANTS (2 Columns x 3 Rows Grid) ─── */
  .video-grid[data-count="6"]:not(.filmstrip) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 4px !important;
    width: 100% !important;
    height: 100% !important;
  }
  .video-grid[data-count="6"]:not(.filmstrip) .video-tile {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 8px !important;
  }

  /* ─── 7+ PARTICIPANTS (Active Speaker Large + Bottom Carousel) ─── */
  .video-grid[data-count="7"]:not(.filmstrip),
  .video-grid[data-count="8"]:not(.filmstrip),
  .video-grid[data-count="9"]:not(.filmstrip),
  .video-grid[data-count="10"]:not(.filmstrip) {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* ==========================================================================
   SIDE DRAWERS (Chat & Participants)
   ========================================================================== */
.side-panel {
  width: 320px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 35;
}
@media (max-width: 768px) {
  .side-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 85;
  }
}
.panel-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.panel-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
}
.panel-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chat-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.74rem;
}
.chat-msg-author {
  font-weight: 700;
  color: #93c5fd;
}
.chat-msg-time {
  color: var(--text-subtle);
  font-size: 0.68rem;
}
.chat-msg-bubble {
  background: #1e293b;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  color: #f1f5f9;
}
.chat-msg.self .chat-msg-bubble {
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.chat-input-bar {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}
.chat-input-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}
.btn-send {
  background: var(--primary);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}
.participant-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.p-name {
  font-size: 0.82rem;
  font-weight: 600;
}
.btn-kick-peer {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

/* ==========================================================================
   MOBILE MORE TOOLS BOTTOM SHEET
   ========================================================================== */
.more-tools-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  animation: slide-up-sheet 0.25s ease-out;
}
@keyframes slide-up-sheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.sheet-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
}
.sheet-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.sheet-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.sheet-tool-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
}
.sheet-tool-item:hover, .sheet-tool-item:active {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.sheet-tool-item .tool-emoji {
  font-size: 1.5rem;
  line-height: 1;
}
.sheet-tool-item span:last-child {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* ==========================================================================
   BOTTOM CONTROLS DOCK (Compact 4-Key Bar + More)
   ========================================================================== */
.meeting-controls {
  height: 68px;
  background: var(--dock-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--dock-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 30;
  flex-shrink: 0;
}
/* Responsive visibility rules (Intelligent Adaptive UI) */
.desktop-only { display: flex !important; }
.mobile-only { display: none !important; }

@media (min-width: 769px) {
  .desktop-only { display: flex !important; }
  .mobile-only { display: none !important; }
  .dock-primary-row {
    max-width: 900px !important;
    gap: 10px !important;
  }
  .more-tools-sheet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Strict Mobile Visibility: Hide all desktop-only tools from dock */
  .desktop-only,
  .meeting-controls .desktop-only,
  .dock-primary-row .desktop-only,
  .dock-primary-row .control-btn.desktop-only,
  .dock-primary-row .dropdown-wrapper.desktop-only,
  #btn-flip-cam,
  #btn-share-screen,
  #btn-toggle-whiteboard,
  #btn-record-meeting,
  #btn-toggle-captions,
  #btn-reactions,
  #btn-toggle-pip,
  #btn-toggle-chat,
  #btn-toggle-participants,
  .dropdown-wrapper {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  /* World-Class 5-Key Mobile Dock (Google Meet / Zoom Parity) */
  .meeting-controls {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 62px !important;
    z-index: 95 !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) 8px !important;
    background: rgba(11, 15, 25, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6) !important;
    box-sizing: border-box !important;
  }

  .dock-primary-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-evenly !important;
    width: 100% !important;
    max-width: 380px !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  /* Exactly 5 Visible Keys: Mic, Camera, Hand, More (⋯), Leave */
  .dock-primary-row .control-btn:not(.desktop-only) {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .dock-primary-row .control-btn .btn-label {
    display: none !important;
  }

  #btn-open-more,
  .dock-primary-row .control-btn.mobile-only {
    display: flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  #btn-leave-meeting,
  .dock-primary-row .btn-leave,
  .dock-primary-row .btn-danger {
    flex: 0 0 58px !important;
    width: 58px !important;
    height: 44px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    border-radius: 22px !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45) !important;
    border: none !important;
  }
}

.btn-admit-all {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  white-space: nowrap;
}
.btn-admit-all:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.55);
}

.dock-primary-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 600px;
}
.control-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  min-width: 50px;
  height: 48px;
  flex: 1;
  max-width: 68px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  transition: all 0.2s;
}
.control-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.control-btn.disabled,
.control-btn.is-muted,
.control-btn:not(.active) {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.control-btn.hand-raised {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  color: #fbbf24 !important;
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border: none !important;
}
.btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.btn-label {
  font-size: 0.64rem;
  font-weight: 600;
}

/* Reactions Dropdown */
.dropdown-wrapper { position: relative; }
.reactions-menu {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 6px 10px;
  display: flex;
  gap: 6px;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.reaction-emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
}
.reaction-emoji-btn:hover { transform: scale(1.25); }

.reaction-container {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 100px;
  height: 320px;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}
.floating-reaction {
  position: absolute;
  bottom: 0;
  font-size: 2rem;
  animation: float-up 2.6s ease-out forwards;
}
@keyframes float-up {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  80% { opacity: 0.9; }
  100% { transform: translateY(-260px) scale(1.3); opacity: 0; }
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-box {
  width: 100%;
  max-width: 540px;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.modal-compact { max-width: 440px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.record-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: pulse-ring 1.5s infinite;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.recording-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.record-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  color: #e2e8f0;
}
.record-option-btn.primary-option {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
}
.opt-icon { font-size: 1.5rem; }
.opt-text strong { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.opt-text span { font-size: 0.75rem; color: var(--text-muted); }

.host-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.host-action-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.card-info strong { display: block; font-size: 0.88rem; margin-bottom: 2px; }
.card-info span { font-size: 0.75rem; color: var(--text-muted); }
.btn-danger-outline {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-weight: 600;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 4px 0 2px 0;
}
.stat-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.stress-test-box {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
}
.stress-test-box h3 { font-size: 0.85rem; margin-bottom: 10px; }
.throttle-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.sim-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.sim-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  color: #fff;
}
.simulation-status {
  font-size: 0.75rem;
  color: #34d399;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s;
}

/* ==========================================================================
   HOST AUTH MODAL (Google & Magic Link)
   ========================================================================== */
.auth-modal-box {
  max-width: 440px;
}
.auth-modal-content {
  display: flex;
  flex-direction: column;
}
.auth-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}
.btn-google-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}
.btn-google-login:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}
.auth-divider {
  position: relative;
  text-align: center;
  margin: 20px 0 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
  position: relative;
  top: 9px;
  background: var(--bg-card-solid);
  padding: 0 12px;
  font-size: 0.76rem;
  color: var(--text-subtle);
  font-weight: 600;
}
.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.auth-email-form input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.auth-email-form input:focus {
  border-color: var(--border-active);
}
.auth-status-msg {
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 4px;
  line-height: 1.4;
}
.auth-status-msg.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.auth-status-msg.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.auth-footer-bypass {
  text-align: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   LIVE AI SUBTITLES (Minimalist Floating Ribbon like Google Meet / YouTube)
   ========================================================================== */
.live-captions-overlay {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 90%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  transition: all 0.25s ease;
  animation: slide-up-captions 0.2s ease-out;
}
@keyframes slide-up-captions {
  from { transform: translate(-50%, 14px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.captions-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 6px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 680px;
}
.captions-text-display {
  font-size: 0.95rem;
  font-weight: 500;
  color: #f8fafc;
  line-height: 1.4;
  text-align: center;
  max-height: 52px;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.captions-placeholder {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.88rem;
}
.captions-ribbon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.captions-icon-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captions-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.captions-settings-drawer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.caption-lang-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.caption-lang-select option {
  background: #111827;
  color: #fff;
}
.captions-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.captions-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.caption-dual-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.caption-orig {
  color: #f8fafc;
  font-weight: 500;
}
.caption-trans {
  color: #38bdf8;
  font-size: 0.88rem;
  font-weight: 600;
}
.caption-speaker-name {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 6px;
}
.control-btn.active-cc {
  background: rgba(59, 130, 246, 0.25) !important;
  border-color: var(--primary) !important;
  color: #60a5fa !important;
}

/* ==========================================================================
   HEADER ADMIN BADGE & E2EE ENCRYPTION BADGE
   ========================================================================== */
.btn-admin-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(234, 88, 12, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-admin-header:hover {
  background: rgba(245, 158, 11, 0.35);
  color: #fff;
  transform: translateY(-1px);
}
.e2ee-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.btn-ai-sparkle {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(59, 130, 246, 0.25)) !important;
  border: 1px solid rgba(168, 85, 247, 0.5) !important;
  color: #d8b4fe !important;
  font-weight: 700 !important;
}
.btn-ai-sparkle:hover {
  background: rgba(168, 85, 247, 0.4) !important;
  color: #fff !important;
}

/* ==========================================================================
   LOBBY FOOTER & LEGAL LINKS
   ========================================================================== */
.lobby-footer {
  text-align: center;
  padding: 16px 20px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(7, 9, 14, 0.6);
  flex-shrink: 0;
  z-index: 10;
}
.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.legal-link {
  color: var(--text-subtle);
  font-size: 0.76rem;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}
.legal-link:hover {
  color: #93c5fa;
  text-decoration: underline;
}
.dot-sep {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.7rem;
}
.badge-dpdp {
  color: #34d399 !important;
  font-weight: 600;
}
.copyright-text {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   👑 ADMIN COCKPIT MODAL STYLES
   ========================================================================== */
.admin-modal-box {
  width: calc(100% - 32px);
  max-width: 860px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-cockpit-tabs {
  display: flex;
  gap: 6px;
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px;
  margin: 0 0 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tab-btn {
  flex: 1 0 auto;
  padding: 7px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.admin-tab-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--primary-glow);
}
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
}
.kpi-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.kpi-info {
  display: flex;
  flex-direction: column;
}
.kpi-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.kpi-val {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  margin: 2px 0;
}
.kpi-sub {
  font-size: 0.65rem;
  color: var(--text-subtle);
}
.admin-overview-card {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
}
.admin-overview-card h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #93c5fa;
}
.admin-overview-card p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.admin-tools-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-search-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.8rem;
  outline: none;
}
.admin-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  max-height: 320px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.admin-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 10px 12px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
}
.active-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.admin-room-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.room-card-info strong {
  font-size: 0.88rem;
  color: #fff;
  display: block;
}
.room-card-info span {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.btn-terminate-room {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-terminate-room:hover {
  background: var(--accent-red);
  color: #fff;
}
.admin-empty-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.admin-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.setting-item strong {
  font-size: 0.86rem;
  color: #fff;
  display: block;
}
.setting-item p {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   LEGAL MODAL & DPDP COMPLIANCE
   ========================================================================== */
.legal-modal-box {
  max-width: 720px;
  max-height: 85vh;
}
.legal-modal-content {
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 6px;
}
.legal-pane h3 {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 4px;
}
.legal-date {
  font-size: 0.74rem;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.legal-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.compliance-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.legal-pane h4 {
  font-size: 0.92rem;
  color: #93c5fa;
  margin: 16px 0 6px 0;
}
.legal-pane p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ==========================================================================
   AI SUMMARY MODAL
   ========================================================================== */
.ai-summary-modal-box {
  max-width: 650px;
}
.ai-summary-status {
  font-size: 0.8rem;
  color: #a78bfa;
  margin-bottom: 10px;
  font-weight: 600;
}
.ai-summary-output {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #f1f5f9;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.ai-summary-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ==========================================================================
   CALENDAR INVITE MODAL
   ========================================================================== */
.calendar-modal-box {
  max-width: 480px;
}
.calendar-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Small Screen Adjustments (<400px) */
@media (max-width: 400px) {
  .lobby-card { padding: 24px 16px; }
  .lobby-card h1 { font-size: 1.4rem; }
  .quick-share-row { grid-template-columns: 1fr; }
  .prejoin-options { grid-template-columns: 1fr; }
  .sheet-tools-grid { grid-template-columns: repeat(3, 1fr); }
  .control-btn { min-width: 44px; padding: 4px; }
  .live-captions-overlay {
    bottom: 74px;
    width: calc(100% - 16px);
    padding: 10px 12px;
  }
}

/* ==========================================================================
   RECORDING CONSENT & NOTICE BAR (Legal Compliance)
   ========================================================================== */
.recording-notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(220, 38, 38, 0.15);
  border-bottom: 1px solid rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(8px);
  color: #fecaca;
  font-size: 0.85rem;
  z-index: 45;
  animation: slideDown 0.3s ease;
}
.recording-notice-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rec-pulsing-dot {
  font-size: 0.9rem;
  animation: pulse-ring 1.5s infinite;
}
.recording-notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-xs-subtle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-xs-subtle:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   EMAIL INVITATION MODAL & UTILITIES
   ========================================================================== */
.email-invite-modal-box {
  max-width: 480px;
}
.input-field-styled {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #f8fafc;
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.input-field-styled:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.text-blue {
  color: #38bdf8 !important;
}

/* ==========================================================================
   RECORDING PERMISSION GATE (Guest Lock)
   ========================================================================== */
.recording-permission-gate {
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  animation: fadeIn 0.25s ease;
}
.gate-lock-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 8px;
}

/* ==========================================================================
   PERSONAL EMAIL & FAST INVITE STYLES (0 Quota, 100% Inbox)
   ========================================================================== */
.invite-fast-section {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.invite-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.invite-section-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f8fafc;
}

.badge-zero-quota {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.fast-invite-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-fast-invite.btn-gmail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.btn-fast-invite.btn-gmail:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.fast-invite-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-fast-subtle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fast-subtle:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

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

.modal-divider-text::before,
.modal-divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-divider-text span {
  padding: 0 12px;
}

/* Auth Modal Host Notice Banner */
.auth-host-banner {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: left;
}

.badge-host-req {
  display: inline-block;
  background: #eab308;
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.auth-host-banner p {
  font-size: 0.84rem;
  color: #fef08a;
  margin: 2px 0 0 0;
}

/* Green Room Quick Invite Pills */
.gr-invite-quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-gr-pill-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gr-pill-action:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

.text-red {
  color: #ef4444 !important;
}

/* ==========================================================================
   GOOGLE SUITE STYLE 9-DOTS APP SWITCHER
   ========================================================================== */
.app-switcher-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-app-switcher {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-app-switcher:hover,
.btn-app-switcher.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  transform: scale(1.05);
}

.app-switcher-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.15);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.app-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-switcher-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.app-switcher-close-btn:hover {
  color: #ffffff;
}

.app-switcher-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999990;
}

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

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 4px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}

.app-item:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.app-item.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
}

.app-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
}

.app-item:hover .app-icon-box {
  transform: scale(1.08);
}

.app-icon-box.ff-icon {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.app-icon-box.meet-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(37, 99, 235, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.app-icon-box.portal-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.3));
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.app-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}

.app-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.app-switcher-drag-handle {
  display: none;
}

/* Responsive Mobile 9-Dots Behavior (October 2026 World-Class Standard) */
@media (max-width: 768px) {
  /* In active meeting screen on mobile, hide the 9-dots button completely so video controls and tiles get 100% focus */
  #meeting-screen .btn-app-switcher,
  #meeting-screen .app-switcher-wrapper {
    display: none !important;
  }

  /* In lobby / landing on mobile, transform app switcher into an iOS/Material-style Bottom Sheet */
  .app-switcher-dropdown {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    border-left: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-right: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-top: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-bottom: none !important;
    padding: 12px 18px 30px !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.9) !important;
    z-index: 999999 !important;
    animation: appSwitcherSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* Grab handle indicator for touch gesture feel */
  .app-switcher-drag-handle {
    display: block !important;
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  .app-switcher-header {
    text-align: center;
    justify-content: center !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
  }

  .app-switcher-grid {
    gap: 10px !important;
  }

  .app-item {
    padding: 12px 6px !important;
    border-radius: 14px !important;
  }

  .app-icon-box {
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
  }

  .app-title {
    font-size: 0.82rem !important;
  }

  .app-desc {
    font-size: 0.68rem !important;
  }
}

@keyframes appSwitcherSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   AUTH MODAL TABS & FIELD STYLING
   ========================================================================== */
.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(30, 41, 59, 0.5);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  text-align: left;
}

.auth-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.auth-field input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.auth-mode-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   PROMINENT GREEN ROOM SHARE CARD & IN-CALL INVITATION CARD
   ══════════════════════════════════════════════════════════════════════════ */
.gr-panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -4px 0 14px 0;
}
.gr-invite-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.gr-invite-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.gr-invite-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}
.gr-room-code-tag {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: monospace;
  font-weight: 700;
  color: #f1f5f9;
}
.gr-link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.gr-share-url-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #e2e8f0;
  font-family: monospace;
  outline: none;
}
.btn-copy-cta {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-copy-cta:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}
.gr-quick-share-row {
  display: flex;
  gap: 8px;
}
.btn-share-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  color: #f1f5f9;
  transition: all 0.2s;
}
.btn-share-wa {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}
.btn-share-wa:hover {
  background: rgba(37, 211, 102, 0.15);
}
.btn-share-gmail {
  color: #ea4335;
  border-color: rgba(234, 67, 53, 0.3);
}
.btn-share-gmail:hover {
  background: rgba(234, 67, 53, 0.15);
}
.btn-share-cal {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.btn-share-cal:hover {
  background: rgba(56, 189, 248, 0.15);
}

/* ─── In-Call Floating Invitation Card (Google Meet Style) ─── */
.in-call-invite-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
  z-index: 45;
  animation: slideUpFade 0.35s ease;
}
.in-call-invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.in-call-invite-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  font-size: 0.92rem;
}
.btn-icon-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.btn-icon-close:hover {
  color: #fff;
}
.in-call-invite-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}
.in-call-link-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.in-call-url-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.76rem;
  color: #e2e8f0;
  font-family: monospace;
  outline: none;
}
.btn-in-call-copy {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.in-call-share-buttons {
  display: flex;
  gap: 6px;
}
.btn-incall-pill {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 41, 59, 0.6);
  text-align: center;
}

/* ─── Mic Indicator Fixes (Replacing "0" with Real SVG Mic) ─── */
.tile-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.tile-indicator svg {
  display: block;
}
.tile-indicator.muted {
  background: var(--accent-red) !important;
}
.tile-indicator.muted .mic-svg-on,
.tile-indicator.muted .mic-icon-unmuted {
  display: none !important;
}
.tile-indicator.muted .mic-svg-off,
.tile-indicator.muted .mic-icon-muted {
  display: block !important;
}
.tile-indicator:not(.muted) .mic-svg-off,
.tile-indicator:not(.muted) .mic-icon-muted {
  display: none !important;
}
.tile-indicator:not(.muted) .mic-svg-on,
.tile-indicator:not(.muted) .mic-icon-unmuted {
  display: block !important;
}

/* ─── Mobile Touch-Draggable PiP Corner Classes ─── */
@media (max-width: 768px) {
  .local-tile.pip-corner-tl,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile).pip-corner-tl {
    top: 55px !important;
    left: 10px !important;
    bottom: auto !important;
    right: auto !important;
  }
  .local-tile.pip-corner-tr,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile).pip-corner-tr {
    top: 55px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
  }
  .local-tile.pip-corner-bl,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile).pip-corner-bl {
    bottom: 75px !important;
    left: 10px !important;
    top: auto !important;
    right: auto !important;
  }
  .local-tile.pip-corner-br,
  .video-grid[data-count="2"]:not(.filmstrip).swapped .video-tile:not(.local-tile).pip-corner-br {
    bottom: 75px !important;
    right: 10px !important;
    top: auto !important;
    left: auto !important;
  }

  .in-call-invite-card {
    left: 12px !important;
    right: 12px !important;
    bottom: 80px !important;
    width: auto !important;
  }

  .status-label-desktop {
    display: none !important;
  }
}

/* ==========================================================================
   CAMERA FLIP & MIRROR PERSPECTIVES
   ========================================================================== */
video.front-cam {
  transform: scaleX(-1) !important;
}
video.rear-cam {
  transform: scaleX(1) !important;
}

/* ==========================================================================
   ACTIVE SPEAKER PULSE (High-Visibility Indicator)
   ========================================================================== */
.video-tile.speaking {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px #38bdf8, 0 0 20px rgba(56, 189, 248, 0.6) !important;
  animation: pulse-speaker 2s infinite ease-in-out;
}
@keyframes pulse-speaker {
  0% { box-shadow: 0 0 0 2px #38bdf8, 0 0 14px rgba(56, 189, 248, 0.5); }
  50% { box-shadow: 0 0 0 3.5px #60a5fa, 0 0 26px rgba(96, 165, 250, 0.85); }
  100% { box-shadow: 0 0 0 2px #38bdf8, 0 0 14px rgba(56, 189, 248, 0.5); }
}

/* ==========================================================================
   RECENT MEETINGS ON HERO LANDING
   ========================================================================== */
.hero-recent-meetings {
  margin-top: 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.recent-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.recent-meetings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.recent-meeting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.2s ease;
}
.recent-meeting-item:hover {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(56, 189, 248, 0.3);
}
.recent-item-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.9rem;
}
.recent-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.btn-recent-rejoin {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-recent-rejoin:hover {
  background: #38bdf8;
  color: #020617;
}

.recent-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-recent-copy,
.btn-recent-delete {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-recent-copy:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  transform: translateY(-1px);
}
.btn-recent-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: translateY(-1px);
}
.btn-clear-history-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 6px;
  transition: color 0.2s ease;
}
.btn-clear-history-link:hover {
  color: #f87171;
}

/* Validation Error Shake Animation */
@keyframes input-error-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.input-error-pulse {
  animation: input-error-shake 0.4s ease-in-out !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4) !important;
}

/* ==========================================================================
   STREAMLINED GREEN ROOM (Zero-Scroll for Invitees on Mobile)
   ========================================================================== */
.view-green-room.is-guest .gr-invite-card {
  display: none !important;
}
@media (max-width: 768px) {
  .green-room-container,
  .view-green-room.is-guest .green-room-container {
    gap: 10px !important;
    padding: 6px 10px !important;
  }
  .gr-video-box,
  .view-green-room.is-guest .gr-video-box {
    aspect-ratio: 4 / 3 !important;
    max-height: 40vh !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    border-radius: 18px !important;
  }
  .gr-video-box video {
    object-fit: cover !important;
    object-position: center center !important;
  }
  .view-green-room.is-guest .gr-stage-hint {
    display: none !important;
  }
  .view-green-room.is-guest .gr-panel-header {
    margin-bottom: 8px !important;
  }
  .view-green-room.is-guest .gr-panel-subtitle {
    display: none !important;
  }
  .view-green-room.is-guest .input-group {
    margin-bottom: 10px !important;
  }
  .view-green-room.is-guest .network-profile-select {
    display: none !important;
  }
}

/* ==========================================================================
   PHASE 2: WORLD-CLASS CONTROLS, MODALS & POST-MEETING EXPERIENCE
   ========================================================================== */

/* Header Minimalist Buttons */
.btn-audio-output,
.btn-room-info {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-audio-output:hover,
.btn-room-info:hover {
  background: rgba(37, 99, 235, 0.4);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}
.audio-out-icon,
.info-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}
.room-code-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-block;
}

@media (max-width: 768px) {
  .meeting-header {
    height: 48px !important;
    padding: 0 8px !important;
    gap: 6px !important;
  }
  .meeting-header-left, .meeting-header-right {
    gap: 5px !important;
    flex-shrink: 0 !important;
  }
  .brand-compact .brand-text {
    display: none !important;
  }
  .e2ee-badge .e2ee-text {
    display: none !important;
  }
  .e2ee-badge {
    padding: 3px 6px !important;
  }
  .btn-audio-output {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
  }
  .btn-room-info {
    padding: 4px 8px !important;
    max-width: 105px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .room-code-tag {
    max-width: 68px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .header-btn.host-btn {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }
  .status-label-desktop {
    display: none !important;
  }
}

/* Room Info Modal Card */
.info-room-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  margin-bottom: 12px;
}
.info-code-label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-code-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

/* Audio Output Routing Modal */
.audio-output-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.audio-output-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f1f5f9;
}
.audio-output-item:hover {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(56, 189, 248, 0.4);
}
.audio-output-item.selected {
  background: rgba(37, 99, 235, 0.22);
  border-color: #3b82f6;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.3);
}
.audio-output-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.audio-output-check {
  color: #38bdf8;
  font-weight: 800;
  font-size: 1rem;
}

/* Dual Subtitles & Real-Time Translated Captions Display */
.caption-sub-select {
  border-color: rgba(56, 189, 248, 0.4) !important;
  background-color: rgba(15, 23, 42, 0.85) !important;
}
.caption-dual-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.caption-orig {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.caption-trans {
  color: #38bdf8;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  padding-top: 3px;
  border-top: 1px dashed rgba(56, 189, 248, 0.3);
}
.caption-speaker-name {
  font-weight: 700;
  color: #f59e0b;
  margin-right: 6px;
}

/* Post-Meeting Screen ("You Left the Meeting") */
.meeting-ended-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(circle at 50% 20%, #0f172a 0%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.meeting-ended-screen:not(.active) {
  display: none !important;
}
.ended-card {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: endedFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes endedFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.ended-icon-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ended-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.4);
  animation: endedPulseGlow 2.5s infinite;
}
@keyframes endedPulseGlow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.12); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.ended-emoji {
  font-size: 2.4rem;
}
.ended-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.ended-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 20px;
}
.ended-stats-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 22px;
}
.ended-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ended-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(148, 163, 184, 0.2);
}
.ended-actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.ended-btn-cta {
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.94rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}
.ended-btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.btn-subtle-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s ease;
}
.btn-subtle-link:hover {
  color: #f1f5f9;
  text-decoration: underline;
}
.ended-rating-box {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
}
.rating-prompt {
  font-size: 0.82rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.ended-stars-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.star-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease, opacity 0.2s ease;
  padding: 2px 4px;
  opacity: 0.5;
  filter: grayscale(1);
}
.star-btn:hover,
.star-btn.active {
  transform: scale(1.28);
  opacity: 1;
  filter: grayscale(0);
}
.rating-feedback-msg {
  font-size: 0.82rem;
  color: #10b981;
  font-weight: 700;
  display: block;
  margin-top: 8px;
}
.ended-host-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
}
.promo-text strong {
  font-size: 0.85rem;
  color: #f8fafc;
  display: block;
  margin-bottom: 2px;
}
.promo-text p {
  font-size: 0.74rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.3;
}

/* Immersive Cinema Mode (Auto-Hide Controls during Inactivity) */
.meeting-screen .meeting-header,
.meeting-screen .meeting-controls,
.meeting-screen .meeting-dock {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.meeting-screen.controls-idle .meeting-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}
.meeting-screen.controls-idle .meeting-controls,
.meeting-screen.controls-idle .meeting-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

/* ==========================================================================
   PROMINENT ROOM CODE HIGHLIGHT CARD (Create for Later Modal)
   ========================================================================== */
.created-room-code-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.code-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.created-room-code-badge .code-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.created-room-code-badge .code-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}
.btn-copy-code-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-copy-code-pill:hover {
  background: #38bdf8;
  color: #020617;
  transform: translateY(-1px);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & STRICT ZERO-OVERFLOW (Prevent Screen Shift)
   ========================================================================== */
html, body, #app, .app-container, .screen, .lobby-screen, 
.meeting-screen, .meeting-header, .meeting-body, .video-stage, 
.video-grid, .waiting-room-screen, .meeting-ended-screen {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100%;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  /* Prevent horizontal header overflow in active meeting */
  .meeting-header {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
  }
  .meeting-header-right {
    gap: 4px !important;
    max-width: 65% !important;
    overflow: hidden !important;
  }
  .meeting-header-right #network-status-badge {
    display: none !important;
  }
  .meeting-header-right .btn-audio-output {
    padding: 4px 6px !important;
  }
  .meeting-header-right .btn-room-info {
    padding: 4px 6px !important;
    max-width: 88px !important;
  }
  .meeting-header-right .header-btn.host-btn {
    padding: 4px 7px !important;
    font-size: 0.72rem !important;
  }
  .meeting-body {
    padding-bottom: 64px !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .lobby-header {
    padding: 10px 14px !important;
    gap: 8px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .brand {
    gap: 8px !important;
    flex-shrink: 0;
  }
  .brand-logo {
    width: 32px !important;
    height: 32px !important;
  }
  .brand-name {
    font-size: 1.05rem !important;
  }
  .brand-sub {
    display: none !important;
  }
  .lobby-header-right {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .app-switcher-wrapper {
    flex-shrink: 0 !important;
  }
  .status-indicator {
    display: none !important;
  }
  .host-auth-badge {
    padding: 2px 5px !important;
    gap: 4px !important;
  }
  .host-email {
    display: none !important;
  }
  .btn-subtle-sm {
    padding: 2px 5px !important;
    font-size: 0.72rem !important;
  }
  .btn-admin-header {
    padding: 3px 6px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    max-width: 88px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
  }
  .btn-auth-header {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
  }

  /* Mobile Sticky Floating Join CTA in Green Room */
  .btn-gr-join {
    position: sticky !important;
    bottom: 12px !important;
    z-index: 50 !important;
    width: 100% !important;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    margin-top: 14px !important;
    margin-bottom: 8px !important;
  }
  .hero-split-container {
    padding: 12px 14px !important;
  }
  .hero-main-title {
    font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important;
    word-break: break-word;
    letter-spacing: -0.02em;
  }
  .hero-main-desc {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
  }
  .hero-badge {
    font-size: 0.74rem !important;
    padding: 4px 10px !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
  .hero-trust-badges {
    justify-content: center !important;
    gap: 6px !important;
  }
  .trust-badge {
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
  }
}

@media (max-width: 420px) {
  .btn-admin-header {
    max-width: 76px !important;
    font-size: 0.68rem !important;
    padding: 2px 4px !important;
  }
  .brand-name {
    font-size: 0.95rem !important;
  }
}

/* ═════════════════════════════════════════════════════════════════ */
/* 🎙️ CLEARFLOW MEET: 1-ON-1 ENGLISH PRACTICE MODE HUD STYLES      */
/* ═════════════════════════════════════════════════════════════════ */

.practice-hud {
  position: relative;
  z-index: 40;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 10px auto;
  padding: 0 12px;
  animation: fadeInDown 0.3s ease;
}

.practice-hud-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 27, 75, 0.95));
  border: 1.5px solid rgba(124, 92, 252, 0.55);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 92, 252, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
}

.practice-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.practice-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.practice-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-ring 1.5s infinite;
}

.practice-turn-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 92, 252, 0.22);
  border: 1px solid rgba(124, 92, 252, 0.45);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

.practice-turn-box.partner-turn {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
}

.practice-timer-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: #fbbf24;
  font-size: 0.95rem;
  min-width: 44px;
}

.btn-practice-switch {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-practice-switch:hover {
  background: rgba(124, 92, 252, 0.35);
  border-color: #7c5cfc;
}

.btn-practice-end {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-practice-end:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #fff;
}

.practice-partner-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.practice-partner-status.waiting {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.practice-partner-status.connected {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.pulsing {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulse 1.5s infinite;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.btn-practice-wa-mini {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
  white-space: nowrap;
}

.btn-practice-wa-mini:hover {
  transform: translateY(-1px);
}

.practice-topic-content {
  margin-bottom: 8px;
}

.practice-topic-en {
  font-size: 0.98rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
  margin-bottom: 2px;
}

.practice-topic-hi {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.3;
}

.practice-hints-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.hints-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fbbf24;
}

.hint-pill {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hint-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.btn-back-learning {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.25), rgba(6, 182, 212, 0.25)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* ══════════════════════════════════════════════════════════════
   PRACTICE OVERFLOW & WORKOUT SUMMARY STYLES
   ══════════════════════════════════════════════════════════════ */
.practice-overflow-screen {
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.practice-overflow-screen.active {
  display: flex !important;
}

.ended-card.hidden {
  display: none !important;
}



