/* ═══════════════════════════════════════════
   ORBNET Mobile Slide-In Navigation
   ═══════════════════════════════════════════ */

/* Hamburger Button */
#mobileMenuBtn {
  display: none;
  background: none;
  border: none;
  color: #e0e7ff;
  font-size: 1.5rem;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

#mobileMenuBtn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

/* Dark Overlay */
#mobileMenuOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobileMenuOverlay.open {
  display: block;
  opacity: 1;
}

/* Slide-In Panel */
#mobileMenuPanel {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #0c0a1e 0%, #0f0b2a 50%, #0a0818 100%);
  border-left: 1px solid rgba(99, 102, 241, 0.2);
  z-index: 9999;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

#mobileMenuPanel.open {
  right: 0;
}

/* Menu Header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu-logo {
  height: 35px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
}

#mobileMenuClose {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

#mobileMenuClose:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Menu Links Container */
.mobile-menu-links {
  padding: 12px 0;
}

/* Profile Section */
.mobile-profile-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.mobile-profile-info {
  min-width: 0;
}

.mobile-profile-name {
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-profile-email {
  color: #64748b;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Menu Items */
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
  color: #fff;
  background: rgba(99, 102, 241, 0.08);
  border-left-color: #6366f1;
}

.mobile-menu-item i {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
  color: #64748b;
  transition: color 0.2s;
}

.mobile-menu-item:hover i {
  color: #a5b4fc;
}

/* Sub items (categories) */
.mobile-menu-sub {
  padding-left: 32px;
  font-size: 0.88rem;
  color: #94a3b8;
}

.mobile-menu-sub:hover {
  color: #00f0ff;
}

/* CTA button (Sign Up) */
.mobile-menu-cta {
  margin: 8px 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 12px;
  color: #fff !important;
  font-weight: 600;
  justify-content: center;
  border-left: none !important;
}

.mobile-menu-cta:hover {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  transform: translateY(-1px);
}

.mobile-menu-cta i {
  color: #fff !important;
}

/* Logout */
.mobile-menu-logout {
  color: #f43f5e !important;
}

.mobile-menu-logout:hover {
  background: rgba(244, 63, 94, 0.1) !important;
  border-left-color: #f43f5e !important;
}

.mobile-menu-logout i {
  color: #f43f5e !important;
}

/* Divider */
.mobile-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 10px 16px;
}

/* Section Title */
.mobile-menu-section-title {
  padding: 10px 24px 6px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  #mobileMenuBtn {
    display: block !important;
  }

  /* Clean topnav on mobile — just logo + hamburger in one row */
  .topnav {
    padding: 10px 16px !important;
    border-radius: 0 0 16px 16px !important;
  }

  .topnav > .d-flex {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .topnav .nav-brand-logo {
    height: 50px !important;
  }

  /* Hide the stacked nav links on mobile — hamburger handles it */
  #navLinksContainer {
    display: none !important;
  }

  /* Fix "How ORBNET Works" images on mobile */
  .how-step-img {
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }

  .how-step-img img {
    height: auto !important;
    max-height: 250px !important;
  }

  .how-step-content {
    min-width: 100% !important;
  }

  .how-step {
    gap: 20px !important;
  }

  /* Fix hero text */
  .hero-text {
    margin: 60px auto 40px !important;
  }

  .hero-text h1 {
    font-size: 2rem !important;
  }

  .hero-text .subtitle {
    font-size: 0.95rem !important;
  }

  /* Fix founder section on mobile */
  .founder-profile-glass {
    padding: 24px 20px !important;
  }

  /* Fix stack title */
  .stack-title {
    font-size: 2rem !important;
  }
}

@keyframes avatarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
