/* HideLink – schlankes Stylesheet (ersetzt Editorial-Template + FontAwesome) */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #1d2330;
  --muted: #5d6676;
  --border: #e2e6ec;
  --accent: #e8574f;
  --accent-hover: #d2443c;
  --accent-soft: #fdecea;
  --accent-text: #ffffff;
  --success: #1f8a57;
  --success-soft: #e6f5ed;
  --error: #c4352d;
  --error-soft: #fdecea;
  --info: #2f63c0;
  --info-soft: #e9f0fc;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --surface: #1a1e26;
    --surface-2: #222733;
    --text: #e8ebf1;
    --muted: #9aa3b2;
    --border: #2d3340;
    --accent: #f06a62;
    --accent-hover: #ff7d75;
    --accent-soft: #3a2124;
    --accent-text: #1a0d0c;
    --success: #4cc38a;
    --success-soft: #16301f;
    --error: #ff7b72;
    --error-soft: #3a1f1f;
    --info: #79a6ff;
    --info-soft: #1c2840;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; word-break: break-all; }
pre { background: #0f1218; color: #e6e9ef; padding: 1em 1.2em; border-radius: var(--radius-sm); overflow: auto; line-height: 1.5; }
pre code { background: none; padding: 0; word-break: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; }
.brand span b { color: var(--accent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--muted); padding: .45rem .75rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav .btn { color: var(--accent-text); }
.nav .btn:hover { background: var(--accent-hover); color: var(--accent-text); }
.lang { display: flex; gap: 2px; margin-left: .5rem; font-size: .8rem; }
.lang a { padding: .25rem .45rem; }
.lang a.active { color: var(--accent); background: var(--accent-soft); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: .4rem .55rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: .5rem 20px 1rem; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .5rem; }
  .nav .btn { margin-top: .5rem; text-align: center; justify-content: center; }
  .lang { margin: .5rem 0 0; }
}

/* ---------- Main / Footer ---------- */
main { flex: 1; padding: 2.5rem 0 4rem; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.5rem 0; font-size: .875rem; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: .7rem 1.15rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  background: var(--accent); color: var(--accent-text);
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: var(--error); filter: brightness(1.08); }
.btn-sm { padding: .4rem .7rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.25rem; }
.grid > .card + .card { margin-top: 0; }
.card h2 { font-size: 1.2rem; }
.card-danger { border-color: color-mix(in srgb, var(--error) 45%, var(--border)); }
.auth { max-width: 440px; margin: 0 auto; }
.auth .card { padding: 2rem; }
.auth h1 { font-size: 1.6rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; color: var(--muted); font-size: .95rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; font-size: 1.9rem; }
.page-head p { margin: .25rem 0 0; color: var(--muted); }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .65rem .8rem; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[disabled] { background: var(--surface-2); color: var(--muted); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-group .prefix { padding: .65rem .2rem .65rem .8rem; color: var(--muted); background: var(--surface-2); white-space: nowrap; border-right: 1px solid var(--border); padding-right: .6rem; }
.input-group input { border: 0; border-radius: 0; box-shadow: none !important; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .3rem; accent-color: var(--accent); }
.feedback { font-size: .85rem; margin-top: .35rem; min-height: 1.2em; }
.feedback.ok { color: var(--success); }
.feedback.bad { color: var(--error); }

/* Modus-Auswahl als Karten */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
@media (max-width: 720px) { .modes { grid-template-columns: 1fr; } }
.mode-option { position: relative; display: block; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; }
.mode-option .mode-body { display: block; height: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1rem; transition: border-color .15s, background .15s; }
.mode-option .mode-body strong { display: flex; align-items: center; gap: .4rem; margin-bottom: .2rem; }
.mode-option .mode-body span { display: block; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.mode-option input:checked + .mode-body { border-color: var(--accent); background: var(--accent-soft); }
.mode-option input:focus-visible + .mode-body { outline: 3px solid var(--accent); outline-offset: 2px; }

.cf-turnstile { margin: .25rem 0 1.1rem; min-height: 65px; }

/* ---------- Alerts / Badges ---------- */
.alert { border-radius: var(--radius-sm); padding: .85rem 1rem; margin-bottom: 1.25rem; border: 1px solid transparent; font-size: .95rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.alert-error { background: var(--error-soft); color: var(--error); border-color: color-mix(in srgb, var(--error) 30%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }

/* ---------- Hero / Home ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding: 1rem 0 3rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin-bottom: 1.6rem; }
.hero-img { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 2; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-demo { margin-top: 1.5rem; display: inline-flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .4rem .5rem .4rem 1rem; font-family: var(--mono); font-size: .9rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 2rem; } .hero-img { order: -1; max-height: 260px; aspect-ratio: auto; } }

.section { padding: 2.5rem 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2rem; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.feature .fi { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: .9rem; }
.feature .fi .ico { width: 22px; height: 22px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.feature h3 { display: flex; align-items: center; gap: .5rem; }
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.2rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; }
.step p { color: var(--muted); }
.cta-band { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; text-align: center; box-shadow: var(--shadow); }
.cta-band p { color: var(--muted); }
.cta-band .actions { justify-content: center; }

/* ---------- Stats / Tabellen ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat .num { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr 1fr; } .stats .stat:last-child { grid-column: span 2; } }

.toolbar { display: flex; gap: .75rem; margin-bottom: 1rem; }
.toolbar input { max-width: 320px; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.link-short { display: flex; align-items: center; gap: .4rem; font-weight: 600; font-family: var(--mono); font-size: .9rem; }
.link-target { color: var(--muted); font-size: .88rem; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.copy-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: .25rem; border-radius: 6px; display: inline-flex; }
.copy-btn:hover { color: var(--accent); background: var(--accent-soft); }
.copy-btn.copied { color: var(--success); }

@media (max-width: 720px) {
  .table-wrap { background: none; border: 0; box-shadow: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; padding: .5rem 0; }
  td { border: 0; padding: .35rem 1rem; }
  td.num { text-align: left; }
  td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .link-target { max-width: none; white-space: normal; word-break: break-all; }
  .row-actions { justify-content: flex-start; padding-top: .35rem; }
}

.empty { text-align: center; padding: 3rem 1rem; }
.empty .ico { width: 48px; height: 48px; color: var(--accent); margin: 0 auto 1rem; }

.result-box { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 1rem 0; }
.result-box a { font-family: var(--mono); font-weight: 700; font-size: 1.1rem; word-break: break-all; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-all; }

.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .5rem 0 .3rem; }
.progress > div { height: 100%; background: var(--accent); border-radius: 999px; }

.token { display: flex; gap: .5rem; align-items: center; }
.token input { font-family: var(--mono); font-size: .85rem; }

details.danger summary { cursor: pointer; color: var(--error); font-weight: 600; }
details.danger[open] summary { margin-bottom: 1rem; }

.endpoint-table td:first-child { white-space: nowrap; }
.method { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: .1rem .4rem; border-radius: 4px; background: var(--info-soft); color: var(--info); }
.method.post { background: var(--success-soft); color: var(--success); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .5rem .9rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* ---------- Redirect-Seiten (Paged View / Safe View) ---------- */
.redirect-page main { padding-top: 2rem; }
.redirect-card { max-width: 680px; margin: 0 auto; }
.redirect-target { background: var(--surface-2); border-radius: var(--radius-sm); padding: .9rem 1rem; font-family: var(--mono); word-break: break-all; margin-bottom: 1.25rem; }
.redirect-target .host { font-weight: 700; color: var(--text); }
.thumb { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); margin-bottom: 1.25rem; background: var(--surface-2); aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.safeview-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: .6rem 0; position: sticky; top: 0; z-index: 5; }
.safeview-bar .container { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; max-width: none; }
.safeview-bar .src { font-family: var(--mono); font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.safeview-bar .src b { color: var(--text); }
.safeview-note { font-size: .8rem; color: var(--muted); font-family: var(--font); }
.safeview-frame { flex: 1; width: 100%; border: 0; background: #fff; min-height: calc(100vh - 60px); display: block; }
body.safeview { display: flex; flex-direction: column; }
