html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  overflow-y: auto; /* Mengizinkan scroll vertikal jika konten melebihi layar */
  background: radial-gradient(circle, #001a33 0%, #000000 100%); /* Latar belakang cadangan yang stabil */
}
body {
  font-family: "Poppins", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
  background-color: rgb(147, 233, 236);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px 0; /* Memberi ruang di atas dan bawah saat di-scroll */
  box-sizing: border-box;
}
.start-screen h1 {
  color: #ffd700; /* Kuning emas */
}
.start-screen select {
  padding: 10px 10px;
  font-size: 18px;
  border-radius: 10px;
  width: 200px;
  text-align: center;
}

.start-screen button {
  padding: 10px 70px;
  font-size: 22px;
  font-weight: 600;
  border-radius: 12px;
  background: #ffaa00;
  cursor: pointer;
  border: none;
  transition: 0.3s;
}
.start-screen button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.8);
}
.start-screen {
  position: fixed; /* lebih stabil dari absolute */
  inset: 0; /* top:0 left:0 right:0 bottom:0 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* center vertical */
  align-items: center; /* center horizontal */
  gap: 20px;
  background: radial-gradient(circle, #001a33 0%, #000000 100%);
  z-index: 9999;
  text-align: center;
  overflow-y: auto;
}
.game-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Mengubah ke center agar sejajar tengah secara vertikal */
  width: 1100px;
  max-width: 95%;
  gap: 20px;
}

.left {
  flex: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.logo-area {
  margin: 20px 0;
  text-align: center;
}

.rotating-logo {
  max-width: 100%;
  height: auto;
  animation: rotateLogo 10s linear infinite;
}

.lifelines {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.lifeline {
  padding: 10px 15px;
  font-weight: bold;
  background: #ffaa00;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Hover effect */
.lifeline:hover {
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.9);
}

/* Efek ditekan */
.lifeline:active {
  transform: scale(0.95);
}

/* Jika sudah digunakan */
.lifeline.used {
  background: #555;
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
#question {
  width: 90%;
  text-align: center;
  font-size: 20px; /* Diperkecil sedikit dari 24px */
  margin-bottom: 20px;
  font-weight: 600;
}

#options {
  width: 90%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* === STYLE JAWABAN === */

.option {
  background: #4ef156;
  font-size: 16px; /* Diperkecil sedikit dari 20px */
  padding: 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.3s ease;
  font-weight: 600;
  border-radius: 15px;
  border: 4px solid rgb(245, 94, 24); /* ← Border putih */
  /* OUTER GLOW */
  box-shadow: 0 0 12px rgba(0, 191, 255, 0.7);
}
.option:hover {
  box-shadow:
    0 0 15px rgba(255, 170, 0, 0.8),
    0 0 25px rgba(255, 170, 0, 0.6);
  transform: scale(1.03);
}
/* Jawaban Benar */
.option.correct {
  background: #006400; /* Hijau tua */
  color: white;
}

/* Jawaban Salah */
.option.wrong {
  background: #cc0000; /* Merah */
  color: white;
}
.right {
  flex: 1;
  width: 100%;
}

#ladder {
  padding: 0;
  margin: 0;
}

#ladder li {
  list-style: none;
  background: #003366;
  margin: 5px 0;
  padding: 6px;
  text-align: right;
  border-radius: 5px;
  color: white; /* ← Tambahkan ini */
  font-weight: bold; /* opsional biar lebih tegas */
}
#ladder li.active {
  background: red; /* ← berubah jadi merah */
  color: white;
}

/* Animasi putar */
@keyframes rotateLogo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.modal-box {
  background: #001a33;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  color: white;
  width: 400px;
  max-width: 90%;
}

.modal-box button {
  margin-top: 20px;
  padding: 8px 20px;
  border: none;
  background: #ffaa00;
  cursor: pointer;
  border-radius: 6px;
}

.credit {
  margin-top: 20px;
  font-size: 12px;      /* kecil */
  opacity: 0.6;         /* samar */
  color: rgb(53, 52, 52);
  text-align: center;
  letter-spacing: 1px;
}

/* Win Popup*/
.win-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.burst {
  width: 400px;
  height: 400px;
  max-width: 90vw;
  max-height: 90vw;
  background: radial-gradient(circle, gold 0%, orange 70%);
  color: #001a33;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;

  /* Bentuk bergerigi */
  clip-path: polygon(
    50% 0%, 60% 15%, 75% 5%, 85% 20%, 100% 25%,
    90% 40%, 100% 50%, 90% 60%, 100% 75%,
    85% 80%, 75% 95%, 60% 85%, 50% 100%,
    40% 85%, 25% 95%, 15% 80%, 0% 75%,
    10% 60%, 0% 50%, 10% 40%, 0% 25%,
    15% 20%, 25% 5%, 40% 15%
  );

  animation: zoomIn 0.6s ease;
}

.burst h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

.amount {
  font-size: 28px;
  font-weight: bold;
  margin: 15px 0;
}

.burst button {
  padding: 10px 20px;
  border: none;
  background: #001a33;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

@keyframes zoomIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.money-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.money {
  position: absolute;
  top: -50px;
  font-size: 50px; /* Diperkecil agar proporsional di HP */
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.8;
  }
}

/* === MEDIA QUERIES UNTUK TABLET & HANDPHONE === */
@media (max-width: 768px) {
  .game-wrapper {
    flex-direction: column; /* Membuat susunan menjadi vertikal atas-bawah */
    align-items: center;
    justify-content: center;
  }

  .left {
    order: 1; /* Area pertanyaan tampil di atas */
  }

  .right {
    order: 2; /* Tangga hadiah tampil di bawahnya */
    margin-top: 20px;
  }

  #options {
    grid-template-columns: 1fr; /* Opsi jawaban menjadi 1 kolom memanjang ke bawah di HP */
    width: 95%;
  }

  #question {
    width: 95%;
    font-size: 18px; /* Diperkecil sedikit lagi di perangkat mobile */
  }

  .rotating-logo {
    width: 200px; /* Ukuran logo disesuaikan agar tidak memenuhi layar HP */
  }

  #ladder li {
    text-align: center; /* Posisi teks hadiah di tengah agar rapi di mobile */
  }
}
