/* =====================================================
   neun30 – Stats Dashboard  (about.html / about2.html)
   Dark Edition – Stand April 2026
   ===================================================== */

/* Keine Underlines/Text-Dekoration auf Dashboard-Links */
.stats-dashboard a,
.stats-dashboard a:hover,
.stats-dashboard a:focus,
.stats-dashboard a:visited {
  text-decoration: none;
}

/* --- Section --- */
.stats-dashboard {
  background: #1e2a3a;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  /* iOS Safari: verhindert Font-Inflation bei kleinen Schriftgrößen (0.48rem etc.) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Subtiles Punkte-Raster im Hintergrund */
.stats-dashboard::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(82,139,197,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Leucht-Gradient oben links – bleibt innerhalb des Containers */
.stats-dashboard::after {
  content: '';
  position: absolute;
  top: -120px;
  left: 0;
  width: 100%;
  height: 480px;
  background: radial-gradient(circle at 20% 50%, rgba(82,139,197,.14) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.stats-dashboard-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px 72px;
}

/* --- Sektionsüberschrift --- */
.sdash-section-title {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 40px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  opacity: 0;
  animation: sdash-fade-up 0.7s cubic-bezier(.2,.8,.3,1) 0.1s forwards;
}

/* --- Kernzahlen-Zeile: gleiche Optik wie Startseiten-Stats-Strip --- */
.sdash-stats-row {
  margin-bottom: 20px;
  max-width: none !important;
}

/* min-width:80px aus style.css (.about-stat-item) gilt nicht im Dashboard-Kontext.
   Zwei-Klassen-Spezifität (0,2,0) schlägt style.css (0,1,0) ohne !important. */
.stats-dashboard .about-stat-item {
  min-width: 0;
}

/* =====================================================================
   MOBILE: Kompletter Neuaufbau des Grids – verhindert horizontalen Overflow
   Ursache: flex + min-width:80px + JS flex-basis = unkontrollierbarer Overflow
   Lösung: Grid auf allen kritischen Elementen, Container mit overflow:hidden
   ===================================================================== */
@media (max-width: 600px) {
  /* Äußerstes Element: hartes Containment auf Section-Ebene */
  .stats-dashboard {
    overflow: hidden;
  }

  /* Container: overflow:hidden als hartes Containment */
  .stats-dashboard-inner {
    padding: 32px 16px 40px;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* 6 Kernzahlen: sauberes 3-Spalten-Grid, nie breiter als Container */
  .sdash-stats-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .sdash-stats-row .about-stat-item {
    min-width: 0;
    overflow: hidden;
    text-align: center;
  }

  .sdash-stats-row .about-stat-num {
    font-size: clamp(0.95rem, 4.8vw, 1.8rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  .sdash-stats-row .about-stat-label {
    font-size: clamp(0.48rem, 1.6vw, 0.58rem);
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    text-align: center;
  }

  /* Ergebnis-Bilanz Zahlen: Grid statt Flex.
     JS setzt flex-basis (about.js:229), aber Grid ignoriert flex-basis vollständig.
     Boxen werden gleich breit statt proportional – auf Mobile kein visueller Verlust. */
  .sdash-wun-numbers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .sdash-wun-num-item {
    min-width: 0;
    overflow: hidden;
    padding: 10px 4px;
  }

  .sdash-wun-big {
    font-size: 1.4rem;
    letter-spacing: -0.03em;
  }

  .sdash-wun-sublabel {
    font-size: clamp(0.48rem, 1.6vw, 0.58rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    letter-spacing: 0.03em;
  }
}

/* Sehr kleine Phones (≤380px): 2 Spalten */
@media (max-width: 380px) {
  .sdash-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Trennlinie --- */
.sdash-sep {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 8px 0 20px;
  opacity: 0;
  animation: sdash-fade-in 0.5s ease 0.9s forwards;
}

/* --- Karten --- */
.sdash-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 22px 22px 18px;
  margin-bottom: 16px;
  overflow: hidden; /* verhindert, dass Inhalte (z.B. Season-Chart) den Viewport sprengen */
}

.sdash-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

/* --- W/U/N Ergebnis-Balken --- */
.sdash-wun-bar {
  display: flex;
  height: 40px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: rgba(255,255,255,.05);
}

.sdash-wun-seg {
  width: 0%;
  transition: width 1.1s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  position: relative;
}

.sdash-wun-seg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.sdash-wun-seg:hover::after { background: rgba(255,255,255,.08); }

.sdash-wun-seg-pct {
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.4s 0.9s;
  position: relative;
  z-index: 1;
}
.sdash-wun-seg.is-filled .sdash-wun-seg-pct { opacity: 1; }

.sdash-wun-win  { background: linear-gradient(135deg, #3ea370, #2b7a52); }
.sdash-wun-draw { background: linear-gradient(135deg, #48586a, #384858); }
.sdash-wun-loss { background: linear-gradient(135deg, #c9464b, #9e3439); }

/* Zahlen-Block unter dem Balken */
.sdash-wun-numbers {
  display: flex;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  border-top: none;
}

.sdash-wun-num-item {
  flex: 0 0 auto;
  /* Breite wird per JS dynamisch passend zum Balken gesetzt */
  padding: 12px 8px 12px;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background .2s, flex-basis 1.1s cubic-bezier(.4,0,.2,1);
  min-width: 0;
  overflow: hidden;
}

.sdash-wun-num-item.win  { background: rgba(62,163,112,.06); }
.sdash-wun-num-item.draw { background: rgba(72,88,106,.06); }
.sdash-wun-num-item.loss { background: rgba(201,70,75,.06); }

.sdash-wun-num-item.win:hover  { background: rgba(62,163,112,.15); }
.sdash-wun-num-item.draw:hover { background: rgba(72,88,106,.15); }
.sdash-wun-num-item.loss:hover { background: rgba(201,70,75,.15); }

.sdash-wun-big {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sdash-wun-sublabel {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

.sdash-wun-num-item.win  .sdash-wun-sublabel { color: #3ea370; }
.sdash-wun-num-item.draw .sdash-wun-sublabel { color: #6a7e90; }
.sdash-wun-num-item.loss .sdash-wun-sublabel { color: #c9464b; }

.sdash-wun-meta {
  font-size: 0.65rem;
  color: rgba(255,255,255,.42);
  margin-top: 10px;
  text-align: right;
}

/* --- 2-Spalten-Layout --- */
.sdash-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 620px) {
  .sdash-two-col { grid-template-columns: 1fr 1fr; }
}

/* --- Rubriken (Podcast-Formate) --- */
.sdash-rubrik-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sdash-rubrik-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* filter-pill-spezial im Stats-Kontext: feste Breite, kein margin */
.sdash-rubrik-pill {
  flex-shrink: 0;
  width: 110px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: flex-start;
}

/* 10 proportionale Segment-Striche */
.sdash-rubrik-segs {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: center;
  min-width: 0;
}

.sdash-rubrik-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.1);
  transition: background 0.28s ease;
}

.sdash-rubrik-seg.is-filled {
  background: rgba(82,139,197,.25);
}

.sdash-rubrik-seg.is-filled.is-lit {
  background: #528BC5;
}

.sdash-rubrik-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* --- Pillen-Grid (hellblau, wie Startseite filter-pill) --- */
.sdash-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sdash-fp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #528BC5;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #528BC5;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.sdash-fp:hover {
  background: #528BC5;
  color: #fff;
}

.sdash-fp-count {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.75;
}

.sdash-fp:hover .sdash-fp-count {
  opacity: 1;
}

/* --- Tortendiagramm (Rubriken) --- */
.sdash-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sdash-donut-svg {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  overflow: visible;
}

.sdash-donut-center-num {
  font-size: 18px;
  font-weight: 800;
  fill: #fff;
  font-family: 'Work Sans', sans-serif;
}

.sdash-donut-center-label {
  font-size: 8px;
  font-weight: 600;
  fill: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Work Sans', sans-serif;
}

.sdash-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.sdash-donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity .15s;
}

.sdash-donut-legend-item:hover { opacity: 0.8; }

.sdash-donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.sdash-donut-legend-name {
  flex: 1;
  font-size: 0.73rem;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sdash-donut-legend-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  flex-shrink: 0;
}

/* --- Top Gegner (Pille + Logo-Bällchen) --- */
.sdash-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sdash-rank-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sdash-rank-num {
  font-size: 0.58rem;
  font-weight: 800;
  color: rgba(82,139,197,.55);
  width: 12px;
  flex-shrink: 0;
  text-align: right;
}

/* filter-pill-opponent im Stats-Kontext: kein margin */
.sdash-rank-item .filter-pill-opponent {
  margin: 0;
}

/* neun30 Logo-Bällchen als Anzahl-Visualisierung */
.sdash-rank-balls-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.sdash-logo-ball {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  opacity: 0.82;
  flex-shrink: 0;
}

.sdash-logo-ball-extra {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  margin-left: 1px;
}

/* --- Top Gegner (Pill-Design, veraltet – nicht mehr genutzt) --- */
.sdash-opp-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sdash-opp-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(82,139,197,.28);
  border-radius: 22px;
  padding: 6px 10px 6px 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}

.sdash-opp-pill:hover {
  background: rgba(82,139,197,.14);
  border-color: rgba(82,139,197,.65);
  transform: translateX(2px);
}

.sdash-opp-pill-rank {
  font-size: 0.58rem;
  font-weight: 700;
  color: #528BC5;
  width: 14px;
  flex-shrink: 0;
  text-align: center;
}

.sdash-opp-pill-name {
  font-size: 0.78rem;
  color: rgba(255,255,255,.9);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sdash-opp-pill-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: #528BC5;
  background: rgba(82,139,197,.15);
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* --- Folgen pro Saison --- */
.sdash-season-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 210px;
  padding-top: 28px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

/* Dezente horizontale Rasterlinien */
.sdash-season-chart::before {
  content: '';
  position: absolute;
  inset: 28px 0 32px;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 100% 33.33%, 100% 50%, 100% 100%;
  background-position: bottom;
  pointer-events: none;
}

.sdash-season-col {
  flex: 1;
  min-width: 0; /* erlaubt Flex-Items kleiner als Content-Width zu werden */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  height: 100%;
  justify-content: flex-end;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.sdash-season-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  width: 100%;
  padding-bottom: 4px;
}

.sdash-season-bar {
  width: 100%;
  background: linear-gradient(180deg, rgba(82,139,197,.7) 0%, rgba(82,139,197,.28) 100%);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: background .2s, box-shadow .2s;
  position: relative;
}

.sdash-season-col:hover .sdash-season-bar {
  background: linear-gradient(180deg, #7ab4e0 0%, #528BC5 100%);
  box-shadow: 0 0 10px rgba(82,139,197,.45);
}

.sdash-season-bar::after {
  content: attr(data-count);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #528BC5;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.sdash-season-col:hover .sdash-season-bar::after { opacity: 1; }

.sdash-season-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,.42);
  font-weight: 600;
  white-space: pre-wrap;
  text-align: center;
  line-height: 1.25;
  padding: 4px 0 2px;
  transition: color .2s;
}

@media (max-width: 540px) {
  .sdash-season-year { display: none; }
}

.sdash-season-col:hover .sdash-season-label {
  color: rgba(255,255,255,.75);
}

/* --- Rekorde --- */
.sdash-records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 560px) {
  .sdash-records-grid { grid-template-columns: repeat(4, 1fr); }
  .sdash-records-3 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Rekorde – Premium-Redesign --- */
.sdash-record-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 0;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s;
  cursor: pointer;
}

/* Farbiger Streifen oben */
.sdash-record-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, rgba(82,139,197,0) 0%, #528BC5 40%, rgba(82,139,197,0) 100%);
  flex-shrink: 0;
  transition: opacity .25s;
}

/* Innerer Glow hinter dem Streifen */
.sdash-record-card::after {
  content: '';
  position: absolute;
  top: 3px; left: 0; right: 0;
  height: 60px;
  background: radial-gradient(ellipse at 50% 0%, rgba(82,139,197,.13) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity .25s;
}

.sdash-record-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(82,139,197,.22);
}

.sdash-record-card:hover::after {
  opacity: 1.6;
}

/* Alle Rekord-Kacheln: einheitlich CI-Blau */
.sdash-record-card .sdash-record-label { color: #528BC5; }

/* Inhaltsbereich */
.sdash-record-card-body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  flex: 1;
}

/* Thumbnail: füllt Kartenbreite, quadratisch, abgerundet */
.sdash-record-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin: 6px 0 8px;
  display: block;
}

/* Episodentitel: groesser als vorher, normal umbrechen */
.sdash-record-sub-big {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 4px;
}

/* Beschriftung ("Längste Folge" etc.) etwas prominenter */
.sdash-record-label {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: block;
}

/* Hauptzahl etwas kleiner damit sie passt neben dem Bild */
.sdash-record-main {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.sdash-record-date {
  font-size: 1.0rem;
  letter-spacing: -0.02em;
}

/* --- Scroll-Reveal --- */
.sdash-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(.2,.8,.3,1),
              transform 0.6s cubic-bezier(.2,.8,.3,1);
}
.sdash-reveal.is-visible { opacity: 1; transform: translateY(0); }
.sdash-reveal[data-delay="1"] { transition-delay: 0.06s; }
.sdash-reveal[data-delay="2"] { transition-delay: 0.13s; }
.sdash-reveal[data-delay="3"] { transition-delay: 0.20s; }
.sdash-reveal[data-delay="4"] { transition-delay: 0.27s; }

/* --- Interviewpartner-Liste --- */
.sdash-interview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* filter-pill-spezial im Interview-Kontext: kein margin */
.sdash-interview-list .filter-pill-spezial {
  margin: 0;
}

.sdash-interview-count {
  opacity: 0.65;
  font-size: 0.8em;
}

.sdash-interview-empty {
  color: #999;
  font-size: 0.9rem;
}

/* --- Keyframes --- */
@keyframes sdash-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sdash-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
