* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #4a1d96, #1a0b3b 70%);
  font-family: "Poppins", sans-serif;
  color: white;
  text-align: center;
  overflow-x: hidden;
}

/* bintang */
#bintang {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.bintang {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: kelap 2s infinite alternate;
}

@keyframes kelap {
  from { opacity: 0.2; }
  to { opacity: 1; }
}

/* layar */
.layar {
  display: none;
  position: relative;
  z-index: 2;
  padding: 50px 20px 100px;
}

.layar.aktif {
  display: block;
  animation: muncul 1s;
}

@keyframes muncul {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.kecil {
  opacity: 0.8;
  margin-bottom: 15px;
}

h1 {
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  font-size: 2.2rem;
  line-height: 1.4;
  margin-bottom: 30px;
}

#nama {
  color: #ffd84d;
  font-size: 4.2rem;
  animation: cahaya 2s infinite alternate;
}

@keyframes cahaya {
  from { text-shadow: 0 0 10px #ff5fa2; }
  to { text-shadow: 0 0 40px #ff5fa2, 0 0 60px #ff5fa2; }
}

/* kado */
#kado {
  position: relative;
  width: 140px;
  height: 160px;
  margin: 80px auto 40px;
}

.kotak {
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 120px;
  height: 90px;
  background: #ff5fa2;
  border-radius: 6px;
}

.tutup {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 140px;
  height: 32px;
  background: #ff2f8a;
  border-radius: 6px;
  z-index: 2;
  transition: transform 0.6s;
}

.pita {
  position: absolute;
  bottom: 0;
  left: 60px;
  width: 20px;
  height: 112px;
  background: #ffd84d;
  z-index: 3;
}

#kado.goyang {
  animation: guncang 0.4s 3;
}

#kado.buka .tutup {
  transform: translateY(-70px) rotate(-25deg);
}

#kado.buka .pita {
  height: 90px;
}

@keyframes guncang {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* kue */
.kue {
  position: relative;
  width: 260px;
  margin: 70px auto 40px;
}

.lapis {
  margin: 0 auto;
  border-radius: 12px;
}

.atas {
  width: 110px;
  height: 45px;
  background: #ff5fa2;
  border-top: 10px solid white;
}

.tengah {
  width: 170px;
  height: 55px;
  background: #ffd84d;
  border-top: 10px solid white;
}

.bawah {
  width: 240px;
  height: 65px;
  background: #ff8a5f;
  border-top: 10px solid white;
}

.piring {
  width: 280px;
  height: 12px;
  margin: 0 auto;
  background: #ddd;
  border-radius: 10px;
}

.lilin {
  position: absolute;
  top: -35px;
  width: 8px;
  height: 35px;
  background: repeating-linear-gradient(45deg, white, white 5px, #7cf0c9 5px, #7cf0c9 10px);
  border-radius: 3px;
}

.lilin:nth-child(1) { left: 100px; }
.lilin:nth-child(2) { left: 126px; }
.lilin:nth-child(3) { left: 152px; }

.api {
  position: absolute;
  top: -22px;
  left: -2px;
  width: 12px;
  height: 20px;
  background: orange;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 20px 8px rgba(255, 180, 0, 0.7);
  animation: goyang 0.4s infinite alternate;
}

@keyframes goyang {
  from { transform: rotate(-6deg); }
  to { transform: rotate(6deg); }
}

.mati {
  display: none;
}

/* tombol */
button {
  padding: 14px 34px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  background: linear-gradient(90deg, #ffd84d, #ff9f5f);
  color: #2b1055;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 180, 60, 0.4);
  transition: transform 0.2s;
}

button:hover {
  transform: scale(1.08);
}

/* pesan */
#pesan {
  max-width: 440px;
  min-height: 110px;
  margin: 30px auto 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

#petunjuk {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-top: 10px;
}

#harapan {
  max-width: 380px;
  margin: 20px auto 0;
  padding: 0 10px;
  font-size: 1.1rem;
  color: #ffd84d;
  min-height: 60px;
}

.kartu {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 16px 20px;
  animation: muncul 0.6s;
}

/* balon */
#areaBalon {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.balon {
  position: absolute;
  bottom: -120px;
  width: 60px;
  height: 75px;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  cursor: pointer;
  pointer-events: auto;
  animation: naik linear forwards;
}

.balon::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 24px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid inherit;
  border-bottom-color: inherit;
}

.balon::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 12px;
  height: 18px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

@keyframes naik {
  to { transform: translateY(-130vh); }
}

/* confetti */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.potongan {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  animation: jatuh linear forwards;
}

@keyframes jatuh {
  to { transform: translateY(110vh) rotate(720deg); }
}

@media (max-width: 500px) {
  h1 { font-size: 1.7rem; }
  #nama { font-size: 3.4rem; }
  .kue { transform: scale(0.85); }
}

/* halaman awal */
.judulAwal {
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  font-size: 3.4rem;
  color: #ffd84d;
  text-shadow: 0 0 25px #ff5fa2;
}

/* tombol musik */
#tombolMusik {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 10;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.3rem;
  border-radius: 50%;
  display: none;
}

#tombolMusik.tampil {
  display: block;
}

#tombolMusik.berputar {
  animation: putar 3s linear infinite;
}

@keyframes putar {
  to { transform: rotate(360deg); }
}

/* galeri foto */
.judulFoto {
  font-family: "timesnewroman", cursive;
  font-weight: normal;
  font-size: 2rem;
  margin: 70px 0 30px;
}

.galeri {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  max-width: 800px;
  margin: 0 auto;
}

.foto {
  width: 170px;
  padding: 10px 10px 8px;
  background: white;
  color: #2b1055;
  border-radius: 4px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s;
}

.foto:nth-child(odd) { transform: rotate(-4deg); }
.foto:nth-child(even) { transform: rotate(4deg); }

.foto:hover {
  transform: rotate(0deg) scale(1.1);
}

.foto img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #ddd;
}

.foto p {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* bagian tambahan */
.lanjut {
  margin-top: 50px;
}

.sembunyi {
  display: none;
}

.petunjukBesar {
  opacity: 0.8;
  margin-bottom: 25px;
}

/* surat */
#surat {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.paragraf {
  margin-bottom: 20px;
  padding: 16px 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid #ffd84d;
  border-radius: 10px;
  animation: muncul 1s;
}

/* kartu alasan */
#daftarAlasan {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 700px;
  margin: 0 auto;
}

.alasan {
  width: 200px;
  min-height: 110px;
  padding: 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff5fa2, #ff8a5f);
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.alasan:hover {
  transform: scale(1.05);
}

.alasan.terbuka {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 400;
  line-height: 1.5;
  cursor: default;
  animation: muncul 0.5s;
}

/* kuis */
.kotakKuis {
  max-width: 460px;
  margin: 0 auto;
  padding: 25px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 18px;
}

#kuisTanya {
  font-size: 1.15rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.pilihan {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

#kuisHasil {
  margin-top: 15px;
  min-height: 26px;
  color: #ffd84d;
  font-weight: 600;
}

/* game hati */
#areaGame {
  position: relative;
  max-width: 500px;
  height: 340px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  overflow: hidden;
}

.hati {
  position: absolute;
  font-size: 2.4rem;
  cursor: pointer;
  user-select: none;
  animation: muncul 0.3s;
}

/* bintang permintaan */
#bintangWish {
  width: 110px;
  height: 110px;
  padding: 0;
  font-size: 4rem;
  border-radius: 50%;
  animation: cahaya 1.5s infinite alternate;
}

#pesanAkhir {
  max-width: 460px;
  min-height: 120px;
  margin: 30px auto 0;
  font-size: 1.15rem;
  line-height: 1.8;
}