:root {
  --bg: #14161c;
  --card: #1e222c;
  --line: #2d3340;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --accent: #6ea8ff;
  --danger: #ff8a80;
  --ok: #8fd19e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.wrap {
  width: min(720px, 100%);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

p,
label {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

input {
  width: 100%;
  margin: 6px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #12141a;
  color: var(--text);
  font-size: 1rem;
}

button,
.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: #10203a;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

button.ghost,
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

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

.code {
  font-size: 2rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin: 8px 0;
}

.status {
  min-height: 1.4em;
  margin-top: 12px;
}

.status.err {
  color: var(--danger);
}

.status.ok {
  color: var(--ok);
}

video {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border-radius: 8px;
  margin-top: 12px;
}

body.watch-page {
  padding: 16px;
}

.wrap.watch {
  width: min(1600px, 100%);
}

.watch-stage {
  margin-top: 12px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.watch-stage video {
  display: block;
  width: 100%;
  height: calc(100vh - 200px);
  max-height: none;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.watch-stage:fullscreen,
.watch-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.watch-stage:fullscreen video,
.watch-stage:-webkit-full-screen video {
  height: 100vh;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
