/* ============================================================
   CROLIX MEET — STYLESHEET
   Sections:
   1.  CSS Variables & Reset
   2.  Join Screen
   3.  Meeting Screen & Top Bar
   4.  Video Grid & Player
   5.  Avatar
   6.  Controls
   7.  Schedule Modal
   8.  Success Toast
   9.  Animations
   10. Participants Panel
   11. Join / Leave Notification Toasts
   12. Responsive
============================================================ */

/* ─── 1. Variables & Reset ──────────────────────────────── */
:root {
  --bg-deep:      #020617;
  --bg-panel:     #0f172a;
  --bg-card:      #1e293b;
  --bg-hover:     #263549;
  --border-muted: rgba(255,255,255,0.07);
  --border-soft:  rgba(255,255,255,0.1);
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-dark:  #4f46e5;
  --purple:       #7c3aed;
  --red-bg:       #7f1d1d;
  --red-bg-hover: #991b1b;
  --red-text:     #fca5a5;
  --blue-bg:      #1d4ed8;
  --blue-bg-hover:#2563eb;
  --blue-text:    #bfdbfe;
  --green-accent: #22c55e;
  --text-primary: #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --text-soft:    #cbd5e1;
  --font:         "Poppins", sans-serif;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --transition:   0.2s ease;
}

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

/* ─── 2. Join Screen ────────────────────────────────────── */
#join-screen {
  min-height: 100vh;
  background: radial-gradient(circle at top, #0f172a, var(--bg-deep));
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 2rem 5%;
  font-family: var(--font);
}

.join-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  gap: 3rem;
  flex-wrap: wrap;
}

.join-left {
  flex: 1;
  min-width: 260px;
  max-width: 500px;
}

.join-left h1 {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 1.2rem 0 0.8rem;
}

.join-left .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  line-height: 1.7;
}

.join-left .features { list-style: none; }
.join-left .features li {
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
}

.join-card {
  width: clamp(280px, 40vw, 380px);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(15px);
  flex-shrink: 0;
}

.join-card h2 { margin-bottom: 4px; font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
.join-card .small-text { color: var(--text-muted); font-size: 14px; margin-bottom: 1.2rem; }

.join-card label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.join-card input {
  width: 100%;
  padding: 12px;
  margin-top: 5px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg-card);
  color: white;
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
}

.join-card input:focus { box-shadow: 0 0 0 2px rgba(99,102,241,0.5); }

.join-card button#joinBtn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-family: var(--font);
  transition: opacity var(--transition), transform var(--transition);
}

.join-card button#joinBtn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.join-card button#joinBtn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.hint-box {
  margin-top: 15px;
  padding: 10px 12px;
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.3);
  border-radius: 10px;
  font-size: 13px;
  color: #c7d2fe;
  line-height: 1.5;
}

/* ─── 3. Meeting Screen & Top Bar ───────────────────────── */
#meeting-screen {
  position: fixed;
  inset: 0;
  background: #0b1220;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  font-family: var(--font);
}

.top-bar {
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(1rem, 3vw, 28px);
  background: var(--bg-panel);
  color: white;
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
  position: relative;
}

.meeting-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.meeting-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

#meeting-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 35vw;
  font-size: clamp(0.82rem, 1.8vw, 0.95rem);
  font-weight: 600;
  color: var(--text-primary);
}

.live-badge {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.premium-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(250,204,21,0.45);
  background: linear-gradient(135deg, rgba(234,179,8,0.18), rgba(168,85,247,0.18));
  color: #fde68a;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform 0.15s, box-shadow var(--transition);
  box-shadow: 0 0 10px rgba(250,204,21,0.12);
}

.premium-pill svg { stroke: #fde68a; flex-shrink: 0; }
.premium-pill:hover {
  background: linear-gradient(135deg, rgba(234,179,8,0.30), rgba(168,85,247,0.30));
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(250,204,21,0.22);
}
.premium-pill:active { transform: scale(0.97); }

.timer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* ── Participant count badge — clickable ── */
.participants-count {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-soft);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: clamp(0.78rem, 1.5vw, 0.88rem);
  color: var(--text-soft);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  user-select: none;
}

.participants-count:hover {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.45);
}

.participants-count svg { stroke: var(--text-muted); flex-shrink: 0; }

/* Pop animation when count changes */
@keyframes countPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); background: rgba(99,102,241,0.25); border-color: rgba(99,102,241,0.6); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); background: rgba(255,255,255,0.07); border-color: var(--border-soft); }
}

.participants-count.count-pop {
  animation: countPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#count-num {
  font-weight: 700;
  font-size: 1rem;
  color: #e2e8f0;
  min-width: 1.2ch;
  text-align: center;
  transition: color 0.2s ease;
}

/* ─── 4. Video Grid & Player ────────────────────────────── */
.video-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1rem, 2vw, 24px);
  padding: clamp(1.5rem, 3vw, 40px);
  place-items: center;
  overflow-y: auto;
}

.video-player {
  width: 100%;
  max-width: 480px;
  height: clamp(180px, 28vw, 280px);
  background: #111827;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-muted);
  animation: tileIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

@keyframes tileIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ─── 5. Avatar ─────────────────────────────────────────── */
.video-player video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: var(--radius-lg);
  z-index: 1;
}

.avatar {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.35);
  transition: opacity 0.25s ease;
}

.avatar-initial {
  font-family: var(--font);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
  width: clamp(80px, 14vw, 120px);
  height: clamp(80px, 14vw, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  animation: avatarPop 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

.avatar-name {
  font-family: var(--font);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 5px 16px;
  backdrop-filter: blur(6px);
  animation: avatarNameSlide 0.4s ease 0.1s both;
}

@keyframes avatarPop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

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

.name-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.68);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 500;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
  z-index: 4;
}

/* ─── 6. Controls ───────────────────────────────────────── */
.controls {
  height: clamp(85px, 11vw, 110px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
  background: var(--bg-panel);
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
  padding: 0 1.5rem;
  flex-wrap: wrap;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: clamp(68px, 10vw, 88px);
  height: clamp(68px, 10vw, 88px);
  border-radius: 14px;
  border: none;
  background: var(--bg-card);
  color: var(--text-soft);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  font-family: var(--font);
}

.control-btn:hover:not(:disabled) { background: var(--bg-hover); transform: translateY(-2px); }
.control-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-icon { display: flex; align-items: center; justify-content: center; }
.btn-icon svg { stroke: currentColor; }
.btn-label { font-size: clamp(9px, 1.2vw, 11px); font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }

.control-btn.muted,
.control-btn.video-off,
.control-btn.leave    { background: var(--red-bg);       color: var(--red-text); }
.control-btn.muted:hover:not(:disabled),
.control-btn.video-off:hover:not(:disabled),
.control-btn.leave:hover:not(:disabled) { background: var(--red-bg-hover); }

.share-btn       { background: var(--blue-bg);      color: var(--blue-text); }
.share-btn:hover:not(:disabled) { background: var(--blue-bg-hover); }
.share-btn.sharing { background: #1e40af; color: #93c5fd; }

/* ─── 7. Schedule Modal ─────────────────────────────────── */
.sched-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.82);
  backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sched-overlay.open { opacity: 1; }

.sched-modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-panel);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1), opacity 0.3s ease;
}

.sched-overlay.open .sched-modal { transform: translateY(0) scale(1); opacity: 1; }

.sched-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(79,70,229,0.2), rgba(168,85,247,0.15));
  border-bottom: 1px solid var(--border-muted);
}

.sched-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #e0e7ff;
  font-family: var(--font);
}

.sched-header-left svg { stroke: var(--accent-light); }

.sched-close {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
  flex-shrink: 0;
}

.sched-close:hover { background: rgba(239,68,68,0.2); color: var(--red-text); }

.sched-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }

.sched-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.sched-field { display: flex; flex-direction: column; gap: 6px; }

.sched-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  font-family: var(--font);
  text-transform: uppercase;
}

.req      { color: #f87171; }
.optional { font-size: 10px; color: #475569; text-transform: none; letter-spacing: 0; font-weight: 400; }

.sched-field input,
.sched-field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: none;
}

.sched-field input:focus,
.sched-field textarea:focus {
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.sched-field input[type="date"],
.sched-field input[type="time"] { color-scheme: dark; }

.sched-copy-wrap { position: relative; display: flex; align-items: center; }
.sched-copy-wrap input { padding-right: 42px; }

.sched-copy-btn {
  position: absolute;
  right: 8px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 7px;
  color: var(--accent-light);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s;
  flex-shrink: 0;
}

.sched-copy-btn:hover  { background: rgba(99,102,241,0.28); transform: scale(1.05); }
.sched-copy-btn.copied { background: rgba(34,197,94,0.2); border-color: rgba(34,197,94,0.4); color: #86efac; }

.sched-err {
  color: #f87171;
  font-size: 13px;
  font-family: var(--font);
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.sched-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-dark), var(--purple));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity var(--transition), transform 0.15s, box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(79,70,229,0.35);
  width: 100%;
  margin-top: 4px;
}

.sched-submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(79,70,229,0.45);
}

.sched-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.sched-submit svg { stroke: white; flex-shrink: 0; }

/* ─── 8. Success Toast ──────────────────────────────────── */
#sched-success-toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34,1.2,0.64,1);
}

#sched-success-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sched-toast-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-panel);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(34,197,94,0.1);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.sched-toast-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(16,185,129,0.15));
  border: 1px solid rgba(34,197,94,0.35);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sched-toast-icon svg { stroke: #4ade80; }
.sched-toast-title { font-size: 15px; font-weight: 700; color: #f0fdf4; font-family: var(--font); }
.sched-toast-sub   { font-size: 13px; color: #86efac; font-family: var(--font); margin-top: 2px; }

/* ─── 9. Animations ─────────────────────────────────────── */
.splash {
  display: flex;
  align-items: center;
  gap: 22px;
  animation: fadeIn 0.9s ease forwards;
  opacity: 0;
  overflow: visible;
  position: relative;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.logo-icon {
  width: 72px; height: 72px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  animation: popIn 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.logo-text {
  display: flex;
  align-items: baseline;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.7s ease 0.4s both;
  opacity: 0;
}

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

.logo-text .crolix {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4fa3f7 0%, #6ec6ff 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text .meet {
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #c8d8f0;
  margin-left: 0.45rem;
}

@keyframes logoTextAbsorb {
  0%   { transform: translateX(0)    scaleX(1)    ; opacity: 1; }
  38%  { transform: translateX(-58px) scaleX(0.85) ; opacity: 0.9; }
  50%  { transform: translateX(-85px) scaleX(0.1)  ; opacity: 0; }
  65%  { transform: translateX(-85px) scaleX(0.1)  ; opacity: 0; }
  78%  { transform: translateX(-60px) scaleX(0.4)  ; opacity: 0.4; }
  90%  { transform: translateX(-10px) scaleX(0.95) ; opacity: 0.9; }
  100% { transform: translateX(0)    scaleX(1)    ; opacity: 1; }
}

@keyframes logoIconAbsorb {
  0%   { transform: scale(1)    translateX(0);   filter: brightness(1); }
  45%  { transform: scale(1)    translateX(0);   filter: brightness(1); }
  52%  { transform: scale(1.22) translateX(0);   filter: brightness(1.6) drop-shadow(0 0 12px rgba(99,102,241,0.9)); }
  60%  { transform: scale(1.08) translateX(-14px); filter: brightness(1.3) drop-shadow(0 0 8px rgba(99,102,241,0.6)); }
  68%  { transform: scale(1.04) translateX(-14px); filter: brightness(1.15); }
  80%  { transform: scale(1)    translateX(0);   filter: brightness(1); }
  100% { transform: scale(1)    translateX(0);   filter: brightness(1); }
}

.splash.absorbing .logo-icon {
  animation: logoIconAbsorb 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash.absorbing .logo-text {
  animation: logoTextAbsorb 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 1;
}

/* ─── 10. Participants Panel ────────────────────────────── */
.participants-panel {
  position: absolute;
  top: 56px;
  right: 0;
  width: clamp(240px, 28vw, 300px);
  height: calc(100% - 56px - clamp(85px, 11vw, 110px));
  background: var(--bg-panel);
  border-left: 1px solid var(--border-muted);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  animation: panelSlideIn 0.25s cubic-bezier(0.34,1.1,0.64,1) both;
  overflow: hidden;
}

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

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-muted);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  font-family: var(--font);
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
}

.panel-header span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header svg { stroke: var(--accent-light); }

/* Panel count number highlight */
#panel-count {
  color: var(--accent-light);
  font-weight: 700;
}

.panel-close-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
  flex-shrink: 0;
}

.panel-close-btn:hover { background: rgba(239,68,68,0.2); color: var(--red-text); }

.participants-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.participants-list::-webkit-scrollbar { width: 4px; }
.participants-list::-webkit-scrollbar-track { background: transparent; }
.participants-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.participant-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.participant-item:hover { background: rgba(255,255,255,0.05); }

.p-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.p-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  font-family: var(--font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── New: indicators wrapper for mic + cam ── */
.p-indicators {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.p-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.p-status.cam-off,
.p-status.mic-off {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}
.p-status.cam-off svg,
.p-status.mic-off svg { stroke: #f87171; }

.p-status.cam-on,
.p-status.mic-on {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
}
.p-status.cam-on svg,
.p-status.mic-on svg { stroke: #4ade80; }

/* ─── 11. Join / Leave Notification Toasts ──────────────── */
.notif-container {
  position: fixed;
  bottom: clamp(100px, 14vw, 130px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.notif-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 30px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: #f1f5f9;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.2,0.64,1);
  white-space: nowrap;
}

.notif-toast.notif-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notif-toast.notif-join {
  background: rgba(15, 30, 20, 0.88);
  border: 1px solid rgba(34,197,94,0.35);
}

.notif-toast.notif-leave {
  background: rgba(30, 10, 10, 0.88);
  border: 1px solid rgba(239,68,68,0.35);
}

.notif-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.notif-icon-join {
  background: rgba(34,197,94,0.2);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.4);
}

.notif-icon-leave {
  background: rgba(239,68,68,0.2);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.4);
}

.notif-msg { color: var(--text-soft); }

/* ─── 12. Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .join-wrapper   { flex-direction: column; align-items: center; gap: 2rem; }
  .join-left      { max-width: 100%; text-align: center; }
  .join-card      { width: 100%; max-width: 480px; }
  .video-grid     { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .participants-panel { width: clamp(200px, 60vw, 260px); }
}

@media (max-width: 600px) {
  #join-screen      { padding: 5rem 4% 2rem; align-items: flex-start; }
  .join-left h1     { font-size: 1.4rem; }
  .join-card        { padding: 1.25rem; }
  .video-grid       { grid-template-columns: 1fr; padding: 1rem; gap: 1rem; }
  .video-player     { max-width: 100%; height: clamp(160px, 52vw, 240px); }
  .top-bar          { height: 50px; padding: 0 1rem; }
  .timer            { font-size: 0.82rem; }
  .controls         { height: auto; padding: 0.75rem 1rem; gap: 10px; }
  .control-btn      { width: 64px; height: 64px; border-radius: 12px; }
  .premium-pill     { font-size: 11px; padding: 4px 10px 4px 8px; }
  .sched-row        { grid-template-columns: 1fr; }
  .sched-modal      { border-radius: var(--radius-lg); }
  #sched-success-toast { bottom: 20px; width: 90%; }
  .sched-toast-inner   { white-space: normal; }
  .avatar-initial      { font-size: 2.2rem; width: 64px; height: 64px; }
  .avatar-name         { font-size: 0.72rem; }
  .participants-panel  { width: 100%; border-left: none; border-top: 1px solid var(--border-muted); top: auto; bottom: clamp(85px, 11vw, 110px); height: 50vh; }
  .notif-toast         { font-size: 12px; padding: 8px 14px; }
}

@media (max-width: 360px) {
  .control-btn  { width: 54px; height: 54px; gap: 3px; }
  .btn-label    { font-size: 9px; }
  .join-card h2 { font-size: 1rem; }
  .premium-pill span { display: none; }
  .premium-pill      { padding: 6px 8px; }
  .avatar-initial    { font-size: 1.8rem; width: 52px; height: 52px; }
}