/* ========================================
   FILTER GROUP STYLES
   Add this to ui.css
   ======================================== */

/* ===== FILTER GROUP CONTAINER ===== */
.filter-group {
  margin-bottom: 20px;
}

/* ===== GROUP HEADER ===== */
.filter-group-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: transparent; /* Transparent background */
  border: none;
  border-left: 3px solid #d4a74a;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.filter-group-header:hover {
  border-left: 3px solid #f3d59b;
  padding-left: 15px;
}

.filter-group-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  font-size: 20px;
}

.filter-group-title {
  flex: 1;
  color: #f3d59b; /* Golden text */
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.filter-group-toggle {
  color: #d4a74a;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.filter-group.collapsed .filter-group-toggle {
  transform: rotate(-90deg);
}

/* ===== GROUP ITEMS CONTAINER ===== */
.filter-group-items {
  padding-left: 12px;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.filter-group.collapsed .filter-group-items {
  max-height: 0;
  opacity: 0;
}

/* ===== UPDATE FILTER LABEL COLOR ===== */
.filter-label {
  flex: 1;
  color: #e8d4a0; /* Lighter golden for better readability */
  font-size: 13px;
  font-weight: 500;
}

/* ===== UPDATE FILTER STATS COLOR ===== */
.filter-stats {
  padding: 15px 20px;
  background: linear-gradient(
    to left,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 0.25) 100%
  );
  border-top: 2px solid rgba(243, 213, 155, 0.5);
  color: #e8d4a0; /* Changed from white to golden */
  font-size: 13px;
  text-align: center;
}

.filter-stats strong {
  color: #f3d59b;
  font-size: 16px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.28);
}


/* === Filter Panel (Right → Left fade + gold shine) === */
.filter-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;

  /* gradient: solid coklat/emas di kanan → pudar ke kiri */
  background: linear-gradient(
    to left,
    rgba(110, 75, 31, 1) 0%,        /* kanan: coklat keemasan solid */
    rgba(110, 75, 31, 0.6) 20%,
    rgba(243, 213, 155, 0.12) 45%,
    rgba(255, 255, 255, 0.06) 60%,  /* tipis efek silau di tengah-kanan */
    rgba(110, 75, 31, 0) 100%       /* kiri: benar-benar transparan */
  );

  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: none;
  display: flex;
  flex-direction: column;

  border-image: linear-gradient(
    to left,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}

.filter-panel.hidden {
  transform: translateX(100%);
}

/* judul gambar tetap kecil */
.filter-title-img img {
  height: 100px;
  width: auto;
  display: block;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
}

/* Toggle button (sesuaikan warna agar matching) */
.filter-toggle {
  position: fixed;
  top: 50%;
  right: 280px;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: linear-gradient(135deg, #d4a74a, #b3872e);
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 999;
  transition: right 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: none;
}
.filter-toggle:hover {
  background: linear-gradient(135deg, #f3d59b, #d4a74a);
}
.filter-panel.hidden ~ .filter-toggle { right: 0; }

/* Header: shine dari kanan ke kiri */
.filter-header {
  padding: 20px;
  background: linear-gradient(
    to left,
    rgba(243, 213, 155, 0.28) 0%,   /* shining area on right */
    rgba(110, 75, 31, 0.95) 60%     /* darker toward left */
  );
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(
    to left,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}
.filter-header h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 6px rgba(255,255,255,0.28);
}

/* rest of panel styles unchanged (keemasan, scrollbar, items, buttons) */
.filter-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.filter-content::-webkit-scrollbar { width: 8px; }
.filter-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.15); border-radius:4px; }
.filter-content::-webkit-scrollbar-thumb { background: #d4a74a; border-radius:4px; }
.filter-content::-webkit-scrollbar-thumb:hover { background: #b3872e; }

.filter-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(80,55,20,0.8);
  border: 1px solid rgba(212,167,74,0.35);
  border-left: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-item:hover {
  background: linear-gradient(
    to left,
    rgba(255,255,255,0.12) 0%,
    rgba(212,167,74,0.35) 100%
  );
  border: 1px solid rgba(243,213,155,0.8);
  border-left: none;
}
.filter-item.active {
  background: linear-gradient(
    to left,
    rgba(255,255,255,0.20) 0%,
    rgba(243,213,155,0.45) 100%
  );
  border: 1px solid rgba(243,213,155,1);
  border-left: none;
}

.filter-icon { width:32px; height:32px; margin-right:12px; object-fit:contain; }
.filter-label { flex:1; color:white; font-size:14px; font-weight:500; }
.filter-checkbox { width:24px; height:24px; margin-left:12px; cursor:pointer; accent-color:#d4a74a; }

.filter-stats {
  padding: 15px 20px;
  background: linear-gradient(
    to left,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,0.25) 100%
  );
  border-top: 2px solid transparent;
  border-image: linear-gradient(
    to left,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,1) 100%
  ) 1;
  color:white;
  font-size:13px;
  text-align:center;
}
.filter-stats strong { color:#f3d59b; font-size:16px; text-shadow:0 0 6px rgba(255,255,255,0.28); }

.filter-actions { padding:15px 20px; display:flex; gap:10px; border-top:1px solid transparent; }
.filter-btn { flex:1; padding:10px; border:none; border-radius:5px; cursor:pointer; font-size:13px; font-weight:bold; transition:all .3s ease; }

.filter-btn-all { background: linear-gradient(135deg, #d4a74a, #b3872e); color:white; }
.filter-btn-all:hover { background: linear-gradient(135deg, #f3d59b, #d4a74a); }

.filter-btn-none { background: linear-gradient(135deg, #8a2a2a, #b33b3b); color:white; }
.filter-btn-none:hover { background: linear-gradient(135deg, #b33b3b, #d44a4a); }

@media (max-width:768px) {
  .filter-panel { width:240px; }
  .filter-toggle { right:240px; width:35px; height:70px; }
  .filter-panel.hidden ~ .filter-toggle { right:0; }
}

/* === Leaderboard Panel (Left → Right fade + gold shine) === */
.leaderboard-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;

  /* gradient: solid coklat/emas di kiri → pudar ke kanan */
  background: linear-gradient(
    to right,
    rgba(110, 75, 31, 1) 0%,        /* kiri: coklat keemasan solid */
    rgba(110, 75, 31, 0.6) 20%,
    rgba(243, 213, 155, 0.12) 45%,
    rgba(255, 255, 255, 0.06) 60%,  /* tipis efek silau di tengah-kiri */
    rgba(110, 75, 31, 0) 100%       /* kanan: benar-benar transparan */
  );

  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: none;
  display: flex;
  flex-direction: column;

  border-image: linear-gradient(
    to right,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}

.leaderboard-panel.hidden {
  transform: translateX(-100%);
}

/* judul gambar tetap kecil */
.leaderboard-title-img img {
  height: 80px;
  width: auto;
  display: block;
  margin: 0 auto 10px auto;
  pointer-events: none;
  user-select: none;
}

/* Toggle button (di kiri) */
.leaderboard-toggle {
  position: fixed;
  top: 50%;
  left: 280px;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: linear-gradient(135deg, #d4a74a, #b3872e);
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  z-index: 999;
  transition: left 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: none;
}
.leaderboard-toggle:hover {
  background: linear-gradient(135deg, #f3d59b, #d4a74a);
}
.leaderboard-panel.hidden ~ .leaderboard-toggle { 
  left: 0; 
}

/* Header: shine dari kiri ke kanan */
.leaderboard-header {
  padding: 20px;
  background: linear-gradient(
    to right,
    rgba(243, 213, 155, 0.28) 0%,   /* shining area on left */
    rgba(110, 75, 31, 0.95) 60%     /* darker toward right */
  );
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(
    to right,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}
.leaderboard-header h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 6px rgba(255,255,255,0.28);
}

/* Content area */
.leaderboard-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.leaderboard-content::-webkit-scrollbar { width: 8px; }
.leaderboard-content::-webkit-scrollbar-track { 
  background: rgba(255,255,255,0.15); 
  border-radius:4px; 
}
.leaderboard-content::-webkit-scrollbar-thumb { 
  background: #d4a74a; 
  border-radius:4px; 
}
.leaderboard-content::-webkit-scrollbar-thumb:hover { 
  background: #b3872e; 
}

/* Loading state */
.leaderboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(243, 213, 155, 0.8);
  font-size: 14px;
  text-align: center;
}

/* Leaderboard item */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(80,55,20,0.8);
  border: 1px solid rgba(212,167,74,0.35);
  border-right: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.leaderboard-item:hover {
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.12) 0%,
    rgba(212,167,74,0.35) 100%
  );
  border: 1px solid rgba(243,213,155,0.8);
  border-right: none;
}

/* Ranking badge */
.leaderboard-rank {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #d4a74a, #b3872e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Top 3 special colors */
.leaderboard-item:nth-child(1) .leaderboard-rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}
.leaderboard-item:nth-child(2) .leaderboard-rank {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  box-shadow: 0 0 12px rgba(192, 192, 192, 0.5);
}
.leaderboard-item:nth-child(3) .leaderboard-rank {
  background: linear-gradient(135deg, #CD7F32, #B8860B);
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.5);
}

/* User info */
.leaderboard-user {
  flex: 1;
  min-width: 0;
}
.leaderboard-username {
  color: white;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.leaderboard-contribution {
  color: rgba(243, 213, 155, 0.8);
  font-size: 12px;
}

/* Contribution count badge */
.leaderboard-count {
  background: rgba(243, 213, 155, 0.2);
  color: #f3d59b;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Stats footer */
.leaderboard-stats {
  padding: 15px 20px;
  background: linear-gradient(
    to right,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,0.25) 100%
  );
  border-top: 2px solid transparent;
  border-image: linear-gradient(
    to right,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,1) 100%
  ) 1;
  color: white;
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leaderboard-stats strong { 
  color: #f3d59b; 
  font-size: 16px; 
  text-shadow: 0 0 6px rgba(255,255,255,0.28); 
}

@media (max-width:768px) {
  .leaderboard-panel { 
    width: 240px;
  }
  /* Mobile: default hidden */
  .leaderboard-panel:not(.manually-opened) {
    transform: translateX(-100%);
  }
  .leaderboard-toggle { left: 240px; width: 35px; height: 70px; }
  .leaderboard-panel.hidden ~ .leaderboard-toggle { left: 0; }
}

/* Desktop: default visible */
@media (min-width: 769px) {
  .leaderboard-panel {
    transform: translateX(0);
  }
  .leaderboard-toggle {
    left: 280px;
  }
}
/* ========================================
   FILTER GROUP STYLES
   Add this to ui.css
   ======================================== */

/* ===== FILTER GROUP CONTAINER ===== */
.filter-group {
  margin-bottom: 20px;
}

/* ===== GROUP HEADER ===== */
.filter-group-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: transparent; /* Transparent background */
  border: none;
  border-left: 3px solid #d4a74a;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.filter-group-header:hover {
  border-left: 3px solid #f3d59b;
  padding-left: 15px;
}

.filter-group-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  font-size: 20px;
}

.filter-group-title {
  flex: 1;
  color: #f3d59b; /* Golden text */
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.filter-group-toggle {
  color: #d4a74a;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.filter-group.collapsed .filter-group-toggle {
  transform: rotate(-90deg);
}

/* ===== GROUP ITEMS CONTAINER ===== */
.filter-group-items {
  padding-left: 12px;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.filter-group.collapsed .filter-group-items {
  max-height: 0;
  opacity: 0;
}

/* ===== UPDATE FILTER LABEL COLOR ===== */
.filter-label {
  flex: 1;
  color: #e8d4a0; /* Lighter golden for better readability */
  font-size: 13px;
  font-weight: 500;
}

/* ===== UPDATE FILTER STATS COLOR ===== */
.filter-stats {
  padding: 15px 20px;
  background: linear-gradient(
    to left,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 0.25) 100%
  );
  border-top: 2px solid rgba(243, 213, 155, 0.5);
  color: #e8d4a0; /* Changed from white to golden */
  font-size: 13px;
  text-align: center;
}

.filter-stats strong {
  color: #f3d59b;
  font-size: 16px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.28);
}


/* === Filter Panel (Right → Left fade + gold shine) === */
.filter-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;

  /* gradient: solid coklat/emas di kanan → pudar ke kiri */
  background: linear-gradient(
    to left,
    rgba(110, 75, 31, 1) 0%,        /* kanan: coklat keemasan solid */
    rgba(110, 75, 31, 0.6) 20%,
    rgba(243, 213, 155, 0.12) 45%,
    rgba(255, 255, 255, 0.06) 60%,  /* tipis efek silau di tengah-kanan */
    rgba(110, 75, 31, 0) 100%       /* kiri: benar-benar transparan */
  );

  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: none;
  display: flex;
  flex-direction: column;

  border-image: linear-gradient(
    to left,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}

.filter-panel.hidden {
  transform: translateX(100%);
}

/* judul gambar tetap kecil */
.filter-title-img img {
  height: 100px;
  width: auto;
  display: block;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
}

/* Toggle button (sesuaikan warna agar matching) */
.filter-toggle {
  position: fixed;
  top: 50%;
  right: 280px;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: linear-gradient(135deg, #d4a74a, #b3872e);
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 999;
  transition: right 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: none;
}
.filter-toggle:hover {
  background: linear-gradient(135deg, #f3d59b, #d4a74a);
}
.filter-panel.hidden ~ .filter-toggle { right: 0; }

/* Header: shine dari kanan ke kiri */
.filter-header {
  padding: 20px;
  background: linear-gradient(
    to left,
    rgba(243, 213, 155, 0.28) 0%,   /* shining area on right */
    rgba(110, 75, 31, 0.95) 60%     /* darker toward left */
  );
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(
    to left,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}
.filter-header h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 6px rgba(255,255,255,0.28);
}

/* rest of panel styles unchanged (keemasan, scrollbar, items, buttons) */
.filter-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.filter-content::-webkit-scrollbar { width: 8px; }
.filter-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.15); border-radius:4px; }
.filter-content::-webkit-scrollbar-thumb { background: #d4a74a; border-radius:4px; }
.filter-content::-webkit-scrollbar-thumb:hover { background: #b3872e; }

.filter-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(80,55,20,0.8);
  border: 1px solid rgba(212,167,74,0.35);
  border-left: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-item:hover {
  background: linear-gradient(
    to left,
    rgba(255,255,255,0.12) 0%,
    rgba(212,167,74,0.35) 100%
  );
  border: 1px solid rgba(243,213,155,0.8);
  border-left: none;
}
.filter-item.active {
  background: linear-gradient(
    to left,
    rgba(255,255,255,0.20) 0%,
    rgba(243,213,155,0.45) 100%
  );
  border: 1px solid rgba(243,213,155,1);
  border-left: none;
}

.filter-icon { width:32px; height:32px; margin-right:12px; object-fit:contain; }
.filter-label { flex:1; color:white; font-size:14px; font-weight:500; }
.filter-checkbox { width:24px; height:24px; margin-left:12px; cursor:pointer; accent-color:#d4a74a; }

.filter-stats {
  padding: 15px 20px;
  background: linear-gradient(
    to left,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,0.25) 100%
  );
  border-top: 2px solid transparent;
  border-image: linear-gradient(
    to left,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,1) 100%
  ) 1;
  color:white;
  font-size:13px;
  text-align:center;
}
.filter-stats strong { color:#f3d59b; font-size:16px; text-shadow:0 0 6px rgba(255,255,255,0.28); }

.filter-actions { padding:15px 20px; display:flex; gap:10px; border-top:1px solid transparent; }
.filter-btn { flex:1; padding:10px; border:none; border-radius:5px; cursor:pointer; font-size:13px; font-weight:bold; transition:all .3s ease; }

.filter-btn-all { background: linear-gradient(135deg, #d4a74a, #b3872e); color:white; }
.filter-btn-all:hover { background: linear-gradient(135deg, #f3d59b, #d4a74a); }

.filter-btn-none { background: linear-gradient(135deg, #8a2a2a, #b33b3b); color:white; }
.filter-btn-none:hover { background: linear-gradient(135deg, #b33b3b, #d44a4a); }

@media (max-width:768px) {
  .filter-panel { width:240px; }
  .filter-toggle { right:240px; width:35px; height:70px; }
  .filter-panel.hidden ~ .filter-toggle { right:0; }
}

/* === Leaderboard Panel (Left → Right fade + gold shine) === */
.leaderboard-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;

  /* gradient: solid coklat/emas di kiri → pudar ke kanan */
  background: linear-gradient(
    to right,
    rgba(110, 75, 31, 1) 0%,        /* kiri: coklat keemasan solid */
    rgba(110, 75, 31, 0.6) 20%,
    rgba(243, 213, 155, 0.12) 45%,
    rgba(255, 255, 255, 0.06) 60%,  /* tipis efek silau di tengah-kiri */
    rgba(110, 75, 31, 0) 100%       /* kanan: benar-benar transparan */
  );

  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: none;
  display: flex;
  flex-direction: column;

  border-image: linear-gradient(
    to right,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}

.leaderboard-panel.hidden {
  transform: translateX(-100%);
}

/* judul gambar tetap kecil */
.leaderboard-title-img img {
  height: 80px;
  width: auto;
  display: block;
  margin: 0 auto 10px auto;
  pointer-events: none;
  user-select: none;
}

/* Toggle button (di kiri) */
.leaderboard-toggle {
  position: fixed;
  top: 50%;
  left: 280px;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: linear-gradient(135deg, #d4a74a, #b3872e);
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  z-index: 999;
  transition: left 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: none;
}
.leaderboard-toggle:hover {
  background: linear-gradient(135deg, #f3d59b, #d4a74a);
}
.leaderboard-panel.hidden ~ .leaderboard-toggle { 
  left: 0; 
}

/* Header: shine dari kiri ke kanan */
.leaderboard-header {
  padding: 20px;
  background: linear-gradient(
    to right,
    rgba(243, 213, 155, 0.28) 0%,   /* shining area on left */
    rgba(110, 75, 31, 0.95) 60%     /* darker toward right */
  );
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(
    to right,
    rgba(243, 213, 155, 0) 0%,
    rgba(243, 213, 155, 1) 100%
  ) 1;
}
.leaderboard-header h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 6px rgba(255,255,255,0.28);
}

/* Content area */
.leaderboard-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.leaderboard-content::-webkit-scrollbar { width: 8px; }
.leaderboard-content::-webkit-scrollbar-track { 
  background: rgba(255,255,255,0.15); 
  border-radius:4px; 
}
.leaderboard-content::-webkit-scrollbar-thumb { 
  background: #d4a74a; 
  border-radius:4px; 
}
.leaderboard-content::-webkit-scrollbar-thumb:hover { 
  background: #b3872e; 
}

/* Loading state */
.leaderboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(243, 213, 155, 0.8);
  font-size: 14px;
  text-align: center;
}

/* Leaderboard item */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(80,55,20,0.8);
  border: 1px solid rgba(212,167,74,0.35);
  border-right: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.leaderboard-item:hover {
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.12) 0%,
    rgba(212,167,74,0.35) 100%
  );
  border: 1px solid rgba(243,213,155,0.8);
  border-right: none;
}

/* Ranking badge */
.leaderboard-rank {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #d4a74a, #b3872e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Top 3 special colors */
.leaderboard-item:nth-child(1) .leaderboard-rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}
.leaderboard-item:nth-child(2) .leaderboard-rank {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  box-shadow: 0 0 12px rgba(192, 192, 192, 0.5);
}
.leaderboard-item:nth-child(3) .leaderboard-rank {
  background: linear-gradient(135deg, #CD7F32, #B8860B);
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.5);
}

/* User info */
.leaderboard-user {
  flex: 1;
  min-width: 0;
}
.leaderboard-username {
  color: white;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.leaderboard-contribution {
  color: rgba(243, 213, 155, 0.8);
  font-size: 12px;
}

/* Contribution count badge */
.leaderboard-count {
  background: rgba(243, 213, 155, 0.2);
  color: #f3d59b;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Stats footer */
.leaderboard-stats {
  padding: 15px 20px;
  background: linear-gradient(
    to right,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,0.25) 100%
  );
  border-top: 2px solid transparent;
  border-image: linear-gradient(
    to right,
    rgba(243,213,155,0) 0%,
    rgba(243,213,155,1) 100%
  ) 1;
  color: white;
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leaderboard-stats strong { 
  color: #f3d59b; 
  font-size: 16px; 
  text-shadow: 0 0 6px rgba(255,255,255,0.28); 
}

@media (max-width:768px) {
  .leaderboard-panel { 
    width: 240px;
  }
  /* Mobile: default hidden */
  .leaderboard-panel:not(.manually-opened) {
    transform: translateX(-100%);
  }
  .leaderboard-toggle { left: 240px; width: 35px; height: 70px; }
  .leaderboard-panel.hidden ~ .leaderboard-toggle { left: 0; }
}

/* Desktop: default visible */
@media (min-width: 769px) {
  .leaderboard-panel {
    transform: translateX(0);
  }
  .leaderboard-toggle {
    left: 280px;
  }
}
/* ========================================
   ADSENSE STICKY WRAPPER - MOBILE FIX
   ======================================== */

/* Default Desktop Style */
#adsense-sticky-wrapper {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    text-align: center !important;
    z-index: 400 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 8px 0 !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* Close Button Default */
#adsCloseBtn {
    position: absolute !important;
    top: 4px !important;
    right: 8px !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.1) !important;
    font-size: 16px !important;
    cursor: pointer !important;
    color: #666 !important;
    z-index: 1000 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

#adsCloseBtn:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* AdSense Container */
#adsense-sticky-wrapper .adsbygoogle {
    display: block !important;
    min-height: 50px !important;
    max-height: 100px !important;
}

/* ========================================
   MOBILE OPTIMIZATION (VERY IMPORTANT!)
   ======================================== */

/* Tablet & Mobile */
@media only screen and (max-width: 768px) {
    #adsense-sticky-wrapper {
        padding: 2px 0 !important;
        max-height: 60px !important;
        overflow: hidden !important;
    }
    
    #adsense-sticky-wrapper .adsbygoogle {
        min-height: 50px !important;
        max-height: 60px !important;
        transform: scale(0.9) !important;
        transform-origin: bottom center !important;
    }
    
    #adsCloseBtn {
        top: 2px !important;
        right: 4px !important;
        font-size: 14px !important;
        width: 20px !important;
        height: 20px !important;
    }
}

/* Small Mobile (< 480px) - SUPER COMPACT */
@media only screen and (max-width: 480px) {
    #adsense-sticky-wrapper {
        padding: 1px 0 !important;
        max-height: 50px !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }
    
    #adsense-sticky-wrapper .adsbygoogle {
        min-height: 40px !important;
        max-height: 50px !important;
        transform: scale(0.8) !important;
    }
    
    #adsCloseBtn {
        top: 1px !important;
        right: 2px !important;
        font-size: 12px !important;
        width: 18px !important;
        height: 18px !important;
        background: rgba(0, 0, 0, 0.15) !important;
    }
}

/* Extra Small Mobile (< 360px) - ULTRA COMPACT */
@media only screen and (max-width: 360px) {
    #adsense-sticky-wrapper {
        padding: 0 !important;
        max-height: 45px !important;
    }
    
    #adsense-sticky-wrapper .adsbygoogle {
        min-height: 35px !important;
        max-height: 45px !important;
        transform: scale(0.75) !important;
    }
    
    #adsCloseBtn {
        font-size: 11px !important;
        width: 16px !important;
        height: 16px !important;
    }
}

/* ========================================
   PREVENT AD OVERFLOW ON MAP
   ======================================== */

/* Pastikan map tidak tertutup ads */
#map {
    padding-bottom: 60px !important; /* Space untuk ads di desktop */
}

@media only screen and (max-width: 768px) {
    #map {
        padding-bottom: 55px !important;
    }
}

@media only screen and (max-width: 480px) {
    #map {
        padding-bottom: 50px !important;
    }
}

@media only screen and (max-width: 360px) {
    #map {
        padding-bottom: 45px !important;
    }
}

/* ========================================
   HIDDEN STATE (when closed)
   ======================================== */

#adsense-sticky-wrapper[style*="display: none"] {
    display: none !important;
}

/* ========================================
   LOADING STATE
   ======================================== */

#adsense-sticky-wrapper:empty::before {
    content: "Loading ads..." !important;
    display: block !important;
    padding: 10px !important;
    font-size: 12px !important;
    color: #999 !important;
}

@media only screen and (max-width: 480px) {
    #adsense-sticky-wrapper:empty::before {
        padding: 5px !important;
        font-size: 10px !important;
    }
}