:root {
  --bg: #0c1018;
  --panel: #151b27;
  --panel2: #1c2433;
  --line: #273042;
  --text: #e7ecf3;
  --muted: #8a97ab;
  --accent: #2bd576;
  --home: #3b82f6;
  --draw: #94a3b8;
  --away: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #16203a 0%, var(--bg) 55%) fixed;
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(12,16,24,.85); backdrop-filter: blur(8px); z-index: 5;
}
.brand { font-weight: 800; font-size: 19px; letter-spacing: .3px; }
.ball { margin-right: 6px; }
.status { font-size: 13px; color: var(--muted); }
.status .live { color: var(--accent); }
.status .demo { color: var(--away); }

main { max-width: 920px; margin: 0 auto; padding: 26px 18px 60px; }
.lead { color: var(--muted); line-height: 1.6; max-width: 720px; }
.lead strong { color: var(--text); }

.tabs { display: flex; gap: 8px; margin: 22px 0 14px; }
.tab {
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.tab.active { background: var(--panel2); color: var(--text); border-color: #3a4a66; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.hidden { display: none; }

.matchup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.team-pick { position: relative; }
.team-pick label, .neutral { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.vs { align-self: center; font-size: 22px; color: var(--muted); padding-top: 22px; }
input[type=text], input[type=date] {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 15px;
}
input:focus { outline: none; border-color: var(--home); }

.suggestions {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 10;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  margin-top: 4px; overflow: hidden; display: none;
}
.suggestions.show { display: block; }
.suggestions div {
  padding: 9px 12px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 9px;
}
.suggestions div:hover { background: #243049; }
.suggestions img { width: 20px; height: 20px; object-fit: contain; }
.chosen { margin-top: 8px; font-size: 14px; color: var(--accent); min-height: 18px; }
.chosen img { width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }

.neutral { margin: 16px 0 6px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.neutral input { width: auto; }

.go {
  margin-top: 14px; background: var(--accent); color: #06210f; border: none;
  padding: 12px 22px; border-radius: 10px; font-weight: 800; font-size: 15px; cursor: pointer;
}
.go:hover { filter: brightness(1.06); }
.go:disabled { opacity: .5; cursor: default; }

.date-row { display: flex; gap: 10px; align-items: center; }
.date-row .go { margin-top: 0; }
.fixtures { margin-top: 16px; display: grid; gap: 8px; }
.fixture {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; cursor: pointer;
}
.fixture:hover { border-color: var(--home); }
.fixture .lg { font-size: 12px; color: var(--muted); }
.fixture .teams { font-weight: 600; }

/* Ergebnis */
.result { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
}
.headline { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.headline .name { font-size: 20px; font-weight: 800; }
.headline .score {
  font-size: 34px; font-weight: 900; letter-spacing: 1px;
  background: var(--panel2); padding: 6px 18px; border-radius: 12px; border: 1px solid var(--line);
}
.verdict { text-align: center; margin: 14px 0 4px; font-size: 16px; }
.verdict .fav { color: var(--accent); font-weight: 800; }
.verdict .clarity { color: var(--muted); }

.bar { display: flex; height: 42px; border-radius: 10px; overflow: hidden; margin: 18px 0 6px; border: 1px solid var(--line); }
.bar > div { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #08111c; min-width: 0; }
.seg-home { background: var(--home); }
.seg-draw { background: var(--draw); }
.seg-away { background: var(--away); }
.bar-legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.bar-legend b { color: var(--text); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .grid2, .matchup { grid-template-columns: 1fr; } .vs { display: none; } }

h3 { margin: 0 0 12px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border: none; }
.kv .k { color: var(--muted); }
.form-str span { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 5px; font-weight: 800; font-size: 12px; margin-right: 3px; }
.form-str .W { background: var(--accent); color: #06210f; }
.form-str .D { background: var(--draw); color: #1a2030; }
.form-str .L { background: var(--danger); color: #fff; }

.scores { display: flex; gap: 8px; flex-wrap: wrap; }
.scores .s { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 14px; }
.scores .s b { font-size: 16px; }

.explain { line-height: 1.7; white-space: pre-wrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); margin-left: 8px; vertical-align: middle; }

.notice { background: #2a230f; border: 1px solid #5b4a1a; color: #f3d98a; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.error { background: #2a1414; border: 1px solid #5b1a1a; color: #f3a0a0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }

.h2h-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.h2h-row:last-child { border: none; }
.muted { color: var(--muted); }
.spinner { text-align: center; color: var(--muted); padding: 30px; }

/* Recherche-Umbau: Hinweis, Loader, Quellen, Vorbehalte, Sicherheit */
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.loader {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner p { margin: 4px 0; }

.conf { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.c-high { background: #133a22; color: var(--accent); border: 1px solid #1d5a35; }
.c-mid  { background: #3a330f; color: #f3d98a; border: 1px solid #5b4a1a; }
.c-low  { background: #3a1414; color: #f3a0a0; border: 1px solid #5b1a1a; }

.bullets { margin: 0; padding-left: 18px; line-height: 1.7; }
.bullets li { margin-bottom: 4px; }

.caveats { border-color: #5b4a1a; background: #221d0c; }
.caveats h3 { color: #f3d98a; }

.sources { margin: 0; padding-left: 22px; line-height: 1.6; }
.sources li { margin-bottom: 7px; }
.sources a { color: #8ab4ff; text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources .url { color: var(--muted); font-size: 12px; margin-left: 8px; }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 22px; border-top: 1px solid var(--line); }
