/* Copyright (c) 2026 Patrick Zeriadtke. Alle Rechte vorbehalten. */
/* zLink – Oberfläche in den Farben von World of Bytes (world-of-bytes.de), nur dunkel. */

:root {
  --bg: #07090D;
  --surface: #0E131B;
  --raised: #121924;
  --ink: #E8ECF3;
  --muted: #98A2B3;
  --line: #1E2733;
  --accent: #B1C740;
  --accent-ink: #07090D;
  --blue-hi: #3FA9D9;
  --brand-grad: linear-gradient(100deg, #B1C740, #6BA942 45%, #3FA9D9);
  --ok: #6BA942;
  --bad: #FF4D4D;
  --mark: #F2B544;
  --f-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--f-body);
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue-hi); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 1.15rem; margin: 28px 0 8px; }
code { font-family: var(--f-mono); font-size: 0.9em; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Rahmen ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: calc(12px + var(--safe-top)) 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand { font-size: 1.4rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.brand span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { color: var(--ink); }
.top nav a.active { color: var(--ink); background: var(--raised); }

.page { max-width: 880px; margin: 0 auto; padding: 24px 20px calc(40px + var(--safe-bottom)); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card.narrow { max-width: 440px; margin: 0 auto; }

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin: 4px 0 12px; }
.hint.filters ul { margin: 4px 0 8px; padding-left: 1.2em; }
.hint.filters li { margin: 2px 0; }
.hint.filters p { margin: 4px 0; }
.error { color: var(--bad); }
.ok { color: var(--ok); }

/* ---------- Formulare ---------- */

form { display: grid; gap: 14px; margin: 16px 0; }
label { display: grid; gap: 6px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-weight: 400;
}
textarea { font-family: var(--f-mono); font-size: 0.9rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #5E6878; }
fieldset.kinds { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
fieldset.kinds legend { font-weight: 600; padding: 0 6px; }
label.radio { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 32px; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--raised);
  font-weight: 600; color: var(--ink); text-decoration: none;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn[hidden] { display: none; }
.link { border: 0; background: none; color: var(--blue-hi); padding: 0; text-decoration: none; }
.link:hover { text-decoration: underline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Anmelden und Registrieren ---------- */

.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.providers { display: grid; gap: 10px; margin: 16px 0 0; }
.providers .btn { width: 100%; }
.provider-slot { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
.provider-slot[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--muted); font-size: 0.9rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
input.code { font-family: var(--f-mono); font-size: 1.3rem; letter-spacing: 0.4em; text-align: center; }
.links { display: flex; gap: 8px 20px; flex-wrap: wrap; margin: 0; }

/* ---------- Links ---------- */

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
}
.item-main { display: grid; gap: 4px; min-width: 0; flex: 1 1 320px; }
.item-main .title { font-size: 1.1rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.item-main .muted { overflow-wrap: anywhere; font-size: 0.9rem; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shortlink { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin: 4px 0; }
.shortlink code, .shortlink a { color: var(--accent); overflow-wrap: anywhere; }

form.query { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
form.search { grid-template-columns: 1fr auto; }

/* ---------- Treffer ---------- */

mark { background: var(--mark); color: #1F1606; border-radius: 3px; padding: 0 2px; }
.lines { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.lines li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; overflow-wrap: anywhere; }
.scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; }
.grid { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { background: var(--surface); color: var(--muted); font-weight: 600; white-space: nowrap; }
.grid tr:last-child td { border-bottom: 0; }
.count { font-size: 0.9rem; }
.page.result { max-width: 1100px; }

/* ---------- Statistik ---------- */

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.figure { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.figure strong { display: block; font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.figure span { display: block; font-size: 0.85rem; }
.head.sub { margin: 28px 0 8px; align-items: baseline; }
.head.sub h2 { margin: 0; }
.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.chip { border: 1px solid var(--line); border-radius: 999px; background: var(--raised); padding: 6px 12px; min-height: 36px; }
.chip:hover { border-color: var(--muted); }
.grid td .link { text-align: left; overflow-wrap: anywhere; font-family: var(--f-mono); font-size: 0.9em; }
.grid td.num, .grid th.num { text-align: right; white-space: nowrap; }
.grid td.bar { width: 25%; min-width: 80px; }
.grid td.bar span { display: block; height: 10px; min-width: 2px; border-radius: 5px; background: var(--blue-hi); }

/* ---------- Zwischenseite mit Werbung ---------- */

.page.ad { max-width: 760px; text-align: center; }
.page.ad .target { color: var(--accent); overflow-wrap: anywhere; margin: 0 0 20px; }
.adslot {
  position: relative; min-height: 280px; margin: 0 0 20px; padding: 28px 12px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.wob-mark { display: inline-block; margin: 0 0 12px; border-radius: 50%; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s; }
.wob-mark img { display: block; width: 96px; height: 96px; filter: drop-shadow(0 8px 24px rgba(63, 169, 217, 0.25)); }
.wob-mark:hover { transform: rotate(-12deg) scale(1.06); filter: brightness(1.1); }
@media (prefers-reduced-motion: reduce) { .wob-mark, .wob-mark:hover { transition: none; transform: none; } }
/* Mehrere Banner (AdMaven, Adsterra) nebeneinander, auf schmalen Bildschirmen untereinander */
.adslot.loaded { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.adslot .zl-ad-content { display: contents; }
.zl-ad-frame { display: block; max-width: 100%; border: 0; background: transparent; }
.adlabel { position: absolute; top: 8px; left: 12px; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

#blazor-error-ui { position: fixed; inset: auto 0 0 0; padding: 12px 20px; background: var(--bad); color: #fff; z-index: 10; }
#blazor-error-ui a { color: #fff; }

@media (max-width: 560px) {
  .card { padding: 18px; }
  .item-actions .btn { flex: 1 1 auto; }
  form.search { grid-template-columns: 1fr; }
}

/* ---------- Einwilligungs-Hinweis für Statistik und Werbung (consent.js) ---------- */

/* Im Stil des Hinweises auf World-of-Bytes.de */
.zl-consent {
  position: fixed; z-index: 1000;
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + var(--safe-bottom));
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 400px; padding: 22px 22px 16px; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--ink); text-align: left; font-family: var(--f-body);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: zl-consent-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* Farbverlauf-Streifen oben wie das Logo */
.zl-consent::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #6BA942, #B1C740, #3FA9D9, #2B7BB9);
}
.zl-consent.zl-consent-out { animation: zl-consent-out 0.3s ease-in both; }
@keyframes zl-consent-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes zl-consent-out { to { opacity: 0; transform: translateY(24px) scale(0.97); } }

.zl-consent-h {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 800 1.55rem/1.05 "Barlow Condensed", "Arial Narrow", var(--f-body); letter-spacing: -0.01em;
}
/* Der Keks wackelt beim Erscheinen und wenn man über das Banner fährt */
.zl-consent-cookie { display: inline-block; font-size: 1.6rem; transform-origin: 50% 60%; animation: zl-cookie-wobble 1.2s ease-in-out 0.5s 1; }
.zl-consent:hover .zl-consent-cookie { animation: zl-cookie-wobble 0.9s ease-in-out infinite; }
@keyframes zl-cookie-wobble {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg) scale(1.08); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(3deg); }
}

.zl-consent p { margin: 0; color: #C9D0DB; font-size: 0.95rem; line-height: 1.5; }
.zl-consent p a { color: var(--blue-hi); white-space: nowrap; }

.zl-consent .zl-consent-yes {
  width: 100%; min-height: 54px; font-size: 1.15rem; border: 0; cursor: pointer; color: #06110A;
  background: linear-gradient(100deg, #B1C740, #6BA942 45%, #3FA9D9);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, #B1C740 60%, transparent);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}
.zl-consent .zl-consent-yes:hover {
  transform: translateY(-1px); filter: brightness(1.08);
  box-shadow: 0 14px 36px -12px color-mix(in srgb, #3FA9D9 70%, transparent);
}
.zl-consent .zl-consent-yes span { display: inline-block; transition: transform 0.25s; }
.zl-consent .zl-consent-yes:hover span { transform: translateX(4px); }
.zl-consent .zl-consent-no { justify-self: center; font-size: 0.8rem; color: var(--muted); cursor: pointer; }
.zl-consent .zl-consent-no:hover { color: var(--ink); text-decoration: underline; }

@media (min-width: 641px) {
  .zl-consent { left: auto; right: 16px; width: 360px; }
  .zl-consent-h { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .zl-consent, .zl-consent.zl-consent-out, .zl-consent-cookie, .zl-consent:hover .zl-consent-cookie { animation: none; }
}

/* Pfeil auf „Einwilligen“ (Zwischenseite, bis zur Entscheidung); Lage setzt consent.js */
.zl-consent-arrow {
  position: fixed; z-index: 1001; width: 40px; height: 40px; pointer-events: none;
  color: var(--accent); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.zl-consent-arrow svg { display: block; }
.zl-consent-arrow.to-right { animation: zl-nudge-right 0.9s ease-in-out infinite; }
.zl-consent-arrow.to-down svg { transform: rotate(90deg); }
.zl-consent-arrow.to-down { animation: zl-nudge-down 0.9s ease-in-out infinite; }
@keyframes zl-nudge-right { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(4px); } }
@keyframes zl-nudge-down { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .zl-consent-arrow.to-right, .zl-consent-arrow.to-down { animation: none; } }
#zl-wait.pending { color: var(--ink); font-weight: 600; max-width: 440px; margin-inline: auto; }

/* ---------- Rechtliche Seiten und Fußzeile ---------- */

.legal-links { text-align: center; padding: 8px 16px calc(24px + var(--safe-bottom)); font-size: 0.85rem; }
.legal-links a { color: var(--muted); }
.page.legal { max-width: 760px; line-height: 1.6; }
.page.legal h2 { font-size: 1.15rem; margin: 2em 0 0.4em; }
.page.legal li { margin: 0.3em 0; }
.page.legal .draft { border: 1px solid var(--mark); border-radius: 10px; padding: 0.8em 1em; color: var(--mark); }
.todo { background: #5a3b00; color: #ffd27a; padding: 0.1em 0.35em; border-radius: 4px; }
.consent-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; margin: 12px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.consent-state p { margin: 0; flex-basis: 100%; }
.consent-state[hidden] { display: none; }
