/* ================================================= */
/* --- 1. RESET & DASAR --- */
/* ================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #0d0d0d;
  color: #fff;
  max-width: 500px;
  margin: 0 auto;
  border-left: 1px solid #222;
  border-right: 1px solid #222;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* INI PENTING BIAR SEMUA YANG HARUSNYA NGUMPET JADI NGUMPET */
.hidden {
  display: none !important;
}

/* ================================================= */
/* --- 2. HEADER & USER BAR (FIX CENTER) --- */
/* ================================================= */
header {
  background: #000;
  height: 60px;
  /* Tinggi header konsisten */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  border-bottom: 2px solid #f00;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* TOMBOL BARIS TIGA (KIRI) */
.header-left {
  color: #ffcc00;
  font-size: 22px;
  cursor: pointer;
  z-index: 1001;
  /* Biar di atas logo */
}

/* LOGO KUNCI TENGAH PRESISI */
.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* RUMUS MATI BIAR LOGO DI TENGAH */
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
  color: #ffcc00;
  text-shadow: 0 0 10px #f00;
  animation: detakJantung 1.5s infinite;
  white-space: nowrap;
}

.header-logo span {
  color: #fff;
}

.header-right {
  width: 22px;
  /* Penyeimbang icon kiri biar logo gak geser */
}

/* ANIMASI DETAK JANTUNG */
@keyframes detakJantung {
  0%, 100%, 30%, 60% {
    transform: translateX(-50%) scale(1);
  }
  15% {
    transform: translateX(-50%) scale(1.08);
  }
  45% {
    transform: translateX(-50%) scale(1.15);
  }
}

.user-panel-top {
  background: #111;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
}

.balance-box {
  color: #00ff88;
  font-weight: bold;
}

/* ================================================= */
/* --- 3. SIDEBAR STYLE (MENU SAMPING) --- */
/* ================================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  /* Sembunyi di kiri */
  width: 280px;
  height: 100%;
  background: #111;
  z-index: 10001;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 2px solid #ffcc00;
}

.sidebar.active {
  left: 0;
}

#sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  z-index: 10000;
  backdrop-filter: blur(3px);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222;
}

.sidebar-content a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #1a1a1a;
  font-size: 14px;
}

.sidebar-content a i {
  margin-right: 15px;
  color: #ffcc00;
  width: 20px;
  text-align: center;
}

/* ================================================= */
/* --- 4. GAME TABS (GAK PAKE GAME FILTER LAGI) --- */
/* ================================================= */
/* Kalau abang gak pake game filter, bagian ini dikosongin aja atau apus */
/* ================================================= */
/* --- 3. AUTH BUTTONS (TOMBOL MASUK & DAFTAR) --- */
/* ================================================= */
.main-auth-area {
  padding: 20px 15px;
  background: #000;
}
.auth-wrapper {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  width: 100%;
}
.btn-main {
  flex: 1 !important;
  padding: 15px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.btn-login {
  background: #222;
  color: #fff;
  border: 1px solid #444;
}
.btn-register {
  background: linear-gradient(to bottom, #ff0000, #800000);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,0,0,0.3);
}
.btn-main:active {
  transform: scale(0.96);
}

/* ================================================= */
/* --- 4. TAMPILAN SPA (TRANSAKSI & AKUN) --- */
/* ================================================= */
#transaction-view, #account-view {
  padding: 20px 15px;
  min-height: 70vh;
  animation: fadeIn 0.4s ease-out;
}
.trans-container {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #222;
}

.transaction-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.opt-btn {
  padding: 15px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  background: #333;
}
.opt-btn.active {
  background: #008855;
}
.opt-btn.wd.active {
  background: #880000;
}

.trans-form label {
  display: block;
  font-size: 11px;
  color: #ffcc00;
  margin-bottom: 5px;
  font-weight: bold;
}
.trans-form input, .trans-form select {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #333;
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: #f00;
  color: #fff;
  border: none;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
}

.profile-info {
  background: #000;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #333;
}
.profile-info p {
  margin-bottom: 10px;
  font-size: 13px;
  border-bottom: 1px solid #222;
  padding-bottom: 5px;
}


/* --- GAME TAB SYSTEM (JEJER 3) --- */
#game-content-container {
  background: #000;
  min-height: 250px;
  border-top: 1px solid #222;
}

/* ================================================= */
/* --- FIX TOTAL JEJER 3 MUNGIL --- */
/* ================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0d0d0d;
  color: #fff;
  max-width: 500px;
  /* Lebar maksimal HP */
  margin: 0 auto;
  overflow-x: hidden;
}

/* KUNCI GRID AGAR TETAP 3 KOLOM KECIL */
.banner-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  padding: 10px !important;
  width: 100% !important;
}

/* KOTAK GAMBAR (UKURAN NORMAL) */
.banner-wrapper {
  position: relative;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  /* Kotak Sempurna */
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #333;
  background: #111;
}

.banner-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  /* Biar gak penyet */
}

/* OVERLAY STATS (KECIL DI BAWAH) */
.game-stats-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 8px;
  /* Font diperkecil biar pas */
  color: #fff;
  z-index: 10;
}

/* TITIK LIVE KECIL */
.live-dot {
  width: 4px;
  height: 4px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 3px #00ff88;
  animation: blink 0.8s infinite alternate;
}

@keyframes blink {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/* SUPAYA TAB YANG LAIN GAK MUNCUL BERSAMAAN */
.game-tab {
  display: none;
}
.game-tab-active {
  display: block !important;
}
.hidden {
  display: none !important;
}

/* NAVIGATION BAWAH TETAP AMAN */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: #000;
  display: flex;
  padding: 10px 0;
  border-top: 2px solid #0051ff;
  z-index: 9999;
}

/* Sembunyikan semua tab standar */
.game-tab {
  display: none;
}

/* Munculkan tab yang dipilih */
.game-tab-active {
  display: block !important;
  animation: fadeInTab 0.4s ease-out;
}

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

/* Warna Merah untuk Menu Kategori yang Aktif */
.prem-cat-item.active {
  color: #ff0000 !important;
  border-bottom: 3px solid #ff0000;
  background: rgba(255, 0, 0, 0.1);
}
/* --- NAVIGASI MENU AKTIF --- */
.prem-cat-item {
  transition: all 0.3s;
  cursor: pointer;
}

.prem-cat-item.active {
  color: #ff0000 !important;
  /* Tulisan jadi merah */
  border-bottom: 3px solid #ff0000;
  /* Garis bawah lebih tebal */
  background: rgba(255, 0, 0, 0.05);
  /* Ada bayangan merah tipis di belakangnya */
}
/* ================================================= */
/* --- 5. BANNER, TICKER & GAME KATEGORI --- */
/* ================================================= */
.banner-slider {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.swiper-slide img {
  width: 100%;
  display: block;
  aspect-ratio: 800/380;
  object-fit: cover;
}
.swiper-pagination-bullet {
  background: #fff !important;
  opacity: 0.5;
}
.swiper-pagination-bullet-active {
  background: #f00 !important;
  opacity: 1;
  width: 18px !important;
  border-radius: 10px !important;
}

.ticker {
  background: #111;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}
marquee {
  color: #ffcc00;
  font-size: 11px;
  font-weight: bold;
}

/* --- KATEGORI GAME (MODEL PREMIUM RIBBON) --- */
.premium-categories {
  display: flex;
  overflow-x: auto;
  background: #111;
  padding: 10px 5px;
  scrollbar-width: none;
  border-bottom: 2px solid #222;
  border-top: 1px solid #222;
}

.premium-categories::-webkit-scrollbar {
  display: none;
}

.prem-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 75px;
  padding: 10px 5px;
  margin: 0 4px;
  border-radius: 8px;
  color: #666;
  cursor: pointer;
  transition: 0.3s ease;
}

.prem-cat-item i {
  font-size: 22px;
  margin-bottom: 6px;
  transition: 0.3s;
}
.prem-cat-item span {
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* MENU AKTIF */
.prem-cat-item.active {
  background: linear-gradient(180deg, #ff0000 0%, #8b0000 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 0, 0, 0.4);
}

.prem-cat-item.active i {
  color: #ffcc00;
  transform: scale(1.1);
}

/* ================================================= */
/* --- 10. GAME POPULER & SLOT SLIDER (UPDATED) --- */
/* ================================================= */
.game-section {
  padding: 15px;
  background: #0d0d0d;
}

.section-title {
  font-size: 13px;
  border-left: 4px solid #f00;
  padding-left: 10px;
  margin-bottom: 15px;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}

/* Container utama kartu game slider */
.game-card {
  position: relative;
  /* Kunci agar overlay nempel di sini */
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #333;
  background: #111;
  transition: transform 0.2s;
}

.game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* Biar tetap kotak rapi */
  display: block;
  object-fit: cover;
}

/* Overlay Stats Khusus Slider (Dibuat lebih mungil) */
.game-card .game-stats-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 8px;
  /* Ukuran font lebih kecil untuk slider */
  color: #fff;
  z-index: 10;
}

/* Titik Ijo Kedip untuk Slider */
.game-card .live-dot {
  width: 4px;
  height: 4px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 3px #00ff88;
  animation: blink 1s infinite alternate;
}

/* Efek klik pada kartu */
.game-card:active {
  transform: scale(0.95);
}

/* ================================================= */
/* --- 6. FLOATING LIVE CHAT & SWEETALERT FIX --- */
/* ================================================= */
.floating-chat {
  position: fixed;
  bottom: 85px;
  right: 15px;
  background: linear-gradient(135deg, #0051ff 0%, #002266 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 50px;
  text-decoration: none;
  z-index: 2000;
  box-shadow: 0 5px 15px rgba(0, 81, 255, 0.4);
  animation: pulseChat 2s infinite;
}
.chat-icon {
  position: relative;
  font-size: 18px;
  margin-right: 8px;
}
.online-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  border: 2px solid #002266;
}
.chat-text {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

@keyframes pulseChat {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 81, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(0, 81, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 81, 255, 0);
  }
}

/* FIX: Mencegah Live Chat keluar dari ukuran 500px */
.chat-container-spa {
  max-width: 500px !important;
  margin: 0 auto !important;
  height: calc(100% - 70px) !important;
  z-index: 3000 !important;
  left: 0 !important;
  right: 0 !important;
}
.chat-popup-spa {
  width: 100% !important;
  max-width: 500px !important;
  margin: 0 !important;
  border-radius: 15px 15px 0 0 !important;
  border: 1px solid #0051ff !important;
  background: #111 !important;
}
.swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
.swal2-backdrop-show {
  background: rgba(0, 0, 0, 0.8) !important;
  max-width: 500px !important;
  margin: 0 auto !important;
}

/* ================================================= */
/* --- 7. MODAL FORM OVERLAY (LOGIN/DAFTAR) --- */
/* ================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 5000;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}
.modal-content {
  background: #111;
  width: 90%;
  max-width: 400px;
  border-radius: 15px;
  border: 1px solid #f00;
  padding: 25px;
  position: relative;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
}
.modal-title {
  color: #ffcc00;
  font-size: 18px;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}
.modal-content input, .modal-content select {
  width: 100%;
  padding: 13px;
  margin-bottom: 10px;
  background: #000;
  border: 1px solid #333;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
}

/* ================================================= */
/* --- 8. FOOTER & LISENSI --- */
/* ================================================= */
.footer-seo {
  background: #050505;
  border-top: 1px solid #222;
  margin-top: 20px;
  padding: 20px 15px 110px 15px;
  /* Padding bawah 110px biar gak ketutup menu bawah */
  color: #888;
  font-size: 11px;
}

/* Info Perusahaan & Lisensi */
.footer-license-info {
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.02);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #111;
}

.footer-license-info strong {
  color: #ccc;
}

/* Link Menu Footer (About Us, dll) */
.footer-links-grid {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
  text-align: left;
}

.footer-col {
  flex: 1;
}

.footer-col h4 {
  color: #fff;
  font-size: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 5px;
}

.footer-col ul li a {
  color: #666;
  text-decoration: none;
}

/* Ikon 18+ dan Keamanan */
.footer-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid #222;
}

.badge-item-age {
  border: 2px solid #f00;
  color: #f00;
  font-weight: bold;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* Bagian Bank (Yang Abang punya tadi kita rapihin) */
.bank-partners {
  padding: 15px 0;
  text-align: center;
}

.bank-partners p {
  font-size: 10px;
  margin-bottom: 10px;
  color: #555;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bank-grid img {
  width: 100%;
  background: rgba(255,255,255,0.03);
  padding: 5px;
  border-radius: 4px;
  filter: grayscale(1);
  /* Bikin hitam putih biar elegan */
  transition: 0.3s;
}

.bank-grid img:hover {
  filter: grayscale(0);
  /* Berwarna lagi pas di-hover */
}

.footer-copyright {
  text-align: center;
  color: #333;
  margin-top: 15px;
  font-size: 10px;
}

/* STYLE KHUSUS IKLAN POPUP */
.iklan-box {
  border: 2px solid #ffcc00 !important;
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.8) !important;
  text-align: center;
  max-width: 350px !important;
  /* Ukuran iklan lebih ramping biar cakep di HP */
}

.iklan-box img {
  border: 1px solid #333;
}

/* Animasi Iklan Muncul */
@keyframes popupMuncul {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#popup-iklan-1 .modal-content, #popup-iklan-2 .modal-content {
  animation: popupMuncul 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* ================================================= */
/* --- 9. NAVIGATION BAWAH (THE KING) --- */
/* ================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: #000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  border-top: 2px solid #0051ff;
  z-index: 9999 !important;
}
.nav-link {
  flex: 1;
  text-align: center;
  color: #666;
  font-size: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}
.nav-link i {
  font-size: 18px;
  display: block;
  margin-bottom: 3px;
}
.nav-link.active, .nav-link.nav-account {
  color: #0084ff !important;
}
.nav-link.active i, .nav-link.nav-account i {
  color: #0084ff !important;
}

.nav-transaction .inner-trans {
  background: linear-gradient(180deg, #00ff88, #008855);
  color: #000;
  padding: 8px 5px;
  border-radius: 10px;
  margin-top: -20px;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
  width: 80px;
  margin: 0 auto;
}
.nav-transaction i, .nav-transaction span {
  color: #000 !important;
}