/* KDV Generator — Military glassmorphism UI */
:root {
  --overlay-color: rgba(10, 18, 12, 0.75);
  --overlay-opacity: 0.75;
  --blur-strength: 14px;
  --accent: #8fae3e;
  --base-font-size: 16px;
  --bg-image: url('../uploads/flecktarn.svg');
  --text: #e4ecda;
  --muted: #9aab90;
  --panel: rgba(14, 22, 16, 0.55);
  --line: rgba(143, 174, 62, 0.28);
  --danger: #d46a6a;
  --ok: #6fbf73;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --font-display: "Barlow", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

html[data-theme="cyber_dark"] {
  --text: #d7f6f6;
  --muted: #7ea0a8;
  --panel: rgba(8, 14, 22, 0.62);
  --line: rgba(62, 207, 207, 0.3);
}

html[data-theme="minimal_slate"] {
  --text: #e6e9ee;
  --muted: #9aa5b1;
  --panel: rgba(16, 20, 26, 0.6);
  --line: rgba(154, 165, 177, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--base-font-size);
  background: #070b08;
  line-height: 1.55;
}

.camo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: saturate(0.9) contrast(1.05);
}

.glass-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--overlay-color);
  opacity: var(--overlay-opacity);
  backdrop-filter: blur(var(--blur-strength));
  -webkit-backdrop-filter: blur(var(--blur-strength));
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  animation: rise 0.7s ease both;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.site-nav a:hover { color: var(--accent); }

.site-main { flex: 1; }
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer a {
  color: var(--muted);
  margin-right: 1rem;
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }

/* —— Cookie consent (TDDDG / DSGVO) —— */
.cookie-consent {
  position: relative;
  z-index: 80;
  pointer-events: none;
}
.cookie-consent .cookie-banner,
.cookie-consent .cookie-modal-backdrop,
.cookie-consent .cookie-banner .btn,
.cookie-consent .cookie-modal-backdrop .btn,
.cookie-consent .cookie-modal__close {
  pointer-events: auto;
}
/* Author display rules must not override the HTML hidden attribute */
.cookie-consent[hidden],
.cookie-banner[hidden],
.cookie-modal-backdrop[hidden] {
  display: none !important;
}
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: 920px;
  margin: 0 auto;
  padding: 1.15rem 1.25rem;
  display: grid;
  gap: 1rem;
  background: rgba(12, 18, 14, 0.82);
  border: 1px solid rgba(143, 174, 62, 0.35);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.cookie-banner.is-visible {
  display: grid;
}
@media (min-width: 720px) {
  .cookie-banner.is-visible,
  .cookie-banner:not([hidden]) {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}
.cookie-banner__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.cookie-banner__text {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}
.cookie-banner__legal {
  margin: 0;
  font-size: 0.82rem;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 8, 6, 0.62);
  backdrop-filter: blur(4px);
}
.cookie-modal-backdrop.is-open {
  display: grid;
}
.cookie-modal {
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 1.25rem;
  background: rgba(14, 20, 16, 0.94);
  border: 1px solid rgba(143, 174, 62, 0.3);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.cookie-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cookie-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.cookie-modal__close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.cookie-modal__close:hover { color: var(--text); }
.cookie-category {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.85rem;
}
.cookie-category legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.cookie-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.35rem 0 0.5rem;
  cursor: pointer;
}
.cookie-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}
.cookie-toggle--locked {
  opacity: 0.85;
  cursor: default;
}
.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.ad-unit.is-consent-blocked,
.ad-sandbox.is-consent-blocked,
.promo-unit.is-consent-blocked,
.promo-sandbox.is-consent-blocked {
  display: none !important;
}
html.cookie-modal-open {
  overflow: hidden;
}
.small { font-size: 0.84rem; }

.glass-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(calc(var(--blur-strength) * 0.65));
  -webkit-backdrop-filter: blur(calc(var(--blur-strength) * 0.65));
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
  animation: rise 0.85s ease both;
}

.hero-panel { padding: 2rem 1.5rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.hero-brand {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.lede { color: var(--muted); max-width: 42rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0.75rem; }
.dsgvo-consent-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1.25rem 0 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(143, 174, 62, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.dsgvo-consent-box input[type="checkbox"] {
  width: auto;
  margin-top: 0.35rem;
  flex-shrink: 0;
}
.dsgvo-consent-box label {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}
.dsgvo-consent-box a { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #10180f; }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.18);
  color: var(--text);
}
.btn-danger { background: var(--danger); color: #fff; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.step {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.55rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}
.step.is-active {
  color: #10180f;
  background: var(--accent);
  border-color: var(--accent);
}

.step-pane { display: none; animation: fade 0.35s ease; }
.step-pane.is-active { display: block; }
.hint { color: var(--muted); margin-top: -0.25rem; }

label {
  display: block;
  margin: 0.85rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(6, 10, 8, 0.65);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 90px; }
.form-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.form-status { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.9rem; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--ok); }

.dsgvo-consent-wrapper,
.dsgvo-consent-box {
  margin: 1.25rem 0 0.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(143, 174, 62, 0.35);
  border-radius: 10px;
  background: rgba(8, 14, 10, 0.72);
}
.dsgvo-consent-wrapper .form-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.dsgvo-consent-wrapper input[type="checkbox"],
.dsgvo-consent-box input[type="checkbox"] {
  margin-top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.dsgvo-consent-wrapper label,
.dsgvo-consent-box label {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}
.dsgvo-consent-wrapper a,
.dsgvo-consent-box a {
  color: #d4e27a;
  text-decoration: underline;
}

.content-panel h1 { margin-top: 0; }
.faq-item {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 0.65rem;
  background: rgba(0,0,0,0.18);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0;
}
.faq-answer { color: var(--muted); padding-bottom: 0.85rem; }

.preview-frame {
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  margin: 1rem 0 1.25rem;
}
.draft-text {
  white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
  padding: 1.25rem;
  max-height: 520px;
  overflow: auto;
}
.preview-frame.is-locked .draft-text {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  max-height: 360px;
}
.preview-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(8,12,9,0.85) 100%);
  pointer-events: none;
}
.preview-badge {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 2px solid rgba(255,255,255,0.35);
  padding: 0.6rem 1rem;
  pointer-events: none;
}
.action-grid, .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.share-box { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); }
.glass-inset { }
.alert { padding: 0.75rem 1rem; border-radius: 8px; }
.alert.ok { background: rgba(111,191,115,0.15); color: var(--ok); }
.alert.err { background: rgba(212,106,106,0.15); color: var(--danger); }
.muted { color: var(--muted); }
.legal-body :is(h1,h2,h3) { color: var(--text); }
.legal-body a { color: var(--accent); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.promo-slot,
.ad-slot {
  margin: 0.75rem 0 1rem;
  display: block;
  width: 100%;
}
.glass-promo,
.glass-ad {
  background: rgba(8, 14, 10, 0.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.65rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: visible;
  text-align: center;
}
.promo-image,
.ad-image {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border-radius: 6px;
}
.promo-html {
  text-align: left;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}
.promo-html a { color: var(--accent); }
.ad-code,
.promo-code-preview {
  overflow: auto;
  max-width: 100%;
  white-space: pre-wrap;
  font-size: 0.8rem;
}
.promo-sandbox,
.ad-sandbox {
  width: 100%;
  min-height: 90px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.promo-slot--header_top,
.ad-slot--header_top { margin-bottom: 1rem; }
.promo-slot--footer_bottom,
.ad-slot--footer_bottom { margin-top: 1rem; width: 100%; }
.promo-slot--content_top { margin: 0 0 1rem; }
.promo-slot--content_bottom { margin: 1.25rem 0 0; }
.ad-between-wrap { margin: 0.75rem 0 1rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 720px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .steps { grid-template-columns: 1fr 1fr; }
  .hero-panel { padding: 1.4rem 1.1rem; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Wizard validation */
.kdv-form .is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  outline: 2px solid var(--danger, #d46a6a);
  border-color: var(--danger, #d46a6a);
}

/* —— Gedankenhilfe / KI-Begründungsassistent —— */
.thought-assist {
  margin: 0.35rem 0 1.1rem;
  border: 1px solid rgba(143, 174, 62, 0.28);
  border-radius: 12px;
  background: rgba(8, 14, 10, 0.35);
  padding: 0.35rem 0.75rem 0.75rem;
}
.thought-assist > summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent);
  padding: 0.45rem 0;
  list-style: none;
}
.thought-assist > summary::-webkit-details-marker { display: none; }
.thought-assist__lead { font-size: 0.9rem; margin: 0.25rem 0 0.75rem; }
.thought-assist__cats,
.thought-assist__chips,
.thought-assist__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0;
}
.chip {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(16, 24, 18, 0.75);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.chip:hover,
.chip:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}
.chip[aria-pressed="true"],
.chip.is-selected {
  background: rgba(143, 174, 62, 0.22);
  border-color: var(--accent);
  color: #e8f0d8;
}
.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.chip-cat { font-weight: 600; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.thought-assist__status.is-error { color: var(--danger); }
.assist-warnings { color: var(--danger); font-size: 0.88rem; }
.assist-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.88rem;
  margin: 0.75rem 0;
}
.draft-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.draft-side {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 0.75rem;
  max-height: 280px;
  overflow: auto;
  margin: 0;
}
.compass-item { display: block; margin-bottom: 0.85rem; }
.compass-prompt { display: block; margin-bottom: 0.35rem; font-size: 0.92rem; }
.ai-privacy-dialog {
  border: 1px solid rgba(143, 174, 62, 0.35);
  border-radius: 14px;
  background: rgba(12, 18, 14, 0.96);
  color: var(--text);
  padding: 1.25rem;
  max-width: min(520px, 92vw);
}
.ai-privacy-dialog::backdrop {
  background: rgba(4, 8, 6, 0.65);
}
.pdf-confirm-form { width: 100%; }
.pdf-confirm-label { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; }
.bg-upload-box {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.bg-preview {
  width: 100%;
  min-height: 120px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.12);
  margin: 0.5rem 0;
}
.legal-note { margin-top: 0.75rem; }

/* —— SEO / Ratgeber —— */
.brand-mark {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.seo-content, .seo-guide { margin-top: 1.5rem; }
.seo-guide h2 { margin-top: 1.5rem; }
.seo-guide ul { padding-left: 1.2rem; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.feature-grid article {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.feature-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-family: var(--font-mono);
}
.internal-links a { color: var(--accent); margin-right: 0.25rem; }
.breadcrumbs {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
}
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  opacity: 0.6;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.seo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.seo-tabs a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.seo-serp-preview { margin: 1rem 0 1.5rem; }
.serp-card {
  background: #fff;
  color: #1a1a1a;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  max-width: 640px;
  font-family: Arial, sans-serif;
}
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; }
.serp-url { color: #006621; font-size: 0.85rem; margin: 0.2rem 0; }
.serp-desc { color: #4d5156; font-size: 0.9rem; line-height: 1.4; }
.seo-page-block {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

@media (max-width: 720px) {
  .draft-compare,
  .assist-scores { grid-template-columns: 1fr; }
  .thought-assist__cats .chip { font-size: 0.78rem; }
}

