:root{
  --bg0:#070a12;
  --bg1:#0b1020;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.10);
  --text:#eef2ff;
  --muted:#aab3d6;
  --good:#56f0b5;
  --bad:#ff5c7a;
  --accent:#7c5cff;
  --accent2:#24d2ff;
}

*{ box-sizing:border-box; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; }
html,body{ height:100%; }
body{
  margin:0; color:var(--text);
  background: radial-gradient(1200px 800px at 15% 10%, rgba(124,92,255,.35), transparent 55%),
              radial-gradient(900px 700px at 80% 20%, rgba(36,210,255,.25), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(800px 500px at 20% 15%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(700px 500px at 75% 25%, rgba(36,210,255,.14), transparent 60%);
  pointer-events:none;
  filter: blur(0px);
}

a{ color:inherit; text-decoration:none; }
code{ background: rgba(0,0,0,.25); border:1px solid var(--stroke); padding:2px 7px; border-radius:10px; }

.shell{
  min-height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  padding:28px 16px;
}

.brandbar{
  text-align:center;
  margin-bottom:18px;
}
.brand{
  font-weight:800;
  letter-spacing:.5px;
  font-size:22px;
}
.sub{
  color:var(--muted);
  font-size:13px;
  margin-top:4px;
}

.container{ max-width:980px; margin:28px auto; padding:0 16px; }

.top{
  position:sticky; top:0; z-index:30;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  background: rgba(10,14,26,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}
.top-left{ display:flex; gap:10px; align-items:center; }
.brandmini{ font-weight:800; letter-spacing:.4px; }
.pill{
  font-size:12px; color:var(--muted);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  padding:6px 10px; border-radius:999px;
}

.top-right{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.link{
  font-size:13px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid transparent;
  color:var(--muted);
}
.link:hover{
  color:var(--text);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.link.danger{ color: rgba(255,92,122,.95); }
.link.danger:hover{ border-color: rgba(255,92,122,.25); background: rgba(255,92,122,.08); }

.card{
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  margin: 12px auto;
}

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media(max-width:880px){ .grid2{ grid-template-columns:1fr; } }

.center{ text-align:center; }

.title{ margin:0; font-size:28px; letter-spacing:.2px; }
.subtitle{ margin:10px 0 0; color:var(--muted); line-height:1.6; }

.h2{ margin:0 0 10px; font-size:18px; }

.form{ margin-top:14px; }
.field{ margin-top:12px; }
label{ display:block; margin-bottom:7px; color:var(--muted); font-size:13px; }

.input, input{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}
.input:focus, input:focus{
  border-color: rgba(124,92,255,.45);
  box-shadow: 0 0 0 4px rgba(124,92,255,.12);
}

.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  width:100%;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
  margin-top:14px;
}
.btn:hover{ background: rgba(255,255,255,.10); }

.btn-primary{
  border-color: rgba(124,92,255,.40);
  background: linear-gradient(90deg, rgba(124,92,255,.34), rgba(36,210,255,.18));
}
.btn-primary:hover{
  background: linear-gradient(90deg, rgba(124,92,255,.42), rgba(36,210,255,.22));
}

.toast{
  margin-top:14px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  font-size:13px;
}
.toast-ok{
  border-color: rgba(86,240,181,.28);
  background: rgba(86,240,181,.08);
}
.toast-error{
  border-color: rgba(255,92,122,.28);
  background: rgba(255,92,122,.10);
}

.kv{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.kv > div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.k{ color:var(--muted); font-size:13px; }
.v{ font-weight:700; font-size:13px; }
.badge{
  border:1px solid rgba(124,92,255,.35);
  background: rgba(124,92,255,.12);
  padding:4px 10px;
  border-radius:999px;
}

.ok{ color: var(--good); font-weight:800; }
.muted{ color: var(--muted); }

.list{ display:grid; gap:10px; margin-top:12px; }
.item{
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size:13px;
}

.row{
  display:flex;
  gap:10px;
  margin-top:14px;
}
@media(max-width:560px){ .row{ flex-direction:column; } }

.preview{ margin-top:14px; }
.out{
  margin-top:10px;
  min-height:70px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.avatar{
  width:48px; height:48px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
}

.flagbox{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}
.flagtitle{ font-weight:900; letter-spacing:.4px; margin-bottom:10px; }
.flagmono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:13px;
  color: var(--text);
  word-break: break-word;
}
.hidden{ display:none; }

.shot{
  margin:14px 0 6px;
  padding:12px;
  border-radius:18px;
  border:1px dashed rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}

.footer{
  margin-top:16px;
  color: rgba(170,179,214,.65);
  font-size:12px;
}