/* ── Moovaz Meet — Google Meet-inspired dark UI ───────────────────── */
:root {
  --bg:        #202124;
  --surface:   #2d2e30;
  --surface-2: #3c4043;
  --navy:      #0f2744;
  --teal:      #00b5ad;
  --teal-dark: #009990;
  --white:     #e8eaed;
  --dim:       #9aa0a6;
  --red:       #ea4335;
  --green:     #34a853;
  --amber:     #fbbc04;
  --blue:      #8ab4f8;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── Pre-join screen ─────────────────────────────────────────────── */
.prejoin {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.prejoin__card {
  background: var(--surface);
  border-radius: 20px;
  padding: 44px 40px;
  text-align: center;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 8px 48px rgba(0,0,0,.5);
}
.prejoin__logo { height: 34px; margin-bottom: 20px; }
.prejoin__card h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.prejoin__card p { color: var(--dim); font-size: 14px; margin-bottom: 28px; line-height: 1.5; }
.name-input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--white);
  font-size: 15px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.name-input:focus { outline: none; border-color: var(--teal); }
.name-input::placeholder { color: var(--dim); }

/* ── Call screen ─────────────────────────────────────────────────── */
.call-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.call-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(32,33,36,.96);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.call-header__left  { display: flex; align-items: center; gap: 12px; }
.call-header__logo  { height: 26px; }
.call-header__brand { font-size: 15px; font-weight: 700; color: var(--white); letter-spacing: -.2px; }
.call-header__timer { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.call-header__right { display: flex; align-items: center; gap: 10px; }
.call-header__session { font-size: 12px; color: var(--dim); }
.call-header__session strong { color: var(--white); font-weight: 500; }

/* ── Main content area ───────────────────────────────────────────── */
.call-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #111;
}

/* ── No-share / waiting placeholder ─────────────────────────────── */
.no-share {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #111;
}
.no-share__info { text-align: center; }
.no-share__icon { font-size: 52px; margin-bottom: 14px; }
.no-share__info h2 { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.no-share__info p { color: var(--dim); font-size: 13px; max-width: 280px; margin: 0 auto; line-height: 1.5; }

/* ── Waiting overlay (inside no-share) ──────────────────────────── */
.waiting-overlay {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 20px 24px;
  text-align: center;
  max-width: 480px;
  width: calc(100% - 32px);
}
.waiting-overlay p { font-size: 13px; color: var(--dim); margin-bottom: 12px; }
.waiting-pulse {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--teal);
  margin: 0 auto 12px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: .65; }
}
.link-row { display: flex; gap: 8px; align-items: center; }
.link-input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--white);
  font-size: 12px;
}
.link-input:focus { outline: 1px solid var(--teal); }

/* ── Screen share video ──────────────────────────────────────────── */
.screen-share-area {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.screen-video { width: 100%; height: 100%; object-fit: contain; }

/* ── Viewer waiting for presenter ────────────────────────────────── */
.waiting-presenter {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #111;
  text-align: center;
  padding: 24px;
}
.waiting-presenter__pulse {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}
.waiting-presenter h2 { font-size: 20px; font-weight: 500; }
.waiting-presenter p { color: var(--dim); font-size: 13px; max-width: 260px; line-height: 1.5; }

/* ── Participant tile (floating) ─────────────────────────────────── */
.participant-tile {
  position: absolute;
  bottom: 100px;
  right: 16px;
  width: 156px; height: 88px;
  background: var(--surface);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.participant-tile--visible { display: flex; }
.participant-tile__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
}
.participant-tile__name { font-size: 11px; color: var(--dim); }

/* ── Bottom control bar ──────────────────────────────────────────── */
.call-controls {
  height: 80px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 0 16px 6px;
}
@media (min-width: 600px) { .call-controls { gap: 16px; height: 92px; } }

/* ── Control button ──────────────────────────────────────────────── */
.ctrl-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.09);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}
@media (min-width: 600px) { .ctrl-btn { width: 60px; height: 60px; } }
.ctrl-btn:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.ctrl-btn:active:not(:disabled) { transform: scale(.92); }
.ctrl-btn:disabled { opacity: .35; cursor: not-allowed; }
.ctrl-btn__icon { font-size: 20px; line-height: 1; }
.ctrl-btn__label {
  position: absolute;
  bottom: -18px;
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
  display: none;
}
@media (min-width: 600px) { .ctrl-btn__label { display: block; } }

.ctrl-btn--off { background: var(--red) !important; }
.ctrl-btn--off:hover:not(:disabled) { background: #c62828 !important; }
.ctrl-btn--active { background: var(--teal) !important; box-shadow: 0 0 0 3px rgba(0,181,173,.3); }
.ctrl-btn--active:hover:not(:disabled) { background: var(--teal-dark) !important; }
.ctrl-btn--end {
  width: 68px !important; border-radius: 32px !important;
  background: var(--red) !important;
}
.ctrl-btn--end:hover:not(:disabled) { background: #c62828 !important; }
@media (min-width: 600px) { .ctrl-btn--end { width: 84px !important; } }

/* ── Status badge ────────────────────────────────────────────────── */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.status::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor; flex-shrink: 0;
}
.status--default    { background: rgba(255,255,255,.07); color: var(--dim); }
.status--connected  { background: rgba(52,168,83,.2);    color: #81c995; }
.status--connecting { background: rgba(251,188,4,.15);   color: #fdd663; }
.status--waiting    { background: rgba(138,180,248,.15); color: var(--blue); }
.status--error      { background: rgba(234,67,53,.2);    color: #f28b82; }
.status--ended      { background: rgba(255,255,255,.07); color: var(--dim); }

/* ── Toast notifications ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--join  { border-left: 3px solid var(--green); }
.toast--leave { border-left: 3px solid var(--amber); }
.toast--error { border-left: 3px solid var(--red); }
.toast--info  { border-left: 3px solid var(--teal); }

/* ── Session ended overlay ───────────────────────────────────────── */
.ended-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.ended-overlay--visible { display: flex !important; }
.ended-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  max-width: 380px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.ended-card__logo { height: 32px; margin-bottom: 20px; }
.ended-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.ended-card p { color: var(--dim); font-size: 14px; line-height: 1.6; margin-bottom: 28px; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px;
  padding: 12px 24px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn--teal  { background: var(--teal); color: #fff; }
.btn--teal:hover:not(:disabled) { background: var(--teal-dark); }
.btn--ghost { background: rgba(255,255,255,.09); color: var(--white); border: 1px solid rgba(255,255,255,.12); }
.btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.btn--sm  { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn--lg  { width: 100%; padding: 14px 24px; font-size: 16px; border-radius: 10px; }
