/* === GLOBAL === */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: url('assets/images/bg.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden; /* hanya hidden horizontal biar vertikal tetap bisa scroll */
}

/* --- Struktur Utama --- */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* --- Wheel Section --- */
.wheel-container {
  position: relative;
  width: 90vw;              /* sedikit kecil supaya muat di semua HP */
  max-width: 420px;         /* biar tidak terlalu besar di layar sedang */
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;         /* beri jarak atas biar tidak terlalu nempel */
}

#wheel {
  width: 100%;
  height: auto;
  border-radius: 50%;
  transform-origin: center center;
  transition: transform 5s cubic-bezier(0.33, 1, 0.68, 1);
  z-index: 2;
  background: transparent;
}

.wheel-frame {
  position: absolute;
  top: -25.%;
  left: -27.5%;
  width: 155%;
  height: 155%;
  pointer-events: none;
  z-index: 3;
}

@keyframes frameGlow {
  from { filter: drop-shadow(0 0 10px rgba(255, 120, 0, 0.6)); }
  to   { filter: drop-shadow(0 0 40px rgba(255, 200, 50, 1)); }
}

/* --- Form Section --- */
.form-container {
  background: linear-gradient(180deg, rgba(55, 2, 112, 0.95) 0%, rgba(57, 17, 138, 0.95) 100%);
  padding: 25px;
  border-radius: 20px;
  width: 90%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 10px rgb(255 255 255), 0 0 20px rgb(255 254 244), 0 0 40px rgb(235 255 48 / 2%), 0 0 80px rgb(229 247 50 / 0%);
    color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

/* efek 3D berkilau pinggir */
.form-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 70%),
              radial-gradient(circle at bottom right, rgba(255, 0, 255, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.logo {
  width: 180px;
  margin-bottom: 10px;
}

h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 15px;
  text-shadow: 0 0 10px #fff;
  text-align: center;
}

input {
  width: 100%;
  padding: 12px;
  margin: 6px 0;
  border-radius: 25px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 15px;
  background: #fff;
  font-weight: 500;
}

/* Tombol Umum */
button {
  border: none;
  border-radius: 25px;
  padding: 12px 20px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

/* Tombol SPIN di form */
#spinTrigger {
  background: linear-gradient(90deg, #ffffff, #dcdcdc);
  color: black;
  font-weight: bold;
  width: 100%;
  box-shadow: 0 0 10px #fff;
}

#spinTrigger {
  background: linear-gradient(90deg, #ff0000, #ff00ff, #00ffff, #ffff00, #ff0000);
  background-size: 500% 500%;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  border-radius: 30px;
  width: 100%;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 0, 255, 0.8), 0 0 50px rgba(255, 255, 0, 0.6);
  animation: flashyMove 3s linear infinite, pulse 1.2s ease-in-out infinite;
}

@keyframes flashyMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Baris tombol Hadiah & Riwayat */
.button-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

#hadiahBtn, #riwayatBtn {
  flex: 1;
  background: white;
  color: black;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#backBtn {
  background: linear-gradient(180deg, #f4f800 8.04%, #c9cc01 64.01%, #6e7001 104.64%);
  color: rgb(0, 0, 0);
  font-weight: 600;
  width: 60%;
  margin-top: 10px;
}

#backBtn:hover {
  background: #b56eff;
}

/* --- Fireworks Canvas --- */
#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* --- MOBILE FIX --- */
@media (max-width: 600px) {
  body {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto; /* biar bisa scroll jika konten panjang */
  }

  .container {
    padding: 10px;
    gap: 100px;
  }

  .wheel-container {
    width: 70vw;
    max-width: 360px;
    margin-top: 100px; /* tambah jarak agar center visualnya pas */
  }

  .form-container {
    width: 90%;
    margin-bottom: 30px;
  }

  h3 {
    font-size: 16px;
  }

  input, button {
    font-size: 14px;
  }
}

/* --- DESKTOP --- */
@media (min-width: 768px) {
  .container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 115px;
  }

  .wheel-container {
    width: 500px;
    max-width: none;
    margin-top: 0;
  }

  .form-container {
    width: 400px;
  }
}
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  left: 20px;
  background-color: #25d36500;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(37, 211, 101, 0);
}

.whatsapp-float img {
  width: 100px;
  height: 100px;
  filter: none; /* tampilkan warna asli logo */
}
/* === POPUP RIWAYAT PEMENANG === */
.riwayat-popup {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

.riwayat-content {
  background: rgba(162, 1, 255, 0.1);
  border: 1px solid rgb(174, 0, 255);
  border-radius: 20px;
  padding: 25px 30px;
  width: 90%;
  max-width: 450px;
  color: #fff;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
  text-align: center;
  animation: popupUp 0.3s ease-out;
}

@keyframes popupUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.riwayat-content h2 {
  color: #ffeb7f;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 18px;
  text-shadow: 0 0 10px rgba(255, 220, 130, 0.8);
}

/* === TABLE STYLE === */
.riwayat-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.riwayat-table thead {
  background: linear-gradient(90deg, #b700ff, #8d02c4, #59017c);
}

.riwayat-table th, .riwayat-table td {
  padding: 10px 12px;
  text-align: center;
  font-size: 15px;
}

.riwayat-table th {
  color: #000;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.riwayat-table tbody tr {
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.riwayat-table tbody tr:hover {
  background: rgba(255, 215, 0, 0.2);
}

.riwayat-table td {
  color: #fff;
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === TOMBOL TUTUP === */
#tutupRiwayat {
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-weight: 600;
  cursor: pointer;
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  transition: 0.2s ease-in-out;
}

#tutupRiwayat:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 220, 100, 0.9);
}
