/* SpoofCheck – Ermittlungsakte für Server-Teams.
   Tinten-Blau als Grund, UV-Violett als einziger Akzent, Risikofarben nur mit Bedeutung. */

:root {
  --ink: #171d2b;
  --ink-2: #1e2638;
  --ink-3: #27324a;
  --line: #34415d;
  --text: #e4e9f3;
  --muted: #8e9ab4;
  --uv: #9d8cff;
  --uv-soft: rgba(157, 140, 255, .14);
  --high: #ff5d6c;
  --high-soft: rgba(255, 93, 108, .13);
  --mid: #f2b544;
  --mid-soft: rgba(242, 181, 68, .13);
  --low: #4fc48a;
  --low-soft: rgba(79, 196, 138, .12);
  --discord: #7b93ff;
  --steam: #8fa9cf;

  --f-display: "Bahnschrift", "DIN Alternate", "DIN Next", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #f3f5fa;
    --ink-2: #ffffff;
    --ink-3: #e8ecf5;
    --line: #cfd6e6;
    --text: #182033;
    --muted: #5d6882;
    --uv: #6a55e8;
    --uv-soft: rgba(106, 85, 232, .1);
    --high: #d42c3d;
    --high-soft: rgba(212, 44, 61, .09);
    --mid: #b07a07;
    --mid-soft: rgba(176, 122, 7, .1);
    --low: #1f8a57;
    --low-soft: rgba(31, 138, 87, .09);
    --discord: #4a63e0;
    --steam: #4c6a94;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font: 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--uv); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--uv); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: .01em; margin: 0; line-height: 1.2; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--f-mono); font-size: .84em; word-break: break-all; }
.num { font-family: var(--f-display); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ Grundgerüst */
.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px; border-right: 1px solid var(--line); background: var(--ink-2);
}
.brand { display: flex; align-items: center; gap: 10px; font: 600 1.15rem var(--f-display); color: var(--text); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-lg { font-size: 1.6rem; margin-bottom: 4px; }
.brand-mark {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--uv); position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; width: 8px; height: 3px; background: var(--uv);
  right: -8px; bottom: -4px; transform: rotate(45deg); border-radius: 2px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--muted); padding: 8px 10px; border-radius: 6px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--ink-3); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--uv-soft); box-shadow: inset 3px 0 0 var(--uv); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.main { padding: 28px 36px 64px; max-width: 1240px; width: 100%; outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; z-index: 5; height: auto; min-width: 0; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .nav { flex-direction: row; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .nav a.active { box-shadow: inset 0 -2px 0 var(--uv); }
  .side-foot { margin: 0 0 0 8px; flex-direction: row; white-space: nowrap; }
  .side-foot #me { display: none; }
  .main { padding: 20px 16px 48px; }
}

/* ------------------------------------------------ Formulare */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--uv); box-shadow: 0 0 0 3px var(--uv-soft); }
label { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
label.check input { width: 16px; height: 16px; accent-color: var(--uv); }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.form-error { color: var(--high); min-height: 1.2em; margin: 0; font-size: .9rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--ink-3);
  font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--text);
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--uv); border-color: var(--uv); color: #12101f; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--uv); }
.btn-danger { background: var(--high); border-color: var(--high); color: #fff; }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.btn-wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--uv); cursor: pointer; text-align: left; }

/* ------------------------------------------------ Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------ Suche */
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.search input {
  font-size: 1.1rem; padding: 14px 16px; border-radius: 10px; background: var(--ink-2);
}
.search .btn { border-radius: 10px; padding: 0 24px; font-size: 1rem; }
.search-opts { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 10px 2px 0; font-size: .88rem; }
.formats { color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) { .search { grid-template-columns: 1fr; } .search .btn { padding: 12px; } }

.section { margin-top: 34px; }
.section > h2 { margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section > h2 .muted { font: 400 .9rem var(--f-body); }

/* Urteil */
.verdict {
  margin-top: 26px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px;
  padding: 24px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line);
  border-left: 6px solid var(--lvl, var(--low));
}
.verdict.lvl-hoch { --lvl: var(--high); --lvl-soft: var(--high-soft); }
.verdict.lvl-mittel { --lvl: var(--mid); --lvl-soft: var(--mid-soft); }
.verdict.lvl-niedrig { --lvl: var(--low); --lvl-soft: var(--low-soft); }
.score { display: flex; flex-direction: column; }
.score-num { font: 600 5rem/0.9 var(--f-display); color: var(--lvl); font-variant-numeric: tabular-nums; }
.score-num small { font-size: 1.4rem; color: var(--muted); font-weight: 400; margin-left: 2px; }
.score-lvl { margin-top: 10px; font: 600 1.15rem var(--f-display); color: var(--lvl); }
.score-what { margin-top: 6px; color: var(--muted); font-size: .85rem; }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.reasons li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.reasons li:last-child { border-bottom: 0; }
.reasons .pts { font: 600 1rem var(--f-display); font-variant-numeric: tabular-nums; text-align: right; }
.reasons .r-high .pts { color: var(--high); }
.reasons .r-medium .pts { color: var(--mid); }
.reasons .r-low .pts, .reasons .r-info .pts { color: var(--muted); }
.reasons-empty { color: var(--muted); padding-top: 6px; }
@media (max-width: 680px) {
  .verdict { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .score { flex-direction: row; align-items: baseline; gap: 14px; flex-wrap: wrap; }
  .score-num { font-size: 3.6rem; }
  .score-lvl { margin: 0; }
}

/* Verbund */
.web { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .web { grid-template-columns: 1fr; } }
.graph { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.graph svg { display: block; width: 100%; height: auto; }
.graph .node circle { fill: var(--ink-3); stroke: var(--line); stroke-width: 2; }
.graph .node.seed circle { stroke: var(--uv); stroke-width: 3; }
.graph .node.banned circle { fill: var(--high-soft); stroke: var(--high); }
.graph .node text { fill: var(--text); font: 600 12px var(--f-display); }
.graph .node .ini { fill: var(--muted); font-size: 13px; }
.graph .node.banned .ini { fill: var(--high); }
.graph .edge { stroke-width: 2.5; fill: none; }
.graph .e-token { stroke: var(--uv); stroke-width: 3.5; }
.graph .e-discord { stroke: var(--discord); }
.graph .e-steam { stroke: var(--steam); }
.graph .e-other { stroke: var(--muted); }
.graph .e-ip { stroke: var(--muted); stroke-dasharray: 4 5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 6px 8px 4px; font-size: .8rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: currentColor; }
.legend .l-token { color: var(--uv); } .legend .l-discord { color: var(--discord); } .legend .l-steam { color: var(--steam); }
.legend .l-other { color: var(--muted); }
.legend .l-banned::before { width: 10px; height: 10px; border-radius: 50%; background: transparent; border: 2px solid var(--high); }
.legend .l-banned { color: var(--muted); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .82rem; }
.facts dd { margin: 2px 0 0; font: 600 1.35rem var(--f-display); font-variant-numeric: tabular-nums; }
.facts dd.date { font: 500 .95rem var(--f-body); }
.facts .warn { color: var(--mid); }
.facts .bad { color: var(--high); }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--ink-2); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: .8rem; background: var(--ink-3); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--ink-3); }
tr.row-banned td:first-child { box-shadow: inset 3px 0 0 var(--high); }
td.nowrap, th.nowrap { white-space: nowrap; }
.names b { font-weight: 600; }
.names .alias { display: block; color: var(--muted); font-size: .82rem; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--ink-3); color: var(--muted); white-space: nowrap; }
.chip.c-token { background: var(--uv-soft); color: var(--uv); }
.chip.c-discord { background: rgba(123, 147, 255, .14); color: var(--discord); }
.chip.c-steam { background: rgba(143, 169, 207, .14); color: var(--steam); }
.share { margin-bottom: 4px; }
.share-to { color: var(--muted); font-size: .8rem; margin-right: 4px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 5px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.b-high { background: var(--high-soft); color: var(--high); }
.b-mid { background: var(--mid-soft); color: var(--mid); }
.b-low { background: var(--low-soft); color: var(--low); }
.b-uv { background: var(--uv-soft); color: var(--uv); }
.b-plain { background: var(--ink-3); color: var(--muted); }

.copy { cursor: copy; border-bottom: 1px dotted var(--muted); }
.copy:hover { color: var(--uv); }

.ban-bar { margin-top: 12px; padding: 16px; border-radius: 8px; border: 1px dashed var(--line); }
.ban-bar .form-row { grid-template-columns: minmax(200px, 2fr) minmax(140px, 1fr) auto auto; }
@media (max-width: 760px) { .ban-bar .form-row { grid-template-columns: 1fr; } }

/* Personen (Discord / Steam) */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.person { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--ink-2); }
.person-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--ink-3); flex: none; object-fit: cover; display: grid; place-items: center; font: 600 1.1rem var(--f-display); color: var(--muted); }
.person-head .who { min-width: 0; }
.person-head .who b { display: block; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.hits { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.hits li { padding: 8px 10px; border-radius: 6px; background: var(--high-soft); font-size: .88rem; }
.hits li b { color: var(--high); }
.hits li.past { background: var(--mid-soft); }
.hits li.past b { color: var(--mid); }
.recheck { margin-top: 12px; }
h3.sub { margin: 22px 0 10px; font-size: 1rem; }
details.mini { margin-top: 10px; font-size: .88rem; }
details.mini > summary { cursor: pointer; color: var(--uv); }
details.mini ul { margin: 8px 0 0; padding-left: 18px; }
details.mini .msgs { margin-top: 8px; }
.keybox { margin: 0 0 24px; padding: 16px 18px; }
.keybox p { margin: 6px 0 10px; }
.alias { display: inline; }

/* Nachrichten */
.msgs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 12px 14px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); }
.msg-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.msg-meta .who { color: var(--text); font-weight: 600; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg-body mark { background: var(--mid-soft); color: var(--mid); border-radius: 3px; padding: 0 2px; }

details.fold { border: 1px solid var(--line); border-radius: 8px; background: var(--ink-2); }
details.fold > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > .fold-body { padding: 0 14px 14px; }
.idlist { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: .88rem; }
.idlist dt { color: var(--muted); }
.idlist dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }

/* Startseite */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-top: 28px; border-top: 1px solid var(--line); }
.stat { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.stat b { display: block; font: 600 1.9rem var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.alert b { color: var(--high); }

.empty { padding: 28px; text-align: left; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--uv-soft); font-size: .9rem; margin-top: 16px; }
.note.warn { background: var(--mid-soft); }
.note.bad { background: var(--high-soft); }
.note.ok { background: var(--low-soft); }
details.import { margin-top: 12px; }
details.import > summary { cursor: pointer; color: var(--uv); font-size: .9rem; }
details.import textarea { min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.inv-info { margin-top: 8px; max-width: 46ch; line-height: 1.4; }
details.fold-mini { margin-top: 6px; }
details.fold-mini > summary { cursor: pointer; }
.bad-users { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.bad-users a { word-break: break-all; }
.allow-bar { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.allow-bar input { flex: 1 1 200px; min-width: 0; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; color: var(--muted); font-size: .88rem; }
.tabs button.active { background: var(--uv-soft); color: var(--uv); border-color: transparent; }

.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.dot.on { background: var(--low); } .dot.off { background: var(--high); } .dot.warn { background: var(--mid); }

.progress { height: 6px; background: var(--ink-3); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; width: 40%; background: var(--uv); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.loading { padding: 40px 0; color: var(--muted); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--uv); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--high); color: #fff; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.panel { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: var(--ink-2); }
.panel h2 { margin-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Verifizierungsseite */
.verify-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.verify-card { width: min(440px, 100%); padding: 32px 28px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); }
.verify-card h1 { margin-bottom: 10px; }
.verify-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; background: var(--uv-soft); color: var(--uv); margin-bottom: 16px; }
.verify-mark.ok { background: var(--low-soft); color: var(--low); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.inline-form { grid-template-columns: minmax(160px, 220px) max-content; }
@media (max-width: 560px) { .inline-form { grid-template-columns: 1fr; } }

dialog.bl-dialog { background: var(--ink-2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: min(440px, calc(100vw - 32px)); }
dialog.bl-dialog::backdrop { background: rgba(8, 10, 20, .65); }
dialog.bl-dialog form { display: flex; flex-direction: column; gap: 12px; }
dialog.bl-dialog h3 { margin: 0; font-size: 1.05rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.lang-select { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: .8rem; margin-top: 8px; }
.login-box .lang-select { align-self: center; }
