/* Draw / Lucky Fans — festive lottery wheel */
.page-draw .page,
.page:has(.draw-page) {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 70, 90, .18), transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 200, 60, .22), transparent 40%),
    linear-gradient(180deg, #fff5f5 0%, #fffaf2 40%, #f7f8fc 100%);
}

.draw-page {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.draw-hero {
  margin: 4px 0 14px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  text-align: center;
  background:
    linear-gradient(145deg, #e31c3d 0%, #ff4d6d 42%, #ffb347 100%);
  color: #fff;
  box-shadow:
    0 14px 36px rgba(227, 28, 61, .28),
    inset 0 1px 0 rgba(255,255,255,.25);
  position: relative;
  overflow: hidden;
}
.draw-hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
}
.draw-hero::after {
  content: "🎊";
  position: absolute;
  left: 14px;
  top: 12px;
  font-size: 18px;
  opacity: .9;
}
.draw-title {
  position: relative;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.draw-rules {
  position: relative;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,.92);
  font-weight: 500;
}
.draw-rules strong { color: #ffe082; font-weight: 800; }

.status-card {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 1px solid rgba(255, 180, 60, .35);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 14px;
  display: none;
  box-shadow: 0 6px 18px rgba(227, 28, 61, .08);
}
.status-card.show { display: block; }
.status-card .st-main {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #b91c1c;
}
.status-card .st-prize {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}
.status-card .st-prize em {
  font-style: normal;
  color: #e31c3d;
  font-weight: 800;
}

.code-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.code-row input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 2px solid rgba(227, 28, 61, .18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(227, 28, 61, .08);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #111;
  outline: none;
}
.code-row input:focus {
  border-color: #e31c3d;
  box-shadow: 0 0 0 4px rgba(227, 28, 61, .12);
}
.code-row .btn-start {
  flex-shrink: 0;
  height: 50px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #e31c3d 0%, #ff5a3c 55%, #ffb347 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(227, 28, 61, .35);
}
.code-row .btn-start:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Wheel — lottery festive */
.wheel-stage {
  position: relative;
  width: min(100%, 300px);
  margin: 8px auto 22px;
  aspect-ratio: 1;
  filter: drop-shadow(0 16px 28px rgba(227, 28, 61, .2));
}
.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -4px;
  z-index: 5;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #e31c3d;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
.wheel-disk {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid #ffd54a;
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 8px #e31c3d,
    0 12px 30px rgba(0,0,0,.12);
  background: conic-gradient(
    #ff3b4a 0deg 60deg,
    #ffe082 60deg 120deg,
    #ff6b6b 120deg 180deg,
    #ffd54a 180deg 240deg,
    #e31c3d 240deg 300deg,
    #ffc107 300deg 360deg
  );
  position: relative;
  overflow: hidden;
  transition: transform 4.2s cubic-bezier(.12, .7, .08, 1);
}
.wheel-seg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  margin-top: -26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  pointer-events: none;
  z-index: 2;
}
.wheel-seg img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  padding: 4px;
  box-sizing: border-box;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.18));
}
.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #fff3cd);
  border: 4px solid #ffd54a;
  box-shadow: 0 4px 14px rgba(227, 28, 61, .2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #e31c3d;
  letter-spacing: .04em;
}

.prize-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.prize-section-title::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e31c3d, #ffb347);
}
.prize-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.prize-card {
  background: linear-gradient(180deg, #fff, #fff8f0);
  border: 1px solid rgba(255, 180, 60, .28);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(227, 28, 61, .06);
}
.prize-card img {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  object-fit: contain;
}
.prize-card .pn {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #111;
}
.prize-card .pp {
  margin: 4px 0 0;
  font-size: 12px;
  color: #e31c3d;
  font-weight: 800;
}

/* Win modal — jackpot celebration */
.win-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.win-modal.show { display: flex; }
.win-mask {
  position: absolute;
  inset: 0;
  background: rgba(40, 10, 20, .55);
}
.win-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 300px);
  background:
    radial-gradient(circle at top, rgba(255, 213, 74, .35), transparent 55%),
    linear-gradient(180deg, #fff 0%, #fff8f0 100%);
  border: 2px solid #ffd54a;
  border-radius: 22px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 56px rgba(227, 28, 61, .28);
  animation: winPop .28s ease;
}
@keyframes winPop {
  from { transform: scale(.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.win-dialog img {
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  object-fit: contain;
}
.win-dialog h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, #e31c3d, #ff8a00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.02em;
}
.win-dialog p {
  margin: 0 0 18px;
  font-size: 14px;
  color: #444;
  font-weight: 600;
  line-height: 1.5;
}
.win-dialog .btn-ok {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e31c3d, #ff6b3c);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(227, 28, 61, .3);
}

@media (min-width: 768px) {
  .draw-page { max-width: 560px; padding-top: 8px; }
  .wheel-stage { width: 340px; }
  .prize-cards { grid-template-columns: repeat(4, 1fr); }
}
