:root {
  --bg: #0e0f14;
  --surface: #1a1b24;
  --surface2: #22243a;
  --surface3: #2a2d42;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --green-light: #22c55e;
  --yellow: #ca8a04;
  --red: #dc2626;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #2d2f45;
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
}

/* HEADER */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-ball { font-size: 22px; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }
.date-label { color: var(--text-muted); font-size: 13px; }
.source-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.source-badge.live { background: rgba(22,163,74,0.2); color: var(--green-light); border-color: var(--green); }
.btn-refresh {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}
.btn-refresh:hover { background: var(--surface3); }
.btn-refresh.spinning { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* MAIN */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* SECTION */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* FINAL SLIP */
.final-section {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 0 24px rgba(37,99,235,0.12);
}
.final-section .section-header h2 {
  color: var(--accent);
  font-size: 17px;
}
.final-meta { display: flex; align-items: center; gap: 10px; }
#final-count { color: var(--text-muted); font-size: 13px; }
.btn-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.btn-clear:hover { border-color: var(--red); color: var(--red); }

/* Slip items */
#slip-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.slip-item {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-left: 3px solid var(--accent);
}
.slip-item-left { flex: 1; min-width: 0; }
.slip-game { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.slip-tip { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slip-odds-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.slip-odds {
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  min-width: 48px;
  text-align: center;
}
.slip-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s;
  line-height: 1;
}
.slip-remove:hover { color: var(--red); }

/* Slip footer */
.slip-footer { border-top: 1px solid var(--border); padding-top: 14px; }
.odds-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.odds-label { color: var(--text-muted); font-size: 12px; }
.odds-value { font-size: 16px; font-weight: 700; }
.odds-value strong { color: var(--accent); font-size: 20px; }
.odds-eq { color: var(--text-dim); }
.stake-row { display: flex; align-items: center; gap: 10px; }
.stake-input {
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 16px;
  font-weight: 700;
  width: 80px;
  text-align: center;
}
.stake-input:focus { outline: none; border-color: var(--accent); }
.stake-currency { color: var(--text-muted); }
.stake-arrow { color: var(--text-dim); }
.potential-win { font-size: 20px; color: var(--green-light); }
.disclaimer { font-size: 11px; color: var(--text-dim); margin-top: 8px; }

/* AUTO PICKS */
#auto-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.btn-auto {
  background: var(--accent);
  color: white;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-auto:hover { background: var(--accent-hover); }

.auto-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.auto-pick-card {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.auto-pick-card:hover { border-color: var(--accent); }
.auto-pick-card.selected { border-color: var(--accent); background: rgba(37,99,235,0.1); }
.auto-pick-card .check {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 14px;
  display: none;
}
.auto-pick-card.selected .check { display: block; color: var(--accent); }
.auto-league { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.auto-teams { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.auto-tip { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.auto-odds-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 20px;
}
.auto-conf { font-size: 11px; color: var(--text-dim); float: right; margin-top: 3px; }

/* FILTER */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.search-input, .sort-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
}
.search-input { width: 200px; }
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus, .sort-select:focus { outline: none; border-color: var(--accent); }
.sort-select { cursor: pointer; }

/* MATCHES GRID */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

/* MATCH CARD */
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.match-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.match-card.selected {
  border-color: var(--accent);
  background: rgba(37,99,235,0.06);
}
.match-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: white;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-league { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.card-country { font-size: 10px; color: var(--text-muted); text-transform: none; letter-spacing: 0; opacity: 0.85; }
.card-time { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.card-teams {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}
.vs-sep { color: var(--text-dim); font-weight: 400; font-size: 12px; margin: 0 4px; }
.score-pred { font-size: 11px; color: var(--text-dim); margin-bottom: 12px; }

/* Prognose-Balken */
.prob-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.prob-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  transition: flex 0.6s ease;
  min-width: 0;
}
.prob-bar-1 { background: var(--green); }
.prob-bar-x { background: var(--yellow); }
.prob-bar-2 { background: #7c3aed; }
.prob-bar span { white-space: nowrap; overflow: hidden; }

/* Stats row */
.card-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--surface2);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-pill strong { color: var(--text); }

/* Neo.bet Filter Checkbox */
.neo-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.2s;
  border: 1px solid var(--border);
}
.neo-filter-label:hover {
  background: var(--surface3);
  color: var(--text);
}
.neo-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.neo-filter-text {
  font-weight: 500;
}
.neo-filter-label:has(.neo-checkbox:checked) {
  background: linear-gradient(135deg, #22c55e20 0%, #16a34a20 100%);
  border-color: var(--green);
  color: var(--green);
}

/* Neo.bet Status Badge */
.neo-status {
  font-size: 12px;
}
.neo-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.neo-badge.live {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}
.neo-badge.offline {
  background: var(--surface3);
  color: var(--text-muted);
}

/* Neo.bet Filter Checkbox */
  background: linear-gradient(135deg, #22c55e20 0%, #16a34a20 100%);
  border-color: var(--green);
  color: var(--green);
}

/* Source badges (Doppelquellen-Validierung) */
.source-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.source-badge.dual {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}
.source-badge.single {
  background: var(--surface3);
  color: var(--text-muted);
}

/* Confidence emoji in card-tip */
.conf-emoji {
  font-size: 10px;
  margin-right: 4px;
  filter: saturate(1.2);
}

/* High confidence card highlight */
.match-card.high-conf {
  border-left: 3px solid var(--green);
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.15);
}
.match-card.high-conf .card-tip {
  color: var(--text);
}

/* Card action row */
.card-action {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.card-tip {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.4;
}
.card-tip strong { color: var(--text); }
.card-odds {
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background 0.2s;
}
.match-card:hover .card-odds { background: var(--accent-hover); }
.match-card.selected .card-odds { background: var(--green); }

/* Confidence bar */
.conf-bar {
  height: 2px;
  border-radius: 2px;
  margin-bottom: 8px;
  background: var(--surface3);
}
.conf-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--green-light));
  transition: width 0.6s ease;
}

/* LOADING */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
}
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

/* League divider */
.league-divider {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  margin-top: 4px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

@media (max-width: 640px) {
  main { padding: 12px; }
  .matches-grid { grid-template-columns: 1fr; }
  .auto-picks { grid-template-columns: 1fr 1fr; }
  .search-input { width: 140px; }
}

/* ——— EMPFOHLENER SCHEIN ——— */
.recommended-section {
  background: linear-gradient(135deg, #1a1f35 0%, #0f172a 100%);
  border: 1px solid #3b4a6b;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rec-icon { font-size: 20px; }

.rec-target-badge {
  background: #1d4ed8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.btn-adopt {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-adopt:hover { background: var(--green-light); }

.rec-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.rec-pick-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rec-pick-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rec-pick-league {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-pick-time {
  font-size: 11px;
  color: var(--text-muted);
}

.rec-pick-teams {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.rec-pick-bet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.rec-pick-tip {
  font-size: 12px;
  color: var(--green-light);
  font-weight: 500;
}

.rec-pick-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec-pick-prob {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.prob-high { background: #166534; color: #4ade80; }
.prob-med  { background: #854d0e; color: #fde047; }
.prob-low  { background: #7f1d1d; color: #fca5a5; }

.rec-pick-odds-val {
  font-size: 14px;
  font-weight: 700;
  color: #60a5fa;
}
.rec-pick-odds-val.odds-live { color: #4ade80; }
.rec-pick-odds-val.odds-neo  { color: #f59e0b; }

.odds-source-tag {
  font-size: 9px;
  font-weight: 700;
  vertical-align: super;
  margin-left: 2px;
  letter-spacing: 0;
  opacity: 0.9;
}
.odds-live .odds-source-tag { color: #4ade80; }
.odds-neo  .odds-source-tag { color: #f59e0b; }
.odds-live-tag { /* legacy */ font-size: 9px; font-weight: 600; color: #4ade80; vertical-align: super; margin-left: 2px; opacity: 0.85; }

/* Neo.bet-Quote-Badge in Auto-Picks */
.auto-odds-badge.odds-neo { background: rgba(245,158,11,0.2); border: 1px solid #f59e0b; color: #f59e0b; }
.odds-neo-tag {
  font-size: 8px; font-weight: 700; color: #f59e0b;
  vertical-align: super; margin-left: 1px; opacity: 0.9;
}

.rec-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.rec-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rec-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-odds-val {
  font-size: 22px;
  color: #60a5fa;
  font-weight: 800;
}

.rec-prob-val {
  font-size: 22px;
  color: var(--green-light);
  font-weight: 800;
}

.rec-win-val {
  font-size: 22px;
  color: #fbbf24;
  font-weight: 800;
}

.rec-disclaimer {
  font-size: 10px;
  color: var(--text-dim);
  font-style: italic;
}

/* ——— FEATURED BADGE ——— */
.featured-badge {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  margin-left: auto;
}

.match-card.featured {
  border-color: #374151;
}

/* ——— VERGLEICHSTABELLE pro Slip-Pick ——— */
.options-table {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
  font-size: 11px;
}

.opt-row {
  display: grid;
  grid-template-columns: 1fr 36px 42px 52px 42px;
  gap: 4px;
  align-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.opt-hdr {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.opt-row:not(.opt-hdr):not(.opt-sel) {
  color: var(--text-muted);
}

.opt-sel {
  background: rgba(96,165,250,0.12);
  border-left: 2px solid #60a5fa;
  color: #e2e8f0;
  font-weight: 600;
  padding-left: 4px;
}

.opt-lbl  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-prob { text-align: right; }
.opt-calc { text-align: right; color: var(--text-dim); }
.opt-neo  { text-align: right; }
.opt-ev   { text-align: right; }

.opt-ev-val.ev-pos  { color: #4ade80; font-weight: 700; }
.opt-ev-val.ev-neu  { color: #fbbf24; }
.opt-ev-val.ev-neg  { color: #f87171; }

.no-neo { color: #4b5563; }

.no-neo-hint {
  margin-top: 6px;
  padding: 4px 6px;
  background: rgba(251,191,36,0.08);
  border-left: 2px solid #d97706;
  border-radius: 3px;
  color: #d97706;
  font-size: 10px;
}
