:root {
  color-scheme: light dark;
  --bg: #0c0c0c;
  --text: #f5f5f5;
  --primary: #2563eb;
  --danger: #dc2626;
  --overlay: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

.screen {
  display: none;
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

.screen.active {
  display: flex;
}

#screen-welcome {
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.hero h1 {
  margin-bottom: 8px;
}

.hero p {
  margin-top: 0;
  color: #cfd3dc;
}

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

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

.primary {
  background: var(--primary);
  color: white;
  width: 240px;
}

.danger {
  background: var(--danger);
  color: white;
  width: 160px;
  height: 54px;
  border-radius: 18px;
}

#screen-live {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: black;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

#stats {
  pointer-events: none;
  align-self: flex-end;
  margin: 12px;
  margin-top: calc(12px + env(safe-area-inset-top, 0));
  padding: 10px 12px;
  background: var(--overlay);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

#bottom-bar {
  display: flex;
  justify-content: center;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  pointer-events: none;
}

#bottom-bar button {
  pointer-events: all;
}

.error {
  color: #fca5a5;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 999;
}

