/* V3in – eine Seite: Start (v3in.de), Forum (/forum/) und Key Manager (/keys/).
   Der Look von v3in.de: Violett und Cyan auf dunklem Grund, Waben-Muster,
   Chakra Petch fuer Ueberschriften. Diese Datei liegt bei Start und Keys. */

:root {
  color-scheme: dark;
  --accent: #8f7cff;
  --accent-strong: #a592ff;
  --accent-soft: rgba(143, 124, 255, 0.16);
  --cyan: #3fd3de;
  --cyan-soft: rgba(63, 211, 222, 0.14);
  --gold: #e8b84a;
  --danger: #ff5c7a;
  --danger-soft: rgba(255, 92, 122, 0.13);
  --warn: #e8b84a;
  --warn-soft: rgba(232, 184, 74, 0.14);

  --bg: #0c0a13;
  --bg-alt: #110e1a;
  --surface: #16121f;
  --surface-2: #1d1829;
  --line: rgba(165, 146, 255, 0.15);
  --line-strong: rgba(165, 146, 255, 0.32);

  --text: #ece9f7;
  --text-dim: #9d97b6;
  --text-muted: #6d6787;

  --radius: 14px;
  --radius-inner: 9px;
  --wrap: 1120px;
  --display: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66v34' fill='none' stroke='%238f7cff' stroke-opacity='.09' stroke-width='1.4'/%3E%3C/svg%3E");
  background-attachment: fixed;
}
h1, h2, h3, .btn, .nav a, .tab, .eyebrow, .chip, .stat-value, .step-n { font-family: var(--display); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
code { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--text-muted); }
.right { text-align: right; justify-content: flex-end; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Kopfzeile ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 20px;
  background: rgba(12, 10, 19, 0.94);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-logo { width: 30px; height: 30px; }
.brand-name { font: 700 22px/1 var(--display); letter-spacing: 0.06em; color: var(--accent); }
.brand-name b { color: var(--cyan); font-weight: 700; }
.brand-name.small { font-size: 16px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-dim); font-size: 13.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 8px 12px; border-radius: var(--radius-inner);
  transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); }
.nav .nav-manager { color: var(--accent-strong); border: 1px solid var(--line-strong); margin-left: 6px; }
.nav .nav-manager:hover, .nav .nav-manager.is-active { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Knoepfe und Felder ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
  padding: 10px 18px; border-radius: var(--radius-inner);
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { font-size: 13px; padding: 6px 11px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #0c0a13; }
.btn-primary:hover { background: var(--accent-strong); color: #0c0a13; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 92, 122, 0.4); }
.btn-danger:hover { background: var(--danger-soft); }

.input {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius-inner); padding: 10px 12px; width: 100%;
  transition: border-color 0.15s;
}
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--accent); }
.input-sm { padding: 7px 10px; font-size: 13px; width: auto; min-width: 150px; }
select.input { cursor: pointer; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text-dim); margin-bottom: 6px; }

/* ---------- Start ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  opacity: 0.55;
}
.hero-inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 96px 20px 84px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 18px; }
.lead { max-width: 620px; font-size: 18px; color: var(--text-dim); margin: 22px 0 26px; }

/* Der Glitch-Look des Clients: weisse Schrift, Farbversatz nach links im
   Akzent und nach rechts in Cyan, der in Takten springt - nie gleitet. */
.glitch {
  position: relative; display: inline-block;
  font-size: clamp(64px, 13vw, 148px); font-weight: 700; letter-spacing: 0.05em; line-height: 0.95;
  color: #f7f7f7;
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  pointer-events: none; z-index: -1;
}
.glitch::before { color: var(--accent); animation: split-left 2.6s steps(1) infinite; }
.glitch::after { color: var(--cyan); animation: split-right 2.6s steps(1) infinite; }
@keyframes split-left {
  0%, 100% { transform: translateX(-4px); }
  20% { transform: translateX(-12px); clip-path: inset(18% 0 52% 0); }
  24% { transform: translateX(-4px); clip-path: none; }
  62% { transform: translateX(-9px); clip-path: inset(60% 0 12% 0); }
  66% { transform: translateX(-4px); clip-path: none; }
}
@keyframes split-right {
  0%, 100% { transform: translateX(4px); }
  20% { transform: translateX(12px); clip-path: inset(40% 0 30% 0); }
  24% { transform: translateX(4px); clip-path: none; }
  62% { transform: translateX(9px); clip-path: inset(8% 0 70% 0); }
  66% { transform: translateX(4px); clip-path: none; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
  font-size: 13px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-dim);
  padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--radius-inner); background: var(--surface);
}
.chip b { color: var(--accent); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Abschnitte ---------- */

.band { padding: 76px 0; }
.band-alt { background: rgba(17, 14, 26, 0.85); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.section-sub { color: var(--text-dim); margin-top: 8px; max-width: 640px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head .input { max-width: 260px; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: var(--radius-inner); border: 1px solid;
}
.tag-visual { color: var(--text-dim); border-color: var(--line-strong); }
.tag-legit { color: var(--cyan); border-color: rgba(63, 211, 222, 0.5); }
.tag-direct { color: var(--danger); border-color: rgba(255, 92, 122, 0.5); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 32px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative;
  transition: border-color 0.15s, transform 0.15s;
}
.feature::before { content: ""; position: absolute; left: 0; top: 22px; width: 3px; height: 20px; background: var(--accent); border-radius: 0 2px 2px 0; }
.feature:nth-child(even)::before { background: var(--cyan); }
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 14.5px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 32px; }
.steps li { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-n {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  font-weight: 700; color: #0c0a13; background: var(--accent); border-radius: var(--radius-inner);
}
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { color: var(--text-dim); font-size: 14.5px; }

.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 28px; }
.config { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.config h3 { font-size: 16px; overflow-wrap: anywhere; }
.config-author { color: var(--accent); font-size: 13px; }
.config-desc { color: var(--text-dim); font-size: 14px; overflow-wrap: anywhere; }
.config-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.empty { margin-top: 28px; padding: 28px; text-align: center; color: var(--text-muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Key Manager ---------- */

.login-wrap { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 24px 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 17px; }
.card > h2 { margin-bottom: 16px; }
.card > .muted { margin: -8px 0 16px; font-size: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head .muted { font-size: 14px; margin-top: 4px; }

.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card h1 { font-size: 24px; margin: 12px 0 6px; }
.login-card form { text-align: left; margin-top: 22px; }
.login-card .btn { margin-top: 6px; }
.login-logo { width: 54px; height: 54px; }
.error-msg { color: var(--danger); font-size: 13px; min-height: 20px; margin: 8px 0 4px; }

.manager { padding-top: 34px; padding-bottom: 64px; }
.manager-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.manager-head h1 { font-size: 28px; font-weight: 800; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); }
.stat-value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value.accent { color: var(--accent); }
.stat-value.cyan { color: var(--cyan); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; }
.tab {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-dim);
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 10px 14px; cursor: pointer; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.field-check { align-self: center; }
.field-check small { display: block; font-size: 12px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.table-scroll { overflow-x: auto; margin: 0 -22px -22px; padding: 0 22px 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table th.right, .table td.right { text-align: right; }
.table td.right .row-actions { justify-content: flex-end; max-width: 300px; margin-left: auto; }
.empty-cell { text-align: center; color: var(--text-muted); padding: 26px 12px !important; }
.code-cell { display: flex; align-items: center; gap: 10px; }
.code-cell code { font-weight: 600; color: var(--text); }
.hwid { color: var(--text-dim); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: var(--radius-inner); white-space: nowrap; }
.badge-on { color: var(--accent); background: var(--accent-soft); }
.badge-off { color: var(--danger); background: var(--danger-soft); }
.badge-warn { color: var(--warn); background: var(--warn-soft); }
.badge-free { color: var(--cyan); background: var(--cyan-soft); }

.reveal {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner); padding: 12px 14px; margin-bottom: 16px; font-size: 14px;
}
.reveal code { font-size: 16px; font-weight: 700; color: var(--accent-strong); letter-spacing: 0.04em; user-select: all; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner); padding: 11px 16px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- schmale Bildschirme ---------- */

@media (max-width: 640px) {
  .topbar { padding: 0 14px; }
  .nav a { padding: 8px 8px; font-size: 13px; }
  .nav a:nth-child(1), .nav a:nth-child(3) { display: none; }
  .hero-inner { padding: 64px 16px 56px; }
  .lead { font-size: 16px; }
  .band { padding: 52px 0; }
  .section-title { font-size: 24px; }
  .wrap { padding: 0 16px; }
  .section-head .input { max-width: none; }
  .input-sm { min-width: 0; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glitch::before, .glitch::after { animation: none; }
  .btn, .feature, .toast { transition: none; }
}

/* ---------- Forum-Hinweis und Test-Fenster auf der Startseite ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: center; }
.split .feature-grid { margin-top: 0; grid-template-columns: 1fr; }
.split .btn { margin-top: 22px; }
.try-tabs { display: flex; gap: 6px; }
.try-tabs button {
  font: 600 13.5px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-inner);
  padding: 8px 14px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.try-tabs button:hover { color: var(--text); border-color: var(--line-strong); }
.try-tabs button[aria-selected="true"] { color: #0c0a13; background: var(--accent); border-color: var(--accent); }
.stage { margin-top: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.stage-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--text-muted); }
.stage-bar kbd { font: 500 12px var(--mono); color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .stage { aspect-ratio: 4 / 3; }
}

/* Freier Code auf der Download-Seite */
.free-code { margin: 0; }

/* Live-Download-Zaehler auf der Download-Seite */
.dl-counter { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-dim); font-size: 14px; }
.dl-counter b { font-family: var(--mono); font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.dl-live { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.dl-live.on { background: #3fde8a; box-shadow: 0 0 0 0 rgba(63, 222, 138, 0.6); animation: dl-pulse 2s infinite; }
.feature .dl-count { margin-top: 6px; font-size: 13.5px; color: var(--text-muted); }
.dl-count b { font-family: var(--mono); color: var(--cyan); font-variant-numeric: tabular-nums; margin-right: 1px; }
.dl-bump { display: inline-block; animation: dl-bump 0.6s ease; }
@keyframes dl-pulse { 70% { box-shadow: 0 0 0 7px rgba(63, 222, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 222, 138, 0); } }
@keyframes dl-bump { 0% { transform: scale(1); color: var(--accent-strong); } 40% { transform: scale(1.25); color: var(--accent-strong); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .dl-live.on, .dl-bump { animation: none; } }
