/* NCE Lucky Wheel – Frontend Styles */

/* ── Container ─────────────────────────────── */
.nce-lucky-wheel-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nce-lw-row {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Form Panel ─────────────────────────────── */
.nce-form-panel {
  flex: 1 1 320px;
  max-width: 400px;
}

.nce-form-panel h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1e293b;
}

.nce-form-group {
  margin-bottom: 16px;
}

.nce-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  margin-bottom: 6px;
}

.nce-form-group input[type="text"],
.nce-form-group input[type="email"],
.nce-form-group input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1e293b;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  box-sizing: border-box;
}

.nce-form-group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* intl-tel-input override */
.iti { width: 100%; }
.iti__flag-container { z-index: 100; }

/* ── Buttons ────────────────────────────────── */
.nce-lw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  width: 100%;
  margin-top: 10px;
}

.nce-lw-btn:active { transform: scale(.97); }
.nce-lw-btn:disabled { opacity: .5; cursor: not-allowed; }

.nce-lw-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}

.nce-lw-btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(99,102,241,.5); }

.nce-lw-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.35);
}

.nce-lw-btn-spin {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 18px rgba(239,68,68,.4);
  animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 4px 18px rgba(239,68,68,.4); }
  50%       { box-shadow: 0 6px 28px rgba(239,68,68,.65); }
}

/* Error message */
#nce-error-msg {
  display: none;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-top: 10px;
}

/* ── Wheel Panel ────────────────────────────── */
.nce-wheel-panel {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.nce-wheel-outer {
  position: relative;
  width: 340px;
  height: 340px;
  max-width: 100%;
}

/* Lights ring */
.nce-wheel-lights {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

.nce-led {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
  transform: translate(-50%, -50%);
  transition: background .1s, box-shadow .1s;
}

.nce-led.on {
  background: #fbbf24;
  box-shadow: 0 0 6px 2px #fbbf24, 0 0 12px 4px rgba(251,191,36,.5);
}

/* Canvas */
#nce-wheel-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

/* Arrow pointer */
.nce-wheel-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left:  11px solid transparent;
  border-right: 11px solid transparent;
  border-top:   22px solid #e11d48;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
  z-index: 10;
}

/* ── Spin Section ───────────────────────────── */
#nce-spin-section {
  display: none;
  text-align: center;
  padding: 24px 0 0;
}

#nce-spin-section p {
  color: #64748b;
  margin-bottom: 16px;
}

/* ── Result Overlay ─────────────────────────── */
.nce-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity .3s;
}

.nce-result-overlay.visible { opacity: 1; }

.nce-result-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  animation: pop-in .4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes pop-in {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.nce-confetti {
  font-size: 2rem;
  letter-spacing: 4px;
  margin-bottom: 12px;
  animation: confetti-dance 1.2s infinite alternate;
}

@keyframes confetti-dance {
  from { transform: rotate(-5deg) scale(.95); }
  to   { transform: rotate(5deg)  scale(1.05); }
}

.nce-result-box h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 10px;
}

.nce-prize-display {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0;
  line-height: 1;
}

.nce-prize-sub {
  color: #64748b;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.nce-cs-msg {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 18px;
  color: #166534;
  font-size: 0.9rem;
  margin-bottom: 20px;
  font-weight: 500;
}

.nce-cs-img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 18px;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 640px) {
  .nce-lw-row { flex-direction: column-reverse; }
  .nce-wheel-outer { width: 290px; height: 290px; }
  .nce-form-panel { max-width: 100%; }
}
