/* RESET DASAR */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  will-change: transform, opacity, scroll-position;
}

/* BODY & BACKGROUND */
body {
  background: radial-gradient(circle at 50% 20%, #0a2342, #001122 85%);
  color: #f9f5ec;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  position: relative;
}

/* --- BINTANG HALUS --- */
.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #dfe6ec;
  border-radius: 50%;
  opacity: 0.7;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation: twinkle 3s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

/* LOGO */
.logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 3px solid rgba(230, 230, 200, 0.8);
  box-shadow: 0 0 18px rgba(255, 255, 200, 0.4);
  animation: floatLogo 3s ease-in-out infinite, rotateLogo 18s linear infinite;
}
@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes rotateLogo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* JUDUL */
h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 2.8rem;
  color: #f5e6ca;
  text-shadow: 0 0 10px rgba(245, 229, 180, 0.8),
    0 0 25px rgba(255, 250, 220, 0.6);
  animation: fadeInDown 1.8s ease forwards;
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TEKS UTAMA */
.teks {
  max-width: 580px;
  line-height: 1.9;
  letter-spacing: 0.7px;
  text-align: left;
  white-space: pre-wrap;
  animation: glowText 6s ease-in-out infinite alternate;

  /* efek gradien emas lembut hanya untuk teks, bukan emoji */
  background: linear-gradient(180deg, #fff9c4, #ffe082, #ffca28);
  -webkit-background-clip: text; /* wajib untuk iOS */
  background-clip: text;
  -webkit-text-fill-color: transparent; /* wajib untuk iOS */
  color: transparent;

  font-family: 'Quicksand', 'Segoe UI Emoji', 'Noto Color Emoji',
    'Apple Color Emoji', sans-serif;

  position: relative;

  /* tambahan agar Safari tidak mem-reset gradien saat animasi */
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

/* animasi teks glowing */
@keyframes glowText {
  from {
    text-shadow: 0 0 10px rgba(230, 230, 200, 0.3);
  }
  to {
    text-shadow: 0 0 20px rgba(255, 250, 200, 0.8);
  }
}

/* Perbaikan penting di sini */
.teks .emoji {
  display: inline-block;
  position: relative;
  z-index: 2;
  background: none !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: initial !important;
  color: initial !important;
  font-size: 1.1em;
  filter: drop-shadow(0 0 4px #ffeb99);
  animation: glowEmoji 4s ease-in-out infinite alternate;
}

/* animasi glow untuk emoji */
@keyframes glowEmoji {
  0% {
    filter: drop-shadow(0 0 3px #fff4a3);
  }
  50% {
    filter: drop-shadow(0 0 6px #ffe78a);
  }
  100% {
    filter: drop-shadow(0 0 3px #fff4a3);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#romanticText div {
  margin: 0 0 0.5em 0; /* atur sesuai jarak yang diinginkan */
  line-height: 1.5em;
  background-clip: text;
  color: transparent;
}

/* VIDEO GALLERY */
.video-momen {
  display: none;
  margin-top: 30px;
  text-align: center;
}

.video-momen video {
  width: 90%;
  max-width: 480px;
  border-radius: 16px;
  border: 2px solid #f9f5ec;
  box-shadow: 0 5px 20px rgba(255, 255, 230, 0.25);
}

/* PHOTO GALLERY */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 25px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}
.photo-gallery.show {
  opacity: 1;
  transform: translateY(0);
}
.photo-gallery img {
  width: 110px;
  height: 110px;
  border-radius: 16px;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.9);
  border: 2px solid #f9f5ec;
  box-shadow: 0 5px 15px rgba(255, 255, 240, 0.25);
  transition: all 0.6s ease;
}
.photo-gallery img.show {
  opacity: 1;
  transform: scale(1);
}
.photo-gallery img:hover {
  transform: scale(1.1) rotate(-1deg);
  box-shadow: 0 8px 20px rgba(245, 229, 180, 0.6);
}

/* BUTTON GROUP */
.button-group {
  display: none;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.button-group button {
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  color: #0a2342;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8f4e1, #dcd2b4);
  box-shadow: 0 0 12px rgba(255, 250, 230, 0.25);
}
.button-group button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(255, 250, 210, 0.6);
}

.button-group.show {
  opacity: 1;
  transform: translateY(0);
}

#whatsapp-share {
  background: linear-gradient(135deg, #25d366, #b2f2bb);
  color: #0a2342;
}
#whatsapp-share:hover {
  background: linear-gradient(135deg, #34e877, #caffbf);
  box-shadow: 0 0 20px rgba(50, 240, 120, 0.6);
}

.button-ulangi button {
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #0a2342;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8f4e1, #dcd2b4);
  box-shadow: 0 0 12px rgba(255, 250, 230, 0.25);
}

.button-ulangi button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(255, 250, 210, 0.6);
}

#reset-experience {
  background: linear-gradient(135deg, #27496d, #f8f4e1);
  color: #f9f5ec;
}
#reset-experience:hover {
  background: linear-gradient(135deg, #3b5b89, #fff9e6);
  box-shadow: 0 0 20px rgba(245, 229, 180, 0.6);
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 17, 34, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(12px);
}
.modal-content {
  background: #3b5b89;
  color: #fffdf7;
  padding: 35px;
  border-radius: 15px;
  text-align: center;
  max-width: 90%;
  animation: fadeInUp 2.5s ease;
  /* box-shadow: 0 0 25px rgba(230, 230, 200, 0.5); */
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal h2 {
  color: #1c3d5a;
}
.modal input {
  padding: 12px;
  font-size: 1rem;
  width: 100%;
  max-width: 280px;
  margin: 15px 0;
  border: 2px solid #fff9c4;
  border-radius: 8px;
  transition: 0.3s;
  background: #fffdf7;
}
.modal input:focus {
  border-color: #fff4a3;
  box-shadow: 0 0 10px rgba(80, 120, 180, 0.4);
  outline: none;
}
.modal button {
  padding: 10px 26px;
  border-radius: 8px;
  background: #f5e6ca;
  color: #3b5b89;
  font-weight: 600;
  border: none;
  transition: 0.3s;
}
.modal button:hover {
  transform: scale(1.05);
  background: #001122;
}

/* JUDUL UTAMA */
#mainTitle {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: #f8efe1;
  text-shadow: 0 0 12px rgba(255, 240, 210, 0.7);
  letter-spacing: 0.5px;
  animation: fadeInDown 1.8s ease forwards;
}

/* JUDUL GALERI */
.gallery-title {
  font-family: 'Great Vibes', cursive;
  font-size: 2.3rem;
  color: #e8d7b8;
  text-shadow: 0 0 10px rgba(255, 250, 230, 0.7),
    0 0 30px rgba(255, 255, 200, 0.4);
  margin-bottom: 12px;
  transition: all 0.5s ease;
}
.gallery-title:hover {
  color: #fff6dc;
  text-shadow: 0 0 20px rgba(255, 250, 220, 0.9),
    0 0 40px rgba(250, 240, 210, 0.6);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  h1 {
    font-size: 2.4rem;
  }
  .teks {
    font-size: 1.05rem;
  }
  .photo-gallery img {
    width: 90px;
    height: 90px;
  }
  .button-group button {
    width: 85%;
    font-size: 0.95rem;
  }
}
