/* =========================================================
   BSCB VOLLBILD BILLARD-LOADER (Überdeckt Nav, Content & Footer)
   ========================================================= */
/* Alten Template-Preloader ausblenden */
.preloader {
  display: none !important;
}

html.bscb-is-loading,
html.bscb-is-loading body {
  overflow: hidden !important;
}

.bscb-billiard-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #FFFFFF;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.bscb-billiard-loader.is-fading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bscb-billiard-loader.is-hidden {
  display: none !important;
}

/* Bühnenbereich für die 3 Kugeln */
.bscb-billiard-stage {
  position: relative;
  width: 164px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dezente Banden-/Tischlinie */
.bscb-billiard-rail {
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(20, 21, 23, 0) 0%,
    rgba(197, 160, 89, 0.55) 50%,
    rgba(20, 21, 23, 0) 100%
  );
  border-radius: 2px;
}

/* Basis-Stil aller Kugeln */
.bscb-ball {
  position: absolute;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  box-shadow: 0 4px 8px rgba(14, 15, 17, 0.22);
  will-change: transform;
}

/* Spekularer Lichtreflex oben links */
.bscb-ball::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 7px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  transform: rotate(-28deg);
  pointer-events: none;
}

/* Weisse Spielkugel (links) */
.bscb-ball--cue {
  left: 24px;
  background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #F1F1EE 68%, #D6D6D0 100%);
  border: 1px solid rgba(20, 21, 23, 0.10);
  animation: bscbCueStrike 1.5s infinite;
}

/* Gelbe 1er-Kugel (Mitte) */
.bscb-ball--one {
  left: 69px;
  background: radial-gradient(circle at 32% 28%, #FFE359 0%, #FCD116 62%, #C9A100 100%);
  color: #141517;
  animation: bscbCenterNudge 1.5s infinite;
}

.bscb-ball--one::before {
  content: "1";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #141517;
  font-size: 8px;
  font-weight: 800;
}

/* Schwarze 8er-Kugel (rechts) */
.bscb-ball--eight {
  left: 96px;
  background: radial-gradient(circle at 32% 28%, #3B3E45 0%, #18191B 62%, #090A0B 100%);
  color: #141517;
  animation: bscbEightBreak 1.5s infinite;
}

.bscb-ball--eight::before {
  content: "8";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #141517;
  font-size: 8px;
  font-weight: 800;
}

/* Dezenter Text unterhalb */
.bscb-billiard-label {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55585E;
}

/* =========================================================
   PHYSIK-KEYFRAMES (Stoss-Impuls & Rücklauf)
   ========================================================= */
@keyframes bscbCueStrike {
  0% {
    transform: translateX(-18px) rotate(-45deg);
    animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
  }
  26% {
    transform: translateX(18px) rotate(15deg);
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
  42% {
    transform: translateX(13px) rotate(5deg);
  }
  78% {
    transform: translateX(13px) rotate(5deg);
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  100% {
    transform: translateX(-18px) rotate(-45deg);
  }
}

@keyframes bscbCenterNudge {
  0%, 24% {
    transform: translateX(0);
  }
  29% {
    transform: translateX(3px);
  }
  38%, 100% {
    transform: translateX(0);
  }
}

@keyframes bscbEightBreak {
  0%, 25% {
    transform: translateX(0) rotate(0deg);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  56% {
    transform: translateX(34px) rotate(95deg);
    animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
  }
  84%, 100% {
    transform: translateX(0) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bscb-ball {
    animation: none !important;
  }
}