/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f7fa;          /* page background */
  color: #111827;
}

/* Prevent background seam between fixed + sticky layers */
body::before {
  content: "";
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 20px;
  background: #ffffff;
  z-index: 850; /* below header (1000), below video strip (900) */
  pointer-events: none;
}


/* =========================
   TOP BAR (FIXED)
========================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  z-index: 1000;

  border: none;
  box-shadow: none;
}

.join-controls {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

/* =========================
   VIDEO STRIP (STICKY)
========================= */
.video-strip {
  position: sticky;
  top: 56px;                    /* sits directly under header */
  top: 68px;
  z-index: 900;

  background: #ffffff;          /* SAME as header */
  border: none;
  box-shadow: none;

  padding: 12px 14px 16px;      /* extra bottom padding = no seam illusion */
}

/* =========================
   VIDEO ROW (HORIZONTAL SCROLL)
========================= */
.video-row {
  display: flex;
  align-items: center;
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.video-row::-webkit-scrollbar {
  height: 6px;
}

.video-row::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

/* =========================
   VIDEO TILES
========================= */
.local-tile,
.remote-row video {
  position: relative;
  flex: 0 0 auto;
}

.local-tile video,
.remote-row video {
  width: 160px;
  height: 120px;

  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

/* Local "You" label */
.local-tile .label {
  position: absolute;
  bottom: 6px;
  left: 6px;

  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;

  background: rgba(0,0,0,0.65);
  color: #ffffff;
}

/* =========================
   REMOTE AREA
========================= */
.remote-row {
  display: flex;
  gap: 12px;
}

/* =========================
   MAIN CONTENT (SCROLLS)
========================= */
main {
  padding: 16px;
  margin-top: 16px;             /* space BELOW video strip */
}

/* =========================
   PANELS
========================= */
.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;

  padding: 16px;
  margin-bottom: 16px;
}

/* =========================
   CAPTIONS
========================= */
.captions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

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

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

.captionBox {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  min-height: 48px;
}

.caption-line {
  display: block;
  line-height: 1.4;
}

.caption-label {
  font-weight: 600;
  margin-right: 4px;
}

/* =========================
   SCREEN SHARE
========================= */
.screen-stage video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;

  background: #000;
  border-radius: 10px;
}

/* =========================
   LOG
========================= */
pre {
  white-space: pre-wrap;
  word-break: break-word;
}
