:root {
  --bg: #0b0e14;
  --panel: rgba(18, 22, 31, 0.82);
  --fg: #e8eef7;
  --muted: #8b98ab;
  --accent: #6d5efc;
  --accent-2: #22d3a6;
  --danger: #f24b5b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

body.page-center {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(109, 94, 252, .28), transparent 60%),
    radial-gradient(800px 500px at 95% 110%, rgba(34, 211, 166, .18), transparent 60%),
    var(--bg);
}

/* ---------- strona startowa ---------- */
.card {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.card h1 { margin: 0 0 6px; font-size: 1.9rem; letter-spacing: -.02em; }
.lead { margin: 0 0 26px; color: var(--muted); }
.accent { color: var(--accent); }
.steps { display: grid; gap: 14px; margin-bottom: 24px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.num {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  background: rgba(109,94,252,.18); color: #b7b0ff;
  border: 1px solid rgba(109,94,252,.35);
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  padding: 1px 7px; border-radius: 6px; font-size: .9em;
}
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- scena / wideo ---------- */
#stage {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: #000;
}
#video, #preview {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}

.placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  background: radial-gradient(700px 400px at 50% 40%, rgba(109,94,252,.16), transparent 65%), #05070b;
  padding: 24px;
}
.placeholder h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.pulse {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(109,94,252,.18);
  border: 1px solid rgba(109,94,252,.5);
  animation: pulse 1.8s ease-in-out infinite;
  margin-bottom: 6px;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ---------- paski ---------- */
.topbar, .bottombar, .controls {
  position: fixed; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(5,7,11,.85), transparent);
  z-index: 5;
  transition: opacity .25s ease;
}
.topbar { top: 0; }
.bottombar {
  bottom: 0;
  background: linear-gradient(to top, rgba(5,7,11,.85), transparent);
  font-size: .85rem;
}
.brand { font-weight: 700; letter-spacing: .01em; }
.tag {
  margin-left: 8px; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .08em; padding: 3px 8px; border-radius: 999px;
  background: rgba(242,75,91,.16); color: #ff8b95;
  border: 1px solid rgba(242,75,91,.35); font-weight: 700;
}
.meta { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: .8rem; }

.dot {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-live { color: #54e6b0; background: rgba(34,211,166,.12); }
.dot-wait { color: #c9b458; background: rgba(201,180,88,.12); }
.dot-off  { color: #ff8b95; background: rgba(242,75,91,.12); }

/* ---------- przyciski ---------- */
button {
  font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--fg); cursor: pointer;
  border-radius: 10px; padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  transition: background .15s ease, transform .05s ease, opacity .15s ease;
}
button:hover:not(:disabled) { background: rgba(255,255,255,.12); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .42; cursor: not-allowed; }
button.primary {
  background: var(--accent); border-color: transparent;
  box-shadow: 0 8px 26px rgba(109,94,252,.35);
}
button.primary:hover:not(:disabled) { background: #7d70ff; }
button.danger { background: rgba(242,75,91,.16); border-color: rgba(242,75,91,.4); color: #ff9aa3; }
button.danger:hover:not(:disabled) { background: rgba(242,75,91,.26); }
button.ghost { background: rgba(255,255,255,.05); }
button.on { background: rgba(34,211,166,.18); border-color: rgba(34,211,166,.45); color: #7ff0c8; }

.controls {
  bottom: 0; justify-content: flex-start;
  background: linear-gradient(to top, rgba(5,7,11,.92), rgba(5,7,11,.55) 60%, transparent);
  padding: 16px;
}
body:has(.controls) .bottombar { bottom: 64px; background: none; }
.grow { flex: 1; }

.unmute {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
}
.unmute button {
  font-size: 1rem; padding: 14px 22px; border-radius: 999px;
  background: var(--accent); border-color: transparent;
}

@media (max-width: 560px) {
  .controls { flex-wrap: wrap; }
  button { padding: 8px 11px; font-size: .8rem; }
  .brand .tag { display: none; }
}
