@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #000; --card: #0a0a0b; --raised: #111114; --line: #212126; --line-strong: #34343b;
  --ink: #fafafa; --muted: #8e8e99;
  --brand: #7c5cff; --brand-hover: #8f73ff; --brand-ink: #fff; --brand-soft: rgba(124, 92, 255, .14);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .12);
  --radius: 14px;
  --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 10px 30px -10px rgba(0,0,0,.8);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: #000; }
body {
  background: var(--bg); color: var(--ink); min-height: 100vh;
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.006em;
}
::selection { background: rgba(124, 92, 255, .45); }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 650; }
h2 { font-size: 1.25rem; } h3 { font-size: 1rem; }
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 16px 72px; }
.narrow { max-width: 440px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.brand { font-weight: 700; letter-spacing: -.03em; font-size: 1.05rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.brand i { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, #9a82ff, #6a46ff); display: inline-block; position: relative; box-shadow: 0 0 18px rgba(124, 92, 255, .55); }
.brand i::after { content: ""; position: absolute; inset: 6.5px; border-radius: 50%; background: #000; }

/* surfaces */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 60px), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
a.card { transition: border-color .15s, background .15s, transform .15s; }
a.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; left: 50%; top: -120px; width: 900px; height: 420px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(124, 92, 255, .28), transparent); pointer-events: none;
}

/* forms */
label { display: block; font-weight: 550; font-size: .85rem; margin-bottom: 6px; color: #d4d4dc; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #000; color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #55555f; }
textarea { resize: vertical; min-height: 110px; }
input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
button:focus-visible, a:focus-visible, .tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--raised); color: var(--ink);
  padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { border-color: var(--line-strong); background: #18181c; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #8f73ff, var(--brand)); border-color: rgba(255,255,255,.18); color: var(--brand-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 18px -6px rgba(124, 92, 255, .7);
}
.btn.primary:hover { background: linear-gradient(180deg, #a08aff, var(--brand-hover)); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: rgba(248,113,113,.4); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.block { width: 100%; padding: 11px 15px; }
.err { color: var(--bad); font-size: .85rem; min-height: 1.2em; }

.badge { display: inline-block; font-size: .68rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: #b3a1ff; border: 1px solid rgba(124, 92, 255, .25); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(52, 211, 153, .25); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, .25); }
.badge.gray { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line); }
.logo-sm { height: 34px; max-width: 120px; object-fit: contain; border-radius: 6px; }
.urlbox { display: flex; gap: 8px; align-items: center; }
.urlbox input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8rem; color: #c9c9d3; }
.powered { text-align: center; padding: 32px 16px 20px; color: var(--muted); font-size: .8rem; }
.powered a { color: var(--ink); font-weight: 650; text-decoration: none; }
.powered a:hover { text-decoration: underline; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* Sonner-style toasts: bottom centre, stacked, auto-dismiss */
#toaster {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  width: min(380px, calc(100vw - 24px)); pointer-events: none;
}
.sn {
  pointer-events: auto; width: 100%; display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 13px 14px; border-radius: 14px; background: #0c0c0e; border: 1px solid var(--line-strong); color: var(--ink);
  font-size: .9rem; font-weight: 500; line-height: 1.4; box-shadow: 0 16px 40px -8px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255,255,255,.03);
  animation: sn-in .35s cubic-bezier(.21, 1.02, .73, 1) both;
}
.sn.out { animation: sn-out .22s ease-in both; }
.sn svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.sn.success svg { color: var(--ok); } .sn.error svg { color: var(--bad); } .sn.info svg { color: #a592ff; }
.sn .t { flex: 1; overflow-wrap: anywhere; }
.sn .d { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; margin-top: 2px; }
@keyframes sn-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sn-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .sn, .sn.out { animation-duration: .01s; } }
