/* ══════════════════════════════════════════════════════════════════
   FYM Lottery — Draw Ceremony overlay
   ════════════════════════════════════════════════════════════════════ */
.lc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(28px, env(safe-area-inset-top, 0px) + 18px) 16px 24px;
  background:
    radial-gradient(ellipse 85% 62% at 50% 42%, rgba(44, 32, 9, 0.9) 0%, rgba(7, 5, 3, 0.98) 55%, rgba(0, 0, 0, 1) 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 380ms ease-out, visibility 0s linear 380ms;
  overflow: hidden;
}
.lc-overlay.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 380ms ease-out;
}
.lc-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
}

.lc-eyebrow {
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #d9b866;
  opacity: 0.85;
  z-index: 2;
}
.lc-phase {
  margin-top: 8px;
  font-family: var(--font-display, 'Bodoni Moda', serif);
  font-size: clamp(20px, 6.4vw, 27px);
  font-weight: 700;
  color: #f6efdd;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
  z-index: 2;
  min-height: 1.2em;
  transition: color 300ms ease;
}
.lc-sub {
  margin-top: 4px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #a99a7a;
  text-align: center;
  z-index: 2;
  min-height: 1.1em;
}

.lc-stage {
  position: relative;
  margin-top: 10px;
  width: 100%;
  max-width: 380px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.lc-canvas {
  display: block;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6));
}

/* Winner reveal card — floats over the machine */
.lc-card {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translate(-50%, 24px) scale(0.9);
  width: min(90%, 320px);
  padding: 16px 18px 18px;
  border-radius: 16px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(26, 22, 12, 0.96), rgba(14, 11, 6, 0.98));
  border: 1px solid hsl(var(--hue, 45) 60% 55% / 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 18px 50px rgba(0, 0, 0, 0.7),
    0 0 40px hsl(var(--hue, 45) 80% 55% / 0.25);
  transition: opacity 340ms ease-out, transform 340ms cubic-bezier(0.18, 1.2, 0.4, 1);
}
.lc-card.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.lc-card.tier-1.show { animation: lcCardPulse 1.6s ease-in-out 0.34s 2; }
@keyframes lcCardPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 18px 50px rgba(0,0,0,0.7), 0 0 40px hsl(45 80% 55% / 0.25); }
  50%      { box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 18px 50px rgba(0,0,0,0.7), 0 0 64px hsl(45 90% 60% / 0.6); }
}
/* Foil shimmer sweep across the card on reveal */
.lc-card { overflow: hidden; }
.lc-card-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, hsl(var(--hue, 45) 90% 75% / 0.28) 48%, rgba(255, 255, 255, 0.4) 52%, transparent 70%);
  transform: translateX(-120%);
}
.lc-card.show .lc-card-shine { animation: lcShine 1.3s ease-out 0.35s 1; }
@keyframes lcShine { to { transform: translateX(120%); } }
.lc-card-medal { font-size: 36px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)); }
.lc-card-tier {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: hsl(var(--hue, 45) 55% 68%); font-weight: 700;
}
.lc-card-name {
  margin-top: 6px;
  font-family: var(--font-display, 'Bodoni Moda', serif);
  font-size: 22px; font-weight: 700; color: #fbf5e6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-card-ticket {
  margin-top: 2px; font-size: 11px; letter-spacing: 0.05em; color: #8d8168;
}
.lc-card-amount {
  margin-top: 10px;
  font-family: var(--font-display, 'Bodoni Moda', serif);
  font-size: 30px; font-weight: 700; line-height: 1;
  color: #ffe08a;
  text-shadow: 0 0 22px hsl(var(--hue, 45) 90% 60% / 0.5);
}
.lc-card-amount span { font-size: 15px; opacity: 0.8; margin-left: 3px; }

.lc-skip {
  position: absolute;
  right: 16px;
  top: max(24px, env(safe-area-inset-top, 0px) + 14px);
  z-index: 3;
  background: rgba(10, 8, 5, 0.55);
  border: 1px solid rgba(217, 184, 102, 0.35);
  color: #d9b866;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.lc-skip:active { transform: scale(0.95); }

/* Temporary TEST DRAW button on the lottery screen */
.lottery-test-draw {
  display: block;
  width: 100%;
  margin: 14px 0 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(217, 184, 102, 0.5);
  background: rgba(217, 184, 102, 0.07);
  color: #d9b866;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.lottery-test-draw:active { transform: scale(0.98); }
.lottery-test-draw small { display: block; font-size: 9px; opacity: 0.6; letter-spacing: 0.1em; margin-top: 3px; }

@media (prefers-reduced-motion: reduce) {
  .lc-card, .lc-card.tier-1.show { transition: opacity 200ms; animation: none; }
}
