:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --text: #1c2026;
  --muted: #5f6873;
  --border: #dde1e6;
  --accent: #0f766e;
  --accent-text: #ffffff;
  --badge-bg: #e6f4f2;
  --badge-text: #0b5c56;
  --eu-bg: #e8eefc;
  --eu-text: #1d3f8f;
  --deal-bg: #fff4d6;
  --deal-text: #7a4b00;
  --best-bg: #15803d;
  --best-text: #ffffff;
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a;
    --surface: #1b2027;
    --text: #e8ebef;
    --muted: #9aa4b0;
    --border: #2c333d;
    --accent: #2dd4bf;
    --accent-text: #062b27;
    --badge-bg: #133a36;
    --badge-text: #8ef0e2;
    --eu-bg: #1c2b4d;
    --eu-text: #a9c2ff;
    --deal-bg: #4a3505;
    --deal-text: #ffd98a;
    --best-bg: #22c55e;
    --best-text: #05290f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

main, .hero, footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero { padding-top: 48px; padding-bottom: 24px; text-align: center; }
.logo { margin: 0; font-size: 2.4rem; letter-spacing: -0.02em; }
.logo a { display: inline-flex; align-items: center; color: inherit; text-decoration: none; border-radius: var(--radius); }
.logo a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.logo span { color: var(--accent); }
.logo__mark { width: 1.5em; height: 1.5em; margin-right: 0.15em; flex: none; overflow: visible; }
.logo__device { fill: var(--text); }
.logo__cloud { fill: var(--accent); transition: transform 0.4s ease; }
.logo a:hover .logo__cloud { transform: translate(2px, -3px); }
@media (prefers-reduced-motion: reduce) {
  .logo__cloud { transition: none; }
}
.tagline { margin: 4px 0 24px; color: var(--muted); }

.search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.combo { position: relative; flex: 1; min-width: 0; display: flex; }
.search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}
.suggest[hidden] { display: none; }
.suggest__item { padding: 8px 16px; cursor: pointer; font-weight: 600; }
.suggest__item .typed { font-weight: 400; }
.suggest__item:hover, .suggest__item[aria-selected="true"] { background: var(--badge-bg); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 8px; }
.tabs[hidden] { display: none; }
.tab {
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.corrected { margin: 12px 0 0; color: var(--muted); }

.api-missing {
  margin: 16px 0;
  padding: 12px 16px;
  color: var(--deal-text);
  background: var(--deal-bg);
  border-radius: var(--radius);
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

section { margin: 32px 0; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.status { margin: 0; color: var(--muted); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); }
.filters select {
  margin-top: 2px;
  padding: 6px 8px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Filter-Seitenleiste links neben den Treffern */
.results-layout--facets { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.facets {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.facets[hidden] { display: none; }
.facets__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.facets__head h2 { margin: 0; font-size: 1.05rem; }
.facets__head h2:focus { outline: none; }
.facets__toggle { display: none; width: 100%; }
.facet { margin: 0; padding: 10px 0 0; border: 0; }
.facet + .facet { margin-top: 10px; border-top: 1px solid var(--border); }
.facet legend { float: left; width: 100%; margin-bottom: 6px; padding: 0; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.facet__option { clear: left; display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 0.92rem; cursor: pointer; }
.facet__option input { flex: none; width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.facet__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.facet__count { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.link-btn { padding: 2px 0; font: inherit; font-size: 0.85rem; color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.facet .link-btn { clear: left; margin-top: 4px; }

@media (max-width: 760px) {
  .results-layout--facets { display: block; }
  .facets { position: static; max-height: none; margin-bottom: 16px; padding: 0; background: none; border: 0; }
  .facets__toggle { display: block; }
  .facets__head, .facets__body { display: none; }
  .facets--open { padding: 14px; background: var(--surface); border: 1px solid var(--border); }
  .facets--open .facets__head { display: flex; margin-top: 12px; }
  .facets--open .facets__body { display: block; }
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card a:hover h3 { text-decoration: underline; }
.card__img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.placeholder { font-size: 2.5rem; opacity: 0.4; }
.img-note {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 1px 6px;
  font-size: 0.7rem;
  color: #fff;
  background: rgb(0 0 0 / 0.55);
  border-radius: 4px;
}
.card__body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 0.95rem; font-weight: 500; }
.price { margin: auto 0 0; font-weight: 700; }
.old-price { margin-left: 8px; font-weight: 400; color: var(--muted); }
.unit { font-size: 0.8rem; color: var(--muted); }

.deal {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--deal-text);
  background: var(--deal-bg);
  border-radius: 6px;
}
.deal--best { background: var(--best-bg); color: var(--best-text); }
.deal--inline { position: static; align-self: flex-start; }

.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge {
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--badge-text);
  background: var(--badge-bg);
  border-radius: 999px;
}
.badge--eu { color: var(--eu-text); background: var(--eu-bg); }

.video-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.video { display: flex; gap: 16px; }
.video__thumb { position: relative; flex: 0 0 240px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video__duration { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; font-size: 0.75rem; color: #fff; background: rgb(0 0 0 / 0.75); border-radius: 4px; }
.video__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.video__body a { color: inherit; text-decoration: none; }
.video__body a:hover h3 { text-decoration: underline; }
.video h3 { margin: 0; font-size: 1rem; }
.video p { margin: 0; }
.video__stats { font-size: 0.85rem; }

#news-status { margin-bottom: 20px; }
.news-group + .news-group { margin-top: 28px; }
.news-group > .muted { margin: -8px 0 12px; }
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.news { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.news a { color: inherit; text-decoration: none; }
.news a:hover h3 { text-decoration: underline; }
.news h3 { margin: 0 0 4px; font-size: 1rem; }
.news p { margin: 0; }

.empty { color: var(--muted); }

.link-group h3 { font-size: 0.9rem; color: var(--muted); margin: 16px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}
.chip:hover { border-color: var(--accent); }

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.info-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.info-list a { font-weight: 600; }
.info-list p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 0.85rem; }

.criteria { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.criteria summary { cursor: pointer; font-weight: 600; }
.source-list { padding-left: 18px; }
.source-list li { margin: 4px 0; }

footer { padding-bottom: 32px; color: var(--muted); font-size: 0.85rem; text-align: center; }
footer a { color: inherit; }

.legal { max-width: 760px; padding-top: 32px; padding-bottom: 24px; }
.legal h1 { margin: 8px 0 16px; }
.legal h2 { margin: 28px 0 8px; font-size: 1.1rem; }
.legal p, .legal li { overflow-wrap: break-word; }
/* Platzhalter, die vor der Veröffentlichung ersetzt werden müssen */
.todo { padding: 0 4px; background: var(--deal-bg); color: var(--deal-text); border-radius: 4px; }
.age-gate__legal { margin: 16px 0 0; font-size: 0.85rem; color: var(--muted); }
.age-gate__legal a { color: inherit; }

.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.contact-form input, .contact-form textarea {
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-form .btn { align-self: flex-start; }
.contact-form[hidden] { display: none; }
/* Falle für Bots: für Menschen unsichtbar, aber nicht display:none */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { padding: 12px 14px; border-radius: var(--radius); background: var(--badge-bg); color: var(--badge-text); }
.contact-status--error { background: var(--deal-bg); color: var(--deal-text); }

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(0 0 0 / 0.65);
}
.age-gate[hidden] { display: none; }
.age-gate__box { max-width: 420px; padding: 24px; background: var(--surface); border-radius: var(--radius); }
.age-gate__box h2 { margin-top: 0; }
.age-gate__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

@media (max-width: 480px) {
  .logo { font-size: 1.9rem; }
  .search { flex-direction: column; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .video { flex-direction: column; gap: 8px; }
  .video__thumb { flex-basis: auto; }
}
