body {
  font-family: system-ui, Arial;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #0d1117;
  color: #e6edf3;
  margin: 0;
  padding: 20px;
}

#container {
  position: relative;
  display: inline-block;
}

#controls {
  margin-bottom: 15px;
}

button {
  background: #238636;
  border: none;
  color: white;
  padding: 8px 16px;
  margin: 0 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

video, canvas {
  border-radius: 8px;
  border: 1px solid #30363d;
}

video {
  display: none;
}

canvas { 
  display: block; 
}

#alert {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 0, 0, 0.85);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  display: none;
}

.info-wrapper {
  position: absolute;
  display: inline-block;
}

.info-button {
  font-size: 16px;
  user-select: none;
  padding: 6px;
}

.tooltip {
  opacity: 0;
  background-color: rgba(0,0,0,0.85);
  color: #fff;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  position: absolute;
  top: 25px; /* below the icon */
  left: 0;
  z-index: 20;
  width: 270px;
  transition: opacity .25s;
}

.info-wrapper:hover .tooltip {
  opacity: 1;
}