@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ===================================================
   MASTER THEME VARIABLES (SAKLAR UTAMA WARNA MAMANGGS)
   =================================================== */
:root {
  /* DARK MATTE BASE */
  --navy-dark: #08090d;        /* Header, footer, & body base */
  --navy-base: #0f1016;        /* Latar section utama */
  --navy-card: #151821;        /* Kotak kartu produk, form input */
  --navy-card-hover: #1c202c;  /* Efek kartu saat hover */
  --border-color: rgba(255, 255, 255, 0.08);

  /* BRAND ACCENT: VOLTAGE NEON LIME */
  --accent-red: #ccff00;       /* Tombol utama / border aktif */
  --accent-red-hover: #b3e600;
  --accent-glow: rgba(204, 255, 0, 0.25);

  /* SECONDARY ACCENT: CYBER GOLD */
  --accent-gold: #facc15;
  --accent-gold-glow: rgba(250, 204, 21, 0.3);

  /* TYPOGRAPHY */
  --text-main: #f8fafc;
  --text-muted: #84889a;

  /* RADIUS & ANIMATION */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --transition: all 0.25s ease;
}

/* ===================================================
   RESET & ISOLASI TIPOGRAFI (IKON AMAN)
   =================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Terapkan font Plus Jakarta Sans HANYA ke teks, JANGAN timpa ::before global */
html, body, input, button, select, textarea, p, h1, h2, h3, h4, h5, h6, span, a, li, label, td, th {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Lindungi dan pulihkan font FontAwesome secara mutlak */
i, [class^="fa-"], [class*=" fa-"], .fa, .fa-solid, .fa-brands, .fa-regular {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", FontAwesome !important;
}

.fa-brands, [class*="fa-brands"] {
  font-family: "Font Awesome 6 Brands" !important;
}

body {
  background-color: var(--navy-dark) !important;
  color: var(--text-main) !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Glow */
body::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.06) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
}

/* Kanvas Partikel Melayang */
#bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===================================================
   NAVBAR
   =================================================== */
.navbar, header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 9, 13, 0.9) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color) !important;
  padding: 14px 24px;
}

.navbar-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.logo-video-wrap {
  height: 42px;
  width: 150px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.logo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.nav-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.nav-search input,
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: #11131a !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px;
  color: #fff !important;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus,
.search-box input:focus {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 12px var(--accent-glow) !important;
}

.nav-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav-login {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--navy-card);
  border: 1px solid var(--border-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-nav-login:hover {
  background: var(--navy-card-hover);
}

.btn-nav-register {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 800 !important;
  background: #ccff00 !important;
  color: #08090d !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-nav-register:hover {
  background: #b3e600 !important;
  box-shadow: 0 4px 15px var(--accent-glow) !important;
}

/* Capsule User Navbar */
.nav-user-logged {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #151821 !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color) !important;
  border-radius: 50px;
  padding: 4px 6px 4px 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.nav-user-logged:hover {
  border-color: #ccff00 !important;
  box-shadow: 0 0 15px var(--accent-glow) !important;
}

.btn-nav-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ccff00, #9ec700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #08090d;
  font-weight: 800;
}

.nav-user-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-nav-logout-capsule {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}

.btn-nav-logout-capsule:hover {
  background: #ccff00;
  color: #08090d;
  border-color: #ccff00;
  box-shadow: 0 0 10px var(--accent-glow);
  transform: rotate(90deg);
}

/* ===================================================
   HALAMAN ORDER & CHECKOUT OVERRIDES
   =================================================== */
.game-info-sidebar,
.step-card,
.instruction-box {
  background: #11131a !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: none !important;
}

.game-info-sidebar h2,
#gameTitle {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.5px !important;
  margin-top: 14px !important;
}

.step-card h3,
#stepAccountTitle {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

.step-number {
  background: #ccff00 !important;
  color: #08090d !important;
  font-weight: 800 !important;
}

/* Input Form Akun */
.form-group label {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  margin-bottom: 8px !important;
  display: block;
}

.form-group input,
#userIdInput,
#zoneIdInput {
  background: #151821 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  width: 100% !important;
  outline: none !important;
}

.form-group input:focus,
#userIdInput:focus,
#zoneIdInput:focus {
  border-color: #ccff00 !important;
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.15) !important;
}

/* Kartu Nominal Item */
.nominal-card {
  background: #151821 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  transition: all 0.2s ease !important;
}

.nominal-title {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
}

.nominal-price {
  color: #ccff00 !important;
  font-weight: 800 !important;
}

.nominal-card.selected {
  background: #1c202c !important;
  border: 1.5px solid #ccff00 !important;
  box-shadow: 0 0 18px rgba(204, 255, 0, 0.18) !important;
}

/* Kartu Pembayaran */
.payment-card {
  background: #151821 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
}

.payment-card.selected {
  background: #1c202c !important;
  border: 1.5px solid #ccff00 !important;
  box-shadow: 0 0 16px rgba(204, 255, 0, 0.16) !important;
}

/* Tombol Aksi */
.btn-checkout, 
#btnApplyPromo {
  background: #ccff00 !important;
  color: #08090d !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(204, 255, 0, 0.3) !important;
  border-radius: 10px !important;
}

.btn-checkout:hover,
#btnApplyPromo:hover {
  background: #b3e600 !important;
  box-shadow: 0 6px 24px rgba(204, 255, 0, 0.45) !important;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  margin-top: auto;
  background: #040508 !important;
  border-top: 1px solid var(--border-color) !important;
  padding: 40px 24px 20px;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 10px;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ccff00;
}

.footer-bottom {
  max-width: 1240px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================================================
   DESKTOP VS MOBILE NAV TOGGLE & DROPDOWN
   =================================================== */
@media (min-width: 769px) {
  .mobile-nav-toggle-group,
  .mobile-search-dropdown,
  .mobile-menu-drawer,
  #mobileMenuDropdown {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-nav-toggle-group {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .btn-mobile-icon {
    width: 36px;
    height: 36px;
    background: #151821 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .btn-mobile-icon:hover {
    border-color: #ccff00 !important;
    color: #ccff00 !important;
  }

  /* DRAWER DROPDOWN MOBILE (PRESISI DI BAWAH NAVBAR KANAN ATAS) */
  .mobile-menu-drawer,
  #mobileMenuDropdown {
    display: none !important;
    position: fixed !important;
    top: 65px !important;
    right: 16px !important;
    left: auto !important;
    width: 250px !important;
    background: #11131a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85) !important;
    padding: 16px !important;
    z-index: 99999 !important;
    backdrop-filter: blur(12px) !important;
  }

  .mobile-menu-drawer.show,
  #mobileMenuDropdown.show {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    animation: slideDownMenu 0.2s ease-out;
  }

  .mobile-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin-bottom: 4px !important;
  }

  .mobile-menu-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  /* Link item menu tersusun vertikal ke bawah */
  .mobile-menu-link,
  .mobile-menu-drawer a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 12px !important;
    color: #cbd5e1 !important;
    text-decoration: none !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
  }

  .mobile-menu-link:hover,
  .mobile-menu-drawer a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ccff00 !important;
    transform: translateX(3px) !important;
  }

  #mobileAuthSlot {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .logo-video-wrap {
    height: 32px;
    width: 115px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
}

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

/* ===================================================
   MODAL LOGOUT CYBER (GLOBAL)
   =================================================== */
.mgs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mgs-modal-overlay.show {
  display: flex !important;
}

.mgs-cyber-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  max-width: 360px;
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-icon-glow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.mgs-cyber-modal h3 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.mgs-cyber-modal p {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 20px;
}

.modal-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-modal-cancel {
  padding: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-confirm {
  padding: 11px;
  background: #ef4444;
  border: none;
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

/* ===================================================
   UNIVERSAL THEME ENFORCER (LEADERBOARD, BLOG, PROFILE, ADMIN)
   Menyapu bersih sisa warna navy di seluruh halaman
   =================================================== */

/* 1. Paksa Semua Background Halaman Gelap Pekat */
body, html {
  background-color: #08090d !important;
}

/* 2. Container Kartu, Podium, & Panel Admin */
.podium-card,
.podium-step,
.leaderboard-table-card,
.leaderboard-rank-card,
.blog-card,
.post-card,
.article-wrapper,
.profile-card,
.edit-profile-card,
.admin-card,
.admin-table-container,
.admin-sidebar,
.panel-box,
div[class*="leaderboard-card"],
div[class*="podium-card"],
div[class*="blog-card"],
div[class*="profile-card"] {
  background: #11131a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* 3. Form Input (Edit Profile, Admin Input, Search Blog) */
.form-control,
.form-input,
.edit-profile-card input,
.admin-card input,
.admin-card select,
.admin-card textarea {
  background: #151821 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.form-control:focus,
.form-input:focus,
.edit-profile-card input:focus,
.admin-card input:focus {
  border-color: #ccff00 !important;
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.15) !important;
}

/* 4. Podium Leaderboard */
.podium-rank-1 {
  background: linear-gradient(180deg, rgba(204, 255, 0, 0.15) 0%, #11131a 100%) !important;
  border: 1px solid #ccff00 !important;
}

.podium-rank-2,
.podium-rank-3 {
  background: #151821 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* 5. Tabel di Leaderboard & Admin */
table th {
  background: #151821 !important;
  color: #84889a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
}

/* 6. Tombol Aksi Universal (Simpan Profile, Admin Submit) */
.btn-save-profile,
.btn-submit-admin,
.btn-primary {
  background: #ccff00 !important;
  color: #08090d !important;
  font-weight: 800 !important;
  border: none !important;
}

/* ===================================================
   CYBER TOAST NOTIFICATION (GLOBAL)
   =================================================== */
.mgs-toast-container {
  position: fixed;
  top: 24px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.mgs-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 360px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.mgs-toast.hide {
  opacity: 0;
  transform: translateX(50px);
}

.mgs-toast i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mgs-toast.warning {
  border-color: rgba(245, 158, 11, 0.4);
}
.mgs-toast.warning i {
  color: #f59e0b;
}

.mgs-toast.error {
  border-color: rgba(239, 68, 68, 0.4);
}
.mgs-toast.error i {
  color: #ef4444;
}

.mgs-toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}
.mgs-toast.success i {
  color: #10b981;
}

.mgs-toast-msg {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: #e2e8f0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}