.draw-panel.draw-live-active {
  overflow: hidden;
}

.draw-panel.draw-live-active:after {
  content: "开奖中";
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 4px 9px;
  border: 1px solid rgba(255, 220, 186, .34);
  border-radius: 999px;
  color: #ffe3cf;
  background: linear-gradient(135deg, rgba(255, 139, 61, .28), rgba(255, 255, 255, .09));
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(255, 139, 61, .22);
}

.draw-panel.draw-live-pending:after {
  content: "待开奖";
}

.draw-panel.draw-live-active .balls {
  position: relative;
}

.draw-panel.draw-live-active .balls:before {
  content: "";
  position: absolute;
  inset: -11px -7px;
  z-index: -1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 227, 207, .18), transparent 34%),
    radial-gradient(circle at 76% 76%, rgba(255, 139, 61, .14), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 139, 61, .07));
  opacity: .95;
}

.lottery-ball.draw-spin {
  position: relative;
  overflow: hidden;
  animation: none;
  transform: none;
  filter: none;
  will-change: auto;
}

.lottery-ball .slot-window {
  position: absolute;
  inset: 20%;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
  color: inherit;
}

.lottery-ball .slot-digit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: inherit;
  transform: translateY(0);
  color: inherit;
  text-align: center;
  will-change: transform, opacity, filter;
}

.lottery-ball .slot-digit:before,
.lottery-ball .slot-digit:after {
  content: attr(data-number);
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.lottery-ball .slot-digit:before {
  top: -100%;
}

.lottery-ball .slot-digit:after {
  top: 100%;
}

.lottery-ball.draw-spin .slot-digit {
  animation: slotDigitRoll .18s linear infinite;
}

.lottery-ball.draw-live-settling {
  overflow: hidden;
  animation: drawBallPreSettle 1.2s cubic-bezier(.18, .84, .22, 1) both;
}

.lottery-ball.draw-spin.draw-live-settling .slot-digit {
  animation: slotDigitPreSettle 1.2s cubic-bezier(.14, .86, .2, 1) both;
}

.lottery-ball.draw-live-hidden {
  color: rgba(5, 7, 13, .35);
  filter: saturate(.75);
}

.lottery-ball.draw-live-reveal {
  overflow: hidden;
  animation: drawBallSettleGlow 2.2s ease-out;
}

.lottery-ball.draw-live-reveal .slot-digit {
  animation: slotDigitSettle 2.2s cubic-bezier(.16, .92, .18, 1) both;
}

.plus.draw-live-plus {
  color: #ffe5d4;
  text-shadow: 0 0 18px rgba(255, 139, 61, .72);
  animation: drawPlusPop .68s ease-out;
}

@keyframes drawLivePulse {
  0%, 100% { opacity: .76; }
  50% { opacity: 1; }
}

@keyframes drawBallShuffle {
  0%, 100% { transform: translateY(0) scale(1); filter: saturate(.95); }
  50% { transform: translateY(-1px) scale(1.018); filter: saturate(1.12); }
}

@keyframes slotDigitRoll {
  0% { opacity: .98; transform: translateY(-100%); filter: blur(.55px); }
  50% { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: .98; transform: translateY(100%); filter: blur(.55px); }
}

@keyframes drawBallPreSettle {
  0% { transform: translateY(0) scale(1); filter: saturate(1); }
  48% { transform: translateY(-2px) scale(1.025); filter: saturate(1.16); }
  76% { transform: translateY(1px) scale(.992); filter: saturate(1.06); }
  100% { transform: translateY(0) scale(1); filter: saturate(1); }
}

@keyframes slotDigitPreSettle {
  0% { opacity: .9; transform: translateY(-260%); filter: blur(2px); }
  36% { opacity: 1; transform: translateY(80%); filter: blur(1.15px); }
  64% { opacity: 1; transform: translateY(-34%); filter: blur(.65px); }
  82% { opacity: 1; transform: translateY(14%); filter: blur(.25px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes drawBallSettleGlow {
  0%, 100% { box-shadow: inset 0 0 0 1px #fffffffa, inset 0 0 0 5px var(--ring), inset 0 0 0 7px #fffffff0, inset -7px -9px 13px #0000002e, inset 5px 5px 10px #ffffffdb, 0 9px 18px #00000057, 0 0 16px var(--ring-glow); }
  50% { box-shadow: inset 0 0 0 1px #ffffff, inset 0 0 0 5px var(--ring), inset 0 0 0 7px #fffffff0, inset -7px -9px 13px #00000024, inset 5px 5px 12px #ffffff, 0 12px 22px #00000066, 0 0 26px var(--ring-glow); }
}

@keyframes slotDigitSettle {
  0% { opacity: .12; transform: translateY(-260%); filter: blur(2.4px); }
  34% { opacity: .5; transform: translateY(-120%); filter: blur(1.4px); }
  58% { opacity: .88; transform: translateY(-28%); filter: blur(.5px); }
  72% { opacity: 1; transform: translateY(16%); filter: blur(0); }
  84% { opacity: 1; transform: translateY(-8%); filter: blur(0); }
  94% { opacity: 1; transform: translateY(3%); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes drawPlusPop {
  0% { transform: translateY(1px) scale(.72); opacity: .45; }
  48% { transform: translateY(1px) scale(1.22); opacity: 1; }
  100% { transform: translateY(1px) scale(1); opacity: .9; }
}

@media (max-width: 460px) {
  .draw-panel.draw-live-active:after {
    top: 12px;
  }
}

.live-entry-disabled {
  opacity: .42;
  filter: grayscale(.45);
  cursor: not-allowed;
}

.live-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 139, 61, .2), transparent 34%),
    rgba(10, 6, 3, .72);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

.live-modal-mask.visible {
  opacity: 1;
  visibility: visible;
}

.live-modal {
  width: min(430px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 226, 205, .22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(42, 23, 15, .96), rgba(18, 10, 7, .96)),
    #160c08;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
  transform: translateY(12px) scale(.98);
  transition: transform .24s ease;
}

.live-modal-mask.visible .live-modal {
  transform: translateY(0) scale(1);
}

.live-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
}

.live-modal-head span,
.live-modal-foot {
  display: block;
  color: rgba(255, 232, 216, .62);
  font-size: 12px;
  font-weight: 760;
}

.live-modal-head strong {
  display: block;
  margin-top: 2px;
  color: #fff4ea;
  font-size: 18px;
  font-weight: 900;
}

.live-modal-close {
  min-width: 54px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  color: #ffe7d8;
  background: rgba(255, 255, 255, .08);
  font-size: 13px;
  font-weight: 820;
}

.live-video-box {
  position: relative;
  margin: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 139, 61, .18), transparent 36%),
    linear-gradient(135deg, #1a0d07, #2b160f);
  aspect-ratio: 16 / 9;
}

.live-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #100805;
  object-fit: contain;
}

.live-frame {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: #100805;
}

.live-frame.visible {
  display: block;
}

.live-video-notice {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  padding: 22px;
  text-align: center;
  color: #ffe4d0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 190, 143, .15), transparent 36%),
    rgba(17, 8, 4, .88);
}

.live-video-notice.visible {
  display: flex;
}

.live-video-notice i {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 222, 200, .24);
  border-top-color: #ff9b58;
  border-radius: 50%;
  animation: liveSpin 1s linear infinite;
}

.live-video-notice p {
  max-width: 310px;
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 820;
}

.live-modal-foot {
  padding: 11px 14px 14px;
  color: rgba(255, 232, 216, .58);
}

.live-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255, 139, 61, .15), rgba(255, 255, 255, .06));
}

.live-status-panel span,
.live-status-panel em {
  color: rgba(255, 232, 216, .56);
  font-size: 12px;
  font-weight: 800;
}

.live-status-panel em {
  font-style: normal;
  text-align: right;
}

.live-status-panel strong {
  color: #fff3eb;
  font-size: 15px;
  font-weight: 930;
}

@keyframes liveSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 460px) {
  .live-modal-mask {
    align-items: flex-end;
    padding: 10px;
  }

  .live-modal {
    border-radius: 20px;
  }

  .live-modal-head {
    padding: 13px 12px 10px;
  }

  .live-video-box {
    margin: 0 12px;
  }

  .live-status-panel {
    margin: 10px 12px 0;
    padding: 10px;
  }

  .live-video-notice p {
    font-size: 14px;
  }
}
