/* =========================================
   OVERLAY MODAL: ROULETTE (SPIN WHEEL)
   ========================================= */
.roulette-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 13, 0.84);
  backdrop-filter: blur(2px);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px 64px;
}

/* Wadah Roda & Alas Emas */
.roulette-stage {
  position: relative;
  width: 310px;
  height: 345px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-top: 10px;
}

/* Jarum Penunjuk Kuning di Atas Roda */
.roulette-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 34px;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 65%, #b45309 100%);
  border: 2px solid #78350f;
  border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
  z-index: 15;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.75);
}

.roulette-pointer::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78350f;
}

/* Lingkaran Luar Putih Roda */
.roulette-wheel-outer {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  padding: 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), inset 0 2px 4px #ffffff;
  position: relative;
  z-index: 5;
}

/* Piringan Roda Hijau 12 Segmen yang Berputar */
.roulette-wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 2px solid #3f6212;
  background: repeating-conic-gradient(
    from -15deg,
    #789828 0deg 29.2deg,
    #365314 29.2deg 30deg
  );
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.45);
  will-change: transform;
}

/* Lingkaran Pusat Roda */
.roulette-wheel-disc::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a, #a16207);
  border: 2px solid #422006;
  z-index: 4;
}

/* Slot Item Hadiah di Tiap Segmen Roda */
.wheel-prize-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 52px;
  margin-left: -23px;
  margin-top: -26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.wheel-prize-box {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: radial-gradient(circle, #334155 15%, #0f172a 90%);
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
}

.wheel-prize-qty {
  position: absolute;
  bottom: -4px;
  font-size: 9px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  white-space: nowrap;
}

/* Alas / Dudukan Emas di Bawah Roda */
.roulette-pedestal {
  position: relative;
  margin-top: -24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.pedestal-neck {
  width: 110px;
  height: 28px;
  background: linear-gradient(90deg, #78350f 0%, #eab308 35%, #fef08a 50%, #ca8a04 75%, #713f12 100%);
  border-left: 2px solid #fef08a;
  border-right: 2px solid #78350f;
}

.pedestal-base {
  width: 245px;
  height: 38px;
  margin-top: -10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #fef9c3 0%, #eab308 55%, #854d0e 100%);
  border: 2.5px solid #fef08a;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.9);
}

/* Panel Tengah Kuning: START + Available / Cost + Multiplier */
.roulette-center-panel {
  position: absolute;
  top: 150px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 176px;
  border-radius: 36px;
  background: linear-gradient(180deg, #fef9c3 0%, #facc15 48%, #ca8a04 100%);
  border: 3px solid #713f12;
  padding: 7px 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 12;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8), inset 0 2px 3px #ffffff;
}

.roulette-start-btn {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}
.roulette-start-btn:active {
  transform: scale(0.95);
}

.r-start-title {
  font-size: 18px;
  font-weight: 900;
  color: #1c1917;
  letter-spacing: 0.5px;
}

.r-start-sub {
  font-size: 11.5px;
  font-weight: 800;
  color: #1c1917;
  margin-top: 1px;
}

/* Bar Pemilih Jumlah Spin (◀ 1 ▶) */
.roulette-mult-bar {
  margin-top: 5px;
  width: 132px;
  height: 22px;
  background: linear-gradient(180deg, #78350f 0%, #451a03 100%);
  border: 1.5px solid #fef08a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
}

.r-mult-arrow {
  width: 18px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #4ade80, #15803d);
  border: 1px solid #bbf7d0;
  color: #052e16;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.r-mult-val {
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
}

/* Kotak NEXT CHANCE HH:MM:SS (Muncul setelah jatah gratis dipakai) */
.roulette-next-chance {
  position: absolute;
  top: 204px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(241, 245, 249, 0.95);
  border: 1.5px solid #64748b;
  border-radius: 6px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 12;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
}

.nc-label {
  font-size: 10px;
  font-weight: 900;
  color: #1e293b;
}

.nc-timer {
  background: #1e293b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

/* Maskot Pemandu Roulette di Sisi Kanan */
.roulette-mascot {
  position: absolute;
  right: -12px;
  top: 22px;
  font-size: 86px;
  line-height: 1;
  z-index: 14;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  pointer-events: none;
  transition: opacity 0.25s;
}

/* Tombol CLOSE Hitam di Bawah Alas */
.roulette-close-btn {
  margin-top: 14px;
  width: 155px;
  padding: 11px 0;
  border-radius: 8px;
  border: 2px solid #9ca3af;
  background: linear-gradient(180deg, #374151 0%, #111827 55%, #030712 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  z-index: 10;
}
.roulette-close-btn:active {
  transform: scale(0.96);
}

/* Bar Bawah: Check Item Drop Rates */
.roulette-droprate-bar {
  position: absolute;
  bottom: 66px;
  left: 10px;
  right: 10px;
  height: 36px;
  border-radius: 7px;
  border: 1.5px solid #99f6e4;
  background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 55%, #115e59 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.75);
  z-index: 10;
}

/* =========================================
   POPUP HASIL HADIAH ROULETTE (GAMBAR 3)
   ========================================= */
.roulette-result-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInResult 0.2s ease-out;
}

@keyframes fadeInResult {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.r-result-slot {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: radial-gradient(circle, #334155 15%, #0f172a 90%);
  border: 2.5px solid #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.65);
  margin-bottom: 10px;
}

.r-result-qty {
  position: absolute;
  bottom: 2px;
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.r-result-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  text-shadow: 0 2px 4px #000;
}

.r-result-close-btn {
  width: 170px;
  padding: 11px 0;
  border-radius: 8px;
  border: 2px solid #a7f3d0;
  background: linear-gradient(180deg, #10b981 0%, #047857 60%, #064e3b 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.r-result-mailbox-note {
  margin-top: 22px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0.85) 80%, transparent 100%);
  padding: 7px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

/* Modal Drop Rates Sederhana */
.roulette-rates-card {
  background: #0f172a;
  border: 2px solid #2dd4bf;
  border-radius: 12px;
  padding: 14px;
  width: 90%;
  max-width: 330px;
  max-height: 70vh;
  overflow-y: auto;
}