:root {
  --bg: #0c0817;
  --panel: #171029;
  --panel-2: #1e1633;
  --border: #302348;
  --text: #ece8f5;
  --muted: #9c92b6;
  --accent: #a78bfa;         /* helles Lila für Text/Links auf Dunkel */
  --accent-strong: #7c3aed;  /* Logo-Lila */
  --accent-deep: #4c1d95;    /* Logo-Lila, dunkles Ende */
  --logo-grad: linear-gradient(135deg, #7c3aed, #4c1d95);
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 80% -14%, #2a1358, transparent),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* Header / Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}
.mark {
  border-radius: 13px;
  display: block;
  flex: none;
  box-shadow: 0 6px 20px -6px rgba(124, 58, 237, 0.6);
}
header h1 {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--text);
}
header h1 span {
  background: linear-gradient(120deg, #a78bfa, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.tagline { color: var(--muted); margin: 0.55rem 0 0; }

.controls {
  margin: 2rem 0 1.25rem;
}

.intensity {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.2rem;
}

.intensity label { display: block; font-weight: 600; margin-bottom: 0.6rem; }
.intensity #intensity-value { color: var(--accent); font-family: var(--font-mono); }
.intensity .hint {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.intensity .hint strong { color: var(--accent); font-family: var(--font-mono); }

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-strong);
  margin: 0 0 0.75rem;
}

.presets { display: flex; gap: 0.5rem; }
.presets button {
  flex: 1;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.12s;
}
.presets button:hover { border-color: var(--accent-strong); }
.presets button.active {
  background: var(--logo-grad);
  border-color: var(--accent);
  color: #f3ecff;
}

.panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pane { display: flex; flex-direction: column; }
.pane > label, .pane-head label { font-weight: 600; margin-bottom: 0.5rem; display: block; }
.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pane-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
#copy {
  background: var(--logo-grad);
  color: #f3ecff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
#copy:hover { filter: brightness(1.15); }
#regen {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.12s, color 0.12s;
}
#regen:hover { border-color: var(--accent-strong); color: #d7c9ff; }

textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.7;
}
textarea:focus { outline: none; border-color: var(--accent-strong); }
#output { background: var(--panel-2); }

.intro {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 70ch;
}
.intro strong { color: var(--text); }

footer { margin-top: 2rem; }
footer p { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0; }
footer .fine { font-size: 0.8rem; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- Artikel-Seite ---------- */
.article {
  max-width: 700px;
  margin: 3rem auto;
  padding: 3.25rem 3rem 3.5rem;
  background: linear-gradient(180deg, rgba(30, 22, 51, 0.55), rgba(23, 16, 41, 0.35));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 80px -40px rgba(76, 29, 149, 0.7);
  position: relative;
  overflow: hidden;
}
.article::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--logo-grad);
}
.article .back {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.12s, color 0.12s;
}
.article .back:hover { border-color: var(--accent-strong); color: #d7c9ff; }
.article h1 {
  font-size: 2.1rem;
  line-height: 1.18;
  margin: 1.5rem 0 0.6rem;
  letter-spacing: -0.02em;
}
.article .lead {
  color: #c4bad9;
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.article h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.7rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent-strong);
  color: var(--text);
}
.article h3 {
  font-size: 1.12rem;
  margin: 1.9rem 0 0.4rem;
  color: var(--accent);
}
.article p { color: #d3cde3; margin: 0.7rem 0; }
.article li { color: #d3cde3; margin: 0.3rem 0; }
.article code {
  font-family: var(--font-mono);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05em 0.4em;
  font-size: 0.9em;
  color: var(--accent);
}
.article .example {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-strong);
  border-radius: 10px;
  padding: 0.95rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 1.02rem;
  margin: 1.1rem 0;
  color: #e7deff;
}
.article strong { color: var(--text); }
.article a { color: var(--accent); }
.article .footnote {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .controls, .panes { grid-template-columns: 1fr; }
  .panes { gap: 0.75rem; }
  header h1 { font-size: 2rem; }
  /* Kleinere Textfelder, damit Ein-/Ausgabe inkl. Buttons zusammen sichtbar sind */
  textarea { min-height: 110px; }
  .pane-head { flex-wrap: wrap; row-gap: 0.35rem; }
  .article { margin: 1.25rem auto; padding: 2rem 1.35rem 2.5rem; border-radius: 14px; }
  .article h1 { font-size: 1.7rem; }
}
