
.highlighted-matches .highlighted-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .highlighted-matches .highlighted-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .highlighted-matches .highlighted-grid > .highlighted-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 520px;
  }
}

.highlighted-matches .highlighted-item {
  position: relative;
}

.highlighted-matches .hl-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.highlighted-matches .hl-card {
  position: relative;
  display: block;
  min-height: 200px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.highlighted-matches .hl-link:hover .hl-card,
.highlighted-matches .hl-link:focus-visible .hl-card {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 134, 0.55);
  box-shadow: 0 22px 46px -14px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 45, 134, 0.25);
}

.highlighted-matches .hl-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0b1020;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-image: var(--hl-bg, url("/assets/highlighted/derby.avif")),
    url("/assets/highlighted/derby.avif");
  transform: scale(1.02);
  transition: transform 0.6s ease;
}

.highlighted-matches .hl-link:hover .hl-media {
  transform: scale(1.09);
}

.highlighted-matches .hl-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
      rgba(7, 10, 22, 0.97) 0%,
      rgba(7, 10, 22, 0.82) 26%,
      rgba(7, 10, 22, 0.10) 55%,
      rgba(7, 10, 22, 0.48) 100%);
}

.highlighted-matches .hl-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.10) 46%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.highlighted-matches .hl-link:hover .hl-card::after {
  transform: translateX(130%);
}

.highlighted-matches .hl-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 46px 0 12px;
}

.highlighted-matches .hl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 74%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 45, 134, 0.22);
  border: 1px solid rgba(255, 45, 134, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.highlighted-matches .hl-chip i {
  color: #ff9ec4;
  font-size: 0.72rem;
}

.highlighted-matches .hl-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlighted-matches .hl-top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.highlighted-matches .hl-score {
  font-weight: 900;
  font-size: 0.9rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.highlighted-matches .hl-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(7, 10, 22, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.highlighted-matches .hl-close:hover {
  background: rgba(255, 45, 134, 0.9);
  color: #fff;
  transform: scale(1.08);
}

.highlighted-matches .hl-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.highlighted-matches .hl-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.highlighted-matches .hl-team {
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlighted-matches .hl-team--home {
  text-align: left;
}

.highlighted-matches .hl-team--away {
  text-align: right;
}

.highlighted-matches .hl-vs {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.highlighted-matches .hl-bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg,
      #ff2d86 0%,
      #e879f9 calc(var(--p1, 40%) - 7%),
      rgba(255, 255, 255, 0.30) calc(var(--p1, 40%) + 7%),
      rgba(255, 255, 255, 0.30) calc(var(--p2, 70%) - 7%),
      #8b5cf6 calc(var(--p2, 70%) + 7%),
      #6d5df6 100%);
}

.highlighted-matches .hl-bar.hl-bar--na {
  background: rgba(255, 255, 255, 0.14);
}

.highlighted-matches .hl-pcts {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.highlighted-matches .hl-pct--home {
  text-align: left;
  color: #ff5aa8;
}

.highlighted-matches .hl-pct--draw {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.highlighted-matches .hl-pct--away {
  text-align: right;
  color: #b39cff;
}

.highlighted-matches .highlighted-item.hl-dismissing {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.highlighted-item.hl-hidden {
  display: none;
}

.highlighted-matches .hl-chip i {
  animation: hl-flame 2.4s ease-in-out infinite;
}

@keyframes hl-flame {
  0%, 100% { transform: scale(1); text-shadow: 0 0 5px rgba(255, 45, 134, 0.45); }
  50%      { transform: scale(1.14); text-shadow: 0 0 11px rgba(255, 45, 134, 0.85); }
}

.highlighted-matches .hl-link:active .hl-card {
  transform: translateY(-1px) scale(0.995);
  border-color: rgba(255, 45, 134, 0.55);
}

@media (hover: none) {
  .highlighted-matches .hl-media {
    animation: hl-kenburns 16s ease-in-out infinite alternate;
  }
}

@keyframes hl-kenburns {
  from { transform: scale(1.03); }
  to { transform: scale(1.10); }
}

@media (prefers-reduced-motion: reduce) {

  .highlighted-matches .hl-media,
  .highlighted-matches .hl-card,
  .highlighted-matches .hl-card::after,
  .highlighted-matches .hl-chip i {
    animation: none;
    transition: none;
  }

  .highlighted-matches .hl-link:hover .hl-media {
    transform: scale(1.02);
  }
}
