/*
 * Boxing Underdog Live - live hub: "Twoja walka na żywo" (the game on this computer, with Chrome's local network
 * permission explained before it is asked) and the "coming soon" card for other players' live fights.
 * Unity preprocesses template *.css files: never use triple curly braces here.
 */

.bu-livehub {
  background:
    radial-gradient(70% 55% at 85% -10%, rgba(255, 56, 56, 0.16) 0%, rgba(255, 56, 56, 0) 60%),
    radial-gradient(50% 40% at 0% 20%, rgba(61, 134, 255, 0.07) 0%, rgba(61, 134, 255, 0) 60%),
    var(--bg);
}

.bu-lh-head {
  padding-top: calc(var(--header-h) + clamp(40px, 6vh, 80px));
  padding-bottom: 34px;
}

.bu-kicker-live {
  color: var(--red-2);
}

.bu-lh-title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 4.6vw, 104px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-transform: uppercase;
}

.bu-lh-sub {
  max-width: 60ch;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: clamp(15.5px, 1vw, 18px);
}

.bu-lh-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  align-items: stretch;
  gap: clamp(20px, 2vw, 40px);
  padding-bottom: 80px;
}

/* ---------------------------------------------------------------------------
   Your fight, live
   --------------------------------------------------------------------------- */

.bu-mylive {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: linear-gradient(180deg, #11141b 0%, #0c0e13 100%);
  box-shadow: var(--shadow-1);
}

.bu-mylive-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 460px;
  padding: 40px 28px;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(255, 56, 56, 0.1), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    #0a0c10;
  border-right: 1px solid var(--line);
}

.bu-chain {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bu-chain-node {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  transition: border-color 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms var(--ease);
}

.bu-chain-node .bu-ic {
  width: 36px;
  height: 36px;
  stroke-width: 1.7;
}

.bu-chain-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 110px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 6px, transparent 6px 12px);
}

.bu-chain-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.bu-mylive-screen {
  position: relative;
  width: min(300px, 80%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background:
    radial-gradient(60% 60% at 50% 60%, rgba(255, 255, 255, 0.06), transparent 70%),
    linear-gradient(180deg, #151923, #0b0d12);
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, 0.35);
}

.bu-mylive-screen-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: none;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bu-mylive-screen-badge .bu-pulse-dot {
  width: 6px;
  height: 6px;
}

.bu-mylive[data-state="connected"] .bu-chain-node,
.bu-mylive[data-state="live"] .bu-chain-node {
  border-color: rgba(61, 220, 132, 0.5);
  color: #bff5d6;
  box-shadow: 0 0 30px rgba(61, 220, 132, 0.15);
}

.bu-mylive[data-state="live"] .bu-chain-node {
  border-color: rgba(255, 56, 56, 0.6);
  color: #fff;
  box-shadow: 0 0 34px rgba(255, 56, 56, 0.25);
}

.bu-mylive[data-state="looking"] .bu-chain-pulse,
.bu-mylive[data-state="connected"] .bu-chain-pulse,
.bu-mylive[data-state="live"] .bu-chain-pulse {
  animation: bu-chain 1.4s ease-in-out infinite;
}

.bu-mylive[data-state="looking"] .bu-chain-pulse:nth-child(2),
.bu-mylive[data-state="connected"] .bu-chain-pulse:nth-child(2),
.bu-mylive[data-state="live"] .bu-chain-pulse:nth-child(2) {
  animation-delay: 0.2s;
}

.bu-mylive[data-state="looking"] .bu-chain-pulse:nth-child(3),
.bu-mylive[data-state="connected"] .bu-chain-pulse:nth-child(3),
.bu-mylive[data-state="live"] .bu-chain-pulse:nth-child(3) {
  animation-delay: 0.4s;
}

.bu-mylive[data-state="connected"] .bu-chain-pulse {
  background: var(--ok);
}

.bu-mylive[data-state="live"] .bu-chain-pulse {
  background: var(--red);
}

.bu-mylive[data-state="looking"] .bu-chain-pulse {
  background: var(--gold);
}

/* Chrome's local network prompt is open: the chain waits on the visitor's answer. */
.bu-mylive[data-state="prompt"] .bu-chain-pulse {
  background: var(--gold);
  animation: bu-blink 1.2s ease-in-out infinite;
}

.bu-mylive[data-state="prompt"] .bu-chain-pc {
  border-color: rgba(233, 185, 73, 0.55);
  color: #ffe6a8;
  box-shadow: 0 0 30px rgba(233, 185, 73, 0.18);
}

.bu-mylive[data-state="live"] .bu-mylive-screen {
  border-color: rgba(255, 56, 56, 0.55);
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, 0.35), 0 0 50px rgba(255, 56, 56, 0.18);
}

.bu-mylive[data-state="live"] .bu-mylive-screen-badge {
  display: inline-flex;
}

@keyframes bu-chain {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.bu-mylive-body {
  display: flex;
  flex-direction: column;
  padding: 34px 36px 26px;
}

.bu-mylive-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 2vw, 38px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bu-mylive-text {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

.bu-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: bu-step;
}

.bu-steps li {
  position: relative;
  padding-left: 44px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  counter-increment: bu-step;
}

.bu-steps li::before {
  content: counter(bu-step);
  position: absolute;
  left: 0;
  top: -3px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 56, 56, 0.45);
  border-radius: 50%;
  background: var(--red-soft);
  color: #ffd0d0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.bu-mylive-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
}

.bu-status-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--text-4);
}

.bu-mylive[data-state="looking"] .bu-status-dot {
  background: var(--gold);
  animation: bu-blink 1.2s ease-in-out infinite;
}

.bu-mylive[data-state="connected"] .bu-status-dot {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(61, 220, 132, 0.7);
}

.bu-mylive[data-state="live"] .bu-status-dot {
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
  animation: bu-blink 1s ease-in-out infinite;
}

.bu-mylive[data-state="live"] .bu-mylive-status {
  border-color: rgba(255, 56, 56, 0.4);
  background: var(--red-soft);
  color: #fff;
}

.bu-mylive[data-state="error"] .bu-status-dot {
  background: var(--red);
}

.bu-mylive[data-state="prompt"] .bu-status-dot {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(233, 185, 73, 0.7);
  animation: bu-blink 1s ease-in-out infinite;
}

.bu-mylive[data-state="prompt"] .bu-mylive-status {
  border-color: rgba(233, 185, 73, 0.45);
  background: rgba(233, 185, 73, 0.08);
  color: #fff;
}

.bu-mylive-denied {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 56, 56, 0.45);
  border-radius: 14px;
  background: rgba(255, 56, 56, 0.08);
}

.bu-mylive-denied-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #ffc9c9;
  font-weight: 700;
}

.bu-mylive-denied-title .bu-ic {
  color: var(--red-2);
}

.bu-mylive-denied-text {
  margin: 8px 0 14px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

/* This browser cannot watch the live fight (Safari and the game's plain address, or no playback at all) */
.bu-mylive-block {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(233, 185, 73, 0.4);
  border-radius: 14px;
  background: rgba(233, 185, 73, 0.07);
}

.bu-mylive-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #ffe6a8;
  font-weight: 700;
}

.bu-mylive-block-title .bu-ic {
  flex: none;
  color: var(--gold);
}

.bu-mylive-block-text {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

.bu-mylive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 18px;
}

.bu-mylive .bu-details:first-of-type {
  margin-top: auto;
}

/* ---------------------------------------------------------------------------
   Other players' fights: coming soon
   --------------------------------------------------------------------------- */

.bu-others {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: #0b0d12;
}

.bu-others-wall {
  position: absolute;
  inset: -12% -12% 28% -12%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
  transform: perspective(900px) rotateX(18deg) rotateZ(-6deg);
  opacity: 0.75;
}

.bu-others-tile {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background:
    radial-gradient(60% 70% at 50% 60%, rgba(255, 255, 255, 0.1), transparent 70%),
    linear-gradient(135deg, rgba(255, 56, 56, 0.34), rgba(61, 134, 255, 0.26)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    #151923;
  animation: bu-tile 6s ease-in-out infinite;
}

.bu-others-tile::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 12px;
  border-radius: 3px;
  background: rgba(255, 56, 56, 0.85);
}

.bu-others-tile::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 40%;
  bottom: 12px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.bu-others-tile:nth-child(2n) {
  animation-delay: -2s;
}

.bu-others-tile:nth-child(3n) {
  animation-delay: -4s;
}

@keyframes bu-tile {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.bu-others::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0b0d12 32%, rgba(11, 13, 18, 0.4) 70%, rgba(11, 13, 18, 0.15) 100%);
  pointer-events: none;
}

.bu-others-body {
  position: relative;
  z-index: 1;
  padding: 30px 32px 32px;
}

.bu-soon {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3c95e, #dca935);
  color: #1a1305;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.bu-others-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 1.8vw, 34px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.bu-others-title .bu-ic {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.bu-others-text {
  max-width: 46ch;
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 1400px) {
  .bu-lh-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bu-others {
    min-height: 320px;
  }
}

@media (max-width: 1180px) {
  .bu-mylive {
    grid-template-columns: minmax(0, 1fr);
  }

  .bu-mylive-visual {
    min-height: 0;
    padding: 22px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .bu-mylive-screen {
    display: none;
  }

  .bu-chain-node {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .bu-chain-node .bu-ic {
    width: 28px;
    height: 28px;
  }
}

.bu-mobile-fps:not([hidden]) {
  position: fixed;
  z-index: 75;
  top: 74px;
  right: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 6px;
  background: rgba(7, 8, 12, .86);
  color: #fff;
  font: 700 13px/1.2 monospace;
  pointer-events: none;
}
