.sorteio-live-btn {
  background: linear-gradient(135deg, #9d7bff, #7c5cff);
  border-color: rgba(157, 123, 255, 0.5);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}

html.sorteio-live-open,
html.sorteio-live-open body {
  overflow: hidden;
}

.sorteio-live-root {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  color: #f5f7ff;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  background: radial-gradient(circle at 50% 0%, #1a1040 0%, #07050f 45%, #030208 100%);
}

.sorteio-live-root[hidden] {
  display: none !important;
}

.sorteio-live-bg,
.sorteio-live-particles,
.sorteio-live-confetti,
.sorteio-live-glow,
.sorteio-live-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sorteio-live-particles,
.sorteio-live-confetti {
  width: 100%;
  height: 100%;
}

.sorteio-live-confetti {
  z-index: 6;
}

.sorteio-live-glow-a {
  background: radial-gradient(circle at 20% 20%, rgba(124, 92, 255, 0.35), transparent 45%);
  animation: sorteioLiveGlowA 8s ease-in-out infinite;
}

.sorteio-live-glow-b {
  background: radial-gradient(circle at 80% 70%, rgba(157, 123, 255, 0.22), transparent 50%);
  animation: sorteioLiveGlowB 10s ease-in-out infinite;
}

.sorteio-live-flash {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.08s ease-out;
  z-index: 2;
}

.sorteio-live-flash.is-on {
  opacity: 1;
}

.sorteio-live-phase {
  position: relative;
  z-index: 10;
  width: min(960px, calc(100vw - 40px));
  min-height: min(88vh, 900px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
  pointer-events: auto;
}

.sorteio-live-phase[hidden] {
  display: none !important;
}

.sorteio-live-phase.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.sorteio-live-header {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.sorteio-live-logo {
  width: clamp(72px, 10vw, 96px);
  height: clamp(72px, 10vw, 96px);
  border-radius: 24px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 48px rgba(124, 92, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.sorteio-live-brand {
  margin: 0;
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.72);
}

.sorteio-live-kicker {
  margin: 0 0 12px;
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: 0.42em;
  color: #c4b5fd;
  font-weight: 700;
}

.sorteio-live-prize {
  margin: 0 0 18px;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #d8c4ff 45%, #9d7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(157, 123, 255, 0.35);
  animation: sorteioLiveShimmer 3.2s ease-in-out infinite;
}

.sorteio-live-stat {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
}

.sorteio-live-date {
  margin: 0 0 10px;
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(245, 247, 255, 0.68);
}

.sorteio-live-auto-hint {
  margin: 0 0 clamp(20px, 4vw, 32px);
  font-size: clamp(13px, 2vw, 16px);
  color: rgba(196, 181, 253, 0.85);
  letter-spacing: 0.04em;
}

.sorteio-live-cta {
  min-width: min(320px, 80vw);
  padding: 18px 36px;
  border: 0;
  border-radius: 999px;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fff;
  background: linear-gradient(135deg, #b794ff, #7c5cff 55%, #5b39e6);
  box-shadow: 0 18px 48px rgba(124, 92, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sorteio-live-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 56px rgba(124, 92, 255, 0.55);
}

.sorteio-live-close {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 18px;
  z-index: 4;
}

.sorteio-live-countdown-hint {
  margin: 0 0 24px;
  font-size: clamp(18px, 3vw, 28px);
  color: rgba(245, 247, 255, 0.72);
  letter-spacing: 0.08em;
}

.sorteio-live-countdown-number {
  font-size: clamp(96px, 24vw, 220px);
  line-height: 1;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 30px rgba(157, 123, 255, 0.8),
    0 0 80px rgba(124, 92, 255, 0.45);
  opacity: 1;
  transform: scale(1);
}

.sorteio-live-countdown-number.is-pop {
  animation: sorteioLiveCountPop 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

.sorteio-live-roulette-label {
  margin: 0 0 24px;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.sorteio-live-roulette-window {
  position: relative;
  width: min(760px, 92vw);
  min-height: clamp(160px, 28vw, 240px);
  display: grid;
  place-items: center;
  border-radius: 28px;
  border: 1px solid rgba(157, 123, 255, 0.35);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(8, 6, 18, 0.72));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 0 60px rgba(124, 92, 255, 0.12);
  overflow: hidden;
}

.sorteio-live-roulette-shimmer {
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
  animation: sorteioLiveShimmerMove 2.4s linear infinite;
}

.sorteio-live-roulette-name {
  position: relative;
  z-index: 1;
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 800;
  padding: 0 20px;
  text-shadow: 0 0 24px rgba(157, 123, 255, 0.55);
}

.sorteio-live-roulette-name.is-pop {
  animation: sorteioLiveNamePop 0.16s ease-out;
}

.sorteio-live-roulette-name.is-final {
  color: #ffe082;
  animation: sorteioLiveWinnerGlow 1.4s ease-in-out infinite;
}

.sorteio-live-root.is-winner {
  background: radial-gradient(circle at 50% 30%, #120a28 0%, #030208 55%, #000 100%);
}

.sorteio-live-root.is-winner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 1;
}

.sorteio-live-root.is-roulette .sorteio-live-glow-a,
.sorteio-live-root.is-roulette .sorteio-live-glow-b {
  opacity: 1.2;
}

.sorteio-live-fireworks {
  z-index: 5;
}

.sorteio-live-firework {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow:
    0 0 20px currentColor,
    0 0 40px rgba(255, 215, 0, 0.45);
  animation: sorteioLiveFirework 1.6s ease-out forwards;
  opacity: 0;
}

.sorteio-live-gold-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.sorteio-live-winner-wrap {
  animation: sorteioLiveWinnerEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 4;
  text-align: center;
}

.sorteio-live-trophy {
  font-size: clamp(56px, 10vw, 88px);
  margin-bottom: 8px;
  filter: drop-shadow(0 0 24px rgba(255, 215, 0, 0.45));
}

.sorteio-live-winner-kicker {
  margin: 0 0 8px;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.38em;
  color: #ffd700;
  font-weight: 800;
}

.sorteio-live-winner-name {
  margin: 0 0 24px;
  font-size: clamp(42px, 9vw, 96px);
  line-height: 1.05;
  font-weight: 900;
  animation: sorteioLiveWinnerGlow 1.8s ease-in-out infinite;
}

.sorteio-live-winner-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: min(520px, 92vw);
  margin: 0 auto 28px;
  text-align: center;
  justify-items: stretch;
}

.sorteio-live-winner-meta div {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sorteio-live-winner-meta dt {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.55);
}

.sorteio-live-winner-meta dd {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 36px);
  font-weight: 800;
  color: #fff;
  word-break: break-word;
}

.sorteio-live-winner-meta div:first-child dd {
  font-size: clamp(28px, 6vw, 48px);
  color: #ffe082;
  animation: sorteioLiveWinnerGlow 1.8s ease-in-out infinite;
}

.sorteio-live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.sorteio-live-action {
  min-width: min(240px, 88vw);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(157, 123, 255, 0.45);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(91, 57, 230, 0.55));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(124, 92, 255, 0.28);
}

.sorteio-live-action-muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.sorteio-live-error-box {
  padding: 28px;
  border-radius: 20px;
  background: rgba(255, 94, 119, 0.12);
  border: 1px solid rgba(255, 94, 119, 0.35);
  max-width: 520px;
}

@keyframes sorteioLiveFirework {
  0% {
    opacity: 0;
    transform: scale(0.2);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8);
  }
  35% {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 24px 8px rgba(255, 215, 0, 0.35),
      0 0 48px 16px rgba(157, 123, 255, 0.25);
  }
  100% {
    opacity: 0;
    transform: scale(2.4);
    box-shadow:
      0 0 60px 24px rgba(255, 215, 0, 0),
      0 0 80px 32px rgba(157, 123, 255, 0);
  }
}

@keyframes sorteioLiveGlowA {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate(2%, 3%) scale(1.06); opacity: 1; }
}

@keyframes sorteioLiveGlowB {
  0%, 100% { transform: translate(0, 0); opacity: 0.7; }
  50% { transform: translate(-3%, -2%); opacity: 1; }
}

@keyframes sorteioLiveShimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

@keyframes sorteioLiveShimmerMove {
  0% { transform: translateX(-30%) rotate(8deg); }
  100% { transform: translateX(30%) rotate(8deg); }
}

@keyframes sorteioLiveCountPop {
  0% { opacity: 0.35; transform: scale(0.72); filter: blur(4px); }
  40% { opacity: 1; transform: scale(1.14); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes sorteioLiveNamePop {
  0% { transform: scale(0.92); opacity: 0.65; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes sorteioLiveWinnerGlow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.35), 0 0 40px rgba(157, 123, 255, 0.35);
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 32px rgba(255, 215, 0, 0.65), 0 0 64px rgba(157, 123, 255, 0.55);
    transform: scale(1.02);
  }
}

@keyframes sorteioLiveWinnerEnter {
  0% { opacity: 0; transform: translateY(24px) scale(0.96); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (max-width: 640px) {
  .sorteio-live-winner-meta {
    grid-template-columns: 1fr;
  }

  .sorteio-live-action {
    width: 100%;
  }
}

@media (min-width: 1600px) {
  .sorteio-live-phase {
    width: min(1100px, 88vw);
  }
}

.sorteio-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  background: rgba(255, 94, 119, .18);
  border: 1px solid rgba(255, 94, 119, .4);
  color: #ffb3c0;
}
.sorteio-live-lobby-body { max-width: min(920px, 94vw); width: 100%; }
.sorteio-live-lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}
.sorteio-live-lobby-actions {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(196,181,253,.2);
}
.sorteio-live-lobby-note {
  margin: 0;
  font-size: 13px;
  color: rgba(245,247,255,.7);
  text-align: center;
  line-height: 1.4;
}
.sorteio-live-chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 260px;
  max-height: 340px;
  border-radius: 16px;
  background: rgba(8, 5, 18, .72);
  border: 1px solid rgba(196,181,253,.22);
  overflow: hidden;
  text-align: left;
}
.sorteio-live-chat-head {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #ddd6fe;
}
.sorteio-live-chat-list {
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.sorteio-live-chat-empty {
  margin: 0;
  color: rgba(245,247,255,.55);
  font-size: 13px;
}
.sorteio-live-chat-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  font-size: 13px;
}
.sorteio-live-chat-item.role-admin {
  background: rgba(124, 92, 255, .16);
  border: 1px solid rgba(124, 92, 255, .28);
}
.sorteio-live-chat-item strong {
  font-size: 11px;
  color: #c4b5fd;
}
.sorteio-live-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sorteio-live-chat-form input {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.sorteio-live-chat-send {
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 800;
  background: #25D366;
  color: #062a1d;
  cursor: pointer;
}
@media (max-width: 760px) {
  .sorteio-live-lobby-grid { grid-template-columns: 1fr; }
  .sorteio-live-chat { max-height: 240px; }
}
