:root {
  color-scheme: light dark;
  --fg: #1d1d1f;
  --bg: #f5f5f7;
  --card: #ffffff;
  --muted: #5a5a5f;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #8EC63F;
  --accent-fg: #142400;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f5f5f7;
    --bg: #1c1c1e;
    --card: #2a2a2d;
    --muted: #b5b5ba;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

/* Kopfzeile */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
header img { display: block; height: 40px; width: auto; }
.hilfe {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.hilfe:hover { border-color: var(--accent); }

main { width: min(720px, 100%); margin: 0 auto; padding: 8px 16px 32px; flex: 1; }
h1 { font-size: 1.6rem; margin: 12px 0 18px; letter-spacing: -0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Suche */
form { display: flex; gap: 8px; }
input[type="search"] {
  flex: 1;
  padding: 13px 14px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow);
}
input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button {
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.05); }

#msg { color: var(--muted); min-height: 1.4em; margin: 12px 4px; }

.hinweis-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hinweis-box p { margin: 0 0 8px; }
.hinweis-box button { padding: 9px 14px; font-size: .9rem; }

.sub { color: var(--muted); font-size: .9rem; }

/* Trefferliste */
.result {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  text-align: left;
  background: var(--card);
  color: var(--fg);
  font-weight: 400;
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform .12s ease, border-color .12s ease;
}
.result:hover { transform: translateY(-1px); border-color: var(--accent); }
.result-poster {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: var(--bg);
}
.result-text { display: flex; flex-direction: column; gap: 3px; }
.result-text strong { font-size: 1rem; }
.kein-poster { background: linear-gradient(135deg, #3a3a40, #222226); }

/* Detailansicht */
.providers {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero { position: relative; height: 180px; background: #111; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, var(--card) 100%);
}
.kopf {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  padding: 0 18px;
  margin-top: -70px;
  position: relative;
  z-index: 1;
}
.kopf-poster {
  width: 110px;
  height: 165px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  background: var(--bg);
}
.kopf-info { padding-bottom: 6px; }
.kopf-info h2 { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: -0.01em; }
.fakten { margin: 0 0 6px; color: var(--muted); font-size: .9rem; }
.frage { margin: 0; font-weight: 600; }

.inhalt { padding: 14px 18px 18px; }
.group { margin-top: 18px; }
.group h3 {
  margin: 0 0 8px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.anbieter-liste { display: flex; flex-direction: column; gap: 8px; }
.anbieter {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.anbieter-logo {
  width: 92px;
  height: 38px;
  display: flex;
  align-items: center;
  flex: none;
}
.anbieter-logo img { max-width: 92px; max-height: 38px; object-fit: contain; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}
.logo-platzhalter { font-weight: 700; color: var(--muted); }
.anbieter-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.anbieter-text strong { font-size: .98rem; }
.preis { color: var(--muted); font-size: .88rem; }
.badge {
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0b429;
  color: #1d1d1f;
  margin-top: 2px;
}
.anbieter-link {
  color: var(--fg);
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
}
.anbieter-link:hover { border-color: var(--accent); }

.hinweis {
  font-size: .82rem;
  color: var(--muted);
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

footer {
  padding: 16px;
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
footer a { color: inherit; }

@media (max-width: 480px) {
  .hero { height: 140px; }
  .kopf { gap: 14px; margin-top: -56px; }
  .kopf-poster { width: 92px; height: 138px; }
  .anbieter-link { padding: 6px 10px; }
}
