.modal-overlay {
  display: none;
  position: absolute; /* Ganti ke absolute agar bisa diatur JS */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6); /* Lebih transparan */
  backdrop-filter: blur(5px); /* Efek Blur di luar gambar */
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  /* Flexbox untuk tengahin gambar */
  justify-content: center;
  align-items: center;
}
/* Tampilkan saat ada class "active" (biar gak loncat scrollnya) */
.modal-overlay.active,
.modal-overlay:target {
  display: flex;
}
/* Wrapper agar tombol nempel di gambar */
.popup-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  background-color: #222; /* Background wrapper */
}
.modal-content {
  display: block;
  max-width: 80vw; /* Kurangi lebar agar muat tombol samping */
  max-height: 85vh; /* Kurangi biar muat footer */
  border: none;
}
/* Footer ala Blogger */
.popup-footer {
  padding: 12px 15px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  border-top: 1px solid #444;
}
.popup-footer .caption {
  font-size: 14px;
  font-weight: 500;
}
.popup-footer .counter {
  font-size: 12px;
  color: #bbb;
  white-space: nowrap;
}
.close-btn {
  position: absolute;
  top: -40px; /* Di atas gambar */
  right: 0; /* Rata kanan dengan gambar */
  z-index: 10001;
  color: white;
  font-size: 40px;
  text-decoration: none;
  font-weight: bold;
  line-height: 1;
  text-shadow: 0 0 5px #000;
}
.prev-btn,
.next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  text-decoration: none;
  font-weight: bold;
  padding: 20px;
  /* Hapus background kotak, ganti text shadow biar rapi */
  background: transparent;
  text-shadow: 0 0 5px #000;
}
.prev-btn {
  left: -60px; /* Di luar kiri gambar */
}
.next-btn {
  right: -60px; /* Di luar kanan gambar */
}

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  margin-top: 10px; /* Kurangi margin atas */
}
th {
  background-color: #333;
  color: white;
  padding: 5px;
  text-align: center;
  font-size: 0.9em; /* Perkecil font header tabel */
}
td {
  padding: 8px; /* Tambah padding biar gak mepet */
  border-bottom: 1px solid #ddd;
  text-align: center;
  font-size: 0.9em; /* Perkecil font isi tabel */
  line-height: 1.5; /* Tambah line spacing lagi */
}
tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.click-hint {
  display: block;
  font-size: 11px;
  color: #555;
  margin-top: 5px;
  font-style: italic;
}
/* Accordion / Collapsible Styles */
.accordion-toggle {
  cursor: pointer;
  user-select: none;
  position: relative; /* Agar absolute position ::after mengacu ke sini */
  font-size: 1em !important; /* Override inline style yang kegedean */
  padding: 8px !important; /* Kurangi padding header accordion */
}
/* Icon Toggle di Kanan */
.toggle-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}
/* Saat tertutup, putar icon (Caret Up jadi Down) */
.accordion-toggle.collapsed .toggle-icon {
  transform: translateY(-50%) rotate(180deg);
}

/* Animasi Smooth Buka Tutup (Transition) */
/* Kita mainkan padding, line-height, dan font-size agar seolah-olah slide */
tbody td,
thead th,
tbody img,
tbody .click-hint {
  transition: all 0.4s ease;
}

/* State Tertutup: Hilangkan padding, height, dan opacity */
tbody.hide-row td,
thead tr.hide-row th {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
  border-bottom: 0 solid transparent !important;
  opacity: 0 !important;
  overflow: hidden; /* Wajib agar konten tidak bocor */
}
/* Kecilkan gambar dan teks hint saat tertutup */
tbody.hide-row img,
tbody.hide-row .click-hint {
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
}
/* Fix: Pastikan elemen dengan inline style (seperti span di Package) juga tertutup */
tbody.hide-row td * {
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Popup Animations */
@keyframes popupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes popupZoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.modal-overlay.active {
  display: flex;
  animation: popupFadeIn 0.3s ease-out;
}
.modal-overlay.active .popup-wrapper {
  animation: popupZoomIn 0.3s ease-out;
}

/* Animasi Border Muter (Facecam Style) untuk Exclusive Header */
.exclusive-anim {
  position: relative;
  overflow: hidden;
  z-index: 1; /* Agar konten tetap di atas */
}
/* Layer 1: Gradient Berputar (Border) */
.exclusive-anim::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500%;
  height: 10000%; /* Dibuat sangat besar agar tidak putus saat muter */
  transform: translate(-50%, -50%);
  background: conic-gradient(
    #dc143c,
    #ffd700,
    #ffffff,
    #ffd700,
    #dc143c
  ); /* Merah - Emas - Putih - Emas - Merah */
  animation: rotate-border 3s linear infinite; /* Diperlambat biar smooth */
  z-index: -2;
}
/* Layer 2: Background Merah (Isi Tengah) */
.exclusive-anim::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px; /* Ketebalan border 3px */
  background-color: #dc143c; /* Warna Merah Asli */
  z-index: -1;
}
@keyframes rotate-border {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Animasi Bounce untuk Crown */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(-3px);
  }
}
.fa-crown {
  animation: bounce 2s infinite;
  display: inline-block;
}

/* Spasi untuk Icon FontAwesome */
th i {
  margin-right: 8px;
}
.btn-hover {
  transition: transform 0.2s;
  display: inline-block;
}
.btn-hover:hover {
  transform: scale(1.05);
}

/* =========================================
   MODERN DESIGN UPDATES (PREMIUM LOOK)
   ========================================= */

/* Kotak Kontak Donasi */
.donation-contact-box {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
  border: 1px solid rgba(241, 196, 15, 0.3);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: white;
  position: relative;
  overflow: hidden;
}
/* Efek Glow Berputar di Background */
.donation-contact-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(241, 196, 15, 0.05) 0%,
    transparent 70%
  );
  animation: rotate-glow 15s linear infinite;
  pointer-events: none;
}
@keyframes rotate-glow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.contact-title {
  text-align: center;
  color: #f1c40f;
  margin-bottom: 20px; /* Tambah jarak lagi */
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.contact-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #444;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}
.contact-image:hover {
  transform: none;
}

.payment-text {
  text-align: center !important;
  width: 100%;
  display: block;
  margin: 20px auto 30px auto; /* Tambah jarak lagi biar lega */
  color: #f1c40f; /* Warna Emas */
  font-size: 1em; /* Dikecilin lagi */
  font-weight: 800; /* Lebih tebal */
  text-transform: uppercase; /* Huruf Besar Semua */
  letter-spacing: 3px; /* Spasi antar huruf lebih lebar */
  text-shadow: 2px 2px 4px #000; /* Shadow hitam tegas biar jelas */
  position: relative;
  z-index: 1;
}

.payment-icons-container {
  display: flex;
  justify-content: center;
  gap: 10px; /* Jarak diperkecil */
  flex-wrap: nowrap; /* Paksa 1 Baris */
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.payment-icon {
  max-height: 50px; /* Dikecilin dari 64px */
  width: auto;
  background: white;
  padding: 5px; /* Padding disesuaikan */
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.payment-icon:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.contact-divider {
  border: 0;
  height: 2px; /* Lebih tebal dikit */
  background: linear-gradient(90deg, transparent, #f1c40f, transparent);
  margin: 25px 0; /* Jarak diperlebar lagi agar tidak mepet */
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

.or-divider {
  color: #f1c40f;
  margin: 20px 0;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.social-buttons-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

/* Tombol Sosial Media dengan Efek Exclusive */
.btn-glow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px; /* Padding dikecilin */
  color: white; /* Balikin jadi putih */
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.3s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  min-width: 200px; /* Lebar minimum dikecilin lagi */
  margin: 5px;
  font-size: 0.9em; /* Font size dikecilin lagi */
  text-shadow: none; /* Hapus text shadow */
  letter-spacing: 1px; /* Tambah jarak antar huruf biar gak mepet */
}
.btn-glow:hover,
.btn-glow:focus {
  transform: scale(1.05);
  color: white; /* Tetap putih saat hover */
  text-decoration: none;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}
.btn-glow i {
  font-size: 24px;
}
/* Layer Animasi Border Berputar */
.btn-glow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 500%;
  transform: translate(-50%, -50%);
  animation: rotate-border 3s linear infinite;
  z-index: -2;
}
/* Layer Background Dalam */
.btn-glow::after {
  content: "";
  position: absolute;
  inset: 3px; /* Ketebalan border */
  border-radius: 46px;
  z-index: -1;
}

/* Tema Discord (Blurple) */
.btn-discord::before {
  /* Animasi gelap: Putih diganti warna gelap */
  background: conic-gradient(#5865f2, #2c2f33, #5865f2, #23272a, #5865f2);
}
.btn-discord::after {
  background-color: #404eed; /* Warna Blurple agak gelap (bukan hitam) */
}

/* Tema WhatsApp (Green) */
.btn-whatsapp::before {
  /* Animasi gelap: Putih diganti warna gelap */
  background: conic-gradient(#25d366, #075e54, #25d366, #128c7e, #25d366);
}
.btn-whatsapp::after {
  background-color: #075e54; /* Warna Hijau Gelap WhatsApp */
}

/* Perbaikan Tampilan Tabel */
table {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px; /* Tambah jarak antar tabel */
  background-color: #222;
  border: 1px solid #333;
}
tbody tr {
  transition: background-color 0.2s ease;
}
tbody tr:hover {
  background-color: rgba(241, 196, 15, 0.05) !important;
}
tbody td strong {
  color: #f1c40f;
}

/* Animasi Scroll Reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE MOBILE VIEW
   ========================================= */

/* Pastikan semua gambar responsif */
img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .donation-contact-box {
    padding: 15px; /* Padding box lebih kecil */
  }
  .contact-title {
    font-size: 1em; /* Judul lebih kecil */
  }
  .payment-text {
    font-size: 1em !important;
    margin-bottom: 20px !important;
  }
  .payment-icons-container {
    flex-wrap: wrap; /* Bungkus icon jika layar sangat kecil */
    gap: 5px;
  }
  .payment-icon {
    max-height: 40px; /* Icon lebih kecil di HP */
  }
  .btn-glow {
    width: 100%; /* Tombol full width di HP */
    min-width: auto;
    font-size: 0.9em;
  }
}

/* Input khusus di dalam tabel (Cash Coin) */
.coin-input-table {
  background: #333;
  border: 1px solid #555;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  width: 100%;
  max-width: 150px;
  margin-top: 5px;
}
.coin-input-table:focus {
  border-color: #f1c40f;
  outline: none;
}
