:root {
  --bg: #0b0f14;
  --panel: rgba(20, 26, 35, 0.88);
  --text: #ffffff;
  --muted: #9aa4b2;
  --accent: #2563eb;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  overflow: hidden;
}

.app {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: #000;
  overflow: hidden;
}

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

.topbar {
  position: absolute;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,0));
}

.brand {
  font-size: 1rem;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.1);
  font-size: .9rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.dot.live {
  background: var(--success);
}

.panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom, 0);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
}

button,
.btnlink,
input {
  appearance: none;
  border: none;
  outline: none;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 52px;
  font-size: 16px;
}

button,
.btnlink {
  background: var(--panel);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

button:active,
.btnlink:active {
  transform: scale(0.98);
}

.primary {
  background: var(--accent);
}

.card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 90px;
  z-index: 9;
  background: rgba(17,24,39,.92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(10px);
}

.qrbox p {
  margin-top: 0;
}

.qrbox input {
  width: 100%;
  margin-bottom: 12px;
  background: #fff;
  color: #111;
}

.qrbox img {
  width: 220px;
  max-width: 100%;
  display: block;
  margin: 12px auto 0;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

.password-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #fff;
}

@media (max-width: 640px) {
  .panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .btnlink,
  button {
    text-align: center;
  }

  .card {
    bottom: 150px;
  }
}
