/* Virex High-End Mobile Navigation System */
@media (max-width: 820px) {
  /* Ensure header layout is clean and thumb-friendly on mobile */
  .site-header {
    height: 64px !important;
    padding: 0 14px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }
  .site-header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .visuals-nav {
    display: none !important;
  }
  .visuals-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
  }
  /* Simplify balance pill on mobile */
  .customer-balance-pill {
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }
  .customer-balance-pill .balance-label {
    display: none !important;
  }
  .customer-balance-pill .balance-amount {
    font-weight: 700 !important;
    color: #c084fc !important;
  }

  /* Mobile Hamburger Button in Header */
  .virex-mobile-menu-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    color: #f3f3f5 !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    flex-shrink: 0 !important;
  }
  .virex-mobile-menu-btn:active {
    transform: scale(0.94) !important;
    background: rgba(168, 85, 247, 0.2) !important;
  }

  /* Add space at the bottom of the page so content doesn't get covered by the bottom bar */
  body {
    padding-bottom: 74px !important;
  }

  /* Hide redundant old sticky bar */
  .mobile-sticky-buy-bar {
    display: none !important;
  }
}

@media (min-width: 821px) {
  .virex-mobile-menu-btn,
  .virex-mobile-drawer,
  .virex-mobile-bottom-bar,
  .virex-mobile-backdrop {
    display: none !important;
  }
}

/* =========================================================
   MOBILE DRAWER (SLIDE-OVER MENU)
   ========================================================= */
.virex-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 8, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.virex-mobile-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.virex-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86vw;
  max-width: 360px;
  background: #09090f;
  background: linear-gradient(180deg, #110e1a 0%, #08070d 100%);
  border-left: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85), 0 0 40px rgba(147, 51, 234, 0.15);
  z-index: 10002;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.virex-mobile-drawer.is-open {
  transform: translateX(0);
}

.virex-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.virex-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.virex-drawer-brand img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}
.virex-drawer-title {
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
}
.virex-drawer-title span {
  color: #a855f7;
}

.virex-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s ease;
}
.virex-drawer-close:active {
  transform: scale(0.92);
  color: #fff;
  background: rgba(168, 85, 247, 0.2);
}

.virex-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.virex-drawer-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #71717a;
  margin: 10px 0 4px 6px;
}

.virex-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
  text-decoration: none;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.virex-drawer-link:active,
.virex-drawer-link.is-active {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: translateX(4px);
}
.virex-drawer-link svg {
  width: 19px;
  height: 19px;
  color: #a855f7;
  flex-shrink: 0;
}
.virex-drawer-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.virex-drawer-footer {
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
}

.virex-drawer-discord-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.35);
  transition: all 0.2s ease;
}
.virex-drawer-discord-cta:active {
  transform: scale(0.98);
}

/* =========================================================
   APP-STYLE MOBILE BOTTOM NAVIGATION BAR
   ========================================================= */
.virex-mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(10, 9, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.virex-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  text-decoration: none;
  color: #71717a;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-body, "Inter", sans-serif);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.virex-tab-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease;
}
.virex-tab-item.is-active,
.virex-tab-item:active {
  color: #c084fc;
}
.virex-tab-item.is-active svg {
  transform: translateY(-2px) scale(1.1);
  stroke: #c084fc;
  filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
}
.virex-tab-item.is-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

/* Status pulsating live dot on Status tab */
.virex-tab-live-dot {
  position: absolute;
  top: 6px;
  right: calc(50% - 13px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}
