/* ===================================================================
   NERVESSTORE EXCLUSIVE MOBILE & APP-LIKE NAVIGATION SYSTEM (V2 ROCK-SOLID)
   Author: NervesStore Autonomous Sales Intelligence System
   =================================================================== */

/* -------------------------------------------------------------------
   1. TOP NAVBAR MOBILE STYLES & TOGGLE BUTTON
   ------------------------------------------------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(14, 18, 29, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--cyan);
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle * {
  pointer-events: none !important;
}

.nav-toggle:hover, .nav-toggle:active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transform: scale(1.04);
}

.nav-right-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* -------------------------------------------------------------------
   2. MOBILE TOP HORIZONTAL SWIPEABLE TABS BAR (Directly Visible at Top)
   ------------------------------------------------------------------- */
.mobile-top-tabs-bar {
  display: none;
  position: relative;
  z-index: 90;
  width: 100%;
  padding: 68px 12px 10px;
  margin-bottom: 8px;
}

.mobile-top-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 4px;
}

.mobile-top-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.mtop-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(14, 18, 29, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mtop-tab * {
  pointer-events: none !important;
}

.mtop-tab i {
  font-size: 13px;
  color: #64748b;
  transition: color 0.2s ease;
}

.mtop-tab:hover, .mtop-tab:active, .mtop-tab.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.mtop-tab.active i {
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.7));
}

.mtop-tab.mtop-guard {
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.08);
}

.mtop-tab.mtop-guard i {
  color: var(--cyan);
}

.mtop-badge {
  background: linear-gradient(135deg, #00f0ff, #0088ff);
  color: #030712;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 99px;
  line-height: 1;
}

/* -------------------------------------------------------------------
   3. MOBILE BOTTOM NAVIGATION BAR (Fixed at Screen Bottom)
   ------------------------------------------------------------------- */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 64px;
  padding: 0 6px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8, 11, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 240, 255, 0.08);
  align-items: center;
  justify-content: space-around;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  padding: 4px 6px;
  border-radius: 12px;
  transition: all 0.18s ease;
  position: relative;
  flex: 1;
  max-width: 72px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bnav-item * {
  pointer-events: none !important;
}

.bnav-icon {
  font-size: 18px;
  margin-bottom: 2px;
  transition: transform 0.18s ease, color 0.18s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bnav-badge {
  position: absolute;
  top: -4px;
  right: -12px;
  background: linear-gradient(135deg, #00f0ff, #0088ff);
  color: #030712;
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 99px;
  line-height: 1;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.bnav-item:hover, .bnav-item:active, .bnav-item.active {
  color: #fff;
}

.bnav-item.active .bnav-icon {
  color: var(--cyan);
  transform: translateY(-2px);
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.7));
}

.bnav-item.active .bnav-label {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.bnav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2.5px;
  background: var(--cyan);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 10px var(--cyan);
}

/* Guard AI Center Floating Button */
.bnav-guard-highlight {
  position: relative;
  transform: translateY(-6px);
}

.bnav-icon-guard {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f0ff 0%, #0077ff 100%);
  color: #030712;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.6), 0 0 30px rgba(0, 240, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.bnav-guard-highlight:active .bnav-icon-guard,
.bnav-guard-highlight.active .bnav-icon-guard {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.8), 0 0 40px rgba(0, 240, 255, 0.5);
}

.bnav-guard-highlight .bnav-label {
  margin-top: 3px;
  font-weight: 800;
  color: var(--cyan);
}

/* -------------------------------------------------------------------
   4. MOBILE DRAWER NAVIGATION MENU (Strictly display: none when closed!)
   ------------------------------------------------------------------- */
.mobile-drawer-overlay {
  display: none !important; /* CRITICAL: Never block touches when closed! */
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 84%;
  max-width: 340px;
  background: linear-gradient(180deg, #0b0f1c 0%, #060810 100%);
  border-left: 1px solid rgba(0, 240, 255, 0.22);
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 240, 255, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 10001;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto !important;
}

.mobile-drawer-overlay.open .mobile-drawer {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 18, 29, 0.8);
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.mobile-drawer-brand span {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.mobile-drawer-brand span span {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}

.mobile-drawer-body {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.mobile-drawer-auth {
  padding: 12px;
  background: rgba(14, 18, 29, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 14px;
}

.mobile-drawer-auth-buttons {
  display: flex;
  gap: 8px;
}

.drawer-auth-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
}

.drawer-auth-login {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  color: var(--cyan);
}

.drawer-auth-register {
  background: linear-gradient(135deg, #00f0ff, #0088ff);
  color: #030712;
  font-weight: 800;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.drawer-link * {
  pointer-events: none !important;
}

.drawer-link i {
  font-size: 16px;
  width: 22px;
  text-align: center;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.drawer-link:hover, .drawer-link:active, .drawer-link.active {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.25);
  color: #fff;
}

.drawer-link.active i, .drawer-link:hover i {
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
}

.drawer-badge {
  margin-left: auto;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.drawer-live-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 2px 8px;
  border-radius: 99px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-btn-itemsatis {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid rgba(251, 191, 36, 0.55);
  border-radius: 12px;
  color: #07090e;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.32);
  transition: all 0.25s ease;
}

.drawer-btn-itemsatis:hover {
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------------
   5. RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ------------------------------------------------------------------- */
.hide-sm {
  display: inline;
}

@media (max-width: 1080px) {
  /* Remove redundant duplicate top swipe bar — keep sleek native bottom bar */
  .mobile-top-tabs-bar {
    display: none !important;
  }

  .mobile-bottom-bar {
    display: flex;
  }

  /* Show toggle hamburger button */
  .nav-toggle {
    display: flex;
  }

  /* Hide center desktop nav menu */
  .nav-menu {
    display: none !important;
  }

  /* Hide secondary store button in crowded top bar (available in drawer + hero + cards) */
  .btn-nav-itemsatis {
    display: none !important;
  }

  /* Safe bottom spacing for full page */
  body {
    padding-bottom: 78px !important;
  }

  /* Floating toast alerts & snow toggle reposition */
  #snow-toggle {
    bottom: 84px !important;
    right: 14px !important;
    width: 42px !important;
    height: 42px !important;
  }

  .last-buys,
  .live-toast-wrap {
    bottom: 84px !important;
    left: 12px !important;
    right: 12px !important;
  }
}

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

  .navbar {
    padding: 8px 10px 0 !important;
  }

  .nav-bar {
    height: 54px !important;
    padding: 0 10px !important;
    border-radius: 16px !important;
    gap: 6px !important;
  }

  .nav-logo {
    gap: 7px !important;
    min-width: 0 !important;
  }

  .nav-logo img {
    height: 30px !important;
    width: 30px !important;
  }

  .nav-logo-text {
    font-size: 19px !important;
  }

  .nav-right-wrap {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .nav-actions {
    gap: 6px !important;
  }

  .nav-hak-pill {
    padding: 5px 9px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }

  .btn-nav-login {
    padding: 6px 11px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    white-space: nowrap !important;
  }

  .nav-user-btn {
    padding: 4px 10px 4px 5px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }

  .nav-user-btn .user-name-text {
    max-width: 72px !important;
  }

  .nav-toggle {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  /* Category Filter Dock Horizontal Swipe */
  .cyber-category-dock {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 8px 12px !important;
    margin-bottom: 20px !important;
    border-radius: 16px !important;
  }

  .cyber-category-dock::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    padding: 8px 14px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  /* Games Grid on Mobile: 2 Columns */
  .games-grid, #gamesGrid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 4px !important;
  }

  .game-card {
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .game-card .gc-title {
    font-size: 12.5px !important;
    line-height: 1.3 !important;
    height: 33px !important;
    -webkit-line-clamp: 2 !important;
  }

  .game-card .gc-price {
    font-size: 14px !important;
  }

  .game-card .gc-actions {
    gap: 6px !important;
  }

  .game-card .gc-actions .btn {
    padding: 7px 6px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  /* Hero Section Mobile Spacing */
  .hero {
    min-height: 82vh !important;
    padding: 96px 16px 96px !important;
  }

  .hero h1 {
    font-size: clamp(28px, 7.8vw, 40px) !important;
    line-height: 1.12 !important;
  }

  .hero-sub {
    font-size: 13.5px !important;
    padding: 0 6px !important;
    margin-bottom: 22px !important;
  }

  .hero-btns {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-secondary {
    width: 100% !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    justify-content: center !important;
  }

  .hero-quick-search-wrap {
    margin-top: 18px !important;
  }

  .hero-quick-search-box input {
    font-size: 13px !important;
  }

  .hero-now {
    bottom: 58px !important;
    font-size: 11px !important;
  }

  .hero-dots {
    bottom: 28px !important;
  }

  /* Steam Guard Form Mobile */
  .guard-ai-card, .guard-box {
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  .guard-code-display {
    font-size: 28px !important;
    letter-spacing: 4px !important;
  }

  /* Modals Mobile */
  .modal {
    width: 94% !important;
    max-width: 380px !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }
}

@media (max-width: 440px) {
  .nav-logo img {
    height: 28px !important;
    width: 28px !important;
  }

  .nav-logo-text {
    font-size: 17px !important;
  }

  .nav-hak-pill {
    padding: 5px 8px !important;
    font-size: 10.5px !important;
  }

  .btn-nav-login {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }

  .pop-card {
    width: 162px !important;
  }
}
