/* ============================================================
   Track & Short — „Signals Console"
   Midnight-Navy, Glasmorphismus, Cyan/Amber, Radar-Sweep.
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900; font-stretch: 62.5% 125%; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plexmono-600.woff2') format('woff2');
  font-weight: 600; font-display: swap;
}

:root {
  --bg: #070B15;
  --bg2: #0B1120;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --cyan: #2DE1E6;
  --cyan-soft: rgba(45, 225, 230, .14);
  --amber: #FBBF24;
  --rose: #FB7185;
  --green: #34D399;
  --text: #EAEEF7;
  --muted: #8B94AB;
  --muted-2: #5A6377;
  --radius: 16px;
  --max: 1180px;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Archivo', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1100px 600px at 82% -8%, rgba(45, 225, 230, .10), transparent 60%),
    radial-gradient(900px 520px at 8% 12%, rgba(80, 90, 255, .09), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--cyan); color: #041014; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.mono { font-family: var(--mono); }

/* dünnes Grid im Hintergrund */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  opacity: .5;
}
.page { position: relative; z-index: 1; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--cyan); color: #04121a; padding: 8px 14px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 21, .72);
  border-bottom: 1px solid var(--line);
  transition: transform .3s ease;
}
.site-header.hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; position: relative; flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, #123, #04101a);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
}
.brand-mark::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.brand-name { font-weight: 800; font-stretch: 84%; letter-spacing: .01em; font-size: 1.12rem; }
.brand-name span { color: var(--cyan); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-tag {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  display: inline-flex; align-items: center; gap: 7px;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.ghost-link { font-family: var(--mono); font-size: .82rem; color: var(--muted); padding: 7px 12px; border-radius: 8px; }
.ghost-link:hover { color: var(--text); background: var(--panel); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 13px 22px; font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  background: var(--panel-2); color: var(--text); cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s, box-shadow .12s;
}
.btn:hover { border-color: var(--line-strong); background: rgba(255,255,255,.09); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #2DE1E6, #1AB6C4);
  color: #04141a; border: 0; font-weight: 800;
  box-shadow: 0 8px 26px -8px rgba(45, 225, 230, .6);
}
.btn-primary:hover { box-shadow: 0 12px 34px -8px rgba(45, 225, 230, .8); }
.btn-sm { padding: 8px 14px; font-size: .82rem; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero / Create ---------- */
.hero { padding: 64px 0 40px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--cyan); }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 850; font-stretch: 78%;
  line-height: .98; letter-spacing: -.01em; margin-bottom: 22px;
}
.hero h1 .glow { color: var(--cyan); text-shadow: 0 0 34px rgba(45, 225, 230, .5); }
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 44ch; margin-bottom: 30px; }

.create-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: 20px; padding: 26px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.9);
  backdrop-filter: blur(8px);
}
.field-label { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; display: block; }
.input {
  width: 100%; background: rgba(4, 8, 16, .7); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 15px 16px; color: var(--text); font-size: 1rem;
  font-family: var(--mono); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); outline: none; }
select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238B94AB' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.field-hint { font-family: var(--mono); font-size: .74rem; color: var(--muted-2); margin-top: 8px; line-height: 1.4; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alias-wrap { display: flex; align-items: stretch; }
.alias-prefix {
  display: flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: .86rem;
  color: var(--muted); background: rgba(4,8,16,.7); border: 1px solid var(--line-strong); border-right: 0;
  border-radius: 12px 0 0 12px; white-space: nowrap;
}
.alias-wrap .input { border-radius: 0 12px 12px 0; }
.create-hint { font-family: var(--mono); font-size: .74rem; color: var(--muted-2); margin-top: 14px; text-align: center; }
.form-error {
  color: var(--rose); font-size: .86rem; margin-top: 12px; font-family: var(--mono);
  min-height: 1.2em;
}

/* Ergebnis nach dem Kürzen */
.result { margin-top: 20px; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.result-row {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: rgba(4, 8, 16, .6); border: 1px solid var(--line-strong); border-radius: 12px;
  margin-bottom: 10px;
}
.result-row .rl-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.result-row .rl-val { font-family: var(--mono); font-size: .92rem; color: var(--text); word-break: break-all; }
.result-row.short .rl-val { color: var(--cyan); font-weight: 600; }
.result-row.dash .rl-val { color: var(--amber); }
.copy-btn {
  flex-shrink: 0; background: var(--panel-2); border: 1px solid var(--line-strong);
  color: var(--text); border-radius: 9px; padding: 9px 13px; font-size: .8rem; cursor: pointer;
  font-family: var(--mono); transition: background .12s;
}
.copy-btn:hover { background: rgba(255,255,255,.1); }
.copy-btn.done { color: var(--green); border-color: var(--green); }
.result-note {
  font-size: .82rem; color: var(--muted); margin-top: 6px; line-height: 1.5;
  border-left: 2px solid var(--amber); padding-left: 12px;
}

/* ---------- Feature-Zeile ---------- */
.features { padding: 30px 0 70px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.feature .ic { font-size: 1.4rem; margin-bottom: 10px; }
.feature h3 { font-size: .98rem; font-weight: 750; margin-bottom: 5px; }
.feature p { font-size: .84rem; color: var(--muted); }

/* ---------- Dashboard ---------- */
.dash { padding: 34px 0 80px; }
.dash-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; }
.dash-title .eyebrow { margin-bottom: 12px; }
.dash-title h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-stretch: 80%; font-weight: 820; }
.dash-target { font-family: var(--mono); font-size: .86rem; color: var(--muted); margin-top: 6px; word-break: break-all; }
.dash-target b { color: var(--cyan); font-weight: 600; }
.dash-expiry { font-family: var(--mono); font-size: .76rem; color: var(--amber); margin-top: 10px; }
.dash-expiry::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-right: 7px; vertical-align: middle; box-shadow: 0 0 6px var(--amber); }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; position: relative; overflow: hidden;
}
.stat::after { content: ''; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px; border-radius: 50%; background: var(--cyan-soft); filter: blur(14px); }
.stat .v { font-family: var(--mono); font-size: 2rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.stat .l { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.stat.hits .v { color: var(--cyan); }
.stat.bots .v { color: var(--muted); }

.dash-body { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }

/* Map-Panel */
.map-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: sticky; top: 84px;
}
.map-panel h2 { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.map-scope { position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, #0a1220 0%, #050A14 70%); border: 1px solid var(--line); }
.map-scope svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graticule { stroke: rgba(45,225,230,.10); stroke-width: .6; fill: none; vector-effect: non-scaling-stroke; }
.map-land { fill: rgba(90,120,165,.14); stroke: rgba(120,160,210,.42); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-nogeo .graticule { stroke: rgba(45,225,230,.18); }

/* Pins (konstante Größe, unabhängig vom Zoom) */
.pin-layer { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; width: 12px; height: 12px; transform: translate(-50%, -50%); pointer-events: auto; }
.pin .core { position: absolute; inset: 3.5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.pin .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--amber); opacity: .5; }
.pin.fresh .ring { animation: ripple 1.4s ease-out 3; }
.pin.newest { width: 15px; height: 15px; z-index: 3; }
.pin.newest .core { background: #fff; box-shadow: 0 0 8px var(--amber), 0 0 16px var(--amber); }
.pin.newest .ring { border-color: var(--amber); animation: ripple 2s ease-out infinite; opacity: 1; }
@keyframes ripple { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }
.pin-label {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  font-family: var(--mono); font-size: .68rem; white-space: nowrap; color: var(--text);
  background: rgba(6,12,22,.86); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
  opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.pin.newest .pin-label, .pin:hover .pin-label { opacity: 1; }

/* Karten-Steuerung */
.map-ctrl { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.map-btn {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--muted);
  background: rgba(6,12,22,.72); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 10px; cursor: pointer; backdrop-filter: blur(6px);
  transition: color .15s ease, border-color .15s ease, transform .1s ease;
}
.map-btn:hover { color: var(--cyan); border-color: rgba(45,225,230,.5); }
.map-btn:active { transform: scale(.95); }
.map-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.map-legend { display: flex; gap: 14px; margin-top: 12px; font-family: var(--mono); font-size: .72rem; color: var(--muted); flex-wrap: wrap; }

/* Klick-Feed */
.feed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.feed-head h2 { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.feed-live { font-family: var(--mono); font-size: .72rem; color: var(--green); display: inline-flex; align-items: center; gap: 7px; }
.feed { display: flex; flex-direction: column; gap: 12px; }

.click-card {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .2s;
}
.click-card:hover { border-color: var(--line-strong); }
.click-card.new { animation: flashin .8s ease; }
@keyframes flashin { from { border-color: var(--amber); box-shadow: 0 0 24px -6px var(--amber); } }
.cc-main { display: flex; gap: 14px; padding: 15px 16px; cursor: pointer; align-items: flex-start; }
.cc-flag { font-size: 1.7rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.cc-body { flex: 1; min-width: 0; }
.cc-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cc-ip { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--text); }
.cc-time { font-family: var(--mono); font-size: .76rem; color: var(--muted); margin-left: auto; }
.cc-loc { font-size: .9rem; color: var(--muted); margin-top: 3px; }
.cc-loc b { color: var(--text); font-weight: 600; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted);
}
.tag.hl { color: var(--cyan); border-color: rgba(45,225,230,.3); }
.tag.warn { color: var(--amber); border-color: rgba(251,191,36,.35); }
.tag.bot { color: var(--rose); border-color: rgba(251,113,133,.35); }
.cc-toggle { font-family: var(--mono); font-size: .72rem; color: var(--cyan); flex-shrink: 0; margin-top: 2px; }

.cc-detail { border-top: 1px dashed var(--line); padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.cc-detail.open { max-height: 900px; padding: 14px 16px 16px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-family: var(--mono); font-size: .8rem; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); word-break: break-all; }
.headers-block { margin-top: 12px; }
.headers-block summary { font-family: var(--mono); font-size: .76rem; color: var(--cyan); cursor: pointer; }
.headers-pre {
  margin-top: 8px; background: #04080F; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; font-family: var(--mono); font-size: .74rem; color: var(--muted);
  white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto;
}

.empty-feed { text-align: center; padding: 50px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.empty-feed .ic { font-size: 2.4rem; margin-bottom: 12px; opacity: .7; }
.empty-feed .mono { color: var(--cyan); }

/* ---------- Toast + Diverses ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #0E1626; border: 1px solid var(--line-strong); color: var(--text);
  padding: 12px 20px; border-radius: 11px; font-size: .9rem; z-index: 200;
  box-shadow: 0 20px 50px -20px #000; animation: rise .25s ease; font-family: var(--mono);
}
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--cyan); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-load { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 80px 20px; color: var(--muted); font-family: var(--mono); font-size: .88rem; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .78rem; color: var(--muted-2); }

.legal-note {
  font-size: .8rem; color: var(--muted-2); max-width: 60ch; margin: 0 auto; text-align: center;
  padding: 0 22px 40px;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .dash-body { grid-template-columns: 1fr; }
  .map-panel { position: static; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero { padding: 40px 0 24px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .header-tag { display: none; }
  .cc-time { margin-left: 0; width: 100%; }
}
