/* IconGod.com – PDF-Werkzeuge – iLovePDF-Style Theme (hell, rot, Kachel-Icons) */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e7ee;
  --text: #2b2f3a;
  --text-muted: #6b7280;
  --accent: #e5322d;
  --accent-hover: #c72925;
  --accent-soft: rgba(229, 50, 45, 0.08);
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --footer-bg: #262b38;
  --footer-text: #b7bdc9;
  --radius-card: 14px;
  --radius-input: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 33, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 24, 33, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---------- Header / Nav ---------- */
header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 20;
  box-shadow: var(--shadow-sm);
}
header.site-header .logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
header.site-header .logo span { color: var(--accent); }
header.site-header nav { display: flex; align-items: center; }
header.site-header nav a {
  color: var(--text-muted);
  margin-left: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
header.site-header nav a:hover { color: var(--text); }
header.site-header nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
header.site-header nav a.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 999px;
  border-bottom: none !important;
  margin-left: 24px;
  box-shadow: var(--shadow-sm);
}
header.site-header nav a.nav-cta:hover { background: var(--accent-hover); }

.breadcrumb {
  max-width: 860px;
  margin: 18px auto 0;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.breadcrumb a { color: var(--text-muted); }

/* ---------- Layout ---------- */
main.tool-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

h1 { font-size: 1.9rem; margin: 6px 0 6px; font-weight: 800; letter-spacing: -0.01em; }
.tool-sub { color: var(--text-muted); margin-bottom: 18px; }

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.3);
  color: var(--success);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 22px;
  font-weight: 600;
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #f3b6b3;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.dropzone .icon { font-size: 2.4rem; margin-bottom: 10px; display: block; }
.dropzone p { color: var(--text-muted); }
.dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
}
.dropzone-label {
  display: inline-block;
  margin-top: 14px;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(229, 50, 45, 0.35);
}

/* ---------- Options / cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-top: 18px;
}

.option-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.option-row label {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  background: var(--surface);
}
.option-row input[type="radio"] { margin-right: 6px; }
.option-row label:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

button.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(229, 50, 45, 0.35);
  transition: background .15s ease, transform .1s ease;
}
button.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
button.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

button.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
button.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Progress ---------- */
.progress-wrap { margin-top: 16px; display: none; }
.progress-wrap.active { display: block; }
.progress-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .2s ease;
}
.progress-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ---------- Result ---------- */
.result-card {
  display: none;
  margin-top: 18px;
  padding: 22px;
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: var(--radius-card);
}
.result-card.active { display: block; }
.result-title { color: var(--success); font-weight: 800; margin-bottom: 8px; font-size: 1.1rem; }
.result-stats { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 14px; }

/* ---------- Error / warning ---------- */
.msg-error, .msg-warning {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-input);
  font-size: 0.9rem;
}
.msg-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--danger);
}
.msg-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92660b;
}
.msg-error.active, .msg-warning.active { display: block; }

/* ---------- Thumbnail grid (merge / organize / crop) ---------- */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.thumb-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: 10px;
  padding: 6px;
  cursor: grab;
  text-align: center;
}
.thumb-item.dragging { opacity: .4; }
.thumb-item canvas, .thumb-item img { width: 100%; border-radius: 6px; display: block; }
.thumb-item .thumb-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.thumb-item .thumb-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff; border: none; border-radius: 50%;
  width: 20px; height: 20px; font-size: 12px; cursor: pointer; line-height: 1;
}

/* ---------- Ad slot ---------- */
.ad-slot {
  margin: 26px 0;
  min-height: 90px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  background: var(--surface);
}
.ad-slot::before { content: "Anzeige"; }

/* ---------- Guide / FAQ ---------- */
.guide { margin-top: 34px; }
.guide h2 { font-size: 1.3rem; margin-bottom: 10px; }
.guide ol { color: var(--text-muted); padding-left: 20px; }
.faq-item { border-top: 1px solid var(--border); padding: 14px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: var(--text-muted); margin-top: 8px; }

.field-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin: 12px 0 6px; }
.text-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}

/* ---------- Related tools (internal cross-linking) ---------- */
.related-tools {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related-tools h2 { font-size: 1.15rem; margin-bottom: 14px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.related-card:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-sm); }
.related-emoji { font-size: 1.1rem; }

/* =========================================================
   HOMEPAGE — iLovePDF-Style Hero + Kategorie-Tabs + Kacheln
   ========================================================= */
.hero {
  text-align: center;
  padding: 56px 20px 28px;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 620px;
  margin: 0 auto;
}
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }

.tab-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1040px;
  margin: 30px auto 6px;
  padding: 0 20px;
}
.tab-bar button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
}
.tab-bar button:hover { border-color: var(--accent); color: var(--accent); }
.tab-bar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(229, 50, 45, 0.3);
}

.home-wrap { max-width: 1040px; margin: 0 auto; padding: 20px 20px 80px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.tool-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tool-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.tool-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
}
.tool-tile-text h3 { margin: 2px 0 4px; font-size: 1rem; color: var(--text); font-weight: 700; }
.tool-tile-text p { margin: 0; color: var(--text-muted); font-size: 0.83rem; line-height: 1.4; }
.tool-tile .new-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: var(--success);
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
}

.section-title {
  margin: 46px 0 4px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.section-sub { color: var(--text-muted); margin: 0 0 6px; font-size: 0.92rem; }

.premium-band {
  margin-top: 50px;
  background: linear-gradient(135deg, #2b2f3a, #1b1e27);
  color: #fff;
  border-radius: 18px;
  padding: 34px;
  text-align: center;
}
.premium-band h2 { margin: 0 0 8px; font-size: 1.5rem; }
.premium-band p { color: #c6cad3; max-width: 520px; margin: 0 auto 18px; }
.premium-band a.btn-primary { display: inline-block; text-decoration: none; }

/* ---------- Rich footer (iLovePDF-Style) ---------- */
footer.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 46px 24px 24px;
  margin-top: 60px;
  font-size: 0.85rem;
}
footer.site-footer .footer-grid {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  text-align: left;
}
footer.site-footer .footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
footer.site-footer .footer-col a {
  display: block;
  color: var(--footer-text);
  margin: 0 0 9px;
  font-size: 0.85rem;
}
footer.site-footer .footer-col a:hover { color: #fff; }
footer.site-footer .footer-bottom {
  max-width: 1040px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #8b92a3;
  font-size: 0.8rem;
}

/* Simple footer fallback (used inline on 404 etc. if needed) */
footer.site-footer.simple {
  text-align: center;
  padding: 26px 20px;
}
footer.site-footer.simple a { display: inline-block; margin: 0 8px; color: var(--footer-text); }

/* ---------- Besucherzähler (Footer) ---------- */
.visitor-stats {
  max-width: 1040px;
  margin: 26px auto 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  color: var(--footer-text);
  font-size: 0.85rem;
}
.visitor-stats[hidden] { display: none; }
.visitor-stats strong { color: #fff; font-variant-numeric: tabular-nums; }
.visitor-stats .vs-item { display: inline-flex; align-items: center; gap: 6px; }
.visitor-stats .vs-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: vsPulse 2s infinite;
}
@keyframes vsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@media (prefers-reduced-motion: reduce) { .visitor-stats .vs-dot { animation: none; } }
