:root {
  color-scheme: dark;
  --bg: #0f1419;
  --panel: #1a222c;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9cfd;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --danger: #f07178;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #2a3542;
  background: var(--panel);
}

header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
}

header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid #2a3542;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #3a4a5c;
  background: #0d1218;
  color: var(--text);
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  text-align: center;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #041018;
}

button.secondary {
  background: #2a3542;
  color: var(--text);
}

button.danger {
  background: var(--danger);
  color: #1a0a0c;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#status {
  font-size: 0.95rem;
  color: var(--muted);
}

#status.ok {
  color: var(--ok);
}

#status.warn {
  color: var(--warn);
}

#status.err {
  color: var(--danger);
}

.stage {
  position: relative;
  flex: 1;
  min-height: 50vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a3542;
}

.stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.stage.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 50;
  border-radius: 0;
  border: 0;
  min-height: 100dvh;
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.5;
}

.steps strong {
  color: var(--text);
}

.hidden {
  display: none !important;
}
