/*
 * Boxing Underdog Live - the fight page over the Unity stage.
 * Watch / live: the stage fills the window; the fight bar, the dock (best moments, timeline, transport, vision mixer)
 * and the header fade out while the fight plays untouched; the scorebug glides up into their place.
 * Director: the Studio (studio.css) takes the page below the fight bar; the watch controls step aside.
 * The page itself is transparent where the canvas shows, so the mouse still reaches the player (free camera).
 * Unity preprocesses template *.css files: never use triple curly braces here.
 */

.bu-fight {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  --bar-h: 64px;
}

.bu-fight a,
.bu-fight button,
.bu-fight input,
.bu-fight .bu-timeline,
.bu-fight .bu-popover,
.bu-fight .bu-endcard,
.bu-fight .bu-prep {
  pointer-events: auto;
}

.bu-fp-scrim-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 320ms var(--ease);
}

/* ---------------------------------------------------------------------------
   Fight bar
   --------------------------------------------------------------------------- */

.bu-fp-bar {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.bu-fp-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.5);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}

.bu-fp-back:hover {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.1);
}

.bu-fp-back .bu-ic {
  width: 18px;
  height: 18px;
}

.bu-fp-left {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.bu-fp-back {
  flex: none;
}

.bu-fp-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bu-fp-title .bu-tag {
  flex: none;
}

.bu-fp-names {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.bu-fp-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bu-fp-vs {
  flex: none;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0.16em;
}

.bu-modes {
  grid-column: 2;
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(8, 9, 12, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.bu-modes button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.bu-modes button .bu-ic {
  width: 17px;
  height: 17px;
}

.bu-modes button:hover {
  color: var(--text);
}

.bu-modes button.bu-on {
  background: #f4f5f7;
  color: #0b0c10;
}

.bu-modes button[data-mode="director"].bu-on {
  background: linear-gradient(180deg, #f3c95e, #dca935);
  color: #1a1305;
}

.bu-modes button:disabled {
  opacity: 0.4;
  cursor: default;
}

.bu-fp-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bu-fp-actions .bu-like {
  height: 36px;
  padding: 0 14px 0 11px;
  border-color: var(--line-2);
  background: rgba(8, 9, 12, 0.5);
  color: var(--text);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bu-fp-actions .bu-like.bu-liked {
  border-color: rgba(255, 56, 56, 0.55);
  background: rgba(255, 56, 56, 0.16);
}

.bu-fp-views {
  height: 36px;
  padding: 0 4px;
  color: var(--text);
  font-size: 14px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.bu-fp-views .bu-ic {
  color: var(--text-2);
}

.bu-fp-live-tools {
  display: flex;
  gap: 8px;
}

.bu-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  box-shadow: 0 10px 26px rgba(255, 56, 56, 0.35);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
}

.bu-live-delay {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.bu-live-pill.bu-behind {
  background: rgba(12, 14, 19, 0.82);
  box-shadow: inset 0 0 0 1.5px rgba(255, 56, 56, 0.7);
  cursor: pointer;
}

.bu-live-pill.bu-behind .bu-pulse-dot {
  color: var(--red);
}

.bu-live-pill.bu-behind .bu-pulse-dot::after {
  display: none;
}

/* ---------------------------------------------------------------------------
   Monitor: backdrop, centre states, veil
   --------------------------------------------------------------------------- */

.bu-fp-monitor {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.bu-fp-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(80% 80% at 50% 40%, #1a1d26 0%, #050608 75%);
  opacity: 0;
  transition: opacity 700ms var(--ease);
}

.bu-fp-backdrop.bu-on {
  opacity: 1;
}

.bu-fp-backdrop-img {
  position: absolute;
  inset: -4%;
  background-position: center;
  background-size: cover;
  filter: blur(3px) saturate(0.9) brightness(0.62);
  animation: bu-kenburns-soft 40s ease-in-out infinite alternate;
}

.bu-fp-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 70% at 50% 50%, rgba(5, 6, 8, 0.2) 0%, rgba(5, 6, 8, 0.85) 100%),
    linear-gradient(0deg, rgba(5, 6, 8, 0.7), rgba(5, 6, 8, 0) 40%);
}

@keyframes bu-kenburns-soft {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.12) translate3d(-1%, -1%, 0);
  }
}

.bu-fp-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + var(--bar-h)) 24px 190px;
}

.bu-prep {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(640px, 100%);
  text-align: center;
  animation: bu-rise 480ms var(--ease-out) both;
}

.bu-prep-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  margin-bottom: 26px;
}

.bu-prep-ring > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bu-prep-ring circle {
  fill: none;
  stroke-width: 6;
}

.bu-prep-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.bu-prep-ring-fg {
  stroke: var(--red);
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(255, 56, 56, 0.55));
  transition: stroke-dasharray 500ms var(--ease);
}

.bu-prep.bu-indeterminate .bu-prep-ring > svg {
  animation: bu-rotate-ring 1.3s linear infinite;
}

@keyframes bu-rotate-ring {
  from {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(270deg);
  }
}

.bu-prep-percent {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bu-prep-alert {
  display: none;
  color: var(--red-2);
}

.bu-prep-alert .bu-ic {
  width: 52px;
  height: 52px;
  stroke-width: 1.6;
}

.bu-prep.bu-prep-failed .bu-prep-ring > svg,
.bu-prep.bu-prep-failed .bu-prep-percent {
  display: none;
}

.bu-prep.bu-prep-failed .bu-prep-ring {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 56, 56, 0.16), rgba(255, 56, 56, 0.04) 70%);
  box-shadow: inset 0 0 0 2px rgba(255, 56, 56, 0.35);
}

.bu-prep.bu-prep-failed .bu-prep-alert {
  display: block;
}

.bu-prep-names {
  margin: 0 0 8px;
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: pre;
}

.bu-prep-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.2vw, 42px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.bu-prep-text {
  max-width: 52ch;
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.6;
  text-wrap: balance;
}

.bu-prep-eta {
  margin: 12px 0 0;
  color: var(--gold-2);
  font-size: 14px;
  font-weight: 600;
}

.bu-prep .bu-btn {
  margin-top: 22px;
}

.bu-loading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(8, 9, 12, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: bu-fade 240ms var(--ease) both;
}

.bu-loading .bu-spinner {
  width: 32px;
  height: 32px;
}

.bu-loading-text {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.bu-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #050608;
  animation: bu-fade 200ms var(--ease) both;
}

.bu-bigplay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  animation: bu-rise 360ms var(--ease-out) both;
}

.bu-bigplay-circle {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(255, 56, 56, 0.95);
  box-shadow: 0 18px 50px rgba(255, 56, 56, 0.45), 0 0 0 12px rgba(255, 56, 56, 0.14);
  color: #fff;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.bu-bigplay:hover .bu-bigplay-circle {
  transform: scale(1.06);
  box-shadow: 0 22px 60px rgba(255, 56, 56, 0.55), 0 0 0 16px rgba(255, 56, 56, 0.16);
}

.bu-bigplay-circle .bu-ic {
  width: 42px;
  height: 42px;
  margin-left: 6px;
}

.bu-bigplay-text {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.64);
}

/* End card */
.bu-endcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(760px, 100%);
  padding: 34px 40px 32px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(233, 185, 73, 0.12), transparent 70%),
    rgba(10, 11, 15, 0.9);
  box-shadow: var(--shadow-2);
  text-align: center;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: bu-rise 420ms var(--ease-out) both;
}

.bu-end-kicker {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.bu-end-method {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 62px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-transform: uppercase;
}

.bu-end-method[data-code="KO"] {
  color: var(--red);
  text-shadow: 0 0 40px rgba(255, 56, 56, 0.45);
}

.bu-end-method[data-code="TKO"] {
  color: var(--orange);
}

.bu-end-method[data-code="DECISION"] {
  color: var(--gold-2);
}

.bu-end-fighters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: 24px;
}

.bu-end-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 16px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 3px 0 var(--corner, var(--blue));
}

.bu-end-red {
  --corner: var(--red);
}

.bu-end-fighter.bu-winner {
  background: linear-gradient(180deg, rgba(233, 185, 73, 0.16), rgba(233, 185, 73, 0.04));
  box-shadow: inset 0 3px 0 var(--gold), 0 0 0 1px rgba(233, 185, 73, 0.3);
}

.bu-end-crown {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #2a1d02;
}

.bu-end-crown .bu-ic {
  width: 18px;
  height: 18px;
}

.bu-end-name {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bu-end-fighter.bu-winner .bu-end-name {
  color: var(--gold-2);
}

.bu-end-score {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

.bu-end-vs {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bu-end-cards {
  margin: 14px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bu-end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* ---------------------------------------------------------------------------
   Scorebug (watch / live)
   --------------------------------------------------------------------------- */

.bu-scorebug {
  position: absolute;
  top: calc(var(--header-h) + var(--bar-h) + 16px);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: stretch;
  width: max-content;
  max-width: min(1040px, calc(100vw - 48px));
  height: 58px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--glass);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  transition: transform 420ms var(--ease-out);
  animation: bu-fade 420ms var(--ease) both;
}

html.bu-idle .bu-scorebug {
  transform: translateY(calc(-1 * (var(--header-h) + var(--bar-h) - 12px)));
}

.bu-sb-side {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.bu-sb-accent {
  width: 7px;
  flex: none;
  align-self: stretch;
}

.bu-sb-blue .bu-sb-accent {
  background: linear-gradient(180deg, #5b9bff, #2f6fe0);
}

.bu-sb-red .bu-sb-accent {
  background: linear-gradient(180deg, #ff5a5a, #e02626);
}

.bu-sb-name {
  overflow: hidden;
  max-width: 320px;
  padding: 0 24px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bu-sb-red .bu-sb-name {
  padding: 0 0 0 24px;
  text-align: right;
}

.bu-sb-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 0 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.bu-sb-label {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bu-sb-clock {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.bu-sb-center.bu-sb-vs .bu-sb-label {
  color: var(--red);
  font-size: 18px;
  letter-spacing: 0.16em;
}

.bu-sb-center.bu-sb-alert .bu-sb-label {
  color: var(--red);
  animation: bu-blink 0.9s ease-in-out infinite;
}

.bu-hint-pill {
  position: absolute;
  left: 50%;
  bottom: 200px;
  z-index: 3;
  max-width: min(760px, calc(100vw - 48px));
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--text);
  font-size: 14px;
  text-align: center;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: bu-fade 220ms var(--ease) both;
}

/* ---------------------------------------------------------------------------
   Dock: best moments, timeline, transport, vision mixer
   --------------------------------------------------------------------------- */

.bu-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 110px var(--gutter) 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

html.bu-idle .bu-dock,
html.bu-idle .bu-fp-bar,
html.bu-idle .bu-fp-scrim-top {
  opacity: 0;
  pointer-events: none;
}

html.bu-idle .bu-dock {
  transform: translateY(12px);
}

html.bu-idle .bu-dock *,
html.bu-idle .bu-fp-bar * {
  pointer-events: none;
}

.bu-moments {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  min-width: 0;
}

.bu-moments-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bu-moments-label .bu-ic {
  width: 16px;
  height: 16px;
}

.bu-moments-list {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.bu-moments-list::-webkit-scrollbar {
  display: none;
}

.bu-moment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 11, 15, 0.6);
  color: var(--text);
  font-size: 13px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
}

.bu-moment:hover {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.12);
}

.bu-moment:active {
  transform: scale(0.97);
}

.bu-moment .bu-ic {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.bu-moment-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bu-moment-time {
  color: var(--text-2);
  font-size: 12px;
}

.bu-moment-ko,
.bu-moment-kd {
  border-color: rgba(255, 56, 56, 0.5);
  background: rgba(255, 56, 56, 0.16);
}

.bu-moment-ko .bu-ic,
.bu-moment-kd .bu-ic {
  color: var(--red-2);
}

.bu-moment-hottest {
  border-color: rgba(233, 185, 73, 0.45);
  background: rgba(233, 185, 73, 0.12);
}

.bu-timeline {
  position: relative;
  height: 46px;
  margin: 0 2px 4px;
  cursor: pointer;
  touch-action: none;
}

.bu-timeline.bu-locked {
  cursor: not-allowed;
}

.bu-tl-heat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  width: 100%;
  height: 28px;
  display: block;
}

.bu-tl-heat path {
  fill: url(#bu-heat-base);
}

.bu-tl-heat-played {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bu-tl-heat-played .bu-tl-heat path {
  fill: url(#bu-heat-hot);
}

/* Nothing to control until the fight is open (the page prepares the graphics or loads the fight). */
.bu-fight.bu-fp-closed .bu-dock,
.bu-fight.bu-fp-closed .bu-scorebug {
  display: none;
}

.bu-timeline:not(.bu-has-heat) .bu-tl-heat {
  display: none;
}

.bu-tl-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  transition: height 140ms var(--ease), bottom 140ms var(--ease);
}

.bu-timeline:hover .bu-tl-track,
.bu-timeline.bu-dragging .bu-tl-track {
  bottom: 11px;
  height: 6px;
}

.bu-tl-avail,
.bu-tl-played {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
}

.bu-tl-avail {
  background: rgba(255, 255, 255, 0.28);
}

.bu-tl-played {
  background: linear-gradient(90deg, var(--red-3), var(--red));
}

.bu-tl-thumb {
  position: absolute;
  bottom: 7px;
  left: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 56, 56, 0.9), 0 2px 8px rgba(0, 0, 0, 0.6);
  transform: scale(0.72);
  transition: transform 140ms var(--ease);
  pointer-events: none;
}

.bu-timeline:hover .bu-tl-thumb,
.bu-timeline.bu-dragging .bu-tl-thumb {
  transform: scale(1);
}

.bu-tl-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bu-marker {
  position: absolute;
  bottom: 8px;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(233, 185, 73, 0.55);
}

.bu-marker-kd,
.bu-marker-ko {
  bottom: 10px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 8px rgba(255, 56, 56, 0.8);
}

/* A diamond, so it never reads as a second playhead (the thumb is a white disc). */
.bu-marker-ko {
  bottom: 9px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 2px;
  transform: rotate(45deg);
}

.bu-tl-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(8, 9, 12, 0.92);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.bu-tip-label {
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bu-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.bu-bar-left,
.bu-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.bu-bar-right {
  justify-content: flex-end;
  gap: 6px;
}

.bu-play-btn {
  width: 48px;
  height: 48px;
  margin-right: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.bu-play-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.bu-play-btn .bu-ic {
  width: 24px;
  height: 24px;
}

.bu-volume {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.bu-range {
  --fill: 100%;
  width: 96px;
  height: 20px;
  margin: 0 6px 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.bu-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff 0%, #fff var(--fill), rgba(255, 255, 255, 0.24) var(--fill), rgba(255, 255, 255, 0.24) 100%);
}

.bu-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  -webkit-appearance: none;
  appearance: none;
}

.bu-time {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.bu-time-sep,
.bu-time-total {
  color: var(--text-3);
}

/* Vision mixer */
.bu-mixer {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(6, 7, 10, 0.66);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.bu-preview:not(.bu-mode-director) .bu-mixer { flex-wrap: wrap; justify-content: center; }
.bu-preview:not(.bu-mode-director) .bu-mixer button { min-width: 82px; padding-left: 10px; padding-right: 10px; }
.bu-preview:not(.bu-mode-director) .bu-mixer-name { letter-spacing: .025em; font-size: 13px; }
.bu-preview .bu-spectator-rate { pointer-events: auto; min-width: 65px; height: 42px; color: white; background: #171923; border: 1px solid #ffffff35; border-radius: 9px; padding: 0 8px; }
.bu-preview .bu-spectator-rate[hidden], .bu-preview.bu-mode-director .bu-spectator-rate { display: none; }
html.bu-spectator-orbit #unity-canvas { touch-action: none; cursor: grab; }
html.bu-spectator-orbit #unity-canvas:active { cursor: grabbing; }
@media (min-width: 901px) and (max-width: 1300px) { .bu-preview:not(.bu-mode-director) .bu-mixer-key { display: none; } }
@media (max-width: 900px) {
  .bu-preview:not(.bu-mode-director) #bu-fight #bu-fp-modes { display: none; }
  .bu-preview:not(.bu-mode-director) #bu-fight #bu-dock .bu-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .bu-preview:not(.bu-mode-director) #bu-fight .bu-bar-left { grid-column: 1 / -1; width: 100%; }
  .bu-preview:not(.bu-mode-director) #bu-fight .bu-time { margin-left: auto; min-width: 105px; text-align: right; }
  .bu-preview:not(.bu-mode-director) #bu-fight .bu-bar-right { justify-content: flex-start; min-width: 0; }
  .bu-preview:not(.bu-mode-director) #bu-fight .sp-camera-btn { grid-column: 2; min-width: 85px; }
  .bu-preview:not(.bu-mode-director) #bu-fight #bu-keys-btn { display: none; }
  .bu-preview:not(.bu-mode-director) #bu-fight .sp-info-btn { padding: 10px 8px; font-size: 10px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .bu-preview:not(.bu-mode-director) #bu-fight .bu-scorebug { top: var(--spectator-score-top, 125px); left: 8px; right: 8px; transform: none; width: auto; height: 48px; max-width: none; }
  .bu-preview:not(.bu-mode-director) #bu-fight .bu-scorebug .bu-sb-side { min-width: 0; }
}

.bu-mixer button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  min-width: 108px;
  padding: 0 16px 0 10px;
  overflow: visible;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}

.bu-mixer button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.bu-mixer button.bu-unavail {
  color: var(--text-3);
  cursor: help;
}

.bu-mixer button.bu-unavail .bu-mixer-name {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-decoration-thickness: 1.5px;
}

.bu-mixer button.bu-unavail .bu-mixer-key {
  opacity: 0.45;
}

.bu-mixer-tally {
  position: absolute;
  top: -1px;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.bu-mixer-key {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-3);
  border-radius: 6px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
}

.bu-mixer-name {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bu-mixer-onair {
  position: absolute;
  top: -11px;
  right: 8px;
  display: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.bu-mixer button.bu-on {
  border-color: rgba(255, 56, 56, 0.55);
  background: linear-gradient(180deg, rgba(255, 56, 56, 0.24), rgba(255, 56, 56, 0.1));
  color: #fff;
}

.bu-mixer button.bu-on .bu-mixer-tally {
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 56, 56, 0.9);
}

.bu-mixer button.bu-on .bu-mixer-key {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.bu-mixer button.bu-on .bu-mixer-onair {
  display: block;
}

.bu-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}

.bu-pill-btn:hover,
.bu-pill-btn.bu-on {
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.12);
}

.bu-pill-btn .bu-ic {
  width: 18px;
  height: 18px;
}

.bu-bar-right .bu-icon-btn.bu-on {
  background: rgba(255, 255, 255, 0.14);
}

/* Popovers above the dock */
.bu-popover {
  position: absolute;
  right: var(--gutter);
  bottom: calc(100% - 96px);
  z-index: 5;
  width: 320px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: bu-drop-up 200ms var(--ease-out) both;
}

@keyframes bu-drop-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bu-pop-title {
  margin: 0 0 10px;
  color: var(--text-3);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bu-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease);
}

.bu-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bu-option.bu-on {
  border-color: rgba(233, 185, 73, 0.4);
  background: rgba(233, 185, 73, 0.08);
}

.bu-radio {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid var(--line-3);
  border-radius: 50%;
}

.bu-option.bu-on .bu-radio {
  border-color: var(--gold);
}

.bu-option.bu-on .bu-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.bu-option-copy {
  display: flex;
  flex-direction: column;
}

.bu-option-name {
  font-weight: 600;
}

.bu-option-sub {
  color: var(--text-3);
  font-size: 13px;
}

.bu-arena-panel {
  width: min(560px, calc(100vw - 48px));
  max-height: min(620px, calc(100vh - 260px));
  overflow-y: auto;
}

.bu-arena-sub {
  margin: -2px 0 14px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
}

.bu-venues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bu-venue {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease);
}

.bu-venue:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bu-venue.bu-on {
  border-color: rgba(233, 185, 73, 0.4);
  background: rgba(233, 185, 73, 0.07);
}

.bu-venue-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--surface-3);
}

.bu-venue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bu-venue-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.bu-venue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bu-venue-name {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bu-venue-badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--gold-soft);
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bu-venue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bu-venue-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.bu-venue-chip:hover {
  color: var(--text);
  border-color: var(--line-3);
}

.bu-venue-chip.bu-on {
  border-color: transparent;
  background: #f4f5f7;
  color: #0b0c10;
}

.bu-venue-chip.bu-loading {
  animation: bu-blink 1s ease-in-out infinite;
}

.bu-venue-chip.bu-recorded:not(.bu-on) {
  border-color: rgba(233, 185, 73, 0.45);
}

.bu-venue-off {
  opacity: 0.7;
}

.bu-venue-note {
  color: var(--text-3);
  font-size: 12.5px;
}

/* ---------------------------------------------------------------------------
   Live stage
   --------------------------------------------------------------------------- */

.bu-fight[data-mode="live"] .bu-moments {
  display: none;
}

/* Full screen: nothing but the stage and its controls */
html.bu-fullscreen.bu-stage-on .tb {
  opacity: 0;
  pointer-events: none;
}

html.bu-fullscreen .bu-fp-bar {
  top: 12px;
}

html.bu-fullscreen .bu-scorebug {
  top: calc(12px + var(--bar-h) + 16px);
}

/* ---------------------------------------------------------------------------
   Narrow windows
   --------------------------------------------------------------------------- */

@media (max-width: 1320px) {
  .bu-mixer button {
    min-width: 0;
    padding: 0 12px 0 9px;
  }

  .bu-fp-names {
    font-size: 18px;
  }

  .bu-fp-title .bu-tag,
  .bu-live-delay,
  .bu-fight .bu-collapsible {
    display: none;
  }

  .bu-fp-back {
    padding: 0 11px;
  }

  #bu-fp-share,
  #bu-arena-btn {
    padding: 0 10px;
  }

  /* The volume slider opens on hover (the mute button stays). */
  .bu-volume .bu-range {
    width: 0;
    margin: 0;
    opacity: 0;
    transition: width 200ms var(--ease), opacity 200ms var(--ease), margin 200ms var(--ease);
  }

  .bu-volume:hover .bu-range,
  .bu-volume:focus-within .bu-range {
    width: 72px;
    margin: 0 6px 0 0;
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  .bu-mixer-name {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .bu-mixer-key {
    display: none;
  }

  .bu-mixer button {
    height: 42px;
    padding: 0 12px;
  }

  .bu-time {
    margin-left: 4px;
    font-size: 13px;
  }
}
