/* ============================================================
   Wanda Lucky Dip — style.css
   ============================================================ */

:root {
  --gold:   #FFD700;
  --gold2:  #FFA500;
  --deep:   #1a0533;
  --purple: #6B21A8;
  --pink:   #EC4899;
  --cyan:   #06B6D4;
  --green:  #10B981;
  --red:    #EF4444;
  --white:  #FFFFFF;
}

/* ===========================
   RESET & BASE
   =========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--deep);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===========================
   BACKGROUND STARS
   =========================== */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 20%, #2d0a5e88 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, #1a0a4488 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, #0d001f 0%, #1a0533 100%);
}

.stars::before,
.stars::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, #fff9 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 40%, #fff7 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 10%, #fffb 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, #fff8 0%, transparent 100%),
    radial-gradient(2px 2px at 85% 25%, #ffe066aa 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 70%, #fff6 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 80%, #fff9 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 90%, #fff7 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 35%, #ec4899aa 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 55%, #06b6d4aa 0%, transparent 100%);
}

.stars::after {
  background-image:
    radial-gradient(1px 1px at 5%  45%, #fff7 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 25%, #fff8 0%, transparent 100%),
    radial-gradient(2px 2px at 55% 65%, #ffe066bb 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 15%, #fff9 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 95% 50%, #fff6 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 90%, #fff8 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 5%,  #ec4899bb 0%, transparent 100%);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.7; }
  to   { opacity: 1;   }
}

/* ===========================
   FLOATING BG EMOJIS
   =========================== */
.confetti-wrap {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}

.confetti-wrap span {
  position: absolute;
  font-size: 1.2rem;
  animation: floatUp linear infinite;
  opacity: 0.18;
}

@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0;    }
  10%  { opacity: 0.18; }
  90%  { opacity: 0.18; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0;    }
}

/* ===========================
   LAYOUT WRAPPER
   =========================== */
.wrapper {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ===========================
   MAIN CARD
   =========================== */
.main-card {
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.07) 0%,
    rgba(255,255,255,0.03) 100%
  );
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 2.5rem;
  backdrop-filter: blur(20px);
  padding: 2.5rem 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow:
    0 0 60px rgba(255,215,0,0.08),
    0 0 120px rgba(107,33,168,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
  animation: cardIn 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ===========================
   HERO (logo + wheel berdampingan)
   =========================== */
.hero-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

/* ===========================
   LOGO (tanpa bulatan)
   =========================== */
.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-img {
  width: 130px;       /* sesuaikan ukuran logo di sini */
  height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.35));
}

/* ===========================
   TITLE & DESCRIPTION
   =========================== */
.game-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.5rem, 5vw, 2rem);
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--gold) 0%, #fff 40%, var(--gold2) 60%, var(--pink) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  line-height: 1.1;
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.4));
}

.game-desc {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.7rem 0 1.8rem;
  line-height: 1.5;
  background: linear-gradient(90deg, var(--cyan), var(--white), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   WHEEL PREVIEW (FORM SCREEN)
   =========================== */


.wheel-preview {
  position: relative;
  width: 130px; height: 130px;
  animation: wheelSpin 8s linear infinite;
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.4));
}

@keyframes wheelSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.wheel-preview-pointer {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  z-index: 10;
  animation: wheelSpin 8s linear infinite reverse;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ===========================
   FORM INPUTS
   =========================== */
.form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,215,0,0.25);
  border-radius: 1rem;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
  transition: all 0.3s;
}

.form-input::placeholder {
  color: rgba(255,255,255,0.3);
  font-weight: 600;
}

.form-input:focus {
  border-color: var(--gold);
  background: rgba(255,215,0,0.08);
  box-shadow: 0 0 20px rgba(255,215,0,0.2);
}

/* ===========================
   CONSENT CHECKBOX
   =========================== */
.consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.05);
  border-radius: 1rem;
  border: 1px solid rgba(255,215,0,0.15);
  cursor: pointer;
}

.consent-wrap:hover { background: rgba(255,215,0,0.07); }

.consent-check {
  appearance: none;
  width: 22px; height: 22px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: all 0.2s;
}

.consent-check:checked {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
}

.consent-check:checked::after {
  content: '✓';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--deep);
  font-size: 0.85rem;
  font-weight: 900;
}

.consent-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  user-select: none;
}

.consent-text strong { color: var(--gold); }

/* ===========================
   SUBMIT BUTTON
   =========================== */
.btn-submit {
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 50%, var(--pink) 100%);
  border: none;
  border-radius: 1.5rem;
  color: var(--deep);
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 8px 25px rgba(255,165,0,0.4);
}

.btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-submit:hover              { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(255,165,0,0.5); }
.btn-submit:hover::before      { opacity: 1; }
.btn-submit:active             { transform: translateY(0); }
.btn-submit:disabled           { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===========================
   DIVIDER
   =========================== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.3), transparent);
  margin: 1.5rem 0;
}

/* ===========================
   GAME SCREEN
   =========================== */
#gameScreen {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1);    }
}

.game-title-sm {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
}

.game-greeting {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ===========================
   SPIN WHEEL (GAME SCREEN)
   =========================== */
.wheel-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.wheel-pointer-big {
  position: absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  z-index: 20;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
  animation: pointerBounce 1.5s ease-in-out infinite;
}

@keyframes pointerBounce {
  0%, 100% { transform: translateX(-50%) translateY(0);    }
  50%       { transform: translateX(-50%) translateY(-4px); }
}

.wheel-pointer-big.spinning { animation: none; }

canvas#wheelCanvas {
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 40px rgba(255,215,0,0.35), 0 0 80px rgba(107,33,168,0.2);
}

.wheel-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--gold));
  border: 3px solid rgba(255,255,255,0.6);
  box-shadow: 0 0 15px rgba(255,215,0,0.8);
  z-index: 10;
}

/* ===========================
   START BUTTON
   =========================== */
.btn-start {
  padding: 0.85rem 3rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
  border: none;
  border-radius: 2rem;
  color: #fff;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(6,182,212,0.4);
  transition: all 0.3s;
  letter-spacing: 1px;
}

.btn-start:hover    { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 35px rgba(6,182,212,0.5); }
.btn-start:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===========================
   POPUP / MODAL
   =========================== */
.popup-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.popup-overlay.show { display: flex; }

.popup-box {
  background: linear-gradient(135deg, #1e0845, #2d0a5e);
  border: 2px solid rgba(255,215,0,0.4);
  border-radius: 2rem;
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 60px rgba(255,215,0,0.2),
    0 30px 60px rgba(0,0,0,0.5);
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  position: relative;
  overflow: hidden;
}

.popup-box::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(255,215,0,0.05), transparent 60%);
  pointer-events: none;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.5) rotate(-5deg); }
  to   { opacity: 1; transform: scale(1)   rotate(0);     }
}

.popup-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.8rem;
}

.popup-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.popup-msg {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.popup-prize {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: block;
}

.btn-popup-close {
  padding: 0.8rem 2.5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none;
  border-radius: 2rem;
  color: var(--deep);
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255,165,0,0.4);
}

.btn-popup-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,165,0,0.5);
}

/* ===========================
   CONFETTI CELEBRATION
   =========================== */
.confetti-celebrate {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 2000;
  overflow: hidden;
}

.cc-piece {
  position: absolute;
  top: -10px;
  border-radius: 3px;
  animation: ccFall linear forwards;
}

@keyframes ccFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===========================
   LOADING SPINNER
   =========================== */
.loading-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: var(--deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 480px) {
  .main-card            { padding: 2rem 1.2rem; border-radius: 1.8rem; }
  canvas#wheelCanvas    { width: 320px !important; height: 320px !important; }
}
