:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #121a2f;
  --panel-strong: #17213a;
  --text: #f6f8ff;
  --muted: #9aa7c7;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #7c9cff;
  --primary-strong: #5d7df2;
  --danger: #ff5c7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, 0.2), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(50, 214, 177, 0.12), transparent 28rem),
    var(--bg);
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #32d6b1);
  box-shadow: 0 12px 28px rgba(124, 156, 255, 0.35);
}

.privacy-pill,
.status-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.privacy-pill {
  padding: 8px 12px;
  font-size: 13px;
}

.join-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 380px;
  gap: 22px;
  align-items: stretch;
}

.video-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(18, 26, 47, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.video-panel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #070a12;
}

#remoteVideo {
  position: absolute;
  inset: 0;
}

#localVideo {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 170px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0a0e1a;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.idle-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}

.avatar {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 32px;
  font-size: 28px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #24304f, #11182c);
  border: 1px solid var(--line);
}

.status-chip {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 8px 12px;
  font-size: 13px;
}

.side-panel {
  padding: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.subhead {
  margin: 18px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.control-button,
.primary-button,
.ghost-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.control-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.control-button.is-on {
  color: #06101e;
  background: #e6ecff;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  font-weight: 750;
  box-shadow: 0 18px 35px rgba(93, 125, 242, 0.32);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost-button {
  margin-top: 10px;
  color: var(--danger);
  background: rgba(255, 92, 122, 0.08);
  border: 1px solid rgba(255, 92, 122, 0.25);
}

.helper-text {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .join-card {
    grid-template-columns: 1fr;
  }

  .video-panel {
    min-height: 420px;
  }

  .side-panel {
    padding: 24px;
  }
}

/* Meeting-room preview inspired by common video call layouts. */
body {
  overflow: hidden;
  background: #050505;
}

.meeting-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 42px 1fr 72px;
  color: #f5f5f5;
  background: #050505;
}

.meeting-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 6px;
  background: #070707;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.meeting-title {
  display: inline-flex;
  align-items: center;
  height: 26px;
  max-width: 44vw;
  padding: 0 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.meeting-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.security-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #28d66f;
  box-shadow: 0 0 0 2px rgba(40, 214, 111, 0.14);
}

.top-separator {
  width: 1px;
  height: 19px;
  background: rgba(255, 255, 255, 0.2);
}

.top-icon,
.view-button {
  display: inline-grid;
  place-items: center;
  height: 26px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 0;
}

.top-icon {
  width: 26px;
  font-size: 12px;
  border-radius: 6px;
}

.top-icon.dots::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.view-button {
  padding: 0 10px;
  font-size: 12px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #080808;
}

.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-fill {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 35% 35%, rgba(117, 76, 45, 0.88), transparent 24%),
    radial-gradient(circle at 58% 40%, rgba(98, 67, 46, 0.86), transparent 29%),
    radial-gradient(circle at 80% 38%, rgba(58, 46, 38, 0.74), transparent 24%),
    linear-gradient(100deg, #160d09 0%, #4f2e1d 42%, #16120f 100%);
  filter: blur(9px) brightness(0.72) saturate(0.86);
  transform: scale(1.04);
}

.participant-name {
  position: absolute;
  left: 8px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 4px;
}

.muted-mark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #e04444;
}

.mini-preview {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 136px;
  height: 78px;
  overflow: hidden;
  background: #111827;
  border: 2px solid rgba(185, 246, 255, 0.92);
  border-radius: 3px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55);
}

.mini-preview video {
  opacity: 0;
}

.mini-frame {
  position: absolute;
  inset: 5px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 5px;
  background: linear-gradient(145deg, #f8fafc 0 22%, #141925 23% 100%);
  border-radius: 2px;
}

.mini-title {
  width: 58px;
  height: 6px;
  background: #111827;
  border-radius: 999px;
  font-size: 0;
}

.mini-line {
  width: 92%;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.mini-line.short {
  width: 58%;
}

.stage .status-chip {
  left: 50%;
  top: 12px;
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
}

.meeting-controls {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(10, minmax(56px, 86px));
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 72px;
  padding: 6px 8px 6px;
  background: #030303;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.control {
  display: grid;
  justify-items: center;
  position: relative;
  gap: 3px;
  min-width: 0;
  height: 58px;
  padding: 4px 5px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.control:hover {
  background: rgba(255, 255, 255, 0.08);
}

.control-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: white;
  border: 0;
  border-radius: 6px;
}

.control-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.control-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control.danger .control-icon {
  color: #ff5757;
  background: transparent;
}

.control.share .control-icon {
  color: white;
  background: #16a34a;
  border-radius: 5px;
}

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

.sparkle {
  color: #f8fbff;
}

.more-dots svg path {
  stroke-width: 4;
}

.chevron {
  position: absolute;
  right: 7px;
  top: 16px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid rgba(255, 255, 255, 0.72);
}

.has-badge::after {
  content: attr(data-badge);
  position: absolute;
  right: 17px;
  top: 1px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  color: #111;
  font-size: 9px;
  font-weight: 700;
  background: white;
  border-radius: 999px;
}

.sr-status {
  position: fixed;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 820px) {
  .meeting-controls {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    height: 132px;
  }

  .meeting-shell {
    grid-template-rows: 42px 1fr 132px;
  }

  .mini-preview {
    width: 112px;
    height: 66px;
  }
}
