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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: #111;
  color: #fff;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
}

#header, #footer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: 1.4rem;
}

#container {
  position: relative;
  min-height: 0;
  max-height: 75vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#webcam {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 8px;
  transform: scaleX(-1);
}

#overlay {
  position: absolute;
  pointer-events: none;
  border-radius: 8px;
  transform: scaleX(-1);
}

#warning {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(180, 0, 0, 0.7);
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  padding: 16px 32px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 10;
}

#warning.hidden {
  display: none;
}

.triangle {
  color: #ff0;
  margin: 0 8px;
}

#status {
  color: #aaa;
  font-size: 0.85rem;
}

#status.hidden {
  display: none;
}

#container.hidden {
  display: none;
}

#start-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 400px;
  text-align: center;
}

#start-screen.hidden {
  display: none;
}

#start-btn {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 16px 56px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
}

#start-btn:hover {
  background: #ddd;
}

#start-desc {
  color: #999;
  font-size: 1rem;
  line-height: 1.6;
}
