*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DARK MODE (Dark Refined) ─────────────────────────────────────── */
html[data-theme="dark"] {
  --bg:      #0c0e14;
  --bg2:     #131720;
  --bg3:     #1a1e2c;
  --border:  #222840;
  --accent:  #6aa3f8;
  --accent2: #1a2a4a;
  --text:    #e8edf5;
  --muted:   #8a93a8;
  --green:   #5ecb8a;
  --red:     #fd9090;
  --gold:    #f6c96b;
}

html[data-theme="dark"] nav {
  box-shadow: 0 1px 0 var(--border);
}

html[data-theme="dark"] .hero-stats {
  box-shadow: none;
}

html[data-theme="dark"] .tool-card.featured {
  background: #1a2a4a;
}
html[data-theme="dark"] .tool-card.featured:hover {
  background: #1f3260;
}

html[data-theme="dark"] .card {
  box-shadow: none;
}

html[data-theme="dark"] .modal {
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

/* ── THEME TOGGLE BUTTON ─────────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

:root {
  --bg:      #f4f6fb;
  --bg2:     #ffffff;
  --bg3:     #eef1f8;
  --border:  #dde2ee;
  --accent:  #2563eb;
  --accent2: #eff4ff;
  --text:    #111827;
  --muted:   #64748b;
  --green:   #16a34a;
  --red:     #dc2626;
  --gold:    #d97706;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── NAV ──────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  height: 58px;
  gap: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.nav-logo svg { flex-shrink: 0; }

nav a.nav-link {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
nav a.nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── HERO ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 52px 24px 44px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero-bg.png') center/cover no-repeat;
  opacity: 0.45;
  pointer-events: none;
}

html[data-theme="dark"] .hero::before {
  opacity: 0.12;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent2);
  border: 1px solid rgba(37,99,235,.2);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.18;
  margin-bottom: 14px;
}

.hero p {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-stats {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.stat {
  padding: 14px 32px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat .label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
}

/* ── MAIN ─────────────────────────────────────────────────────────── */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}

/* ── SECTION BLOCK ────────────────────────────────────────────────── */
.section-block { margin-bottom: 44px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-label h2 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}

.section-label .line { flex: 1; display: none; }

.section-label .pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent2);
  border: 1px solid rgba(37,99,235,.18);
  padding: 2px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── TOOL LIST ────────────────────────────────────────────────────── */
.tool-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

/* ── TOOL ROW ─────────────────────────────────────────────────────── */
.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--card-accent, var(--accent));
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: background .13s, box-shadow .13s;
}

.tool-card::before { display: none; }

.tool-card:hover {
  background: var(--accent2);
  box-shadow: 0 2px 10px rgba(37,99,235,.07);
  transform: none;
  border-color: var(--border);
  border-left-color: var(--card-accent, var(--accent));
}

/* Icon box */
.card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--bg3);
  border-radius: 9px;
  border: 1px solid var(--border);
}

.card-icon { font-size: 1.2rem; line-height: 1; }
.card-badge { display: none; }

.tool-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  width: 200px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card p {
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
  margin: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 0;
}

.card-tags { display: none; }

.card-arrow {
  color: var(--muted);
  font-size: 1rem;
  opacity: .4;
  transition: opacity .13s, transform .13s, color .13s;
  flex-shrink: 0;
}
.tool-card:hover .card-arrow {
  color: var(--card-accent, var(--accent));
  opacity: 1;
  transform: translateX(3px);
}

/* ── FEATURED ROW (same list-style, slightly highlighted) ──────────── */
.tool-card.featured {
  grid-column: unset;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--accent2);
  border-left-width: 3px;
}
.tool-card.featured:hover { background: #e4edfe; }

.tool-card.featured .featured-icon {
  font-size: 1.2rem;
  width: 38px;
  height: 38px;
  background: rgba(37,99,235,.1);
  border-radius: 9px;
  border: 1px solid rgba(37,99,235,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-card.featured .featured-body {
  display: contents;
}

.tool-card.featured .featured-body > .card-top {
  display: contents;
}

.tool-card.featured .featured-body > .card-top > h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  width: 200px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card.featured .featured-body > .card-top > .card-badge { display: none; }

.tool-card.featured .featured-body > p {
  font-size: 0.81rem;
  color: var(--muted);
  flex: 1;
  margin: 0;
  line-height: 1.45;
}

.tool-card.featured .featured-body > .card-footer {
  flex-shrink: 0;
}

/* ── BADGES (visible in future detail views) ───────────────────────── */
.badge-active  { background: rgba(22,163,74,.1);  color: #15803d; border: 1px solid rgba(22,163,74,.2); }
.badge-new     { background: var(--accent2);        color: var(--accent); border: 1px solid rgba(37,99,235,.2); }
.badge-hot     { background: rgba(217,119,6,.1);   color: #b45309; border: 1px solid rgba(217,119,6,.2); }

/* ── DISCLAIMER BAR (Tool-Seiten, via JS injiziert) ──────────────── */
.disclaimer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.78rem;
  padding: 7px 28px;
  line-height: 1.4;
}
html[data-theme="dark"] .disclaimer-bar {
  background: #1c1608;
  border-bottom-color: #3d2e00;
  color: #d4a650;
}

/* ── COOKIE BANNER ────────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,.09);
  padding: 16px 24px;
}
.cookie-content {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cookie-icon {
  color: var(--accent);
  flex-shrink: 0;
  opacity: .8;
}
.cookie-text {
  flex: 1;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.55;
}
.cookie-text strong {
  color: var(--text);
  display: block;
  margin-bottom: 3px;
  font-size: 0.87rem;
}
.cookie-text p { margin: 0; }
.cookie-actions { flex-shrink: 0; }
.cookie-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.cookie-btn:hover { opacity: .85; }

/* ── FOOTER ───────────────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.78rem;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── MODAL ────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.modal h3 { color: var(--accent); margin-bottom: 16px; }
.modal p, .modal li { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }
.modal ul { padding-left: 18px; margin-top: 8px; }

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }

/* ── SEARCH ───────────────────────────────────────────────────────── */
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  transition: border-color .15s;
}
.nav-search:focus-within { border-color: var(--accent); }
.nav-search svg { color: var(--muted); flex-shrink: 0; }
.nav-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.83rem;
  font-family: inherit;
  width: 160px;
}
.nav-search input::placeholder { color: var(--muted); }

.tool-card.hidden { display: none !important; }
.section-block.all-hidden .section-label,
.section-block.all-hidden .tool-grid { display: none; }

/* ── NAVIGATION: MENÜ UND BURGER ──────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

/* Nur auf schmalen Bildschirmen sichtbar */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 0 8px;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s, opacity .2s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  nav { padding: 0 16px; gap: 10px; height: 56px; }
  .nav-logo { font-size: .95rem; margin-right: 0; }
  .nav-burger { display: flex; }

  /* Menü klappt unter der Leiste auf */
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 14px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px -16px rgba(0, 0, 0, .5);
    display: none;
  }
  .nav-menu.is-open { display: flex; }

  .nav-menu .nav-search { width: 100%; margin: 6px 0 10px; }
  .nav-menu .nav-search input { width: 100%; }

  .nav-menu a.nav-link {
    padding: 12px 2px;
    font-size: .95rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu a.nav-link:hover { border-bottom-color: var(--border); }
  .nav-menu a.nav-link:last-of-type { border-bottom: none; }

  .nav-menu #konto-nav { margin-top: 10px; }
  .nav-menu .konto-chip,
  .nav-menu .konto-anmelden { display: flex; justify-content: center; padding: 10px; }
}

@media (max-width: 700px) {
  .tool-card h3 { width: auto; }
  .tool-card p { display: none; }
  .tool-card.featured .featured-body > p { display: none; }
  .hero-stats { flex-direction: column; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
}
