/**
 * Lineup Component — Production-grade pitch & lineup UI
 * Inspired by FlashScore, SofaScore, FotMob.
 * Uses design tokens from premium.css.
 */

/* ========== LINEUP CONTAINER ========== */
.lu-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== HEADER — TEAM COMPARISON BAR ========== */
.lu-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.lu-team-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.lu-team-badge--home {
  justify-content: flex-end;
  text-align: right;
}

.lu-team-badge--away {
  justify-content: flex-start;
  text-align: left;
}

.lu-team-badge__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.lu-team-badge__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lu-team-badge__name {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lu-team-badge__formation {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.lu-header__vs {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

/* ========== PITCHES ROW ========== */
.lu-pitches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.lu-pitch-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lu-pitch-col__label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-3);
  text-align: center;
}

/* ========== PITCH ========== */
.lu-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 68 / 105;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), inset 0 0 60px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.08);
}


/* Realistic grass gradient */
.lu-pitch__grass {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 20px,
      transparent 20px,
      transparent 40px
    ),
    linear-gradient(160deg,
      #2a7d3f 0%,
      #237a38 15%,
      #2e8544 30%,
      #267e3b 45%,
      #2a8240 60%,
      #237a38 75%,
      #2e8544 90%,
      #267e3b 100%
    );
  z-index: 0;
}

/* Field lines overlay */
.lu-pitch__lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Touchline border */
.lu-pitch__lines::before {
  content: '';
  position: absolute;
  inset: 3%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
}

/* Halfway line */
.lu-pitch__halfway {
  position: absolute;
  top: 50%;
  left: 3%;
  right: 3%;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  z-index: 1;
}

/* Center circle */
.lu-pitch__center-circle {
  position: absolute;
  width: 28%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Center spot */
.lu-pitch__center-circle::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Penalty areas */
.lu-pitch__box--top,
.lu-pitch__box--bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  z-index: 1;
}

.lu-pitch__box--top {
  top: 3%;
  height: 18%;
  border-top: none;
}

.lu-pitch__box--bottom {
  bottom: 3%;
  height: 18%;
  border-bottom: none;
}

/* Goal areas (6-yard boxes) */
.lu-pitch__goal-box--top,
.lu-pitch__goal-box--bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  z-index: 1;
}

.lu-pitch__goal-box--top {
  top: 3%;
  height: 7%;
  border-top: none;
}

.lu-pitch__goal-box--bottom {
  bottom: 3%;
  height: 7%;
  border-bottom: none;
}

/* Penalty arcs */
.lu-pitch__arc--top,
.lu-pitch__arc--bottom {
  position: absolute;
  width: 20%;
  aspect-ratio: 2;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.lu-pitch__arc--top {
  top: 17%;
  clip-path: inset(50% 0 0 0);
}

.lu-pitch__arc--bottom {
  bottom: 17%;
  clip-path: inset(0 0 50% 0);
}

/* ========== PITCH WRAPPER — stable width and centering ========== */
.lu-pitch-wrapper {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========== SHARED PITCH — 3:4 aspect, centered ========== */
.lu-pitch--shared {
  aspect-ratio: 3 / 4;
  max-width: 560px;
  width: 100%;
  margin: 0 auto var(--space-5);
}

.lu-pitch--shared .lu-players {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.lu-pitch--shared .lu-player {
  pointer-events: auto;
}

/* ========== PLAYER COMPONENT — Professional circular node ========== */
.lu-players {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.lu-player {
  position: absolute;
  top: var(--lu-top, 50%);
  left: var(--lu-left, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s ease;
}

.lu-player:hover {
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 10;
}

.lu-player__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.lu-player__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none !important;
  color: inherit;
}

/* Badge wrapper — holds badge + events, events positioned outside */
.lu-player__badge-wrap {
  position: relative;
  display: inline-block;
}

/* Player badge — compact size, no overlap (SofaScore style) */
.lu-player__badge {
  --lu-badge-size: 48px;
  width: var(--lu-badge-size);
  height: var(--lu-badge-size);
  min-width: var(--lu-badge-size);
  min-height: var(--lu-badge-size);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: var(--player-bg, #2d5a8c);
}

/* Face container — holds photo or number, fills badge */
.lu-player__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
}

.lu-player__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center 32%;
  display: block;
}

.lu-player__number {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  line-height: 1;
}

/* When we have photo: number as small overlay (top-left, SofaScore style) */
.lu-player__number--overlay {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 5px;
  border-radius: 6px;
  z-index: 2;
}

.lu-player__face--no-photo .lu-player__number {
  font-size: 1.25rem;
}

.lu-player__face--no-photo .lu-player__number--overlay {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  background: transparent;
  padding: 0;
}

/* Position colors */
.lu-player__badge--G,
.lu-player__badge--gk {
  --player-bg: #dc2626;
  background: linear-gradient(145deg, #dc2626, #b91c1c);
}

.lu-player__badge--D,
.lu-player__badge--def {
  --player-bg: #22c55e;
  background: linear-gradient(145deg, #22c55e, #16a34a);
}

.lu-player__badge--M,
.lu-player__badge--mid {
  --player-bg: #f97316;
  background: linear-gradient(145deg, #f97316, #ea580c);
}

.lu-player__badge--F,
.lu-player__badge--fwd {
  --player-bg: #3b82f6;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
}

/* Rating badge — below circle, centered, never overlaps face */
.lu-player__rating {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.lu-player__rating--high {
  background: var(--success, #22c55e);
}

.lu-player__rating--mid {
  background: var(--warning, #eab308);
}

.lu-player__rating--low {
  background: var(--danger, #dc2626);
}

/* Best player of the match — blue highlight (SofaScore/OneFootball style) */
.lu-player__rating--best {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.5);
}

.lu-player--best .lu-player__badge {
  border-color: #3b82f6;
  box-shadow:
    0 4px 16px rgba(59, 130, 246, 0.4),
    0 0 0 2px rgba(59, 130, 246, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lu-player--best:hover .lu-player__badge {
  box-shadow:
    0 6px 20px rgba(59, 130, 246, 0.5),
    0 0 0 2px rgba(59, 130, 246, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Event icons — outside top-right of badge, stacked vertically, never overlap face */
.lu-player__events {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  z-index: 5;
  pointer-events: none;
}

.lu-event {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lu-event--sub-in {
  color: var(--success);
  background: rgba(34, 197, 94, 0.9);
}

.lu-event--sub-out {
  color: #fff;
  background: var(--danger);
}

.lu-event--yellow {
  color: #fff;
  background: #eab308;
}

.lu-event--red {
  color: #fff;
  background: #dc2626;
}

.lu-event--goal {
  font-size: 11px;
  background: transparent;
  border: none;
}

/* Player name — below badge, no overlap */
.lu-player__name {
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  max-width: 56px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
}

/* ========== ACCORDION ========== */
.lu-accordion .accordion-item {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lu-accordion .accordion-button {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  border: none;
}

.lu-accordion .accordion-button:not(.collapsed) {
  background: var(--bg-elevated);
  box-shadow: none;
}

.lu-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

.lu-accordion .accordion-body {
  background: var(--bg-secondary);
  padding: var(--space-5);
}

/* ========== SUBSTITUTES — Clean two-column layout ========== */
.lu-subs-pitch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.lu-subs-pitch__col {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.lu-subs-pitch__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4);
  background: var(--bg-tertiary);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--bg-elevated);
}

.lu-subs-pitch__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.lu-subs-pitch__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--bg-tertiary);
  font-size: var(--text-sm);
  transition: background 0.15s ease;
}

.lu-subs-pitch__row:last-child {
  border-bottom: none;
}

.lu-subs-pitch__row:hover {
  background: var(--bg-hover);
}

.lu-subs-pitch__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-xs);
  color: #fff;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.lu-subs-pitch__name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.lu-subs-pitch__played {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--success);
  flex-shrink: 0;
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.lu-subs-pitch__bench {
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ========== TOOLTIP ========== */
.lu-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  pointer-events: none;
}

.lu-player:hover .lu-tooltip {
  display: block;
}

.lu-tooltip__name {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.lu-tooltip__meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lu-tooltip__meta span {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ========== STARTING XI LIST ========== */
.lu-squad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.lu-squad-col {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lu-squad-col__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--bg-elevated);
}

.lu-squad-col__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.lu-squad-col__title {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.lu-squad-col__formation {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--accent-primary);
  background: var(--accent-muted);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* Player row in list */
.lu-player-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.lu-player-row__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.lu-player-row:last-child {
  border-bottom: none;
}

.lu-player-row:hover {
  background: var(--bg-hover);
}

.lu-player-row__number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.lu-player-row__info {
  flex: 1;
  min-width: 0;
}

.lu-player-row__name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lu-player-row__name a {
  color: inherit;
  text-decoration: none;
}

.lu-player-row__name a:hover {
  color: var(--accent-primary);
}

.lu-player-row__pos {
  font-size: 10px;
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lu-player-row__rating {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: #fff;
  flex-shrink: 0;
}

.lu-player-row__rating--high { background: var(--success); }
.lu-player-row__rating--mid  { background: var(--warning); }
.lu-player-row__rating--low  { background: var(--danger); }

/* Position color dot */
.lu-pos-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

.lu-pos-dot--gk  { background: #d4a017; }
.lu-pos-dot--def { background: #3b82f6; }
.lu-pos-dot--mid { background: #10b981; }
.lu-pos-dot--fwd { background: #ef4444; }

/* ========== SUBSTITUTES — COLLAPSIBLE ========== */
.lu-subs-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: background var(--transition-fast);
}

.lu-subs-toggle:hover {
  background: var(--bg-elevated);
}

.lu-subs-toggle__icon {
  transition: transform var(--transition-base);
  font-size: 10px;
}

.lu-subs-toggle[aria-expanded="true"] .lu-subs-toggle__icon {
  transform: rotate(180deg);
}

.lu-subs-body {
  overflow: hidden;
}

.lu-subs-body .lu-player-row {
  opacity: 0.85;
}

.lu-subs-body .lu-player-row__number {
  opacity: 0.7;
}

/* Played/not-played indicator */
.lu-played-badge {
  font-size: 10px;
  font-weight: var(--font-semibold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.lu-played-badge--yes {
  color: var(--success);
  background: var(--success-bg);
}

.lu-played-badge--no {
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

/* ========== SUBSTITUTIONS TIMELINE ========== */
.lu-subs-timeline {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.lu-subs-timeline__header {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-tertiary);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  border-bottom: 1px solid var(--bg-elevated);
}

.lu-sub-event {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--bg-tertiary);
  transition: background var(--transition-fast);
}

.lu-sub-event:last-child {
  border-bottom: none;
}

.lu-sub-event:hover {
  background: var(--bg-hover);
}

.lu-sub-event__minute {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: #fff;
  background: var(--accent-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.lu-sub-event__detail {
  flex: 1;
  min-width: 0;
}

.lu-sub-event__team {
  font-size: 10px;
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 1px;
}

.lu-sub-event__players {
  font-size: var(--text-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lu-sub-event__out {
  color: var(--danger);
  font-weight: var(--font-medium);
}

.lu-sub-event__in {
  color: var(--success);
  font-weight: var(--font-medium);
}

.lu-sub-event__arrow {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ========== COACH INFO ========== */
.lu-coach {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--bg-tertiary);
}

.lu-coach__photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--bg-tertiary);
}

.lu-coach__label {
  font-size: 10px;
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lu-coach__name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

/* ========== NO DATA STATE ========== */
.lu-empty {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  background: var(--bg-secondary);
  border: 1px dashed var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.lu-empty__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
  opacity: 0.4;
}

.lu-empty__title {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.lu-empty__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.lu-empty code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .lu-pitches {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .lu-squad {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .lu-subs-pitch {
    grid-template-columns: 1fr;
  }

  .lu-header {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .lu-team-badge--home,
  .lu-team-badge--away {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .lu-pitch--shared .lu-player__badge {
    --lu-badge-size: 40px;
    border-width: 2px;
  }

  .lu-pitch--shared .lu-player__rating {
    width: 16px;
    height: 16px;
    font-size: 8px;
    bottom: -3px;
  }

  .lu-pitch--shared .lu-player__events .lu-event {
    width: 10px;
    height: 10px;
    font-size: 7px;
  }

  .lu-pitch--shared .lu-player__name {
    font-size: 8px;
    max-width: 56px;
  }

  .lu-pitch--shared .lu-player__number {
    font-size: 0.9rem;
  }

  .lu-pitch--shared .lu-player__number--overlay {
    font-size: 0.6rem;
    padding: 1px 4px;
  }

  .lu-player-row {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .lu-player-row__number {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .lu-player-row__name {
    font-size: var(--text-xs);
  }

  .lu-squad-col__header {
    padding: var(--space-3) var(--space-4);
  }

  .lu-sub-event {
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }

  .lu-sub-event__minute {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }
}

/* ========== SECTION DIVIDER ========== */
.lu-section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--bg-tertiary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lu-section-title__icon {
  font-size: var(--text-sm);
}

/* ========== ANIMATION ========== */
@keyframes luFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lu-container {
  animation: luFadeIn 0.3s ease;
}

/* Staggered player badge animation — triggers when tab becomes active */
@keyframes luPlayerStaggerIn {
  from {
    opacity: 1;
    transform: translate(-50%, calc(-50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.lu-players--animate-ready .lu-player {
  opacity: 1;
  transform: translate(-50%, calc(-50% + 8px));
}

.lu-players--animate-ready.lu-animate .lu-player {
  animation: luPlayerStaggerIn 450ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Row-based animation delay (defense first, then midfield, then attack) */
.lu-players--animate-ready.lu-animate .lu-row--1 { animation-delay: 0ms; }
.lu-players--animate-ready.lu-animate .lu-row--2 { animation-delay: 80ms; }
.lu-players--animate-ready.lu-animate .lu-row--3 { animation-delay: 160ms; }
.lu-players--animate-ready.lu-animate .lu-row--4 { animation-delay: 240ms; }
.lu-players--animate-ready.lu-animate .lu-row--5 { animation-delay: 320ms; }

/* ========== ACTIVE PLAYER HIGHLIGHT (GOALS / ASSISTS) ========== */
.lu-player--goal .lu-player__badge {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 12px 2px color-mix(in srgb, var(--player-bg, #2d5a8c) 60%, transparent);
}

.lu-player--assist .lu-player__badge {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 10px 2px color-mix(in srgb, var(--success, #22c55e) 50%, transparent);
}

.lu-player--goal.lu-player--assist .lu-player__badge {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 12px 2px color-mix(in srgb, var(--player-bg, #2d5a8c) 50%, transparent),
    0 0 10px 2px color-mix(in srgb, var(--success, #22c55e) 40%, transparent);
}

/* Goal/Assist — badge overflow for event icons */
.lu-player__badge {
  overflow: visible;
}

/* ========== LIGHT THEME ADJUSTMENTS ========== */
html.theme-light .lu-pitch {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md), inset 0 0 40px rgba(0, 0, 0, 0.08);
}

html.theme-light .lu-player__name {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

html.theme-light .lu-tooltip {
  border-color: var(--bg-tertiary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Goal/assist glow — softer in light theme */
html.theme-light .lu-player--goal .lu-player__badge {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 10px 2px color-mix(in srgb, var(--player-bg, #2d5a8c) 45%, transparent);
}
html.theme-light .lu-player--assist .lu-player__badge {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 8px 2px color-mix(in srgb, var(--success, #22c55e) 40%, transparent);
}

/* ========== PITCH PLAYER BADGE LINKS ========== */
/* Entire badge + name clickable; tooltip still works (hover bubbles to .lu-player) */
.lu-player .lu-link-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none !important;
}
.lu-player .lu-link-player:hover {
  text-decoration: none !important;
}
.lu-player .lu-link-player:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 50%;
}
