:root {
  --bg: #0e1116;
  --panel: #171c24;
  --panel-2: #1f2630;
  --text: #e6edf3;
  --muted: #9aa7b4;
  --accent: #3b82f6;
  --accent-2: #2563eb;
  --ok: #22c55e;
  --err: #ef4444;
  --border: #2a333f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { color: var(--muted); font-size: 14px; }

main {
  width: 100%;
  max-width: 920px;
  padding: 24px 16px 48px;
  flex: 1;
}

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card .emoji { font-size: 30px; display: block; margin-bottom: 10px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
}

h1 { font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
button:hover { background: var(--accent-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: var(--panel-2); border: 1px solid var(--border); }

input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 18px;
  letter-spacing: 3px;
  text-align: center;
  width: 180px;
}

.code-box {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
  background: var(--panel-2);
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--err); }

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

video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--border);
  margin-top: 14px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  background: var(--panel-2);
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 14px;
  line-height: 1.5;
}
a.back { color: var(--muted); font-size: 14px; text-decoration: none; }
a.back:hover { color: var(--text); }
