.scoreboard-player-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  line-height: 1;
}

.leader-highlight {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.leader-highlight::before,
.leader-highlight::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.leader-highlight::before {
  z-index: -1;
  inset: -0.65rem -1rem;
  background:
    radial-gradient(circle at 10% 25%, #fde047 0 2px, transparent 3px),
    radial-gradient(circle at 88% 20%, #fff7ae 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 18% 82%, #f59e0b 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 82% 78%, #fef08a 0 2px, transparent 3px),
    radial-gradient(circle at 50% 4%, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 55% 94%, #facc15 0 1.5px, transparent 2.5px);
  filter: drop-shadow(0 0 5px rgba(250, 204, 21, 0.95));
  animation: leader-particles 2.2s ease-in-out infinite;
}

.leader-highlight::after {
  z-index: -2;
  inset: -0.35rem -0.65rem;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(250, 204, 21, 0.32), rgba(245, 158, 11, 0.08) 55%, transparent 75%);
  filter: blur(4px);
  animation: leader-glow 1.6s ease-in-out infinite alternate;
}

.leader-crown,
.leader-player-name {
  position: relative;
  z-index: 1;
}

.leader-crown {
  width: 18px;
  height: 18px;
  color: #facc15;
  filter: drop-shadow(0 0 5px rgba(250, 204, 21, 0.95));
  animation: leader-crown-float 1.8s ease-in-out infinite;
}

.leader-player-name {
  font-size: 1.18em;
  font-weight: 800;
  color: #fff7ae;
  letter-spacing: 0.015em;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.8),
    0 0 10px rgba(250, 204, 21, 0.9),
    0 0 20px rgba(245, 158, 11, 0.55);
}

.leader-highlight-totals {
  width: fit-content;
  padding: 0.15rem 0.25rem;
}

.stink-highlight {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.stink-highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -0.3rem -0.55rem;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(120, 113, 108, 0.2), rgba(87, 83, 78, 0.06) 58%, transparent 76%);
  filter: blur(5px);
  animation: stink-glow 2.4s ease-in-out infinite alternate;
}

.stink-scene {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 31px;
}

.stink-lines {
  position: absolute;
  inset: 0 auto auto 2px;
  width: 42px;
  height: 32px;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(28, 25, 23, 0.55));
}

.stink-highlight-table .stink-scene {
  margin-bottom: -0.35rem;
}

.stink-highlight-totals {
  width: fit-content;
  padding: 0.15rem 0.25rem;
}

.stink-path {
  fill: none;
  stroke: #756a62;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 3;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: stink-waft 2.25s ease-in-out infinite;
}

.stink-path:nth-child(1) {
  stroke: #655c56;
  animation-delay: -1.55s;
}

.stink-path:nth-child(2) {
  stroke: #80736a;
  animation-delay: -0.8s;
}

.stink-path:nth-child(3) {
  stroke: #5f5752;
  animation-delay: -0.2s;
}

.stink-flies {
  position: absolute;
  inset: -6px -5px -4px;
  pointer-events: none;
}

.stink-fly {
  position: absolute;
  font-size: 0.72rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9));
}

.stink-fly:nth-child(1) {
  top: 5px;
  left: 7px;
  animation: fly-orbit-one 2.1s ease-in-out infinite;
}

.stink-fly:nth-child(2) {
  top: 1px;
  right: 7px;
  animation: fly-orbit-two 2.45s ease-in-out infinite -0.8s;
}

.stink-fly:nth-child(3) {
  top: 16px;
  right: 1px;
  animation: fly-orbit-three 1.85s ease-in-out infinite -0.35s;
}

.stink-fly:nth-child(4) {
  top: 14px;
  left: -2px;
  animation: fly-orbit-four 2.3s ease-in-out infinite -1.1s;
}

@keyframes leader-particles {
  0%, 100% { opacity: 0.6; transform: translateY(1px) scale(0.94) rotate(-2deg); }
  50% { opacity: 1; transform: translateY(-2px) scale(1.08) rotate(2deg); }
}

@keyframes leader-glow {
  0% { opacity: 0.55; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1.08); }
}

@keyframes leader-crown-float {
  0%, 100% { transform: translateY(1px) rotate(-4deg); }
  50% { transform: translateY(-2px) rotate(4deg); }
}

@keyframes stink-waft {
  0% { opacity: 0; stroke-dashoffset: 12; transform: translateY(3px) rotate(-4deg) scaleY(0.76); }
  30% { opacity: 0.9; }
  65% { opacity: 0.72; transform: translateY(-2px) rotate(4deg) scaleY(1.04); }
  100% { opacity: 0; stroke-dashoffset: -8; transform: translateY(-7px) rotate(-3deg) scaleY(0.9); }
}

@keyframes stink-glow {
  0% { opacity: 0.2; transform: scale(0.94); }
  100% { opacity: 0.48; transform: scale(1.04); }
}

@keyframes fly-orbit-one {
  0%, 100% { transform: translate(0, 1px) rotate(-8deg); }
  28% { transform: translate(13px, -5px) rotate(14deg); }
  57% { transform: translate(20px, 5px) rotate(-12deg); }
  78% { transform: translate(7px, 9px) rotate(10deg); }
}

@keyframes fly-orbit-two {
  0%, 100% { transform: translate(0, 0) rotate(9deg); }
  30% { transform: translate(-11px, 7px) rotate(-15deg); }
  62% { transform: translate(-20px, 1px) rotate(12deg); }
  82% { transform: translate(-8px, -5px) rotate(-8deg); }
}

@keyframes fly-orbit-three {
  0%, 100% { transform: translate(0, 0) scale(0.82); }
  36% { transform: translate(-14px, -8px) scale(1); }
  70% { transform: translate(-5px, -15px) scale(0.9); }
}

@keyframes fly-orbit-four {
  0%, 100% { transform: translate(0, 0) rotate(-12deg) scale(0.88); }
  32% { transform: translate(9px, -13px) rotate(9deg) scale(1); }
  66% { transform: translate(22px, -6px) rotate(-8deg) scale(0.92); }
  84% { transform: translate(12px, 3px) rotate(11deg) scale(0.86); }
}

@media (prefers-reduced-motion: reduce) {
  .leader-highlight::before,
  .leader-highlight::after,
  .leader-crown,
  .stink-highlight::after,
  .stink-path,
  .stink-fly {
    animation: none;
  }
}
