/* Copyright (c) 2026 Benjamin Weatherston. All rights reserved. */
:root {
  --bg: #0a0a0f; --bg2: #111118; --bg3: #18181f; --surface: #1e1e28; --surface2: #252530;
  --border: rgba(255,255,255,.08); --border2: rgba(255,255,255,.16);
  --accent: #1DB954; --accent-dim: #19a348; --hot: #ff4757; --amber: #ffa502; --blue: #4ecdc4;
  --text: #f0f0f8; --muted: rgba(240,240,248,.55); --muted2: rgba(240,240,248,.3);
  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 12px; --radius-sm: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); background: var(--bg); color: var(--text); min-height: 100vh; min-height: 100dvh; line-height: 1.45; overflow-x: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo { font-family: var(--display); letter-spacing: 3px; color: var(--accent); text-shadow: 0 0 18px rgba(29,185,84,.35); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted2); margin-bottom: .75rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border2); background: var(--surface2); cursor: pointer; font-size: 14px; transition: .15s; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 500; }
.btn.primary:hover:not(:disabled) { background: var(--accent-dim); }
.btn.danger { border-color: rgba(255,71,87,.5); color: var(--hot); }
.btn.danger:hover:not(:disabled) { background: rgba(255,71,87,.12); border-color: var(--hot); }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: .9rem; }
.field > span, .field > label { font-size: 13px; color: var(--muted); }
.input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; transition: border-color .15s; }
.input:focus { border-color: var(--accent); outline: none; }
textarea.input { resize: vertical; min-height: 70px; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.switch i { position: absolute; inset: 0; background: var(--surface2); border: 1px solid var(--border2); border-radius: 100px; transition: .2s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.toggle-row:last-child { border-bottom: 0; }

.badge { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; padding: 2px 8px; border-radius: 100px; border: 1px solid var(--border2); text-transform: uppercase; white-space: nowrap; }
.badge.guest { color: var(--blue); border-color: rgba(78,205,196,.4); background: rgba(78,205,196,.12); }
.badge.host { color: var(--accent); border-color: rgba(29,185,84,.4); background: rgba(29,185,84,.12); }
.badge.bridge { color: var(--amber); border-color: rgba(255,165,2,.4); background: rgba(255,165,2,.12); }
.badge.live { color: var(--accent); border-color: var(--accent); }
.badge.off { color: var(--muted); }

.toast-host { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 500; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.5); animation: pop .2s ease-out; }
.toast.error { border-color: rgba(255,71,87,.6); }
.toast.ok { border-color: rgba(29,185,84,.6); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
