/* ===============================
   MOBILE GAME UI (GLOBAL REUSABLE)
   =============================== */

body.mobile-game {
  margin: 0;
  font-family: var(--pdikm-font-body);
  background: #000;
}

/* WRAPPER */
.mobile-game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  width: 100%;
  padding: 50px 20px;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/assets/img/pdikm/bgpdikm.jpg');
  background-size: cover;
  background-position: center;
}

/* HEADER */
.game-header {
  text-align: center;
  color: #f3e5ab;
  text-shadow: 3px 3px 0 #5d4037;
}

.game-header h1 {
  font-size: 2.5rem;
  font-weight: 900;
}

.game-header p {
  color: #fff;
}

/* MENU */
.menu-list {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Style dasar tombol game */
.btn-game {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 88px;
  margin-bottom: 15px;
  padding: 8px 12px 8px 104px;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;

  /* Pengaturan Background — banner asset penuh, hindari crop ikon */
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center center;
  transition:
    transform 0.2s,
    filter 0.2s;
}

.btn-game__body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 64px;
  text-align: center;
}

.btn-game__title {
  display: block;
  width: 100%;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.btn-game__sub {
  display: block;
  width: 100%;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.92;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.btn-game:active {
  transform: scale(0.95);
  filter: brightness(0.8);
}

.bg-yellow {
  background: #ffca28;
}
.bg-brown {
  background: #8d6e63;
  color: #fff;
}
.bg-green {
  background: #d4e157;
}
.bg-grey {
  background: #cfd8dc;
}

/* FOOTER NAV */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.nav-item {
  aspect-ratio: 1/1;
  background: #8d6e63;
  border: 3px solid #5d4037;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 0 #3e2723;
  color: white;
}

/* Gambar Spesifik untuk masing-masing level */
.level-easy {
  background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), url('/assets/img/icons/btn-easy.png'); /* Sesuaikan path folder */
}

.level-medium {
  background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), url('/assets/img/icons/btn-medium.png');
}

.level-hard {
  background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), url('/assets/img/icons/btn-hard.png');
}

.action-area {
  margin-top: auto;
  z-index: 2;
}

/* btn-scan → public/assets/css/pdikm/eticket-buttons.css */

.btn-back {
  display: block;
  width: 100%;
  margin: 10px auto 0;
  background: #9e9e9e;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--pdikm-font-body);
}

/* IMAGE */
.clue-image-wrapper {
  padding: 10px 20px 10px;
  text-align: center;
  z-index: 2;
}

.clue-image {
  width: 100%;
  max-height: 180px; /* jangan terlalu kecil */
  object-fit: cover;
  border-radius: 8px;
  transform: rotate(-2deg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* CONTENT */
.clue-content {
  padding: 20px 35px;
  text-align: center;
  z-index: 2;
  color: #fff;
  font-family: var(--pdikm-font-body);
}

/* Box Pertanyaan - Memastikan teks terbaca */
.question-box {
  background: #ffffff !important;
  border: 3px solid #f3e5ab;
  padding: 20px !important;
  margin-bottom: 20px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
}

.question-box .game-text {
  color: #3e2723 !important; /* Warna cokelat tua agar kontras dengan putih */
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

/* Daftar Pilihan Jawaban - Satu baris satu jawaban agar tidak bertumpuk */
.choices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.choice-item {
  background: rgba(255, 255, 255, 0.9) !important;
  padding: 15px !important;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  margin: 0 !important;
}

.choice-item .game-text {
  color: #333 !important;
  font-weight: 600;
  font-size: 1rem;
  text-shadow: none; /* Hilangkan shadow agar teks tajam */
}

/* Status Saat Jawaban Dipilih */
.choice-item:has(.choice-input:checked) {
  background: #d4e157 !important; /* Warna hijau limau game */
  border-color: #ffffff;
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(212, 225, 87, 0.4);
}

/* Sembunyikan Bulatan Radio Button Asli */
.choice-input {
  display: none;
}

/* Timer Badge */
.timer-badge {
  background: #ff3b3b;
  color: #fff;
  padding: 4px 15px;
  border-radius: 20px;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 4px 0 #8b0000;
  display: inline-block;
  margin-top: 5px;
}

/* Style Khusus Halaman Selesai */
.finish-box {
  background: rgba(255, 255, 255, 0.95) !important;
  padding: 30px 20px !important;
  text-align: center;
  border: 3px solid #f3e5ab;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.congrats-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.2));
}

.finish-box .game-text {
  color: #3e2723 !important;
  line-height: 1.6;
}

.finish-box small {
  display: block;
  background: #fff9c4;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #fbc02d;
  color: #5d4037;
}

/* Memastikan tombol finish memakai pola e-ticket (eticket-buttons.css) */

/* Styling Khusus Statistik Akhir */
.stat-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0;
}

.stat-label {
  font-size: 0.8rem;
  color: #8d6e63;
  font-weight: 700;
  letter-spacing: normal;
}

.stat-value {
  font-size: 2.2rem;
  color: #3e2723;
  font-weight: 900;
  text-shadow: 1px 1px 0px #fff;
}

.stat-divider {
  height: 2px;
  width: 50%;
  background: radial-gradient(circle, #f3e5ab 0%, rgba(243, 229, 171, 0) 100%);
  margin: 5px auto;
}

/* Memastikan kartu finish tampil solid */
.finish-box {
  background: white !important;
  border: 4px solid #f3e5ab;
  border-radius: 20px;
  padding: 25px !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Leaderboard Specific Styles */
.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 10px;
}

.tab-btn {
  background: #8d6e63;
  border: 2px solid #5d4037;
  color: white;
  padding: 8px 15px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 4px 0 #3e2723;
  transition: 0.2s;
}

.tab-btn.active {
  background: #ffca28;
  color: #3e2723;
  box-shadow: 0 4px 0 #b89500;
  transform: translateY(-2px);
}

.leader-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh; /* Agar bisa scroll jika banyak data */
  overflow-y: auto;
  padding: 5px;
}

.leader-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: 2px solid #f3e5ab;
}

.leader-card.top-three {
  background: #ffffff;
  border: 2px solid #ffca28;
}

.rank-badge {
  font-size: 1.2rem;
  font-weight: 900;
  width: 40px;
  color: #3e2723;
}

.player-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.player-name {
  font-weight: 800;
  color: #3e2723;
  font-size: 1rem;
}

.player-time {
  font-size: 0.7rem;
  color: #8d6e63;
  font-weight: 600;
}

.player-score {
  font-size: 1.4rem;
  font-weight: 900;
  color: #3e2723;
  text-shadow: 1px 1px 0 #fff;
}

/* Scrollbar Style */
.leader-container::-webkit-scrollbar {
  width: 5px;
}
.leader-container::-webkit-scrollbar-thumb {
  background: #8d6e63;
  border-radius: 10px;
}
