/* ========================================================================
   RESET & BASE
   ======================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f0f0f;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

.screen {
  height: 100vh;
  width: 100vw;
}

.hidden {
  display: none !important;
}

/* ========================================================================
   LANDING SCREEN — Premium SaaS Hero
   ======================================================================== */
#landing {
  display: flex;
  flex-direction: column;
  background: #fafafa;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  color: #111827;
}

/* ---------- Background layers ---------- */
.landing-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Fine dot-grid */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Gradient orbs */
.bg-gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}

.bg-gradient-1 {
  width: 700px;
  height: 700px;
  background: rgba(99, 102, 241, 0.15);
  top: -200px;
  right: -100px;
  animation: orb-float 28s ease-in-out infinite;
}

.bg-gradient-2 {
  width: 600px;
  height: 600px;
  background: rgba(139, 92, 246, 0.10);
  bottom: -180px;
  left: -120px;
  animation: orb-float 32s ease-in-out infinite reverse;
}

.bg-gradient-3 {
  width: 500px;
  height: 500px;
  background: rgba(168, 85, 247, 0.08);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation: orb-float 24s ease-in-out infinite 4s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(40px, -30px) scale(1.05); }
  50%      { transform: translate(-20px, 40px) scale(0.95); }
  75%      { transform: translate(30px, 20px) scale(1.03); }
}

/* Subtle film-grain noise overlay */
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Radial vignette */
.bg-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 50%, rgba(250, 250, 250, 0.7) 100%);
}

/* ---------- Navigation ---------- */
.landing-nav {
  position: relative;
  z-index: 10;
  padding: 0 clamp(20px, 5vw, 64px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111827;
}

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

.nav-brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

.nav-pill {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: -0.1px;
}

/* ---------- Hero main area ---------- */
.landing-main {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 64px);
}

.hero-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding: clamp(32px, 4vh, 60px) 0;
}

/* ---------- Hero content (left) ---------- */
.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 8px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  font-size: 13px;
  font-weight: 500;
  color: #6366f1;
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  color: #0f172a;
  margin-bottom: 20px;
}

.hero-title-accent {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
  line-height: 1.7;
  color: #64748b;
  margin-bottom: 36px;
  max-width: 480px;
}

/* ---------- Hero form ---------- */
.hero-form {
  margin-bottom: 32px;
}

.hero-input-row {
  display: flex;
  gap: 10px;
}

.input-group {
  position: relative;
  flex: 1;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

#room-input {
  width: 100%;
  padding: 16px 16px 16px 46px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  letter-spacing: 1.2px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#room-input::placeholder {
  color: #94a3b8;
  letter-spacing: normal;
  font-weight: 400;
}

#room-input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.10),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---------- Join button ---------- */
#join-btn {
  padding: 16px 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(99, 102, 241, 0.3),
    0 4px 16px rgba(99, 102, 241, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

#join-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

#join-btn:hover:not(:disabled)::before {
  opacity: 1;
}

#join-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(99, 102, 241, 0.35),
    0 10px 32px rgba(99, 102, 241, 0.25);
}

#join-btn:active:not(:disabled) {
  transform: translateY(0);
}

#join-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#join-btn:disabled .btn-icon {
  display: none;
}

/* Error */
.error {
  color: #ef4444;
  margin-top: 10px;
  font-size: 13px;
  min-height: 20px;
  font-weight: 500;
}

/* ---------- Social proof ---------- */
.hero-proof {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-avatars {
  display: flex;
}

.hero-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border: 2px solid #fafafa;
  margin-right: -8px;
}

.hero-avatar:last-child {
  margin-right: 0;
}

.hero-proof-text {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

/* ---------- Hero visual (right side) ---------- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

/* Mock video call window */
.visual-window {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
  z-index: 2;
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.4s ease;
}

.visual-window:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.visual-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot-red    { background: #ff5f57; }
.window-dot-yellow { background: #ffbd2e; }
.window-dot-green  { background: #28c840; }

.window-title {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

.visual-window-body {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #1e1b4b, #312e81, #1e1b4b);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mock main video */
.mock-video-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mock-video-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.3);
  border: 2px solid rgba(99, 102, 241, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.mock-video-avatar.small {
  width: 32px;
  height: 32px;
  border-width: 1.5px;
}

.mock-video-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: -0.2px;
}

.mock-video-name.small {
  font-size: 9px;
}

/* Animated waveform bars */
.mock-waveform {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 16px;
  margin-top: 2px;
}

.mock-waveform span {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: #6366f1;
  animation: wave 1.2s ease-in-out infinite;
}

.mock-waveform span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.mock-waveform span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.mock-waveform span:nth-child(3) { height: 16px; animation-delay: 0.3s; }
.mock-waveform span:nth-child(4) { height: 10px; animation-delay: 0.45s; }
.mock-waveform span:nth-child(5) { height: 7px;  animation-delay: 0.6s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%      { transform: scaleY(1); opacity: 1; }
}

/* PiP overlay */
.mock-video-pip {
  position: absolute;
  bottom: 50px;
  right: 14px;
  width: 80px;
  height: 60px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

/* Mock controls */
.mock-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.mock-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
}

.mock-ctrl-hangup {
  background: rgba(239, 68, 68, 0.8);
}

/* Connection dots animation */
.visual-connection-dots {
  position: absolute;
  top: -14px;
  right: 40px;
  display: flex;
  gap: 6px;
}

.conn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  animation: conn-pulse 1.8s ease-in-out infinite;
}

.cd-1 { animation-delay: 0s; }
.cd-2 { animation-delay: 0.3s; }
.cd-3 { animation-delay: 0.6s; }

@keyframes conn-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.3); }
}

/* Floating decorative shapes around the visual */
.float-shape {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.float-shape-1 {
  width: 120px;
  height: 120px;
  border: 1.5px solid rgba(99, 102, 241, 0.15);
  top: -20px;
  left: -30px;
  animation: float-slow 14s ease-in-out infinite;
}

.float-shape-2 {
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, 0.08);
  bottom: 20px;
  left: -10px;
  border-radius: 16px;
  transform: rotate(15deg);
  animation: float-slow 18s ease-in-out infinite reverse;
}

.float-shape-3 {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.06);
  top: 30px;
  right: -16px;
  border-radius: 10px;
  transform: rotate(-10deg);
  animation: float-slow 12s ease-in-out infinite 2s;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-12px) rotate(3deg); }
  50%      { transform: translateY(6px) rotate(-2deg); }
  75%      { transform: translateY(-8px) rotate(1deg); }
}

/* ---------- Features section ---------- */
.landing-features-section {
  position: relative;
  z-index: 5;
  padding: 0 clamp(20px, 5vw, 64px) clamp(40px, 6vh, 80px);
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 16px 40px rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.12);
}

.feature-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(139, 92, 246, 0.10));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  margin-bottom: 18px;
}

.feature-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.feature-card-desc {
  font-size: 14px;
  line-height: 1.65;
  color: #64748b;
  font-weight: 400;
}

/* ---------- Footer ---------- */
.landing-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 24px 20px 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.landing-footer p {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 400;
}

/* ---------- Responsive: tablet ---------- */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-input-row {
    max-width: 440px;
    margin: 0 auto;
  }

  .hero-proof {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    min-height: 300px;
  }

  .visual-window {
    max-width: 380px;
    margin: 0 auto;
    transform: none;
  }

  .visual-window:hover {
    transform: none;
  }

  .float-shape {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 600px) {
  .nav-inner {
    height: 60px;
  }

  .nav-brand-text {
    font-size: 16px;
  }

  .nav-pill {
    font-size: 11px;
    padding: 5px 10px;
  }

  .hero-title {
    font-size: 34px;
    letter-spacing: -1.2px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .hero-badge {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .hero-input-row {
    flex-direction: column;
  }

  #join-btn {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
  }

  #room-input {
    padding: 14px 16px 14px 44px;
  }

  .hero-proof {
    flex-direction: column;
    gap: 8px;
  }

  .hero-visual {
    min-height: 240px;
  }

  .visual-window {
    max-width: 300px;
  }

  .visual-window-body {
    aspect-ratio: 16 / 11;
  }

  .mock-video-avatar {
    width: 52px;
    height: 52px;
  }

  .mock-video-avatar svg {
    width: 28px;
    height: 28px;
  }

  .mock-video-pip {
    width: 60px;
    height: 44px;
    bottom: 40px;
    right: 8px;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .feature-card-title {
    font-size: 15px;
  }

  .feature-card-desc {
    font-size: 13px;
  }

  /* Call screen mobile */
  #local-video {
    width: 120px;
    height: 90px;
    bottom: 88px;
    right: 12px;
    border-radius: 12px;
  }

  .control-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .control-btn svg {
    width: 20px;
    height: 20px;
  }

  #controls {
    padding: 16px;
    gap: 12px;
  }

  #filter-bar {
    bottom: 78px;
    gap: 6px;
    padding: 10px 12px;
    justify-content: flex-start;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
}


/* ========================================================================
   CALL SCREEN — Dark immersive (PRESERVED EXACTLY)
   ======================================================================== */
#call {
  display: flex;
  flex-direction: column;
  background: #000;
}

#videos {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

#local-video {
  position: absolute;
  bottom: 100px;
  right: 20px;
  width: 160px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #222;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* ========== Status Overlay ========== */
#status-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 15;
}

.status-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.status-spinner.active {
  display: block;
}

#status-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: -0.2px;
}

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

/* ========== Reconnecting Indicator ========== */
#reconnecting-indicator {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(230, 126, 34, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(230, 126, 34, 0.3);
}

.reconnect-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== Quality Indicator — Signal Bars ========== */
#quality-indicator {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  z-index: 30;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.signal-bar {
  width: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.signal-bar:nth-child(1) { height: 8px; }
.signal-bar:nth-child(2) { height: 13px; }
.signal-bar:nth-child(3) { height: 18px; }

#quality-indicator.quality-good .signal-bar {
  background: #2ecc71;
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.4);
}

#quality-indicator.quality-fair .signal-bar:nth-child(1),
#quality-indicator.quality-fair .signal-bar:nth-child(2) {
  background: #f1c40f;
  box-shadow: 0 0 6px rgba(241, 196, 15, 0.4);
}

#quality-indicator.quality-poor .signal-bar:nth-child(1) {
  background: #e74c3c;
  box-shadow: 0 0 6px rgba(231, 76, 60, 0.4);
}

/* ========== Reconnect Button ========== */
#reconnect-btn {
  position: absolute;
  top: calc(50% + 50px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

#reconnect-btn:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

/* ========== Controls ========== */
#controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.control-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.control-btn svg {
  transition: opacity 0.2s;
}

/* Mute & Camera active (off) state — red with slash */
#mute-btn.active,
#camera-btn.active {
  background: rgba(239, 68, 68, 0.9);
  border-color: transparent;
}

#mute-btn.active::after,
#camera-btn.active::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  transform: rotate(-45deg);
}

#mute-btn.active:hover,
#camera-btn.active:hover {
  background: rgba(239, 68, 68, 1);
}

/* Filter toggle active state — blue accent */
#filter-toggle-btn.active {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Hangup button */
.control-btn.hangup {
  background: rgba(239, 68, 68, 0.9);
  border-color: transparent;
}

.control-btn.hangup:hover {
  background: #dc2626;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* ========== Filter Bar ========== */
#filter-bar {
  position: absolute;
  bottom: 92px;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#filter-bar.hidden {
  display: none !important;
}

.filter-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.filter-btn.active {
  background: rgba(99, 102, 241, 0.9);
  border-color: transparent;
  color: #fff;
}
