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

body {
  background: #111;
  color: #eee;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

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

#video, #overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

#overlay { pointer-events: none; }

#controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1a1a1a;
  flex-wrap: wrap;
}

#btn-toggle {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: #2d6a4f;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

#btn-toggle.active { background: #c0392b; }

#stats { display: flex; gap: 10px; font-size: 0.85rem; color: #aaa; }

label { font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }

#perm-error {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 1.1rem;
}

#perm-error[hidden] { display: none; }
