/* =====================================================
   MECHANICS — mekanik permainan
   1. Drag & drop (susun kalimat / urutkan cerita)
   2. Lengkapi cerita (fill-blank)
   3. Pop-up pembahasan

   Lebar kolom konten disamakan lewat --dd-lebar agar
   kartu soal, kotak jawaban, bank, dan chip sejajar rapi.
   ===================================================== */
:root {
  --dd-lebar: min(620px, 92vw);
}

@media (min-width: 768px) and (min-height: 600px) {
  :root {
    --dd-lebar: min(880px, 88vw);
  }
}

/* ============ 1. DRAG & DROP ============ */

/* --- Area jawaban (tujuan) --- */
.dd-jawaban {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  min-height: 80px;
  width: var(--dd-lebar);
  padding: 14px;
  background: rgba(255, 251, 240, 0.85);
  border: 3px dashed #C9A876;
  border-radius: 18px;
}

.dd-jawaban:empty::before {
  content: "Ketuk kata di bawah untuk menyusunnya di sini";
  color: #A08A6B;
  font-weight: 700;
  font-size: 0.95rem;
}

/* --- Bank kata (asal) --- */
.dd-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: var(--dd-lebar);
}

/* --- Chip kata --- */
.dd-chip {
  font-family: var(--font-isi);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--coklat);
  background: #FFF3D6;
  border: 3px solid #E8B95C;
  box-shadow: 0 4px 0 #D9A63F;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
}

.dd-chip:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);
}

/* Chip yang sudah dipindah ke area jawaban: biru */
.dd-jawaban .dd-chip {
  background: #E8F4FD;
  border-color: #7FB5DE;
  box-shadow: 0 4px 0 #639BC7;
}

/* Feedback benar/salah per chip */
.dd-chip.benar {
  background: var(--hijau);
  border-color: #3B8A3F;
  box-shadow: 0 4px 0 #2E6C31;
  color: var(--putih);
  animation: pop 0.35s ease;
}

.dd-chip.salah {
  background: var(--merah);
  border-color: var(--merah-tua);
  box-shadow: 0 4px 0 #701818;
  color: var(--putih);
  animation: goyang 0.4s ease;
}

/* --- Mode vertikal (urutkan cerita / urutan sholat) --- */
.dd-jawaban.dd-vertical,
.dd-bank.dd-vertical {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
}

.dd-jawaban.dd-vertical {
  padding: 12px;
}

.dd-vertical .dd-chip {
  width: 100%;
  /* selebar kolom: semua sejajar */
  padding: 12px 18px;
  font-size: 1rem;
}

/* Petunjuk khusus mode urutkan */
.dd-jawaban.dd-vertical:empty::before {
  content: "Ketuk kejadian di bawah, urutkan dari yang PERTAMA terjadi";
}

/* Nomor urut otomatis di area jawaban */
.dd-jawaban.dd-vertical {
  counter-reset: urutan;
}

.dd-jawaban.dd-vertical .dd-chip::before {
  content: counter(urutan) ".";
  counter-increment: urutan;
  margin-right: 8px;
  color: var(--tosca-tua);
}

/* --- Peringatan kata jebakan --- */
.dd-hint {
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #B0762A;
}

/* --- Tombol periksa & kunci jawaban --- */
.dd-aksi {
  display: flex;
  justify-content: center;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 100;
  padding: 10px 0;
}

.dd-kunci {
  background: #FFFBF0;
  border: 3px solid #E7D9BD;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 1rem;
  max-width: var(--dd-lebar);
  text-align: center;
}

/* ============ 1b. URUTAN GERAKAN (kartu bergambar) ============ */
.ug-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ug-question-card {
  padding: clamp(6px, 1.2vh, 12px) clamp(14px, 2vw, 24px) !important;
  margin-bottom: 2px !important;
  width: min(850px, 96vw) !important;
}

.ug-question-card h3 {
  font-size: clamp(0.85rem, 2vh, 1.1rem) !important;
  line-height: 1.25 !important;
}

.ug-slots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  justify-content: safe center;
  /* semua slot sebaris dan terpusat di tengah dengan rapi */
  gap: clamp(6px, 1vw, 10px);
  width: fit-content;
  max-width: 98vw;
  margin: 0 auto;
  padding: clamp(6px, 1.2vh, 10px) clamp(8px, 1.5vw, 14px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  background: rgba(255, 251, 240, 0.9);
  border: 3px dashed #C9A876;
  border-radius: 16px;
  scrollbar-width: thin;
  scrollbar-color: #C9A876 transparent;
}

.ug-slot {
  position: relative;
  flex: 0 0 clamp(75px, 8.5vw, 105px);
  width: clamp(75px, 8.5vw, 105px);
  min-height: clamp(88px, 14vh, 120px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ug-slot.ug-kosong {
  background: #EFEAE0;
  border: 2px dashed #C9A876;
}

.ug-slot.ug-terisi {
  background: transparent;
}

.ug-slot-nomor {
  position: absolute;
  top: 2px;
  left: 4px;
  font-family: var(--font-judul);
  font-weight: 800;
  font-size: clamp(0.55rem, 1.2vh, 0.72rem);
  color: #A07F50;
  z-index: 2;
  pointer-events: none;
}

.ug-slot.ug-kosong .ug-slot-nomor {
  position: static;
  font-size: clamp(1rem, 2.4vh, 1.4rem);
  color: #C9A876;
}

/* --- Kartu (dipakai di slot maupun bank) --- */
.ug-kartu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 0.6vh, 5px);
  width: 100%;
  padding: clamp(4px, 0.8vh, 8px) clamp(3px, 0.6vw, 6px);
  background: #FFF3D6;
  border: 2.5px solid #E8B95C;
  box-shadow: 0 3px 0 #D9A63F;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-isi);
  touch-action: pan-x pan-y;
  transition: transform 0.12s, filter 0.12s;
}

.ug-kartu:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.ug-kartu:disabled {
  cursor: default;
}

.ug-kartu img {
  width: 100%;
  max-width: clamp(38px, 6.5vh, 64px);
  height: clamp(38px, 6.5vh, 64px);
  object-fit: contain;
}

.ug-kartu small {
  font-weight: 800;
  font-size: clamp(0.64rem, 1.4vh, 0.78rem);
  color: var(--coklat);
  text-align: center;
  line-height: 1.15;
  word-break: break-word;
}

/* Kartu pertama (given) tampil beda supaya jelas "bukan pilihan" */
.ug-kartu-awal {
  background: #E8F4FD;
  border-color: #7FB5DE;
  box-shadow: 0 3px 0 #639BC7;
}

/* Kartu di slot yang sudah dikunci setelah "Periksa" ditekan */
.ug-slot.benar .ug-kartu {
  background: var(--hijau);
  border-color: #3B8A3F;
  box-shadow: 0 3px 0 #2E6C31;
  color: var(--putih);
  animation: pop 0.35s ease;
}

.ug-slot.benar .ug-kartu small {
  color: var(--putih);
}

.ug-slot.salah .ug-kartu {
  background: var(--merah);
  border-color: var(--merah-tua);
  box-shadow: 0 3px 0 #701818;
  color: var(--putih);
  animation: goyang 0.4s ease;
}

.ug-slot.salah .ug-kartu small {
  color: var(--putih);
}

/* --- Bank kartu (kartu yang belum dipakai) --- */
.ug-bank {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(6px, 1vw, 10px);
  justify-content: center;
  justify-content: safe center;
  width: fit-content;
  max-width: 98vw;
  margin: clamp(6px, 1.2vh, 12px) auto 0;
  padding: clamp(4px, 0.8vh, 8px) clamp(8px, 1.5vw, 14px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: #C9A876 transparent;
}

.ug-bank .ug-kartu {
  flex: 0 0 clamp(75px, 8.5vw, 105px);
  width: clamp(75px, 8.5vw, 105px);
  min-height: clamp(88px, 14vh, 120px);
}

/* ============ 2. LENGKAPI CERITA ============ */
.fb-teks {
  line-height: 1.6 !important;
}

.fb-blank {
  display: inline-block;
  min-width: 110px;
  border-bottom: 4px dotted var(--emas);
  color: var(--emas);
  font-weight: 800;
  padding: 0 6px;
}

.fb-blank.benar {
  color: var(--putih);
  background: var(--hijau);
  border-radius: 10px;
  border-bottom-color: transparent;
  animation: pop 0.35s ease;
}

.fb-blank.salah {
  color: var(--putih);
  background: var(--merah);
  border-radius: 10px;
  border-bottom-color: transparent;
  animation: goyang 0.4s ease;
}

/* ============ 3. POP-UP PEMBAHASAN ============ */
.pembahasan-overlay {
  position: absolute !important;
  inset: 0;
  background: rgba(42, 26, 8, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: masuk 0.25s ease;
}

.pembahasan-popup {
  background: #FFF9E8;
  border: 4px solid var(--emas);
  border-radius: 24px;
  padding: 28px 30px;
  width: min(480px, 90vw);
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
  color: #3B2210 !important;
  box-shadow: 0 8px 0 rgba(91, 58, 30, 0.3);
  animation: popupMasuk 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pembahasan-popup::-webkit-scrollbar {
  width: 0;
}

.pembahasan-popup p {
  color: #4A2810 !important;
  font-weight: 700;
  margin: 6px 0;
}

.pembahasan-ikon {
  font-size: 3rem;
}

.pembahasan-judul {
  font-family: var(--font-judul);
  font-size: 1.5rem;
  font-weight: 800;
  color: #C93B2B !important;
  margin: 6px 0 10px;
}

.pembahasan-label-kunci {
  color: #5B3A1E !important;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 8px 0 4px !important;
}

.pembahasan-kunci {
  font-family: var(--font-judul);
  font-size: 1.3rem;
  font-weight: 800;
  color: #075E5E !important;
  background: #D8F2F2 !important;
  border: 2px solid #85D4D4;
  border-radius: 12px;
  padding: 10px 16px;
  margin: 8px 0 12px;
}

.pembahasan-kunci:empty {
  display: none !important;
}

.pembahasan-isi {
  color: #2E1A0B !important;
  margin: 10px 0;
  line-height: 1.6;
  font-size: 1.05rem !important;
  font-weight: 600;
}

.pembahasan-popup .btn {
  margin-top: 14px;
}

@keyframes popupMasuk {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============ 4. LOMPAT PILIHAN (Froggy Jumps Style) ============ */
.lompat-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.lompat-pertanyaan {
  width: min(940px, 92vw);
  margin-top: clamp(6px, 1.4vh, 18px);
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 4px solid #E7D9BD;
  border-radius: 24px;
  padding: clamp(14px, 2.2vh, 26px) clamp(18px, 2.8vw, 36px);
  text-align: center;
  font-family: var(--font-judul);
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
  line-height: 1.35;
  color: #3D2714;
  box-shadow: 0 8px 0 rgba(91, 58, 30, 0.18), 0 16px 32px rgba(0, 0, 0, 0.12);
  z-index: 2;
  flex-shrink: 0;
}

.lompat-pijakan-area {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end; /* Posisi agak ke bawah di atas karpet masjid */
  gap: clamp(10px, 1.8vw, 26px);
  padding: 0 clamp(12px, 1.8vw, 28px);
  padding-bottom: clamp(75px, 13vh, 120px); /* Jarak pas di atas karakter */
  z-index: 5;
  box-sizing: border-box;
}

.lompat-pad {
  position: relative;
  flex: 1 1 0;
  max-width: clamp(200px, 22vw, 280px);
  min-width: 140px;
  aspect-ratio: 1.55 / 1;
  background: url('../assets/images/ui/bt_adab.webp') center/100% 100% no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s;
  padding: clamp(16px, 2.2vh, 26px) clamp(10px, 1.4vw, 18px) clamp(22px, 3.2vh, 36px) clamp(10px, 1.4vw, 18px);
  text-align: center;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35));
  box-sizing: border-box;
}

.lompat-pad:hover {
  transform: translateY(-8px) scale(1.04);
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.45)) brightness(1.08);
}

.lompat-pad:active {
  transform: translateY(2px) scale(0.96);
}

.lompat-pad-label {
  background: linear-gradient(135deg, #FF6B35, #E83F15);
  color: #fff;
  font-family: var(--font-judul);
  font-weight: 900;
  border-radius: 50%;
  width: clamp(28px, 3.4vmin, 38px);
  height: clamp(28px, 3.4vmin, 38px);
  font-size: clamp(0.9rem, 1.8vmin, 1.2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -14px;
  border: 2.5px solid #FFF;
  box-shadow: 0 4px 0 #9E2203, 0 4px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.lompat-pad-text {
  font-family: var(--font-isi);
  font-size: clamp(0.95rem, 1.4vw, 1.22rem);
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 3px #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  word-wrap: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.lompat-pad-text.is-arabic {
  font-family: "Amiri", "Scheherazade New", "Traditional Arabic", serif, var(--font-isi);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: bold;
  line-height: 1.1;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 3px #000;
}

.lompat-pertanyaan.has-arabic {
  font-family: "Amiri", "Scheherazade New", "Traditional Arabic", serif, var(--font-judul);
}

.lompat-start {
  position: absolute;
  bottom: clamp(8px, 2vh, 24px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(90px, 15vmin, 140px);
  height: clamp(20px, 3.5vmin, 32px);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.lompat-karakter {
  position: absolute;
  bottom: clamp(12px, 2.6vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.lompat-karakter img {
  width: clamp(95px, 16vmin, 160px);
  height: auto;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s;
  animation: idleBreathe 2.5s infinite ease-in-out;
}

.lompat-karakter.is-jumping img,
.lompat-karakter.fall-back img {
  animation: none;
  /* matikan animasi idle saat bergerak */
}

@keyframes idleBreathe {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.95) scaleX(1.03) translateY(4px);
  }
}

/* Feedback Teks Mengambang (Benar/Salah) */
.fb-pop {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0.5);
  font-family: var(--font-judul);
  font-size: 2.2rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  animation: fbPopUp 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.fb-pop.good {
  color: #FFF;
  text-shadow: 0 4px 0 #3B8A3F, 0 0 20px rgba(0, 255, 0, 0.9);
}

.fb-pop.bad {
  color: #FF4444;
  text-shadow: 0 4px 0 #701818, 0 0 20px rgba(255, 0, 0, 0.9);
}

@keyframes fbPopUp {
  0% {
    transform: translateX(-50%) scale(0.5) translateY(0);
    opacity: 0;
  }
  30% {
    transform: translateX(-50%) scale(1.1) translateY(-30px);
    opacity: 1;
  }
  80% {
    transform: translateX(-50%) scale(1) translateY(-40px);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(0.9) translateY(-60px);
    opacity: 0;
  }
}

.lompat-pad.benar {
  filter: drop-shadow(0 0 15px var(--hijau)) brightness(1.2);
  animation: pop 0.4s ease;
}

.lompat-pad.salah {
  filter: drop-shadow(0 0 15px var(--merah)) grayscale(0.6);
  animation: goyang 0.4s ease;
}

/* --- RESPONSIF LOMPAT PILIHAN: HP LANDSCAPE (<= 540px) --- */
@media (max-height: 540px) {
  .lompat-pertanyaan {
    margin-top: 2px;
    padding: clamp(5px, 1vh, 8px) 14px;
    font-size: clamp(0.82rem, 2.2vh, 0.95rem);
    border-radius: 12px;
    border-width: 2px;
  }
  .lompat-pijakan-area {
    padding: 0 8px;
    padding-bottom: clamp(42px, 11vh, 55px); /* Menurunkan pijakan pas di atas karakter */
    gap: clamp(6px, 1.2vw, 12px);
    align-items: flex-end;
  }
  .lompat-pad {
    padding: 10px 8px 14px 8px;
    min-width: 100px;
    max-width: 185px;
  }
  .lompat-pad-label {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    top: -10px;
    border-width: 1.5px;
  }
  .lompat-pad-text {
    font-size: clamp(0.78rem, 2.1vmin, 0.92rem);
    line-height: 1.2;
  }
  .lompat-karakter {
    bottom: 4px;
  }
  .lompat-karakter img {
    width: clamp(56px, 14vmin, 72px);
  }
  .lompat-start {
    bottom: 2px;
    width: 56px;
    height: 14px;
  }
}


/* ============ 5. HALAL VS HARAM ============ */
.hh-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  padding-bottom: 25vh;
  /* Ruang untuk tombol dan karakter */
}

.hh-label {
  background: var(--emas);
  color: #fff;
  font-family: var(--font-judul);
  font-size: 3vmin;
  padding: 1vmin 3vmin;
  border-radius: 999px;
  box-shadow: 0 0.6vmin 0 #C99E38;
  margin-top: 2vh;
  z-index: 5;
}

.hh-object-area {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.hh-object-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.6vmin solid rgba(245, 166, 35, 0.5);
  border-radius: 4vmin;
  padding: 5vmin 6vmin;
  font-size: 8vmin;
  /* Besar untuk emoji/teks */
  text-align: center;
  box-shadow: 0 2vmin 4vmin rgba(0, 0, 0, 0.15), inset 0 0 3vmin rgba(255, 255, 255, 0.8);
  font-family: var(--font-judul);
  color: var(--coklat);
  animation: ngambang 3s ease-in-out infinite;
  transition: all 0.3s;
  position: relative;
  max-width: 80%;
}

.hh-object-card.glow-correct {
  border-color: #4CAF50;
  box-shadow: 0 0 6vmin rgba(76, 175, 80, 0.8), inset 0 0 3vmin rgba(76, 175, 80, 0.4);
}

.hh-object-card.shake-wrong {
  animation: goyang 0.4s ease-in-out;
  border-color: #FF4444;
  box-shadow: 0 0 4vmin rgba(255, 68, 68, 0.8);
}

.hh-karakter {
  position: absolute;
  bottom: 2vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.hh-karakter img {
  width: 20vmin;
  filter: drop-shadow(0 1vmin 2vmin rgba(0, 0, 0, 0.3));
  animation: idleBreathe 2s infinite ease-in-out;
}

.hh-controls {
  position: absolute;
  bottom: 8vh;
  width: 95vw;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  z-index: 15;
}

.hh-btn {
  font-family: var(--font-judul);
  font-weight: 800;
  font-size: 3.5vmin;
  border: none;
  border-radius: 3vmin;
  padding: 2vmin 4vmin;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, filter 0.2s;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  width: 40vw;
  max-width: 300px;
}

.hh-btn-haram {
  background: linear-gradient(180deg, #FF6B6B, #D93838);
  box-shadow: 0 1vmin 0 #A82424, 0 1.5vmin 2vmin rgba(0, 0, 0, 0.3);
}

.hh-btn-haram:active,
.hh-btn-haram.active-wrong {
  transform: translateY(1vmin);
  box-shadow: 0 0 0 #A82424, 0 0.5vmin 1vmin rgba(0, 0, 0, 0.3);
}

.hh-btn-halal {
  background: linear-gradient(180deg, #6BCB77, #3B9A47);
  box-shadow: 0 1vmin 0 #287232, 0 1.5vmin 2vmin rgba(0, 0, 0, 0.3);
}

.hh-btn-halal:active,
.hh-btn-halal.active-correct {
  transform: translateY(1vmin);
  box-shadow: 0 0 0 #287232, 0 0.5vmin 1vmin rgba(0, 0, 0, 0.3);
}

/* ============ 6. TAP & COLLECT ============ */
.tc-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tc-label {
  font-family: var(--font-judul);
  font-size: 5vmin;
  color: #333;
  background: rgba(255, 255, 255, 0.8);
  padding: 1vmin 3vmin;
  border-radius: 3vmin;
  margin-top: 2vmin;
  z-index: 10;
}

.tc-score-display {
  font-family: var(--font-teks);
  font-size: 4vmin;
  font-weight: bold;
  color: #fff;
  background: var(--hijau);
  padding: 1vmin 3vmin;
  border-radius: 3vmin;
  margin-top: 1vmin;
  z-index: 10;
  transition: transform 0.1s;
}

.tc-score-display.pop {
  transform: scale(1.2);
  background: #2E7D32;
}

.tc-item {
  position: absolute;
  top: 0;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.9);
  border: 0.4vmin solid #ccc;
  border-radius: 50%;
  width: 14vmin;
  height: 14vmin;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1vmin 2vmin rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
  z-index: 5;
  touch-action: manipulation;
}

.tc-item:hover {
  transform: scale(1.1) !important;
  border-color: var(--emas);
}

.tc-pop {
  position: absolute;
  font-family: var(--font-judul);
  font-size: 6vmin;
  font-weight: 900;
  pointer-events: none;
  z-index: 20;
  animation: tcPopUp 0.8s ease-out forwards;
}

.tc-pop.good {
  color: #4CAF50;
  text-shadow: 0 0 10px white;
}

.tc-pop.bad {
  color: #F44336;
  text-shadow: 0 0 10px white;
}

@keyframes tcPopUp {
  0% {
    transform: scale(0.5) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(1.5) translateY(-50px);
    opacity: 0;
  }
}

.tc-catcher {
  position: absolute;
  bottom: 0;
  width: 20vmin;
  height: 20vmin;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.tc-catcher img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1vmin 2vmin rgba(0, 0, 0, 0.3));
}

.tc-btn-left,
.tc-btn-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12vmin;
  height: 12vmin;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5vmin;
  color: #fff;
  z-index: 20;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.1s, background 0.1s;
}

.tc-btn-left {
  left: 2vmin;
}

.tc-btn-right {
  right: 2vmin;
}

.tc-btn-left:active,
.tc-btn-right:active {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-50%) scale(0.9);
}

.css-basket {
  width: 20vmin;
  height: 10vmin;
  background: #C9A876;
  border: 0.6vmin solid #5B3A1E;
  border-radius: 2vmin 2vmin 10vmin 10vmin;
  box-shadow: inset 0 -2vmin rgba(0, 0, 0, 0.15), 0 1vmin 2vmin rgba(0, 0, 0, 0.3);
  position: relative;
  /* Membuat tekstur keranjang anyaman sederhana dengan background */
  background-image:
    linear-gradient(45deg, rgba(91, 58, 30, 0.1) 25%, transparent 25%, transparent 75%, rgba(91, 58, 30, 0.1) 75%, rgba(91, 58, 30, 0.1)),
    linear-gradient(45deg, rgba(91, 58, 30, 0.1) 25%, transparent 25%, transparent 75%, rgba(91, 58, 30, 0.1) 75%, rgba(91, 58, 30, 0.1));
  background-size: 2vmin 2vmin;
  background-position: 0 0, 1vmin 1vmin;
}

.css-basket::before {
  content: "";
  position: absolute;
  top: -1vmin;
  left: -0.6vmin;
  right: -0.6vmin;
  height: 2vmin;
  background: #E8B95C;
  border: 0.6vmin solid #5B3A1E;
  border-radius: 1vmin;
}

@media (max-width: 1024px) and (orientation: landscape),
(max-height: 540px) {
  .pembahasan-popup {
    padding: clamp(12px, 2vh, 20px) clamp(16px, 3vw, 24px);
    border-radius: 16px;
    border-width: 3px;
    max-height: 96vh;
  }

  .pembahasan-ikon {
    font-size: clamp(2rem, 5vh, 2.5rem);
  }

  .pembahasan-judul {
    font-size: clamp(1.2rem, 3.5vh, 1.4rem);
    margin: 4px 0 6px;
  }

  .pembahasan-popup p,
  .pembahasan-label-kunci {
    font-size: clamp(0.9rem, 2.4vh, 1.05rem);
    margin: 4px 0;
  }

  .pembahasan-kunci {
    font-size: clamp(0.95rem, 2.5vh, 1.15rem);
    padding: 8px 12px;
    margin: 6px 0;
  }

  .pembahasan-isi {
    font-size: clamp(0.85rem, 2.2vh, 0.95rem);
    margin: 6px 0;
  }

  .pembahasan-popup .btn {
    margin-top: 8px;
    padding: 6px 16px;
    font-size: 1rem;
  }

  .ug-wrap {
    width: 100%;
  }

  .ug-slots {
    justify-content: center;
    justify-content: safe center;
    gap: 6px;
    padding: clamp(3px, 0.8vh, 6px) clamp(6px, 1.2vw, 10px);
    width: fit-content;
    max-width: 98vw;
    margin: 0 auto;
    border-width: 2px;
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .ug-slot {
    flex: 0 0 clamp(58px, 9.2vw, 75px);
    width: clamp(58px, 9.2vw, 75px);
    min-height: clamp(68px, 18vh, 85px);
    border-radius: 8px;
  }

  .ug-kartu {
    padding: 3px 2px 5px;
    border-width: 1.5px;
    border-radius: 8px;
    gap: 2px;
  }

  .ug-kartu img {
    max-width: clamp(28px, 8vh, 42px);
    height: clamp(28px, 8vh, 42px);
  }

  .ug-kartu small {
    font-size: clamp(0.52rem, 1.3vh, 0.66rem);
    line-height: 1.1;
  }

  .ug-bank {
    justify-content: center;
    justify-content: safe center;
    gap: 6px;
    padding: clamp(3px, 0.8vh, 6px) clamp(6px, 1.2vw, 10px);
    margin: clamp(2px, 0.8vh, 6px) auto 0;
    width: fit-content;
    max-width: 98vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .ug-bank .ug-kartu {
    flex: 0 0 clamp(58px, 9.2vw, 75px);
    width: clamp(58px, 9.2vw, 75px);
    min-height: clamp(68px, 18vh, 85px);
  }

  .dd-aksi {
    margin-top: 4px;
    padding-bottom: 8px;
  }

  .dd-aksi .btn {
    padding: 4px 16px;
    font-size: clamp(0.75rem, 1.8vh, 0.88rem);
  }
}