:root{
  --ink:#0f172a;
  --card:#fff;
  --accent:#2e6bff;
  --shadow:0 18px 36px rgba(15,23,42,.20);
  --stroke:#e3e9f8;
  --muted:#6b7280;
  --bg-a:#f7f9ff;
  --bg-b:#eef3ff;
}

/* Basics */
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{min-height:100%}
body{
  margin:0;
  background:linear-gradient(180deg,#e8edf8,#f5f7fc);
  font:15px/1.5 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:var(--ink);
  -webkit-text-size-adjust:100%; /* verhindert iOS Auto-Zoom-Anpassung */
}
.wrap{max-width:820px;margin:0 auto;padding:18px}

/* =========================================================
   Datebar (Heute/Morgen) + separater Filter-Button daneben
   ========================================================= */
.datebar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:linear-gradient(180deg,var(--bg-a),var(--bg-b));
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:10px 12px;
  box-shadow:0 10px 24px rgba(46,107,255,.08);
  margin-bottom:20px;
}
.tablist{display:flex;align-items:center;gap:12px}
.tab{
  padding:10px 18px;
  border-radius:14px;
  border:1px solid transparent;
  background:transparent;
  font-weight:800;
  color:#223048;
  text-decoration:none;
  white-space:nowrap;
  transition:.18s ease;
}
.tab:hover{opacity:.9}
.tab.act{ /* aktive Registerkarte */
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
  box-shadow:0 8px 22px rgba(46,107,255,.28);
}

/* separater Filter-Button rechts von den Tabs */
.fbtn{
  width:40px;height:40px;
  border:none;
  background:#fff;
  border-radius:12px;
  display:grid;place-items:center;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(46,107,255,.10);
  transition:opacity .2s ease, transform .08s ease;
}
.fbtn:hover{opacity:.85}
.fbtn:active{transform:translateY(1px)}
.fbtn svg{width:20px;height:20px;stroke:#223048}

/* =========================================================
   Match Cards
   ========================================================= */
.card{
  background:var(--card);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:16px;
  margin:24px 0 56px;
  position:relative;
}
.head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;
  border-bottom:none; /* Linie nur beim Tipp unten */
  padding-bottom:12px;
}
.teams{display:flex;flex-direction:column;gap:10px}
.line{display:flex;align-items:center;gap:12px}

/* Logos ohne Hintergrund – leicht kleiner */
.logo{
  width:36px;height:36px;border:0;background:transparent;border-radius:0;
  display:grid;place-items:center;overflow:hidden
}
.logo img{width:32px;height:32px;object-fit:contain}

/* beide Teamnamen gleich gewichtet */
.line strong,.line span{font-weight:600;color:#0d1628}

.meta{text-align:right}
.league{font-weight:700;color:#111827;font-size:12px;margin-bottom:6px}
.time{font-weight:700;color:var(--muted);font-size:12px}
.empty{opacity:.7;margin:24px 0}

/* =========================================================
   Compact meters
   ========================================================= */
.details{margin-top:24px}
.grid{display:grid;gap:12px}

.comp{display:grid;gap:18px}
.mblock{display:grid;gap:8px}
.mttl{font-weight:800;color:#64748b;letter-spacing:.04em;text-align:center}
.meter{
  height:40px;border-radius:14px;overflow:hidden;display:flex;
  background:#e9ecfb;border:1px solid #dde3fb
}
.seg{display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff}
.seg.s1{background:#7b61ff}
.seg.s2{background:#1f2937}
.seg.s3{background:#9aa3b2}
.mrow{display:flex;gap:0;margin-top:4px;font-size:12px;color:#64748b;font-weight:700}
.mrow span{flex:1;text-align:center}
.msep{height:1px;border-bottom:1px dashed #e5e9f6;margin:4px 0 0}

/* =========================================================
   Correct Score – 5 Chips in einer Reihe
   ========================================================= */
.cs{display:grid;gap:12px}
.cs .mttl{text-align:center}
.cs-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.cs-pill{
  background:#fff;border:1px solid #e6eaf5;border-radius:12px;
  padding:10px 8px 12px;text-align:center;box-shadow:0 4px 16px rgba(2,6,23,.06)
}
.cs-meter{height:6px;border-radius:999px;background:#eef1fb;border:1px solid #e6eaf5;overflow:hidden;margin-bottom:8px}
.cs-meter>span{display:block;height:100%;background:linear-gradient(90deg,#7b61ff,#4f74ff);opacity:.38}
.cs-pct{font-weight:900;font-size:clamp(13px,3.2vw,16px);line-height:1.1;color:#111827}
.cs-score{margin-top:4px;font-weight:800;font-size:clamp(11px,2.6vw,13px);color:#64748b;letter-spacing:.02em}
@media (max-width:380px){
  .cs-row{gap:8px}
  .cs-pill{padding:8px 6px 10px;border-radius:10px}
  .cs-meter{height:5px;margin-bottom:6px}
}

/* =========================================================
   VIRA Tipp – eine Linie, links Label+Wert, rechts Quote+Haken
   ========================================================= */

.vira-left{display:flex;align-items:center;gap:6px;white-space:nowrap;font-weight:900}
.vira-right{display:flex;align-items:center;gap:6px;justify-content:flex-end}
.vira-label{font-weight:800}
.vira-value{font-weight:900}
.vira-quote{font-weight:900;opacity:.9}

/* kleiner grüner Kreis */
.vira-ok{width:14px;height:14px;display:inline-grid;place-items:center}
.vira-ok svg{width:14px;height:14px;display:block}
.vira-ok circle{fill:#22c55e}
.vira-ok path{fill:none;stroke:#fff;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}

/* Tipp verschleiern (sichtbar, aber nicht lesbar) */
.blurred{
  color:#111827;position:relative;filter:blur(2px);-webkit-filter:blur(3px);
  opacity:.6;pointer-events:none
}
.blurred::after{
  content:"";position:absolute;inset:0;background:rgba(255,255,255,.25);border-radius:4px
}

/* =========================================================
   PRO CTA + Trennlinie darunter
   ========================================================= */
.pro-cta{
  width:100%;display:flex;align-items:center;justify-content:center;gap:10px;
  margin:0 0 10px;padding:10px 14px;background:#000;color:#fff;border:none;border-radius:12px;
  box-shadow:0 6px 14px rgba(0,0,0,.25);cursor:pointer;text-align:left;
  transition:transform .15s ease, box-shadow .15s ease
}
.pro-cta:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.28)}
.pro-cta:active{transform:translateY(1px)}
.pro-ico{display:grid;place-items:center;flex-shrink:0;color:#fff}
.pro-ico svg{width:18px;height:18px;stroke:#fff;display:block}
.pro-text{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.15}
.pro-text strong{font-weight:800;font-size:15px;letter-spacing:.2px}
.pro-text em{margin-top:2px;font-style:normal;opacity:.7;font-size:12.5px;font-weight:500}
@media (max-width:400px){
  .pro-cta{padding:9px 12px;border-radius:10px}
  .pro-text strong{font-size:14.5px}
  .pro-text em{font-size:12px}
  .pro-ico svg{width:17px;height:17px}
}
/* feine gestrichelte Linie unter dem PRO-Button (außerhalb des Buttons platzieren) */
.pro-sep{width:100%;border-bottom:1px dashed #d8dce7;margin:10px 0 12px;opacity:.85}

/* =========================================================
   „Prognose ansehen“ + FREE-Badge + Pfeil
   ========================================================= */
.open-prog{
  display:flex;align-items:center;justify-content:space-between;
  font-weight:800;font-size:15px;color:#0f172a;margin-top:8px;cursor:pointer;
  transition:opacity .2s ease
}
.open-prog:hover{opacity:.85}
.open-left{display:flex;align-items:center;gap:10px}
.free-badge{
  background:#13c24a;color:#fff;font-size:12px;font-weight:800;
  padding:3px 8px 4px;border-radius:8px;letter-spacing:.3px;line-height:1
}
.open-prog svg{width:18px;height:18px;stroke-width:2.2;stroke:#0f172a;flex-shrink:0}

/* =========================================================
   Filter-Overlay & Panel
   ========================================================= */
.panel{
  position:fixed;inset:0;z-index:70;display:grid;place-items:center;
  background:rgba(15,23,42,.32);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)
}
.box{
  width:min(560px,92vw);background:var(--card);border-radius:18px;padding:16px;
  display:grid;gap:12px;box-shadow:0 18px 40px rgba(2,6,23,.25);border:1px solid var(--stroke);position:relative
}
.close{
  position:absolute;top:10px;right:10px;width:36px;height:36px;border-radius:12px;border:1px solid var(--stroke);
  background:#fff;display:grid;place-items:center;font-size:18px;cursor:pointer
}
.hd{font-weight:800;color:#0d1628}
.search{
  width:100%;border:1px solid var(--stroke);border-radius:12px;padding:12px; /* >=16px iOS no-zoom */
  font-weight:600;outline:none;font-size:16px
}
.list{display:grid;gap:8px;max-height:58vh;overflow:auto;padding-right:2px}
.item{
  display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--stroke);
  border-radius:12px;padding:10px 12px;background:#fff;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .05s ease
}
.item:hover{background:#f7f9ff;border-color:#dbe3ff}
.item.act{background:#eef3ff;border-color:#dbe3ff;box-shadow:0 6px 18px rgba(46,107,255,.12)}
.count{font-size:12px;color:#6b7280;font-weight:600}

/* =========================================================
   Popup (Prognose)
   ========================================================= */
.popup-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.45);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  display:grid;place-items:center;z-index:100;animation:fadeIn .2s ease
}
@keyframes fadeIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
.popup-box{
  background:var(--card);border-radius:18px;padding:20px;width:min(640px,92vw);
  max-height:85vh;overflow:auto;box-shadow:0 22px 40px rgba(2,6,23,.25);position:relative;border:1px solid var(--stroke)
}
.popup-close{
  position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:10px;border:1px solid var(--stroke);
  background:#fff;font-weight:700;color:#111827;cursor:pointer
}
.popup-body{margin-top:30px}

/* === Zurück-Link über Datebar === */
.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  font-size:15px;
  color:#0f172a;
  text-decoration:none;
  margin-bottom:12px;
  transition:opacity .2s ease;
}
.back-link:hover{opacity:.7}
.back-link svg{
  width:20px;
  height:20px;
  stroke:#0f172a;
  flex-shrink:0;
}
/* === Titel unter der Datebar === */
.section-title{
  font-size:clamp(24px, 5vw, 30px);
  font-weight:900;
  color:#0f172a;
  text-align:center;
  line-height:1.25;
  margin:20px 0 26px;
  letter-spacing:0.3px;
}
/* Abstand und Layout für Tipp + PRO-Button */
.vira-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px; /* Platz unter Tipp-Zeile */
}

.pro-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  margin-top: 6px; /* zusätzlicher Abstand zum Tipp */
  margin-bottom: 6px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.pro-sep {
  display: none; /* falls deine Linie vorher zu viel Platz macht */
}

.pro-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.pro-text strong {
  font-size: 14px;
  font-weight: 700;
}

.pro-text em {
  font-size: 12px;
  opacity: 0.8;
  font-style: normal;
}
.vira-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-top:1px solid #e7ebf4;
  padding-top:12px;
  margin:10px 0 14px; /* Platz über PRO-Button */
  color:#111827;
  font-weight:800;
}
.vira-label{display:inline-flex; align-items:center; gap:6px; font-weight:800;}
.vira-ico{
  width:20px; height:20px;
  display:inline-block;
  object-fit:contain;
  transform:translateY(0px);   /* ↓ Icon minimal absenken */
  /* Alternative statt transform:
  position:relative; top:2px;
  */
}
/* =========================================
   POPUP: Minimaler Rail-Look für die Märkte
   ========================================= */

.popup-body .mblock{
  background:#f9fafb;
  border-radius:14px;
  padding:10px 12px 14px;
  border:1px solid #e5e7eb;
  box-shadow:0 6px 18px rgba(15,23,42,.05);
}

/* kleiner, nüchterner Titel */
.popup-body .mttl{
  text-align:left;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#9ca3af;
}

/* Rail statt fettem Balken */
.popup-body .meter{
  position:relative;
  display:flex;
  align-items:flex-end;
  gap:0;
  height:8px;
  border-radius:999px;
  background:#e5e7eb;
  border:none;
  margin-top:22px;  /* Platz für die Badges */
  margin-bottom:4px;
  overflow:hidden;
}

/* Segmente: dezente Farben, nur als Füllung */
.popup-body .meter .seg{
  position:relative;
  height:100%;
  display:block;
  /* width kommt weiter aus dem Inline-Style */
}

.popup-body .meter .seg.s1{ background:rgba(59,130,246,.45); }
.popup-body .meter .seg.s2{ background:rgba(15,23,42,.55);   }
.popup-body .meter .seg.s3{ background:rgba(148,163,184,.75);}

/* Prozent oben drüber als Badge */
.popup-body .meter .seg span{
  position:absolute;
  top:-18px;
  left:50%;
  transform:translateX(-50%);
  padding:2px 8px 3px;
  border-radius:999px;
  background:#ffffff;
  box-shadow:0 3px 8px rgba(15,23,42,.15);
  font-size:11px;
  font-weight:800;
  color:#111827;
}

/* Labels darunter dezent */
.popup-body .mrow{
  margin-top:4px;
  font-size:11px;
  font-weight:700;
  color:#6b7280;
}

/* =========================================
   EXAKTES ERGEBNIS: nur Chips, keine Balken
   ========================================= */

.popup-body .cs{
  margin-top:6px;
}

.popup-body .cs-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* kleine Chips mit Score + Prozent */
.popup-body .cs-pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  box-shadow:0 4px 10px rgba(15,23,42,.04);
  min-width:70px;
}

/* Mini-Balken komplett weg */
.popup-body .cs-meter{
  display:none;
}

.popup-body .cs-score{
  font-weight:800;
  font-size:12px;
  color:#111827;
}

.popup-body .cs-pct{
  font-size:11px;
  font-weight:800;
  padding:2px 7px 3px;
  border-radius:999px;
  background:rgba(37,99,235,.08);
  color:#1d4ed8;
}
/* Fix: Prozent-Badges im Popup sichtbar machen */
.popup-body .meter{
  overflow: visible !important;   /* nichts mehr abschneiden */
  position: relative;
}

/* Badges über dem Balken anzeigen */
.popup-body .meter .seg span{
  position: absolute;
  top: -20px;                     /* über dem Rail */
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;

  padding: 2px 8px 3px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  color: #111827;
  box-shadow: 0 3px 8px rgba(15,23,42,.12);
}
/* =========================================
   EXAKTES ERGEBNIS – Ticket-Design
   ========================================= */

.popup-body .cs{
  margin-top:12px;
}

/* Responsive Grid für die Ergebnis-Karten */
.popup-body .cs-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
  gap:10px;
}

/* einzelne Karte im Ticket-Look */
.popup-body .cs-pill{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  column-gap:6px;

  padding:8px 10px;
  border-radius:14px;
  background:#ffffff;
  border:1px solid #e3e8f4;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}

/* farbige Ticketkante links */
.popup-body .cs-pill::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:linear-gradient(180deg,#3b82f6,#8b5cf6);
  opacity:.85;
}

/* den Mini-Balken komplett ausblenden */
.popup-body .cs-meter{
  display:none;
}

/* Score groß, klar lesbar */
.popup-body .cs-score{
  order:1;                    /* rechts vom Badge */
  font-weight:800;
  font-size:13px;
  color:#0f172a;
}

/* Prozent als kleiner Badge */
.popup-body .cs-pct{
  order:0;                    /* links, vor dem Score */
  font-size:11px;
  font-weight:800;
  padding:2px 7px 3px;
  border-radius:999px;
  background:rgba(37,99,235,.08);
  color:#2563eb;
}
/* =========================================
   Popup-Match-Header (wie Tipico-Hero)
   ========================================= */

.popup-box{
  padding:0 0 18px;           /* oben kein extra Padding, damit Header bündig ist */
}

/* oberer Bereich im Popup */
.popup-header{
  position:relative;
  border-radius:18px 18px 0 0;
  padding:14px 16px 18px;
  color:#fff;

  display:grid;
  grid-template-columns:1.15fr auto 1.15fr; /* links Team, Mitte Info, rechts Team */
  align-items:center;
  gap:14px;

  /* Grund-Gradient, wird von JS via --ph-c1 / --ph-c2 überschrieben */
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,.18), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(15,23,42,.35), transparent 50%),
    linear-gradient(120deg, var(--ph-c1, #dc2626), var(--ph-c2, #1d4ed8));
  box-shadow:0 14px 26px rgba(15,23,42,.45);
  overflow:hidden;
}

/* leichte Vignette unten */
.popup-header::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, transparent 0%, rgba(15,23,42,.45) 100%);
  opacity:.45;
  pointer-events:none;
}

/* Teams links/rechts */
.popup-header .teams{
  display:flex;
  flex-direction:column;
  gap:8px;
  position:relative;
  z-index:1;
}

.popup-header .line{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Logo im Kreis mit Glow */
.popup-header .logo{
  width:40px;
  height:40px;
  border-radius:999px;
  background:rgba(15,23,42,.35);
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.25);
  box-shadow:0 0 0 1px rgba(15,23,42,.25), 0 10px 18px rgba(15,23,42,.6);
}
.popup-header .logo img{
  width:30px;
  height:30px;
  object-fit:contain;
}

/* Teamnamen hell auf dem dunklen BG */
.popup-header .line strong,
.popup-header .line span{
  color:#f9fafb;
  font-weight:700;
  font-size:13px;
}

/* Mittelspalte: Liga + Zeit */
.popup-header .meta{
  position:relative;
  z-index:1;
  text-align:center;
}

.popup-header .league{
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(226,232,240,.88);
  margin-bottom:4px;
}

/* Zeit prominenter */
.popup-header .time{
  font-size:17px;
  font-weight:900;
  color:#ffffff;
}

/* kleine Subline (z.B. "heute") – wir ziehen sie aus dem bestehenden Text nicht raus,
   aber machen Platz, falls du später trennst */
.popup-header .time small{
  display:block;
  font-size:11px;
  font-weight:600;
  opacity:.8;
}

/* darunter später deine Prognose-Box wie gehabt */
.popup-body{
  padding:18px 16px 0;
}
/* ===========================
   Popup Match Header Layout
   =========================== */

.popup-box{
  padding:0 0 18px;
}

/* Header: dunkler Gradient + 3-Bereich-Layout */
.popup-header{
  position:relative;
  border-radius:18px 18px 0 0;
  padding:18px 18px 20px;
  color:#fff;
  overflow:hidden;

  /* Hintergrund aus Logo-Farben (JS setzt --ph-c1 / --ph-c2) */
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,.16), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(15,23,42,.55), transparent 55%),
    linear-gradient(120deg, var(--ph-c1, #4b5563), var(--ph-c2, #1d4ed8));
  box-shadow:0 14px 26px rgba(15,23,42,.45);
}

/* Liga + Uhrzeit ZENTRAL oben */
.popup-header .meta{
  position:absolute;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  text-align:center;
  z-index:2;
}

.popup-header .meta .league{
  font-size:11px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(226,232,240,.9);
  margin-bottom:4px;
}

.popup-header .meta .time{
  font-size:16px;
  font-weight:900;
  color:#ffffff;
}

/* Teams links/rechts auf einer Linie */
.popup-header .teams{
  position:relative;
  z-index:1;
  margin-top:32px;              /* Platz für die Meta oben */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
}

/* jede Zeile (Logo + Name) */
.popup-header .line{
  display:flex;
  align-items:center;
  gap:10px;
}

/* runde Logos mit leichtem Glow */
.popup-header .logo{
  width:40px;
  height:40px;
  border-radius:999px;
  background:rgba(15,23,42,.35);
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.25);
  box-shadow:0 0 0 1px rgba(15,23,42,.35), 0 10px 18px rgba(15,23,42,.7);
}
.popup-header .logo img{
  width:30px;
  height:30px;
  object-fit:contain;
}

/* Team-Namen hell auf dunklem Hintergrund */
.popup-header .line strong,
.popup-header .line span{
  color:#f9fafb;
  font-weight:700;
  font-size:13px;
}

/* Body unter dem Header wie gewohnt */
.popup-body{
  padding:16px 16px 0;
}
/* Popup Overlay darf NICHT scrollen */
.popup-overlay{
  overflow:hidden !important;
}

/* Popup-Box soll nur intern scrollen – ABER ohne sichtbare Leiste */
.popup-box{
  overflow:hidden !important;
}

/* Nur der Body-Teil (unter dem Header) darf scrollen – unsichtbar */
.popup-body{
  max-height: calc(85vh - 140px); /* passt bei ALLEN Geräten */
  overflow-y:auto;
  -ms-overflow-style:none; /* Edge/IE */
  scrollbar-width:none;    /* Firefox */
}

/* Scrollbar komplett verstecken */
.popup-body::-webkit-scrollbar{
  display:none;
}
/* Popup Header: Teams links/rechts statt untereinander */
.popup-header .teams{
  display:flex;
  flex-direction:row;          /* WICHTIG: überschreibt column */
  align-items:center;
  justify-content:space-between;
  gap:32px;
}
/* ===========================================================
   POPUP HEADER – Finaler Look: Logos oben, Namen darunter
   =========================================================== */

/* Teams nebeneinander */
.popup-header .teams{
  display:flex !important;
  flex-direction:row !important;
  justify-content:space-between;
  align-items:flex-start;
  width:100%;
  margin-top:36px; /* Platz für Liga + Uhrzeit */
}

/* Jede Seite (home/away) vertikal: Logo oben + Name unten */
.popup-header .line{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center;
  gap:6px;
  width:100%;
}

/* Logo OHNE Kreis-Background */
.popup-header .logo{
  width:auto !important;
  height:auto !important;
  background:none !important;
  border:none !important;
  box-shadow:none !important;
  padding:0 !important;
}

/* Logo-Bild selber */
.popup-header .logo img{
  width:46px;
  height:46px;
  object-fit:contain;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.25));
}

/* Teamname unter dem Logo – mittig */
.popup-header .line strong,
.popup-header .line span{
  font-size:13px;
  font-weight:700;
  color:#ffffff;
  text-align:center;
  letter-spacing:.2px;
  margin-top:2px;
  display:block;
}
/* =========================================
   3-Spalten Match Header Layout (Tipico Style)
   ========================================= */

.popup-header{
  position:relative;
  display:grid !important;
  grid-template-columns:1fr auto 1fr !important;
  align-items:center;
  padding:22px 18px 24px;
  border-radius:18px 18px 0 0;
}

/* Liga oben zentriert */
.popup-header .league{
  position:absolute;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  font-size:11px;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.9;
}

/* =======================
   linke + rechte Teamspalte
   ======================= */
.popup-header .teams{
  display:contents !important; /* Wir zerstören die alte Struktur */
}

.popup-header .line{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center;
  gap:6px;
}

/* Logos clean, ohne Kreis */
.popup-header .logo{
  background:none !important;
  border:none !important;
  box-shadow:none !important;
  padding:0 !important;
}

.popup-header .logo img{
  width:48px !important;
  height:48px !important;
  object-fit:contain;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.25));
}

/* Teamnamen mittig */
.popup-header .line strong,
.popup-header .line span{
  color:#fff;
  font-weight:700;
  font-size:14px;
  text-align:center;
  letter-spacing:.1px;
}

/* =======================
   Zentrierter Zeitblock
   ======================= */

.popup-header .mid-block{
  grid-column:2 / 3; /* Mitte */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  margin-top:20px;
}

.mid-time{
  font-size:20px;
  font-weight:900;
  color:#fff;
  letter-spacing:.4px;
}

.mid-date{
  font-size:12px;
  font-weight:600;
  opacity:.85;
  color:#fff;
}
/* ========= POPUP HEADER STRUCTURE ========= */

.popup-header{
  position:relative;
  padding:24px 20px 34px;
  border-radius:18px 18px 0 0;
  color:#fff;

  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  justify-content:center;
}

/* Liga oben */
.ph-league{
  position:absolute;
  top:8px;
  left:50%;
  transform:translateX(-50%);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.15em;
  opacity:.95;
}

/* Teams neu ausrichten */
.popup-header .teams{
  grid-column:1/4;
  display:flex !important;
  flex-direction:row !important;
  justify-content:space-between;
  align-items:flex-start;
  margin-top:28px;
}

/* Team einzeln */
.popup-header .line{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  gap:6px;
}

/* Logos clean */
.popup-header .logo{
  background:none !important;
  border:none !important;
  box-shadow:none !important;
  padding:0 !important;
}
.popup-header .logo img{
  width:56px;
  height:56px;
  object-fit:contain;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.35));
}

/* Teamnamen */
.popup-header strong,
.popup-header span{
  font-size:14px;
  font-weight:700;
  text-align:center;
  color:#fff;
}

/* Zeitblock in der Mitte */
.ph-mid{
  position:absolute;
  top:65px; /* direkt zwischen den Logos */
  left:50%;
  transform:translateX(-50%);
  text-align:center;
}
.ph-time{
  font-size:22px;
  font-weight:900;
}
.ph-date{
  margin-top:2px;
  font-size:12px;
  opacity:.85;
}
/* LOGOS im Popup vollständig ohne Hintergrund */
.popup-header .logo,
.popup-header .logo img {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}
/* League Text im Popup */
.ph-league {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 6px;
    margin-top: 4px;
    text-transform: uppercase;
}
.popup-header .teams {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 30px;
}

.popup-header .teams .line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.popup-header .logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}
/* Logo-Halo / weißer Rand fix */
.popup-header .logo img {
    display: block;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;

    /* Entfernt browser smoothing-halo */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;

    /* verhindert bei Retina das „weißliche Padding“ */
    transform: translateZ(0);
    backface-visibility: hidden;

    padding: 0 !important;
}
.popup-header .logo img {
    width: auto;
    height: 54px;      /* leicht größer wirkt edler */
    object-fit: contain;
}
/* Abstand zwischen Logos und der Uhrzeit */
.ph-mid {
    margin-top: 14px;
    margin-bottom: 8px;
}

/* Abstand der Teams seitlich */
.popup-header .teams .line {
    margin-top: 8px;
}
/* =======================================
   FINAL MATCH POPUP HEADER (Tipico Style)
   =======================================*/

.popup-header{
    position:relative;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    justify-content:center;

    padding:28px 26px 34px;
    border-radius:18px 18px 0 0;

    background:
      radial-gradient(circle at 0% 0%, rgba(255,255,255,.15), transparent 55%),
      radial-gradient(circle at 100% 0%, rgba(0,0,0,.35), transparent 55%),
      linear-gradient(120deg, var(--ph-c1), var(--ph-c2));
    color:#fff;
}

/* Liga */
.popup-header .league{
    position:absolute;
    top:8px;
    left:50%;
    transform:translateX(-50%);
    font-size:11px;
    font-weight:700;
    letter-spacing:.18em;
    text-transform:uppercase;
    color:rgba(255,255,255,.65);
}

/* Zeitblock */
.popup-header .mid{
    grid-column:2/3;
    text-align:center;
    margin-top:12px;
}

.popup-header .mid .time{
    font-size:24px;
    font-weight:900;
}
.popup-header .mid .date{
    font-size:12px;
    opacity:.85;
}

/* Teams */
.popup-header .team{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
}

.popup-header .team img{
    width:52px;
    height:52px;
    object-fit:contain;

    background:none !important;
    border:none !important;
    border-radius:0 !important;
    box-shadow:none !important;
}

.popup-header .team .name{
    font-size:13px;
    font-weight:700;
    text-align:center;
    color:#fff;
    line-height:1.3;
}

/* Entfernt Scrollen */
.popup-box{
    overflow:hidden;
}
/* Popup Close Button – wieder sichtbar */
.popup-close {
    position:absolute;
    top:10px;
    right:12px;
    z-index: 50;                /* WICHTIG */
    background:rgba(0,0,0,0.35);
    color:#fff;
    border:none;
    border-radius:50%;
    width:32px;
    height:32px;
    font-size:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    backdrop-filter:blur(4px);
}
/* ===== POPUP SCROLL FIX ===== */

/* Overlay darf selbst scrollen, damit Box auf kleinen Screens nicht "abgeschnitten" wird */
.popup-overlay{
    overflow:auto !important;
    display:flex !important;
    align-items:flex-start !important;
    justify-content:center !important;
    padding:18px 10px;
}

/* Die Box selbst bekommt eine vernünftige max-Höhe und scrollt intern */
.popup-box{
    max-height:92vh !important;
    overflow-y:auto !important;
    overflow-x:hidden;
}

/* Body im Popup: keine eigene max-height mehr, einfach normal laufen lassen */
.popup-body{
    max-height:none !important;
    overflow:visible !important;
    padding-bottom:18px; /* bisschen Platz unter deinen Exakten Ergebnissen */
}
/* ===== POPUP HEADER STICKY ===== */
.popup-header {
    position: sticky;
    top: 0;
    z-index: 40;
}
/* Overlay steht – Box scrollt */
.popup-overlay{
    overflow: hidden !important;
    display:flex !important;
    align-items:flex-start !important;
    justify-content:center !important;
    padding:18px 10px;
}
.popup-box{
    max-height:92vh !important;
    overflow-y:auto !important;   /* Body scrollt */
    overflow-x:hidden;
    position:relative;
}
.popup-body{
    padding-top:10px;
    padding-bottom:18px;
    overflow:visible !important;
    max-height:none !important;
}