.sticky-scorebar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.sticky-scorebar.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.sticky-scorebar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}

.sticky-scorebar-track {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.sticky-scorebar-track::-webkit-scrollbar {
  display: none;
}

.scorebar-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 32, 16, 0.92);
  backdrop-filter: blur(14px);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  scroll-snap-align: start;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.scorebar-chip:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(12, 42, 22, 0.96);
  transform: translateY(-1px);
}

.scorebar-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scorebar-chip--live {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.scorebar-chip--live:hover {
  border-color: rgba(239, 68, 68, 0.5);
}

.scorebar-chip--focus {
  border-color: rgba(16, 185, 129, 0.45);
}

.scorebar-teams {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.scorebar-team {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.scorebar-team .flag-img {
  width: 18px;
  height: auto;
}

.scorebar-team .flag-missing {
  width: 18px;
  height: 13px;
  font-size: 8px;
}

.scorebar-name {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 700;
}

.scorebar-score {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.scorebar-score--live {
  color: #fca5a5;
}

.scorebar-meta {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: var(--danger);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  white-space: nowrap;
}

.scorebar-meta--ht {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.scorebar-meta--ft {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.scorebar-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  animation: nav-pulse 1.5s infinite;
}

html[data-theme="light"] .scorebar-chip {
  background: rgba(248, 252, 249, 0.94);
  border-color: rgba(20, 90, 40, 0.14);
}

html[data-theme="light"] .scorebar-chip:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(20, 90, 40, 0.22);
}

@media (max-width: 768px) {
  .scorebar-name {
    display: none;
  }

  .sticky-scorebar-inner {
    padding: 0 8px;
  }

  .scorebar-chip {
    padding: 4px 8px;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-scorebar {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .scorebar-live-dot {
    animation: none;
  }
}
