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

.draw-panel.draw-live-active:after {
  content: "开奖中";
  position: absolute;
  top: 13px;
  right: 72px;
  z-index: 2;
  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);
  animation: drawLivePulse 1.1s ease-in-out infinite;
}

.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 {
  overflow: hidden;
  animation: drawBallRoll .18s linear infinite, drawBallGlow .9s ease-in-out infinite;
  transform-origin: 50% 52%;
  will-change: transform, filter;
}

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

.lottery-ball.draw-live-reveal {
  animation: drawBallDrop .62s cubic-bezier(.18, .92, .32, 1.25), drawBallGlow .8s ease-out;
}

.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; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

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

@keyframes drawBallRoll {
  0% { transform: translateY(-7px) scale(.992); filter: saturate(1.04) blur(.18px); }
  72% { transform: translateY(5px) scale(1); filter: saturate(1.1) blur(0); }
  100% { transform: translateY(9px) scale(.996); filter: saturate(1.02) blur(.12px); }
}

@keyframes drawBallGlow {
  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 drawBallDrop {
  0% { opacity: 0; transform: translateY(-22px) scale(.7) rotate(-18deg); }
  52% { opacity: 1; transform: translateY(5px) scale(1.12) rotate(5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(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 {
    right: 66px;
    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;
  }
}
