/* ── Venue display — big screen layout ── */

.bd-display.bdx-shell {
  --bdx-pink: #ff2d95;
  --bdx-purple: #9d4edd;
  --bdx-cyan: #00f0ff;
  --bdx-lime: #b8ff3c;
  --bdx-ink: #07050f;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #fff8f0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bdx-ink);
}

.bdx-cosmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(157, 78, 221, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(255, 45, 149, 0.18), transparent 50%),
    var(--bdx-ink);
}

.bdx-cosmos__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: bdx-orb-drift 18s ease-in-out infinite;
}

.bdx-cosmos__orb--1 {
  width: 28rem;
  height: 28rem;
  top: -12rem;
  left: -6rem;
  background: var(--bdx-purple);
}

.bdx-cosmos__orb--2 {
  width: 22rem;
  height: 22rem;
  bottom: -8rem;
  right: -2rem;
  background: var(--bdx-pink);
  animation-delay: -7s;
}

@keyframes bdx-orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1.5rem, -1rem); }
}

/* Header */
.bdx-head {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem 2rem;
  padding: 1rem clamp(1.5rem, 4vw, 3rem) 0.75rem;
}

.bdx-head__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1rem, 1.8vmin, 1.25rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 248, 240, 0.65);
}

.bdx-head__brand img {
  width: clamp(1.5rem, 2.5vmin, 2rem);
  height: clamp(1.5rem, 2.5vmin, 2rem);
}

.bdx-head__brand em {
  font-style: normal;
  color: var(--bdx-pink);
}

.bdx-head__title {
  margin: 0;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(2.75rem, 6.5vmin, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff8f0;
}

.bdx-head__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
}

.bdx-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.75rem, 1.4vmin, 1rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bdx-pink);
}

.bdx-live__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--bdx-pink);
  box-shadow: 0 0 10px var(--bdx-pink);
  animation: bdx-dot-blink 1.4s ease-in-out infinite;
}

.bdx-code {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(2.75rem, 6.5vmin, 5rem);
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--bdx-lime);
}

@keyframes bdx-dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Sponsors */
.bdx-sponsors {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: 0 clamp(1.5rem, 4vw, 3rem) 0.75rem;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.bdx-sponsors[hidden] {
  display: none !important;
}

.bdx-sponsors__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 3rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bdx-sponsors__label {
  margin: 0;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1rem, 1.8vmin, 1.25rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bdx-lime);
}

.bdx-sponsors__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3.5rem;
}

.bdx-sponsor__logo {
  height: clamp(3.5rem, 7vmin, 5.5rem);
  width: auto;
  max-width: 14rem;
  object-fit: contain;
  background: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
}

.bdx-sponsor__fallback {
  display: grid;
  place-items: center;
  width: clamp(3.5rem, 6vmin, 5rem);
  height: clamp(3.5rem, 6vmin, 5rem);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--bdx-purple), var(--bdx-pink));
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(1.75rem, 3vmin, 2.25rem);
  color: #fff;
}

.bdx-sponsor__name {
  font-size: clamp(1.0625rem, 2vmin, 1.375rem);
  font-weight: 600;
  color: #fff8f0;
}

.bdx-sponsor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

/* Main stage */
.bdx-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.5rem clamp(1.5rem, 4vw, 3rem) max(1.25rem, env(safe-area-inset-bottom));
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bdx-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 34vw);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: stretch;
}

.bdx-stage--hit {
  animation: bdx-flash 0.45s ease;
}

@keyframes bdx-flash {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.15); }
  100% { filter: brightness(1); }
}

/* Left column */
.bdx-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 3.5vh, 3rem);
  min-height: 0;
  min-width: 0;
}

/* Scoreboard */
.bdx-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: end;
  padding-bottom: clamp(1rem, 2vh, 1.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bdx-stat__label {
  display: block;
  font-size: clamp(0.875rem, 1.8vmin, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(138, 127, 168, 0.95);
  margin-bottom: 0.35rem;
}

.bdx-stat__num {
  display: block;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(4.5rem, 12vmin, 9rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: #fff8f0;
}

.bdx-stat__num em {
  font-style: normal;
  font-size: 0.38em;
  color: rgba(107, 98, 136, 0.9);
  margin-left: 0.08em;
}

.bdx-stat--songs.is-pop .bdx-stat__num {
  animation: bdx-pop 0.55s ease;
}

@keyframes bdx-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); color: var(--bdx-lime); }
  100% { transform: scale(1); }
}

.bdx-stat__bar {
  margin-top: 0.75rem;
  width: 100%;
  max-width: 22rem;
  height: clamp(0.4rem, 0.8vmin, 0.65rem);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bdx-stat__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bdx-purple), var(--bdx-lime));
  transition: width 0.5s ease;
}

/* Pattern block — grid + copy side by side */
.bdx-pattern {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-width: 0;
}

.bdx-pattern.is-flip {
  animation: bdx-fade-swap 0.5s ease;
}

@keyframes bdx-fade-swap {
  0% { opacity: 1; }
  40% { opacity: 0.4; }
  100% { opacity: 1; }
}

.bdx-pattern__visual {
  width: clamp(11rem, 28vmin, 20rem);
  flex-shrink: 0;
}

.bdx-pattern__tag {
  margin: 0 0 0.35rem;
  font-size: clamp(0.875rem, 1.6vmin, 1.125rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bdx-cyan);
}

.bdx-pattern__title {
  margin: 0 0 0.75rem;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(2.5rem, 6vmin, 5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--bdx-lime);
}

.bdx-pattern__hint {
  margin: 0;
  font-size: clamp(1.125rem, 2.2vmin, 1.625rem);
  line-height: 1.4;
  color: rgba(200, 191, 216, 0.95);
  max-width: 36rem;
}

/* Pattern grid cells */
.bdx-pattern .bd-pat-letters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.bdx-pattern .bd-pat-letter {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(0.875rem, 2vmin, 1.375rem);
  text-align: center;
  color: rgba(255, 248, 240, 0.85);
}

.bdx-pattern .bd-pat-letter--n {
  color: var(--bdx-cyan);
}

.bdx-pattern .bd-pat-grid-wrap {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
}

.bdx-pattern .bd-pat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0.25rem;
  height: 100%;
}

.bdx-pattern .bd-pat-cell {
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.bdx-pattern .bd-pat-cell--free {
  border-color: rgba(255, 45, 149, 0.55);
  background: rgba(255, 45, 149, 0.28);
}

.bdx-pattern .bd-pat-cell--free span {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(0.5rem, 1.2vmin, 0.75rem);
  color: #fff;
}

.bdx-pattern .bd-pat-cell--win {
  border-color: rgba(184, 255, 60, 0.6);
  background: rgba(184, 255, 60, 0.18);
}

.bdx-pattern .bd-pat-lines {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0.25rem;
  pointer-events: none;
}

.bdx-pattern .bd-pat-line {
  opacity: 0;
  border-radius: 8px;
  border: 3px solid var(--bdx-lime);
  background: rgba(184, 255, 60, 0.1);
  animation: bdx-line-blink 12s linear infinite;
}

.bdx-pattern .bd-pat-line--row {
  grid-column: 1 / -1;
  grid-row: calc(var(--line-i) + 1);
}

.bdx-pattern .bd-pat-line--col {
  grid-row: 1 / -1;
  grid-column: calc(var(--line-i) + 1);
}

.bdx-pattern .bd-pat-line--diag {
  grid-area: 1 / 1 / 6 / 6;
  border: none;
  background: transparent;
}

.bdx-pattern .bd-pat-line--diag-a {
  background: linear-gradient(135deg, transparent 46%, rgba(184, 255, 60, 0.5) 48%, rgba(184, 255, 60, 0.5) 52%, transparent 54%);
}

.bdx-pattern .bd-pat-line--diag-b {
  background: linear-gradient(45deg, transparent 46%, rgba(184, 255, 60, 0.5) 48%, rgba(184, 255, 60, 0.5) 52%, transparent 54%);
}

.bdx-pattern .bd-pat-line:nth-child(1) { animation-delay: 0s; }
.bdx-pattern .bd-pat-line:nth-child(2) { animation-delay: -1s; }
.bdx-pattern .bd-pat-line:nth-child(3) { animation-delay: -2s; }
.bdx-pattern .bd-pat-line:nth-child(4) { animation-delay: -3s; }
.bdx-pattern .bd-pat-line:nth-child(5) { animation-delay: -4s; }
.bdx-pattern .bd-pat-line:nth-child(6) { animation-delay: -5s; }
.bdx-pattern .bd-pat-line:nth-child(7) { animation-delay: -6s; }
.bdx-pattern .bd-pat-line:nth-child(8) { animation-delay: -7s; }
.bdx-pattern .bd-pat-line:nth-child(9) { animation-delay: -8s; }
.bdx-pattern .bd-pat-line:nth-child(10) { animation-delay: -9s; }
.bdx-pattern .bd-pat-line:nth-child(11) { animation-delay: -10s; }
.bdx-pattern .bd-pat-line:nth-child(12) { animation-delay: -11s; }

@keyframes bdx-line-blink {
  0%, 6% { opacity: 1; }
  8.5%, 100% { opacity: 0; }
}

.bdx-bingo-call {
  margin: 0;
  font-size: clamp(1.5rem, 3vmin, 2.5rem);
  color: rgba(176, 165, 200, 0.95);
}

.bdx-bingo-call strong {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: 1.25em;
  letter-spacing: 0.05em;
  color: var(--bdx-pink);
  animation: bdx-bingo-pulse 2.5s ease-in-out infinite;
}

@keyframes bdx-bingo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* QR column — tall, dominant */
.bdx-join {
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.bdx-join__panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.25rem, 2.5vh, 2rem);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  width: 100%;
  min-height: 0;
}

.bdx-join__panel--paper {
  border-color: rgba(184, 255, 60, 0.3);
}

.bdx-join__label {
  margin: 0 0 0.5rem;
  font-size: clamp(0.875rem, 1.6vmin, 1.125rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bdx-cyan);
}

.bdx-join__title {
  margin: 0 0 1.25rem;
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: clamp(2rem, 4.5vmin, 3.5rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff8f0;
}

.bdx-join__text {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.8vmin, 1.25rem);
  line-height: 1.4;
  color: rgba(168, 158, 196, 0.95);
  max-width: 16rem;
}

.bdx-join__qr-wrap {
  padding: clamp(0.5rem, 1vmin, 0.875rem);
  border-radius: 16px;
  background: #fff;
  line-height: 0;
}

.bdx-join__qr {
  display: block;
  width: min(100%, clamp(12rem, 24vmin, 18rem));
  height: min(100%, clamp(12rem, 24vmin, 18rem));
  object-fit: contain;
}

.bdx-join__room {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.8vmin, 1.25rem);
  color: rgba(168, 158, 196, 0.95);
}

.bdx-join__room strong {
  font-family: "Bebas Neue", impact, sans-serif;
  font-size: 1.5em;
  letter-spacing: 0.12em;
  color: var(--bdx-lime);
  margin-left: 0.35rem;
}

.bdx-loading,
.bdx-error {
  margin: auto;
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.5rem;
  color: #a89ec4;
}

@media (max-width: 1000px) {
  #bd-event-mount:has(.bdx-shell) {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .bd-display.bdx-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .bdx-main {
    flex: none;
    overflow: visible;
    height: auto;
  }

  .bdx-stage {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .bdx-join {
    order: -1;
  }

  .bdx-join__panel {
    min-height: auto;
    padding: 1.5rem;
  }

  .bdx-pattern {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .bdx-pattern__visual {
    margin: 0 auto;
  }

  .bdx-pattern__copy {
    text-align: center;
  }

  .bdx-pattern__hint {
    margin-inline: auto;
  }

  .bdx-stats {
    text-align: center;
  }

  .bdx-stat__bar {
    margin-inline: auto;
  }
}

@media (max-height: 700px) {
  .bdx-stat__num {
    font-size: clamp(3rem, 9vmin, 5.5rem);
  }

  .bdx-pattern__title {
    font-size: clamp(2rem, 4.5vmin, 3rem);
  }

  .bdx-left {
    gap: 1.25rem;
  }
}
