* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #111;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}

h1 {
  margin: 0;
  font-size: 32px;
  text-align: center;
}

.subtitle {
  margin: 0;
  text-align: center;
  color: #555;
  max-width: 520px;
}

.mode-switcher {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-option {
  cursor: pointer;
}

.mode-option input {
  display: none;
}

.mode-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #fff;
  transition: 0.2s ease;
}

.mode-option input:checked + span {
  border-color: #111;
  background: #111;
  color: #fff;
}

.video-wrapper {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.recording-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.hidden {
  display: none;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 16px;
  cursor: pointer;
}

#startBtn {
  background: #111;
  color: #fff;
}

#stopBtn {
  background: #d92d20;
  color: #fff;
}

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

.status {
  min-height: 24px;
  text-align: center;
  color: #333;
}
