/* QR-Code-Generator – Toolseite */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.page-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  position: relative;
  z-index: 10;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.header {
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
}

/* ---------- Layout: Formular + Vorschau ---------- */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .qr-layout { grid-template-columns: 1fr; }
}

/* ---------- Typ-Tabs ---------- */
.qr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.qr-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: all 0.25s ease;
}

.qr-tab:hover { color: var(--text-main); border-color: rgba(59, 130, 246, 0.4); }

.qr-tab.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary-color);
  color: #fff;
}

.qr-tab:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ---------- Felder ---------- */
.field { margin-bottom: 1.15rem; }

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.field input[type="text"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  box-sizing: border-box;
}

.field textarea { min-height: 96px; resize: vertical; }

.field select option { background: #0f172a; color: #fff; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.field input:disabled { opacity: 0.45; cursor: not-allowed; }

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.hint a { color: var(--primary-color); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.checkbox-row input { width: 18px; height: 18px; accent-color: var(--primary-color); }

/* ---------- Optionen ---------- */
.qr-options {
  border-top: 1px solid var(--glass-border);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.qr-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.color-field { display: flex; align-items: center; gap: 0.6rem; }

.color-field input[type="color"] {
  width: 46px;
  height: 40px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
}

.color-field span { font-size: 0.82rem; color: var(--text-muted); }

.qr-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

.qr-preset {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
}

.qr-preset:hover { color: #fff; border-color: var(--primary-color); }

input[type="range"] { width: 100%; accent-color: var(--primary-color); }

.qr-logo-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.qr-logo-row input[type="file"] { font-size: 0.82rem; color: var(--text-muted); max-width: 100%; }

#qr-logo-name { font-size: 0.78rem; color: var(--text-muted); }

#qr-logo-remove {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
}

/* ---------- Vorschau ---------- */
.qr-preview-card {
  position: sticky;
  top: 96px;
  text-align: center;
}

.qr-preview-box {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin-bottom: 1rem;
}

.qr-preview-box svg { width: 100%; height: auto; max-width: 280px; display: block; }

.qr-empty {
  color: #64748b;
  font-size: 0.88rem;
  padding: 2rem 1rem;
}

#qr-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.2em;
}

.qr-actions { display: grid; gap: 0.6rem; }

.btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(59, 130, 246, 0.3); }

.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  transition: all 0.25s ease;
  width: 100%;
}

.btn-ghost:hover { border-color: var(--primary-color); color: #fff; }

.btn-ghost:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.qr-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  color: #fcd34d;
  font-size: 0.8rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  text-align: left;
}

.qr-warning p { margin: 0 0 0.5rem; }
.qr-warning p:last-child { margin-bottom: 0; }

.qr-payload-wrap { margin-top: 1rem; text-align: left; }

.qr-payload-wrap label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

#qr-payload {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  min-height: 64px;
  padding: 0.6rem 0.75rem;
  resize: vertical;
  box-sizing: border-box;
}

/* ---------- CTA & Textblöcke ---------- */
.cta-box {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.cta-box h3 { color: #fff; font-size: 1.5rem; margin: 0 0 0.75rem; }
.cta-box p { color: rgba(255, 255, 255, 0.9); margin: 0 0 1.5rem; }

.btn-white {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  color: var(--primary-hover);
  font-weight: 700;
  padding: 0.85rem 2rem;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.btn-white:hover { transform: translateY(-2px); }

.tool-text-panel h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.tool-text-panel h3 { font-size: 1.15rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.tool-text-panel p, .tool-text-panel li { color: #cbd5e1; }
.tool-text-panel a { color: var(--primary-color); }

.faq-item {
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
}

.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin-top: 0.5rem; }

.use-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.use-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem;
}

.use-card h3 { font-size: 1rem; margin: 0 0 0.4rem; color: var(--text-main); }
.use-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.data-table th, .data-table td {
  border-bottom: 1px solid var(--glass-border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.data-table th { color: var(--primary-color); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.data-table td { color: #cbd5e1; }

.table-scroll { overflow-x: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  /* Auf schmalen Displays steht die Vorschau unter dem Formular –
     dort ist "sticky" nur stoerend. */
  .qr-preview-card { position: static; }
}

/* ---------- USP-Leiste unter der H1 ---------- */
.qr-usp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.qr-usp li {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 99px;
  color: #bfdbfe;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
}

.qr-usp li::before {
  content: "✓";
  margin-right: 0.4rem;
  color: var(--ok);
}

/* ---------- Logo-Block (eigener Schritt) ---------- */
.qr-logo-block {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.09), rgba(59, 130, 246, 0.03));
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 16px;
  margin-top: 1.5rem;
  padding: 1.5rem;
}

.qr-logo-block .card-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.qr-logo-flag {
  background: var(--ok);
  border-radius: 99px;
  color: #052e21;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  text-transform: none;
}

.qr-logo-lead {
  color: #cbd5e1;
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

/* Eigener Auslöser statt des unscheinbaren Datei-Dialogs */
.qr-logo-choose {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  transition: background 0.25s ease, transform 0.25s ease;
}

.qr-logo-choose:hover { background: rgba(59, 130, 246, 0.25); transform: translateY(-1px); }

#qr-logo { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

#qr-logo:focus-visible + #qr-logo-name,
#qr-logo:focus + #qr-logo-name { outline: none; }

.qr-logo-block .qr-logo-row:focus-within .qr-logo-choose {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
