* { box-sizing: border-box; }

body {
  background: url("/assets/bg-lucky-spin.webp") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  margin: 0;
  position: relative;
}

/* ======================
   OVERLAY GELAP (AMAN)
====================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1;
  pointer-events: none;
}

/* SEMUA KONTEN DI ATAS OVERLAY */
body > * {
  position: relative;
  z-index: 5;
}

/* ======================
   WHEEL FRAME (CONTAINER)
====================== */
.wheel-frame {
  width: 420px;
  height: 420px;
  position: relative;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======================
   BACKGROUND RING
====================== */
.wheel-bg {
  position: absolute;
  inset: 0;
  background: url("/assets/outwheels.webp") no-repeat center center;
  background-size: contain;

  z-index: 1;

  /* ðŸ”’ KUNCI AGAR TIDAK IKUT MUTER */
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* ======================
   CANVAS (WINWHEEL)
====================== */
.wheel-canvas {
  position: relative;
  z-index: 2;

  width: 350px;
  height: 350px;
}

#canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ======================
   FIREWORKS
====================== */
.fireworks-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

/* ======================
   SAMAKAN UKURAN TOMBOL
====================== */

/* CARA MAIN */
.btn-caramain {
  width: 360px;
  max-width: 100%;
  height: 40px;              /* ⬅️ sama seperti SPIN */
  line-height: 40px;         /* ⬅️ teks pas tengah */
  font-size: 16px;
  font-weight: 700;
  padding: 0;                /* ⬅️ biar tinggi konsisten */
  border-radius: 10px;

  background: linear-gradient(135deg, #2196f3, #21cbf3);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 14px rgba(33,150,243,.45);
  transition: all .25s ease;
}

.btn-caramain:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33,150,243,.6);
}

/* DAFTAR PEMENANG */
.btn-daftar {
  width: 360px;
  max-width: 100%;
  height: 40px;              /* ⬅️ sama seperti SPIN */
  line-height: 40px;         /* ⬅️ teks pas tengah */
  font-size: 16px;
  font-weight: 700;
  padding: 0;                /* ⬅️ konsisten */
  border-radius: 10px;
  margin-bottom:16px;
  background: linear-gradient(135deg, #ff9800, #ffc107);
  color: #000 !important;
  border: none;
  box-shadow: 0 4px 14px rgba(255,152,0,.45);
  transition: all .25s ease;
}

.btn-daftar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,152,0,.6);
}

#voucher::placeholder {
  text-align: center;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.5px;
}

/* ======================
   TOMBOL SPIN HIDUP
====================== */
.btn-spin {
  position: relative;
  background: linear-gradient(180deg, #ff3b3b, #b30000);
  border: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;

  box-shadow:
    0 0 12px rgba(255, 0, 0, 0.6),
    inset 0 0 6px rgba(255,255,255,0.3);

  animation: spinPulse 1.8s infinite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* DENYUT HALUS */
@keyframes spinPulse {
  0% {
    box-shadow:
      0 0 12px rgba(255, 0, 0, 0.5),
      inset 0 0 6px rgba(255,255,255,0.3);
  }
  50% {
    box-shadow:
      0 0 22px rgba(255, 80, 80, 0.9),
      inset 0 0 8px rgba(255,255,255,0.45);
  }
  100% {
    box-shadow:
      0 0 12px rgba(255, 0, 0, 0.5),
      inset 0 0 6px rgba(255,255,255,0.3);
  }
}

/* HOVER */
.btn-spin:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 28px rgba(255, 80, 80, 1),
    inset 0 0 10px rgba(255,255,255,0.5);
}

/* SAAT DIKLIK */
.btn-spin:active {
  transform: scale(0.97);
  box-shadow:
    0 0 10px rgba(255, 0, 0, 0.8),
    inset 0 0 14px rgba(0,0,0,0.4);
}

.voucher-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffc107;
  text-shadow:
    0 0 6px rgba(255,193,7,.6),
    0 0 14px rgba(255,193,7,.4);
}

/* ======================
   IDLE ROTATE (CSS ONLY)
====================== */
@keyframes idleRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.wheel-idle {
  animation: idleRotate 30s linear infinite;
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 480px) {
  .wheel-frame {
    width: 360px;
    height: 360px;
  }

  .wheel-canvas {
    width: 300px;
    height: 300px;
  }
}