/* =========================================================
   Live Match / Post-match stylesheet (scoped)
   Scope: .livematch …
   ========================================================= */

/* Local tokens (custom properties) */
.livematch {
  --card-red: #ef4444; /* lokalny czerwony (nie nadpisuje --red z base.css) */
  --card-red-2: #ff6b6b;
  --ink: #e5e7eb;
  --muted: #a1a1aa;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);

  /* event colors */
  --c-goal: #16a34a;
  --c-pen: #f59e0b;
  --c-var: #38bdf8;
  --c-yellow: #fbbf24;
  --c-red: #ef4444;
  --c-sub: #a78bfa;
}

/* Title + subtitle */
.livematch .page-title {
  margin: 0.25rem 0 0.25rem;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.2;
}
.livematch .page-subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Hero image */
.livematch .matchday_image {
  position: relative;
  margin: 0 0 1.2rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.livematch .matchday_image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: grayscale(8%) contrast(1.03) brightness(0.98);
  transition: transform 0.45s ease, filter 0.45s ease;
  animation: heroFadeZoom 1.2s ease-out both;
}

.livematch .matchday_image figcaption {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.livematch .matchday_image:hover {
  transform: scale(1.01);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.livematch .matchday_image:hover img {
  transform: scale(1.05);
  filter: brightness(1.05) contrast(1.05) saturate(1.1);
}

.livematch .matchday_image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.15),
    rgba(0, 0, 0, 0.25) 50%,
    rgba(56, 189, 248, 0.15)
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.livematch .matchday_image:hover::after {
  opacity: 1;
}

/* Entry animation */
@keyframes heroFadeZoom {
  0% {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(6px) brightness(0.8);
  }
  60% {
    opacity: 1;
    transform: scale(1.02);
    filter: blur(2px) brightness(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0) brightness(1);
  }
}

/* Intro felieton (smaczek + kontekst) */
.livematch .match-intro {
  border: 1px solid var(--line);
  border-left: 6px solid var(--ink);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.22)
  );
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 1rem 1rem 0.9rem;
  margin: 0 0 1.2rem;
}

.livematch .match-intro h2 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  line-height: 1.25;
}

.livematch .match-intro p {
  margin: 0.55rem 0;
  color: var(--ink);
}

.livematch .match-intro em {
  font-style: italic;
  opacity: 0.95;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

/* drobne ściśnięcie na małych ekranach */
@media (max-width: 640px) {
  .livematch .match-intro {
    padding: 0.85rem 0.85rem 0.8rem;
    border-left-width: 5px;
  }
  .livematch .match-intro h2 {
    font-size: 1.05rem;
  }
}

/* Lineups – wrapper */
.livematch .lineups {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 0 0 1.2rem;
}
.livematch .lineups > h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

/* Grid: 1 kolumna mobile, 2 kolumny desktop */
.livematch .lineups__grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 760px) {
  .livematch .lineups__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Team card */
.livematch .team {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.2)
  );
  padding: 0.8rem;
}
.livematch .team--lfc {
  border-left: 6px solid var(--card-red);
}
.livematch .team--eve {
  border-left: 6px solid rgba(31, 8, 238, 0.859);
}

.livematch .team--manu {
  border-left: 6px solid rgba(249, 249, 255, 0.993);
}
.livematch .team--avl {
  border-left: 6px solid rgba(62, 3, 35, 0.993);
}

/* Team header */
.livematch .team__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 6px;
}
.livematch .team__name {
  margin: 0;
  font-size: 1.05rem;
}
.livematch .formation {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--muted);
}
/* Herby i baner z informacjami o meczu*/
.match-teams {
  display: flex;
  align-items: center;
  justify-content: center; /* Centralizuje całą zawartość bloku */
  gap: clamp(1rem, 10vw, 4rem); /* Dynamicznie zmienia odstęp między herbami */
}

/* cienkie „promienie” do środka – desktop only */
@media (min-width: 960px) {
  .match-banner .team--home::after,
  .match-banner .team--away::before {
    content: "";
    position: absolute;
    top: 50%;
    width: clamp(60px, 14vw, 180px);
    height: 2px;
    background: linear-gradient(
      90deg,
      rgba(147, 51, 234, 0) 0%,
      rgba(147, 51, 234, 0.45) 45%,
      rgba(147, 51, 234, 0) 100%
    );
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.6;
  }
  .match-banner .team--home {
    position: relative;
  }
  .match-banner .team--home::after {
    left: 100%;
    margin-left: 10px;
  }
  .match-banner .team--away {
    position: relative;
  }
  .match-banner .team--away::before {
    right: 100%;
    margin-right: 10px;
    transform: translateY(-50%) scaleX(-1);
  }
}
.match-banner .team {
  flex: 0 0 clamp(110px, 12vw, 160px);
  display: flex;
  justify-content: center;
  align-items: center;
}
.match-banner .team__logo {
  width: clamp(90px, 12vw, 140px);
  height: auto;
  object-fit: contain;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.match-banner .team__logo:hover {
  transform: translateY(-2px) scale(1.06);
}
.match-banner .match-meta {
  flex: 0 1 auto;
  min-width: clamp(220px, 36vw, 420px);
  text-align: center;
}
/* === Match banner / teams – base === */
.match-banner {
  padding: 16px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.match-banner .match-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* pasek z herbami i nazwami drużyn */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.match-team__crest {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.25));
}
.match-team__name {
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* blok meta: liga, data/godzina, stadion, countdown */
.match-meta {
  text-align: center;
  line-height: 1.25;
  margin-inline: auto;
  padding-top: 1rem;
}
.match-meta .comp {
  opacity: 0.9;
  font-weight: 600;
}
.match-meta .kickoff {
  font-size: 1.05rem;
  font-weight: 800;
}
.match-meta .venue {
  opacity: 0.8;
}
.match-meta .countdown {
  opacity: 0.85;
}

/* przyciski (zapowiedź / składy / live blog) */
.match-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* === Mobile tweaks === */
@media (max-width: 768px) {
  .match-banner .match-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .match-teams {
    order: 1;
    justify-content: center;
    gap: 20px;
  }
  .match-team {
    flex: 0 0 auto;
    justify-content: center;
  }
  .match-team__crest {
    width: 56px;
    height: 56px;
  }
  .match-team__name {
    font-size: 0.95rem;
  }

  .match-meta {
    order: 2;
    margin-top: 4px;
  }
  .match-meta .kickoff {
    font-size: 1rem;
  }
  .match-meta .countdown {
    font-size: 0.95rem;
  }

  .match-actions {
    order: 3;
  }

  /* jeśli masz tło/gradient w bannerze – ogranicz bleeding na mobile */
  .match-banner {
    overflow: hidden;
  }
}
/* „vs” – kompaktowe i wyraźne */
.match-vs {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: radial-gradient(
    100% 100% at 50% 0%,
    #ff2d55 0%,
    #a71f3b 60%,
    #77152a 100%
  );
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 45, 85, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  user-select: none;
}

/* Mobile */
@media (max-width: 768px) {
  .team__crest {
    width: 56px;
    height: 56px;
  }
  .match-vs {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}
@media (max-width: 420px) {
  .team__crest {
    width: 48px;
    height: 48px;
  }
  .match-vs {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}
@media (max-width: 420px) {
  .match-team__crest {
    width: 48px;
    height: 48px;
  }
  .match-team__name {
    font-size: 0.9rem;
  }
  .match-meta .kickoff {
    font-size: 0.95rem;
  }
}

.livematch .squad li {
  transition: background 0.25s ease, transform 0.12s ease;
}
.livematch .squad li:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

/* środkowy blok: niech trzyma środek, nie rozpycha herbów */
.match-banner .match-meta {
  flex: 0 1 auto;
  text-align: center;
  min-width: clamp(220px, 36vw, 420px);
}

/* Flexbox container for team logos and match info */
.match-teams {
  display: flex;
  align-items: center; /* Wyśrodkowuje wszystkie elementy w pionie, co jest kluczowe */
  justify-content: center; /* Centralizuje zawartość w poziomie */
  gap: 1rem; /* Zwiększa odstęp między elementami, aby nie były ściśnięte */
}

.team__logo {
  max-width: 100px;
  height: auto;
  transition: transform 0.3s ease; /* Dodaje płynną animację przy najechaniu */
}

.team__logo:hover {
  transform: scale(
    1.05
  ); /* Lekkie powiększenie po najechaniu, aby dodać interaktywność */
}

/* Styling for the central match metadata block */
.match-meta {
  flex-grow: 1; /* Pozwala temu elementowi zająć całą dostępną przestrzeń między herbami */
  text-align: center; /* Wyśrodkowuje tekst i przyciski */
}

/* Styling for match actions (buttons) */
.match-actions {
  display: flex;
  justify-content: center; /* Centralizuje przyciski */
  flex-wrap: wrap; /* Pozwala na zawijanie przycisków na mniejszych ekranach */
  gap: 8px; /* Odstęp między przyciskami */
  margin-top: 10px; /* Dodaje odstęp nad przyciskami */
}

/* WHEN / COUNTDOWN nad herbami */
.match-when {
  text-align: center;
  margin: 10px auto 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 680px;
}
.match-title {
  font-weight: 800;
  opacity: 0.95;
}
.match-kickoff {
  margin-top: 4px;
  font-weight: 800;
}
.match-venue {
  opacity: 0.85;
}
.match-countdown {
  margin-top: 2px;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}

/* Rząd: herby + „vs” */
.match-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 12px 0 8px;
  flex-wrap: nowrap;
}

/* Squad list */
.livematch .squad {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.livematch .squad li {
  display: grid;
  grid-template-columns: 34px 1fr auto; /* num | name | pos */
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
.livematch .num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.livematch .name {
  font-weight: 600;
}
.livematch .pos {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #e8e8ea;
}
/* Badges (kapitan, debiut etc.) */
.livematch .tag {
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}
.livematch .tag--c {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.18);
  color: #ffd7d7;
}

/* Bench (details/summary) */
.livematch .bench {
  margin-top: 6px;
}
.livematch .bench > summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.livematch .bench[open] > summary {
  background: rgba(255, 255, 255, 0.08);
}
.livematch .bench ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

/* Manager line */
.livematch .manager {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* TL;DR */
.livematch .match-essay {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.18)
  );
  box-shadow: var(--shadow);
}
.livematch .match-essay h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.livematch .key-points {
  margin: 0;
  padding-left: 1rem;
}
.livematch .key-points li {
  margin: 0.3rem 0;
}

/* Timeline (events list) */
.livematch .timeline {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  border-left: 2px solid var(--line);
}
.livematch .timeline li {
  position: relative;
  margin: 0.85rem 0 0.85rem 0;
  padding: 0.35rem 0.75rem 0.35rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
.livematch .timeline li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.livematch .timeline time {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--muted);
  margin-right: 0.5rem;
  min-width: 2.2rem;
}

/* Event color accents */
.livematch .timeline li.goal {
  border-color: rgba(22, 163, 74, 0.28);
}
.livematch .timeline li.goal::before {
  background: var(--c-goal);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.livematch .timeline li.penalty {
  border-color: rgba(245, 158, 11, 0.28);
}
.livematch .timeline li.penalty::before {
  background: var(--c-pen);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.livematch .timeline li.var {
  border-color: rgba(56, 189, 248, 0.28);
}
.livematch .timeline li.var::before {
  background: var(--c-var);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.livematch .timeline li.yellow {
  border-color: rgba(251, 191, 36, 0.28);
}
.livematch .timeline li.yellow::before {
  background: var(--c-yellow);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.livematch .timeline li.red {
  border-color: rgba(239, 68, 68, 0.32);
}
.livematch .timeline li.red::before {
  background: var(--c-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.livematch .timeline li.sub {
  border-color: rgba(167, 139, 250, 0.28);
}
.livematch .timeline li.sub::before {
  background: var(--c-sub);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

/* Timeline badges (use global .badge from base.css as base) */
.livematch .badge {
  border-color: rgba(255, 255, 255, 0.12);
}
.livematch .badge--goal {
  background: rgba(22, 163, 74, 0.15);
  color: #cdeed8;
  border-color: rgba(22, 163, 74, 0.25);
}
.livematch .badge--pen {
  background: rgba(245, 158, 11, 0.15);
  color: #ffe9bf;
  border-color: rgba(245, 158, 11, 0.25);
}
.livematch .badge--var {
  background: rgba(56, 189, 248, 0.15);
  color: #cfefff;
  border-color: rgba(56, 189, 248, 0.25);
}
.livematch .badge--yellow {
  background: rgba(251, 191, 36, 0.15);
  color: #fff1c2;
  border-color: rgba(251, 191, 36, 0.28);
}
.livematch .badge--red {
  background: rgba(239, 68, 68, 0.15);
  color: #ffd1d1;
  border-color: rgba(239, 68, 68, 0.28);
}
.livematch .badge--sub {
  background: rgba(167, 139, 250, 0.15);
  color: #e6ddff;
  border-color: rgba(167, 139, 250, 0.28);
}

/* Highlighted match events (longer blocks) */
.livematch .match-event {
  position: relative;
  border: 1px solid var(--line);
  border-left: 6px solid var(--card-red);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.22)
  );
  padding: 1rem 0.9rem 0.9rem 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.livematch .match-event + .match-event {
  margin-top: 1rem;
}
.livematch .match-event .label {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  background: rgba(239, 68, 68, 0.18);
  color: #ffd7d7;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}
.livematch .match-event h3 {
  margin: 0.1rem 0 0.35rem;
  font-size: 1.1rem;
}
.livematch .match-event.goal {
  border-left-color: var(--c-goal);
}
.livematch .match-event.goal .label {
  background: rgba(22, 163, 74, 0.18);
  color: #d6f5e2;
  border-color: rgba(22, 163, 74, 0.35);
}
.livematch .match-event.red {
  border-left-color: var(--c-red);
}
.livematch .match-event.yellow {
  border-left-color: var(--c-yellow);
}
.livematch .match-event.var {
  border-left-color: var(--c-var);
}
.livematch .match-event.penalty {
  border-left-color: var(--c-pen);
}
.livematch .match-event.sub {
  border-left-color: var(--c-sub);
}
/* KEY POINTS (TL;DR) */
.key-points {
  margin: 0;
  padding-left: 1.2rem;
}
.key-points li {
  margin: 0.25rem 0;
}

/* Stats table */
.livematch .stats-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.livematch .stats-box h2 {
  margin: 0;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.25);
}
.livematch .stats-box table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.livematch .stats-box th,
.livematch .stats-box td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.livematch .stats-box tbody tr:last-child td {
  border-bottom: 0;
}
.livematch .stats-box th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}
.livematch .stats-box td:nth-child(2),
.livematch .stats-box td:nth-child(3) {
  text-align: center;
}

/* Pull-quote */
.livematch .pull-quote blockquote {
  margin: 0;
  border-left: 4px solid var(--card-red);
  padding: 0.5rem 0.9rem;
  font-size: 1.05rem;
  color: #ffd7d7;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), transparent);
  border-radius: 6px;
}

/* Read Next (scoped) */
.livematch .read-next {
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #121214;
  box-shadow: var(--shadow);
}
.livematch .read-next h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.livematch .read-next ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.livematch .read-next a {
  font-weight: 600;
}
.livematch .read-next .why {
  opacity: 0.8;
  margin-left: 6px;
  font-size: 14px;
}

/* Small screens polish */
@media (max-width: 640px) {
  .livematch .stats-box th,
  .livematch .stats-box td {
    padding: 0.6rem 0.7rem;
  }
  .livematch .timeline li {
    padding: 0.35rem 0.6rem 0.35rem 0.9rem;
  }
}

/* Centered article layout on desktop */
.livematch .article {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}
.livematch .comments h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.livematch .comments {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}
.livematch .comments {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}
.livematch .comments h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.livematch .comments-cta {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}

/* Preview news (plotki i aktualności) */
.livematch .preview-news {
  border: 1px solid var(--line);
  border-left: 6px solid var(--card-red);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
}
.livematch .preview-news h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  line-height: 1.25;
}
.livematch .preview-news ul {
  margin: 0;
  padding-left: 1.05rem; /* delikatny wcięty bullet */
  display: grid;
  gap: 10px;
}
.livematch .preview-news li {
  position: relative;
  padding: 0.35rem 0.55rem 0.35rem 0.1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

/* link do źródła – subtelny, nie krzyczy */
.livematch .preview-news a {
  font-size: 0.88rem;
  color: var(--muted);
  margin-left: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  text-underline-offset: 2px;
}
.livematch .preview-news a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* wzmocnienie leadów w punktach */
.livematch .preview-news li > strong {
  color: #ffe1e1;
}

/* mobile squeeze */
@media (max-width: 640px) {
  .livematch .preview-news {
    padding: 0.8rem 0.85rem;
    border-left-width: 5px;
  }
}

/* Hero image full width on mobile, centered on larger screens */
@media (min-width: 900px) {
  .livematch .matchday_image img {
    border-radius: 14px;
  }
}
/* Wynik meczu – Scorebox */
.livematch .scorebox {
  margin: 1.4rem 0;
  padding: 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.015)
  );
  box-shadow: var(--shadow);
  text-align: center;
}

.livematch .scorebox__teams {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.6rem;
  color: var(--ink);
}

.livematch .scorebox__team {
  flex: 1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.livematch .scorebox__team--lfc {
  color: var(--card-red-2);
}

.livematch .scorebox__team--lfc--away {
  color: var(--ink);
}

.livematch .scorebox__team--atm {
  color: #bbbbff;
}

.livematch .scorebox__team--saints {
  color: #ecfb12;
}

.livematch .scorebox__team--cp {
  color: #3912fb;
}

/* Scorebox – responsive */
.livematch .scorebox {
  padding: 0.9rem 0.9rem;
}
.livematch .scorebox__teams {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
}
.livematch .scorebox__team {
  flex: 1 1 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.livematch .scorebox__score {
  font-weight: 800;
  line-height: 1;
  font-size: clamp(1.6rem, 9vw, 2.3rem);
}

/* <= 600px: ciaśniej */
@media (max-width: 600px) {
  .livematch .scorebox {
    padding: 0.75rem 0.8rem;
  }
  .livematch .scorebox__teams {
    gap: 0.6rem;
  }
}

/* <= 400px: grid, jeszcze ciaśniej */
@media (max-width: 400px) {
  .livematch .scorebox__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .livematch .scorebox__team {
    letter-spacing: 0.02em;
    font-size: 0.86rem;
  }
  .livematch .scorebox__score {
    font-size: 1.9rem;
    padding: 0 0.2rem;
  }
}

/* <= 360px: automatyczna zamiana na skrót (LIV/ATL) */
@media (max-width: 360px) {
  .livematch .scorebox__team .full {
    display: none;
  }
  .livematch .scorebox__team::after {
    content: attr(data-abbr);
  }
}

.livematch .scorebox__score {
  font-weight: 700;
  font-size: 2.1rem;
  color: #fff;
}
/* MOTM card */
.livematch .motm {
  margin: 1.2rem 0;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--card-red);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(0, 0, 0, 0.22)
  );
  box-shadow: var(--shadow);
}
.livematch .motm__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.livematch .motm h3 {
  margin: 0;
  font-size: 1.15rem;
}
.livematch .motm .label {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  background: rgba(239, 68, 68, 0.18);
  color: #ffd7d7;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}
.livematch .motm__facts {
  margin: 0.3rem 0 0.6rem;
  padding-left: 1.1rem;
}
.livematch .motm__facts li {
  margin: 0.15rem 0;
}
.livematch .motm__why {
  color: var(--ink);
  opacity: 0.95;
}
/* Pull-quote dla felietonu */
.livematch .pull-quote {
  margin: 0.8rem 0 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 4px solid var(--card-red);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}
.livematch .pull-quote blockquote {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  font-style: italic;
}
/* LIVE EVENTS (appended) */
.live-tools {
  margin: 14px 0;
}
.live-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.scoreboard {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.scoreboard .score {
  font-size: 1.25rem;
  padding: 0 6px;
}
.score-update {
  transform: scale(1.02);
  transition: transform 0.25s ease;
}

.live-controls .btn {
  margin-left: 6px;
}

.live-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.evt {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px;
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.evt__meta {
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 84px;
}
.evt__type {
  display: inline-block;
  background: rgba(255, 255, 255, 0.02);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  margin-left: 8px;
  color: #fff;
}
.evt__body {
  flex: 1;
  color: #ddd;
}

.evt--goal {
  border-left: 4px solid #29a745;
  box-shadow: 0 6px 18px rgba(41, 167, 69, 0.06);
}
.evt--yellow {
  border-left: 4px solid #f2c94c;
}
.evt--red {
  border-left: 4px solid #e63946;
}
.evt--sub {
  border-left: 4px solid #5e60ce;
}
.evt--injury {
  border-left: 4px solid #ff7b8a;
}
.evt--shot {
  border-left: 4px solid #2b90d9;
}
.evt--half,
.evt--full {
  border-left: 4px solid #9aa0a6;
}

.evt--flash {
  transform: translateY(-4px);
  animation: evtFlash 0.9s ease-in-out;
}
@keyframes evtFlash {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .evt {
    padding: 8px;
  }
  .evt__meta {
    min-width: 64px;
    font-size: 0.8rem;
  }
}
/* Scorebox – responsive */
.livematch .scorebox {
  padding: 0.9rem 0.9rem;
}
.livematch .scorebox__teams {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
}
.livematch .scorebox__team {
  flex: 1 1 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.livematch .scorebox__score {
  font-weight: 800;
  line-height: 1;
  font-size: clamp(1.6rem, 9vw, 2.3rem);
}

/* <= 600px: ciaśniej */
@media (max-width: 600px) {
  .livematch .scorebox {
    padding: 0.75rem 0.8rem;
  }
  .livematch .scorebox__teams {
    gap: 0.6rem;
  }
}

/* <= 400px: grid, jeszcze ciaśniej */
@media (max-width: 400px) {
  .livematch .scorebox__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .livematch .scorebox__team {
    letter-spacing: 0.02em;
    font-size: 0.86rem;
  }
  .livematch .scorebox__score {
    font-size: 1.9rem;
    padding: 0 0.2rem;
  }
}

/* <= 360px: automatyczna zamiana na skrót (LIV/ATL) */
@media (max-width: 360px) {
  .livematch .scorebox__team .full {
    display: none;
  }
  .livematch .scorebox__team::after {
    content: attr(data-abbr);
  }
}
/* ===== Live timeline: base ===== */
.evt {
  position: relative;
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
}
.evt__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.evt__meta time {
  display: inline-block;
  min-width: 2ch;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}
.evt__type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}
.evt__body {
  line-height: 1.4;
}
.evt__author {
  opacity: 0.8;
  margin-bottom: 4px;
}

/* ===== Variants ===== */
.evt--goal {
  border-color: rgba(46, 204, 113, 0.55);
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.25) inset,
    0 6px 20px rgba(46, 204, 113, 0.12);
}
.evt--goal .evt__type {
  background: rgba(46, 204, 113, 0.18);
  color: #c9f7de;
}

.evt--yellow {
  border-color: rgba(255, 208, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 208, 0, 0.25) inset,
    0 6px 20px rgba(255, 208, 0, 0.08);
}
.evt--yellow .evt__type {
  background: rgba(255, 208, 0, 0.22);
  color: #fff1b3;
}

.evt--red {
  border-color: rgba(255, 71, 87, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 71, 87, 0.25) inset,
    0 6px 20px rgba(255, 71, 87, 0.12);
}
.evt--red .evt__type {
  background: rgba(255, 71, 87, 0.2);
  color: #ffd1d6;
}

.evt--var {
  border-color: rgba(255, 159, 67, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 159, 67, 0.25) inset,
    0 6px 20px rgba(255, 159, 67, 0.1);
}
.evt--var .evt__type {
  background: rgba(255, 159, 67, 0.2);
  color: #ffe0bf;
}

.evt--subs {
  border-color: rgba(52, 152, 219, 0.55);
  box-shadow: 0 0 0 1px rgba(52, 152, 219, 0.25) inset,
    0 6px 20px rgba(52, 152, 219, 0.1);
}
.evt--subs .evt__type {
  background: rgba(52, 152, 219, 0.2);
  color: #cfeaff;
}

/* Drobne dopieszczki na mobile */
@media (max-width: 560px) {
  .evt {
    padding: 10px 12px;
  }
  .evt__meta time {
    padding: 2px 6px;
  }
}
.btn--danger {
  background: #7a1f2b;
  border-color: #a92f40;
}
.btn--danger:hover {
  filter: brightness(1.05);
}
/* === Live timeline: mobile stack for meta === */
@media (max-width: 640px) {
  /* meta w kolumnie: czas nad typem */
  .evt__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px; /* ciaśniej niż desktop */
    min-width: auto; /* pozwól się zawijać */
    margin-bottom: 6px; /* odstęp od treści */
  }

  .evt__meta time {
    display: inline-block;
    padding: 2px 8px; /* czytelniejszy „żeton” minuty */
  }

  .evt__type {
    display: inline-block; /* nowa linia przez flex-direction: column */
    margin-left: 0; /* wyzeruj lewy margines z wersji desktop */
    padding: 2px 8px;
    font-size: 0.74rem; /* odrobina kompresji */
  }

  /* delikatne ściśnięcie całego eventu na mobile */
  .evt {
    gap: 10px;
    padding: 10px 12px;
  }

  .evt--goal .evt__type {
    background: #123d23;
    color: #c2ffda;
  }
  .evt--yellow .evt__type {
    background: #3a3300;
    color: #ffe066;
  }
  .evt--red .evt__type {
    background: #e4050da0;
    color: #f70606;
  }
  .evt--subs .evt__type {
    background: #10273a;
    color: #c8e6ff;
  }
  .evt--moment .evt__type,
  .evt--fact .evt__type {
    background: #24262a;
    color: #d9d9d9;
  }
}

/* minimalny, ciemny wygląd pasujący do Anfield.pl */
.match-history-section {
  margin: 1.25rem 0;
}
.match-history {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, Segoe UI, Roboto, "Helvetica Neue", Arial;
}
.match-history thead th {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #ddd;
  background: rgba(255, 255, 255, 0.02);
}
.match-history tbody td {
  padding: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #ccc;
  font-size: 0.95rem;
}
.match-history tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.01);
}

/* mobile: stack rows and label each cell (accessibility-friendly) */
@media (max-width: 640px) {
  .match-history thead {
    display: none;
  }
  .match-history,
  .match-history tbody,
  .match-history tr,
  .match-history td {
    display: block;
    width: 100%;
  }
  .match-history tr {
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    overflow: hidden;
  }
  .match-history td {
    padding: 0.6rem 0.8rem;
    position: relative;
  }
  .match-history td:before {
    content: attr(data-label);
    position: absolute;
    left: 0.8rem;
    top: 0.6rem;
    font-size: 0.78rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
}

/* To make responsive labels work, add data-label attributes in tbody for mobile */
