/* ======================================================
   LOGIN MODAL
   ====================================================== */
.login-modal .modal-dialog {
  max-width: 420px;
}

.login-box {
  position: relative;
  padding: 22px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #141414, #0b0b0b);
}

.login-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.login-header {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo {
  width: 140px;
  margin-bottom: 12px;
}

.login-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  background: #1f1f1f;
  border-radius: 12px;
}

.login-input i {
  color: #c9a14a;
  font-size: 16px;
}

.login-input input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
}

.toggle-pass {
  cursor: pointer;
}

.login-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 13px;
}

.login-options a,
.login-footer a {
  color: #c9a14a;
  text-decoration: none;
}

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5c16c, #cfa14a);
  box-shadow: 0 12px 50px rgba(245, 193, 108, .4);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.login-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}

/* ======================================================
   HEADER WALLET
   ====================================================== */
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 5%;
}

.wallet-ui {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin-right: 4px;
  max-width: calc(100vw - 120px);
  background: #1c1c1c;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 4px 4px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.2s ease;
}

.wallet-refresh i {
  display: flex;
  align-items: center;
  color: #737373;
  width: 20px;
  font-size: 18px;
  transition: transform 0.8s;
}

.wallet-refresh:hover i {
  transform: rotate(90deg);
}

.wallet-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px;
  background: #0f0f0f;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 2px 2px rgba(0, 0, 0, 0.7);
}

.wallet-balance .currency,
.wallet-balance .amount {
  font-size: 13px;
  line-height: 1;
}

.wallet-balance .currency {
  color: #3bd16f;
}

.wallet-balance .amount {
  color: #fff;
}

/* Paksa menu tetap muncul */
.mobile-button--menu {
  flex-shrink: 0;
}

/* ======================================================
   BUTTON NAV
   ====================================================== */
.button-nav {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: linear-gradient(180deg, #FFFFFF14, #FFFFFF0F);
  border: 1px solid #FFFFFF14;
  cursor: pointer;
  transition: all 0.25s ease;
  
}

.button-nav i {
  font-size: 18px;
  color: #C4C4C4E3;
}

.button-nav:hover {
  background: linear-gradient(180deg, #303030, #202020);
  box-shadow: 0 0 0 1px rgba(143, 209, 158, 0.25);
}

.button-nav:hover i {
  color: #EA9C19;
  text-shadow: 0 0 6px rgba(159, 240, 181, 0.5);
}

.button-nav:active {
  transform: scale(0.96);
}

/* ======================================================
   CATEGORY MENU (PREMIUM)
   ====================================================== */
.home-category {
  padding-bottom: 6px;
  margin-bottom: 8px;
  margin-top: 8px;
}

.home-category .sgx-container {
  padding-left: 0;
  padding-right: 0;
}

/* SCROLL WRAPPER */
.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 8px 6px;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

/* ITEM */
.cat-item {
  min-width: 58px;
  text-align: center;
  text-decoration: none;
  color: #9c9c9c;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* KOTAK ICON */
.cat-item i {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1f1f1f;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.02);
  font-size: 30px;
  color: #8f8f8f;
  margin-bottom: 2px;
  transition: all 0.25s ease;
}

/* TEXT */
.cat-item span {
  font-size: 13px;
  color: #8f8f8f;
  line-height: 1.1;
}

/* ACTIVE */
.cat-item.active i {
  background: linear-gradient(180deg, #3a3124, #2a241b);
  border-color: rgba(255, 215, 140, 0.8);
  color: #f1cc7a;
  box-shadow:
    0 0 0 1px rgba(255, 215, 140, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.6);
}

.cat-item.active span {
  color: #f1cc7a;
}

/* HOVER */
.cat-item:hover i {
  border-color: rgba(255, 215, 140, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

/* TAP MOBILE */
.cat-item:active i {
  transform: scale(0.96);
}

.home-category .category-scroll {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* ======================================================
   MOBILE BOTTOM NAV
   ====================================================== */
/* BASE */

.mbnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #151515F2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 999;
}

/* ITEM */
.mbnav-item {
  flex: 1;
  text-align: center;
  color: #9b9b9b;
  font-size: 11px;
  text-decoration: none;
}

.mbnav-item i {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.mbnav-item.active {
  color: #f5c26b;
}

/* CENTER BUTTON */
.mbnav-center {
  flex: 1.2;
  text-align: center;
  position: relative;
  top: -8px;
  text-decoration: none;
}

/* INNER CIRCLE - PREMIUM */
.mbnav-center-inner {
  width: 64px;
  height: 64px;
  border-radius: 50%;

  /* gold gradient */
  background: linear-gradient(145deg, #f7d27d, #c89b3c);

  /* black ring / list hitam */
  border: 1px solid rgba(0, 0, 0, 0.85);

  /* shadow kombinasi: gold glow + depth */
  box-shadow:
    0 0 10px rgba(245, 193, 108, 0.45), /* gold glow */
    0 6px 16px rgba(0, 0, 0, 0.65),      /* depth */
    inset 0 2px 4px rgba(255, 255, 255, 0.25); /* glossy */

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;

  transition: all 0.25s ease;
}

/* efek klik / hover biar hidup */
.mbnav-center-inner:active,
.mbnav-center-inner:hover {
  transform: scale(0.96);
  box-shadow:
    0 0 14px rgba(245, 193, 108, 0.65),
    0 4px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 3px rgba(255, 255, 255, 0.2);

}


.mbnav-center-inner {
  position: relative;
  overflow: visible;
}

/* PARTIKEL */
.mbnav-center-inner::after {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,215,120,.9) 2px, transparent 3px),
    radial-gradient(circle, rgba(0,0,0,.8) 2px, transparent 3px),
    radial-gradient(circle, rgba(255,200,90,.8) 1.5px, transparent 2px);
  background-size: 12px 12px, 14px 14px, 10px 10px;
  background-position: center;
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}

/* ANIMASI LEDAKAN */
.mbnav-center-inner:active::after {
  animation: particle-burst 0.6s ease-out forwards;
}

@keyframes particle-burst {
  0% {
    opacity: 1;
    transform: scale(0.2);
  }
  60% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

.mbnav-center-inner::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(245, 193, 108, 0.6);
  opacity: 0;
}

.mbnav-center-inner:active::before {
  animation: shockwave 0.5s ease-out forwards;
}

@keyframes shockwave {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
  
}
/* ICON */
.mbnav-center-inner i {
  font-size: 22px;
  color: #1a1a1a;
  margin-bottom: 2px;
}

/* TEXT INSIDE CIRCLE */
.mbnav-center-inner em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
}

/* ======================================================
   RESPONSIVE DESIGN
   ====================================================== */

/* HP kecil (max-width: 360px) */
@media (max-width: 360px) {
  .login-modal .modal-dialog {
    max-width: 95vw;
  }
  .login-box {
    padding: 18px;
  }
  .login-logo {
    width: 120px;
  }
  .login-header h3 {
    font-size: 18px;
  }
  .wallet-ui {
    max-width: calc(100vw - 100px);
  }
  .cat-item {
    min-width: 48px;
  }
  .cat-item i {
    width: 50px;
    height: 50px;
    font-size: 19px;
  }
  .mbnav {
    height: 60px;
    padding: 0 4px;
  }
  .mbnav-item i {
    font-size: 18px;
  }
  .mbnav-center-inner {
    width: 58px;
    height: 58px;
  }
  .mbnav-center-inner i {
    font-size: 20px;
  }
}


  /* ================= HOME POPUP ================= */
.home-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}



.home-popup {
  width: 90%;
  max-width: 360px;
  background: #121212;
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  position: relative;
  animation: popupFade .35s ease;
}

@keyframes popupFade {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
}

.popup-logo img {
  width: 120px;
  margin-bottom: 12px;
}

.home-popup h3 {
  color: #f5c16c;
  margin-bottom: 8px;
}

.home-popup p {
  font-size: 13px;
  color: #bbb;
  margin-bottom: 18px;
}

.popup-actions {
  display: grid;
  gap: 10px;
}

.btn-popup {
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}

.btn-popup.primary {
  background: linear-gradient(135deg, #f5c16c, #e0a94f);
  color: #111;
}

.btn-popup.ghost {
  border: 1px solid #333;
  color: #fff;
}

.popup-note {
  margin-top: 12px;
  font-size: 11px;
  color: #777;
}

.popup-image {
  margin-bottom: 16px;
  text-align: center;
}

.popup-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  display: inline-block;
}

.chat-voice {
  margin-bottom: 10px;
}

.chat-sheet-drag {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: #666;
}

.voice-user {
  font-size: 12px;
  color: #d6a24f;
  margin-bottom: 4px;
}

.voice-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111;
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  width: 220px;
}

.voice-ui i {
  color: #d6a24f;
  font-size: 14px;
}

.wave {
  display: flex;
  gap: 2px;
  flex: 1;
  align-items: center;
}

.wave span {
  width: 3px;
  height: 6px;
  background: #555;
  border-radius: 2px;
}

/* 🔥 ANIMASI */
.voice-ui.playing .wave span {
  background: #d6a24f;
  animation: waveAnim 1s infinite ease-in-out;
}

.voice-ui.playing .wave span:nth-child(2) { animation-delay: .1s }
.voice-ui.playing .wave span:nth-child(3) { animation-delay: .2s }
.voice-ui.playing .wave span:nth-child(4) { animation-delay: .3s }
.voice-ui.playing .wave span:nth-child(5) { animation-delay: .4s }

@keyframes waveAnim {
  0% { height: 6px }
  50% { height: 14px }
  100% { height: 6px }
}

.duration {
  font-size: 11px;
  color: #aaa;
  min-width: 30px;
}

.chat-sheet-header {
  position: sticky;
  top: 0;
  background: #222;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f5c16c;
  font-weight: 700;
  z-index: 10;
  border-bottom: 1px solid #333;
}

.chat-close {
  cursor: pointer;
  color: #aaa;
  font-size: 14px;
}

.chat-close:hover {
  color: #fff;
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-info {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(245, 193, 108, .08);
  border: 1px solid rgba(245, 193, 108, .25);
  color: #f5c16c;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 12px;
}

.note-info i {
  font-size: 14px;
  margin-top: 2px;
}


.swal-btn {
  background: linear-gradient(135deg, #f5c16c, #cfa14a) !important;
  color: #1a1a1a !important;
  border: none !important;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 193, 108, .35);
  transition: all .2s ease;
}

/* Hover effect */
.swal-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Fokus / klik */
.swal-btn:focus {
  box-shadow: 0 0 0 3px rgba(245, 193, 108, .35);
}

.toggle-pass {
  cursor: pointer;
}

/* ================= OVERLAY ================= */
.wallet-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  z-index: 998;
}

.wallet-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ================= POPUP WRAPPER ================= */
.wallet-popup {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: .35s ease;
  z-index: 999;
}

.wallet-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ================= CARD (CIRCLE MINI) ================= */
.wallet-card {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1e1e1e, #0f0f0f);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  text-align: center;
  color: #fff;

  box-shadow:
    0 6px 16px rgba(0,0,0,.55),
    inset 0 1px 2px rgba(255,255,255,.12);

  opacity: 0;
  transform: translateY(6px) scale(.94);
}

/* ================= ICON ================= */
.wallet-card i {
  font-size: 17px;
  margin-bottom: 2px;
}

/* ================= TEXT ================= */
.wallet-card span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* ================= WARNA ICON ================= */
.wallet-card.deposit i  { color: #3bd16f; }
.wallet-card.withdraw i { color: #f5c16c; }
.wallet-card.history i  { color: #4da3ff; }

/* ================= ANIMASI GOLD ================= */
.wallet-popup.active .wallet-card {
  animation: goldFast .3s ease-out forwards;
}

/* STAGGER HALUS */
.wallet-popup.active .wallet-card:nth-child(2) {
  animation-delay: .05s;
}
.wallet-popup.active .wallet-card:nth-child(3) {
  animation-delay: .1s;
}

@keyframes goldFast {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.94);
    box-shadow:
      0 6px 16px rgba(0,0,0,.55),
      0 0 0 rgba(245,193,108,0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow:
      0 12px 26px rgba(0,0,0,.75),
      0 0 12px rgba(245,193,108,.35),
      inset 0 1px 2px rgba(255,255,255,.15);
  }
}

/* ================= TAP EFFECT ================= */
.wallet-card:active {
  transform: scale(.92);
  box-shadow:
    0 16px 36px rgba(0,0,0,.85),
    0 0 20px rgba(245,193,108,.6);
}

  /* =========================
   CHAT BOTTOM SHEET
========================= */
.chat-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: .8s;
}

.chat-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80vh;
  background: #222;
  z-index: 9999;
  
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: .35s cubic-bezier(.4, 0, .2, 1);
}

/* ACTIVE STATE */
.chat-sheet.active {
  transform: translateY(0);
}

.chat-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* HEADER */
.chat-sheet .chat-header {
  padding: 12px;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* CHAT LIST */
#chatMessages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* SAFE AREA iOS */
.chat-sheet {
  padding-bottom: env(safe-area-inset-bottom);
}
.chat-text:hover .chat-delete {
  opacity: 1;
}

.chat-delete {
  opacity: .4;
  transition: .2s;
}

.swal2-container {
  z-index: 20000 !important;
}

