.bk-card {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  background: var(--bg-surface);
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
  position: relative;
}

@media (max-width: 480px) {
  .bk-card {
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: 100vh;
  }
}

.bk-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
  position: relative;
  z-index: 5;
}

.bk-bar-left, .bk-bar-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.bk-bar-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s;
  position: relative;
}

.bk-bar-btn:active {
  transform: scale(0.78);
  background-color: var(--bg-page);
}

.bk-bar-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
  display: block;
}

.bk-bar-btn[data-reset]:active {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.15);
}

.bk-fs-e, .bk-fs-c {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bk-fs-e {
  opacity: 1;
  transform: scale(1);
}

.bk-fs-c {
  opacity: 0;
  transform: scale(0);
}

.bk-fs-on .bk-fs-e {
  opacity: 0;
  transform: scale(0);
}

.bk-fs-on .bk-fs-c {
  opacity: 1;
  transform: scale(1);
}

.bk-team {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  transition: border-color 0.2s;
}

.bk-shake-card {
  animation: card-quake 0.4s ease-out;
}

@keyframes card-quake {
  0% { transform: translateX(0); }
  10% { transform: translateX(-6px) rotate(-0.5deg); }
  25% { transform: translateX(6px) rotate(0.5deg); }
  40% { transform: translateX(-4px) rotate(-0.3deg); }
  55% { transform: translateX(4px) rotate(0.3deg); }
  70% { transform: translateX(-2px); }
  85% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.bk-team-top {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  position: relative;
  z-index: 2;
}

.bk-team-top-right {
  justify-content: flex-end;
}

.bk-name {
  background: transparent;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  outline: none;
  color: var(--text-muted);
  padding: 0.15rem 0;
  flex: 1;
  min-width: 0;
}

.bk-name-right {
  text-align: right;
}

.bk-fire {
  width: 0;
  height: 0;
  transition: all 0.4s;
  flex-shrink: 0;
}

.bk-fire-on {
  width: 1.25rem;
  height: 1.25rem;
  background: radial-gradient(circle at 50% 100%, #ef4444 0%, #f97316 40%, #facc15 70%, transparent 80%);
  border-radius: 0 0 50% 50%;
  animation: fire-dance 0.5s ease-in-out infinite alternate;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

@keyframes fire-dance {
  0% {
    transform: scaleY(1) translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: scaleY(1.15) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.9) translateY(0);
    opacity: 0.8;
  }
}

.bk-streak {
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.5);
}

.bk-streak-on {
  opacity: 1;
  transform: scale(1);
}

.bk-streak-val {
  font-size: 0.7rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.4);
  min-width: 1.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bk-streak-hot .bk-streak-val {
  animation: streak-glow 0.6s ease-in-out infinite alternate;
}

@keyframes streak-glow {
  0% {
    color: #facc15;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.4);
  }
  100% {
    color: #f97316;
    text-shadow: 0 0 14px rgba(250, 204, 21, 0.8);
  }
}

.bk-score-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  overflow: hidden;
}

.bk-score-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.bk-score-digit {
  font-size: clamp(4rem, 25vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text-base);
  z-index: 2;
  position: relative;
}

.bk-out {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: clamp(4rem, 25vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text-base);
  pointer-events: none;
}

.bk-in {
  z-index: 4;
  pointer-events: none;
}

.bk-out-split {
  transition: transform 0.25s ease-in, opacity 0.25s ease-in;
  transform: translateY(0);
  opacity: 1;
}

.bk-out-split.bk-out-active {
  transform: translateY(-100%);
  opacity: 0;
}

.bk-in-split {
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
  transform: translateY(100%);
  opacity: 0;
}

.bk-in-split.bk-in-active {
  transform: translateY(0);
  opacity: 1;
}

.bk-out-boom {
  transition: transform 0.3s ease-out, opacity 0.25s ease-out;
  transform: scale(1);
  opacity: 1;
}

.bk-out-boom.bk-out-active {
  transform: scale(1.8);
  opacity: 0;
}

.bk-in-boom {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease-out;
  transform: scale(0.2);
  opacity: 0;
}

.bk-in-boom.bk-in-active {
  transform: scale(1);
  opacity: 1;
}

.bk-out-spin {
  transition: transform 0.3s ease-in, opacity 0.2s ease-in;
  transform: rotateX(0deg) scale(1);
  opacity: 1;
}

.bk-out-spin.bk-out-active {
  transform: rotateX(-90deg) scale(0.3);
  opacity: 0;
}

.bk-in-spin {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease-out;
  transform: rotateX(90deg) scale(0.3);
  opacity: 0;
}

.bk-in-spin.bk-in-active {
  transform: rotateX(0deg) scale(1);
  opacity: 1;
}

.bk-out-stretch {
  transition: transform 0.25s ease-in, opacity 0.2s ease-in;
  transform: scaleX(1);
  opacity: 1;
}

.bk-out-stretch.bk-out-active {
  transform: scaleX(0);
  opacity: 0;
}

.bk-in-stretch {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease-out;
  transform: scaleX(0);
  opacity: 0;
}

.bk-in-stretch.bk-in-active {
  transform: scaleX(1);
  opacity: 1;
}

.bk-out-drop {
  transition: transform 0.2s ease-in, opacity 0.15s ease-in;
  transform: translateY(0);
  opacity: 1;
}

.bk-out-drop.bk-out-active {
  transform: translateY(20px);
  opacity: 0;
}

.bk-in-drop {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease-out;
  transform: translateY(-120%);
  opacity: 0;
}

.bk-in-drop.bk-in-active {
  transform: translateY(0);
  opacity: 1;
}

.bk-score-digit.bk-danger {
  animation: dang 0.5s ease-out;
  color: #ef4444;
}

@keyframes dang {
  0% {
    transform: translateX(0) rotate(0deg);
    color: #ef4444;
    filter: drop-shadow(0 0 0 transparent);
  }
  8% {
    transform: translateX(-10px) rotate(-4deg);
    filter: drop-shadow(0 0 20px #ef4444);
  }
  20% {
    transform: translateX(10px) rotate(4deg);
  }
  32% {
    transform: translateX(-8px) rotate(-3deg);
  }
  44% {
    transform: translateX(8px) rotate(3deg);
  }
  56% {
    transform: translateX(-5px) rotate(-2deg);
  }
  68% {
    transform: translateX(5px) rotate(2deg);
  }
  82% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

.bk-shake-slot {
  animation: slot-shake 0.5s ease-out;
}

@keyframes slot-shake {
  0% { transform: translateX(0); }
  10% { transform: translateX(-8px); }
  25% { transform: translateX(8px); }
  40% { transform: translateX(-5px); }
  55% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  85% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.bk-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.bk-p {
  position: absolute;
  font-weight: 900;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 3px 12px rgba(0,0,0,0.25), 0 0 20px currentcolor;
  animation: part-rage var(--dur, 0.6s) ease-out forwards;
  animation-delay: var(--del, 0s);
  will-change: transform, opacity;
}

@keyframes part-rage {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.2) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translate(calc(var(--dx, 40px) * 0.3), calc(var(--dy, -50px) * 0.3)) scale(1.4) rotate(calc(var(--rot, 10deg) * 0.3));
  }
  50% {
    opacity: 0.9;
    transform: translate(var(--dx, 40px), var(--dy, -50px)) scale(0.9) rotate(var(--rot, 10deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx, 40px) * 1.6), calc(var(--dy, -50px) * 1.4)) scale(0.3) rotate(calc(var(--rot, 10deg) * 2.5));
  }
}

.bk-dot {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 9;
  animation: dot-blast var(--dur, 0.4s) ease-out forwards;
  will-change: transform, opacity;
}

@keyframes dot-blast {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0);
  }
  20% {
    opacity: 1;
    transform: translate(calc(var(--dx, 30px) * 0.4), calc(var(--dy, -30px) * 0.4)) scale(1.8);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx, 30px) * 1.3), calc(var(--dy, -30px) * 1.3)) scale(0);
  }
}

.bk-flash {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
}

.bk-flash-on {
  animation: screen-pop 0.3s ease-out forwards;
}

@keyframes screen-pop {
  0% { opacity: 0.35; }
  100% { opacity: 0; }
}

.bk-pts {
  display: flex;
  gap: 0.375rem;
  position: relative;
  z-index: 2;
}

.bk-inc {
  flex: 1;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.06s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.bk-inc:active {
  transform: scale(0.78);
}

.bk-inc[data-val="1"] {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}

.bk-inc[data-val="2"] {
  background: rgba(249,115,22,0.12);
  color: #f97316;
}

.bk-inc[data-val="3"] {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.bk-inc[data-val="1"]:active {
  background: rgba(34,197,94,0.25);
}

.bk-inc[data-val="2"]:active {
  background: rgba(249,115,22,0.25);
}

.bk-inc[data-val="3"]:active {
  background: rgba(239,68,68,0.25);
}

.bk-inc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.bk-inc:active::after {
  opacity: 1;
}

.bk-dec-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
  position: relative;
  z-index: 2;
}

.bk-dec {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 2px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.06s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s, border-color 0.15s, color 0.15s;
  position: relative;
}

.bk-dec:active {
  transform: scale(0.78);
  background-color: rgba(239,68,68,0.15);
  color: #ef4444;
  border-color: #ef4444;
}

.bk-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 0.75rem;
  position: relative;
  z-index: 2;
}

.bk-winner {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-winner-off {
  display: none;
}

.bk-winner-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}

.bk-winner-box {
  position: relative;
  text-align: center;
  animation: winner-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes winner-in {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.bk-winner-crown {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.5rem;
  color: #facc15;
  animation: crown-bounce 1s ease-in-out infinite;
}

@keyframes crown-bounce {
  0%, 100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.bk-winner-crown svg {
  width: 100%;
  height: 100%;
}

.bk-winner-label {
  font-size: 3.5rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 30px rgba(250, 204, 21, 0.5), 0 4px 0 #b45309;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
}

.bk-winner-name {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0.75rem 0 0.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.bk-winner-score {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

.bk-winner-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bk-wc {
  position: absolute;
  top: -10px;
  border-radius: 2px;
  animation: wc-fall var(--dur, 2s) linear forwards;
}

@keyframes wc-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0.5;
  }
}

.bk-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.bk-modal-off {
  display: none;
}

.bk-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

.bk-modal-box {
  position: relative;
  background: var(--bg-surface);
  border-radius: 1.25rem;
  padding: 1.5rem;
  max-width: 20rem;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.bk-modal-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: #f97316;
}

.bk-modal-icon svg {
  width: 100%;
  height: 100%;
}

.bk-modal-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-base);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.bk-modal-btns {
  display: flex;
  gap: 0.75rem;
}

.bk-modal-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.08s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bk-modal-btn:active {
  transform: scale(0.92);
}

.bk-modal-btn-cancel {
  background: var(--bg-page);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.bk-modal-btn-reset {
  background: #ef4444;
  color: white;
}

@media (min-width: 640px) {
  .bk-card {
    border-radius: 1.5rem;
  }

  .bk-score-digit {
    font-size: clamp(5rem, 15vw, 8rem);
  }

  .bk-team {
    padding: 1rem;
  }

  .bk-inc {
    height: 3rem;
    font-size: 1.25rem;
  }
}
