/* ==========================================================================
 *   XPROTECT NAVBAR & TOP BAR STYLES
 *   Exact Faithful Layout & Rich Indigo Palette (Matches Original xprotect.org)
 *   ========================================================================== */

/* --------------------------------------------------------------------------
 *   TOP INFO BAR (IP & LIVE DNS STATUS)
 *   Original vibrant linear gradient with clean white typography
 *   -------------------------------------------------------------------------- */
.top-info-bar {
  background: #0d0a1b !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.85rem !important;
  color: #ffffff !important;
  padding: 9px 0 !important;
  margin: 0 !important;
  position: relative !important;
  z-index: 1000;
  width: 100%;
  overflow: hidden;
}

/* Animated multi-tone cyber spectrum glow along the bottom edge */
.top-info-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #7c3aed 0%, #2563eb 30%, #06b6d4 50%, #ff8c00 80%, #7c3aed 100%);
  background-size: 200% 100%;
  animation: cyberSpectrumFlow 8s linear infinite;
  opacity: 0.85;
}

@keyframes cyberSpectrumFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.top-info-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

/* Left side Client IP Capsule */
.ip-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.25s ease;
  user-select: text;
}

.ip-display:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
}

.ip-display i,
.ip-display svg {
  color: #60a5fa !important;
  font-size: 0.82rem;
}

.ip-display #user-ip-address,
.ip-display .user-ip-address {
  color: #f1f5f9;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-weight: 500;
  letter-spacing: -0.2px;
  margin-left: 1px;
}

/* Right side / Centered Live DNS Status Pill */
.dns-status {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.dns-status-pill {
  font-family: 'Outfit', sans-serif !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  box-sizing: border-box;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15px;
  line-height: 1;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  user-select: none;
}

.dns-status-pill:hover {
  transform: none !important;
}

/* Protected State: You are using Xprotect DNS */
.dns-status-pill.status-protected {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #a7f3d0 !important;
}

.dns-status-pill.status-protected:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.12) 100%) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  transform: none !important;
}

/* Unprotected State: You are not using Xprotect DNS */
.dns-status-pill.status-unprotected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(185, 28, 28, 0.08) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fecaca !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

.dns-status-pill.status-unprotected:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0%, rgba(185, 28, 28, 0.12) 100%) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
  transform: none !important;
}

/* Checking State */
.dns-status-pill.status-checking {
  background: rgba(59, 130, 246, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #bfdbfe !important;
}

/* Sonar Radar Emitter & Waves */
.sonar-emitter {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sonar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  z-index: 2;
  display: block;
}

.sonar-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* Protected Sonar Pulse */
.status-protected .sonar-dot {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.status-protected .sonar-wave {
  background: rgba(16, 185, 129, 0.65);
  animation: sonarRadarPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Unprotected Sonar Pulse */
.status-unprotected .sonar-dot {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.status-unprotected .sonar-wave {
  background: rgba(239, 68, 68, 0.65);
  animation: sonarWarningPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Checking Dot */
.status-checking .sonar-dot {
  background: #60a5fa;
  box-shadow: 0 0 6px #60a5fa;
}

@keyframes sonarRadarPing {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  70%,
  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

@keyframes sonarWarningPing {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  65%,
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Shield Icons */
.dns-status-pill i.status-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.status-protected i.status-icon {
  color: #34d399;
}

.status-unprotected i.status-icon {
  color: #f87171;
}

.status-checking i.status-icon {
  color: #60a5fa;
}

/* Typography Inside Status Pill */
.dns-status-text {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15px;
  line-height: 1.3;
  display: inline-block;
  vertical-align: middle;
}

.dns-brand-name {
  font-weight: 500;
  color: #ffffff;
}

/* Mini Tag Badge */
.dns-tag-badge {
  display: none !important;
}

/* Setup Link for Unprotected */
.dns-setup-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.70rem;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ffffff !important;
  background: rgba(239, 68, 68, 0.35);
  border: 1px solid rgba(252, 165, 165, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none !important;
  margin-left: 4px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.dns-setup-btn:hover {
  background: rgba(239, 68, 68, 0.6);
  color: #ffffff !important;
  transform: scale(1.03);
}

.dns-status i.fa-rotate-right {
  cursor: pointer;
  color: #ffffff !important;
  opacity: 0.8;
  margin-left: 6px;
  font-size: 0.8rem;
  transition: opacity 0.2s, transform 0.3s;
}

.dns-status i.fa-rotate-right:hover {
  opacity: 1;
}

@keyframes spinOnce {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spin-once {
  animation: spinOnce 0.6s linear;
}

/* --------------------------------------------------------------------------
 *   STICKY MAIN NAVIGATION HEADER
 *   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #141026 !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: none !important;
  box-shadow: none !important;
  z-index: 999;
  padding: 8px 0 !important;
  margin: 4px 0 !important;
  transition: all 0.3s ease;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.top-info-inner,
.navbar-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Brand */
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Outfit', sans-serif !important;
  font-size: calc(1.55rem + 1px);
  font-weight: 400;
  color: #ffffff !important;
  letter-spacing: -0.5px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.nav-brand span {
  font-weight: 400 !important;
}

.nav-brand img {
  height: 25px !important;
  width: auto;
}

.nav-brand:hover {
  opacity: 0.95;
}

/* --------------------------------------------------------------------------
 *   NAVBAR & MENU (User Exact Design & Parity)
 *   -------------------------------------------------------------------------- */
.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu {
  list-style: none;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0;
  gap: 4px;
}

.menu li {
  position: relative;
  list-style: none;
}

.menu li a {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1rem;
  font-weight: 500;
  color: #d6e0f9 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
  padding: 0.5rem 0.9rem;
  line-height: 1.25;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .menu > li > a:hover {
    background: #2563eb !important;
    color: #ffffff !important;
  }
}

.menu li.active>a {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* Submenu Dropdown */
.submenu-wrapper {
  position: relative;
}

.submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 360px;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  background: #1e1b30 !important;
  border-radius: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 9999;
  list-style: none;
  padding: 0;
  margin: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.submenu-wrapper:hover .submenu,
.submenu-wrapper:focus-within .submenu,
.submenu-wrapper.open .submenu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.submenu li a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1rem 1.2rem !important;
  transition: background 0.3s ease !important;
  border-radius: 0 !important;
}

.submenu li a:hover {
  background: #2f2b47 !important;
}

.tool-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-info i {
  font-size: 1.4rem !important;
  color: #60a5fa !important;
  width: 24px;
  text-align: center;
}

.tool-title {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 600;
  color: #ffffff !important;
  font-size: 0.92rem;
  line-height: 1.2;
}

.tool-desc {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem;
  color: #94a3b8 !important;
  margin-top: 0.2rem;
  line-height: 1.2;
}

/* Badges */
.badge,
.submenu .badge {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: bold !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 9999px !important;
  text-transform: uppercase !important;
  border: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
}

.badge-hot,
.submenu .badge-hot {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.badge-new,
.submenu .badge-new {
  background: #10b981 !important;
  color: #ffffff !important;
}

.submenu-wrapper .fa-chevron-down {
  transition: transform 0.3s ease;
  margin-left: auto;
  font-size: 0.75rem;
}

.submenu-wrapper:hover .fa-chevron-down,
.submenu-wrapper.mega-hover .fa-chevron-down,
.submenu-wrapper.open .fa-chevron-down {
  transform: rotate(180deg);
}

/* Shared Icon Accent Tiles & Pill Badges (Desktop Mega-Menu & Mobile Submenu) */
.xp-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  flex-shrink: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.xp-icon--amber   { background: rgba(245, 158, 11, 0.13); border: 1px solid rgba(251, 191, 36, 0.28); color: #fbbf24; }
.xp-icon--emerald { background: rgba(16, 185, 129, 0.13); border: 1px solid rgba(52, 211, 153, 0.28); color: #34d399; }
.xp-icon--indigo  { background: rgba(99, 102, 241, 0.14); border: 1px solid rgba(129, 140, 248, 0.28); color: #818cf8; }
.xp-icon--violet  { background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.28); color: #c084fc; }
.xp-icon--cyan    { background: rgba(6, 182, 212, 0.13);  border: 1px solid rgba(34, 211, 238, 0.28); color: #22d3ee; }
.xp-icon--blue    { background: rgba(59, 130, 246, 0.13); border: 1px solid rgba(96, 165, 250, 0.28); color: #60a5fa; }
.xp-icon--rose    { background: rgba(244, 63, 94, 0.13);  border: 1px solid rgba(251, 113, 133, 0.28); color: #fb7185; }
.xp-icon--sky     { background: rgba(14, 165, 233, 0.13); border: 1px solid rgba(56, 189, 248, 0.28); color: #38bdf8; }
.xp-icon--orange  { background: rgba(249, 115, 22, 0.13); border: 1px solid rgba(251, 146, 60, 0.28); color: #fb923c; }

.xp-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
  flex-shrink: 0;
}

.xp-pill--new {
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.4);
  color: #fdba74;
}

.xp-pill--top {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

/* Hide desktop mega-menu on mobile; mobile <= 991px uses enhanced .submenu */
.xp-mega-menu {
  display: none;
}

/* Desktop-Only Enterprise Navigation Bar & Categorized Mega-Menu (Mobile <= 991px untouched) */
@media (min-width: 992px) {
  .site-header {
    background: rgba(14, 12, 30, 0.84) !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
    margin: 0 !important;
    padding: 4px 0 !important;
  }

  /* Refined floating glass capsule for top-level desktop links */
  .navbar > .menu {
    background: rgba(17, 23, 41, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 13px;
    padding: 5px;
    gap: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  }

  .navbar > .menu > li.submenu-wrapper {
    position: static;
  }

  .navbar > .menu > li > a {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    color: #cbd5e1 !important;
    padding: 0.48rem 0.9rem !important;
    border-radius: 9px !important;
    border: 1px solid transparent;
    gap: 0.45rem !important;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  }

  .navbar > .menu > li > a > i:first-child {
    font-size: 0.82rem;
    color: #94a3b8;
    transition: color 0.18s ease;
  }

  .navbar > .menu > li > a:hover,
  .navbar > .menu > li.submenu-wrapper:hover > a,
  .navbar > .menu > li.submenu-wrapper.mega-hover > a,
  .navbar > .menu > li.submenu-wrapper:focus-within > a {
    background: rgba(124, 98, 219, 0.14) !important;
    border-color: rgba(167, 139, 250, 0.28);
    color: #ffffff !important;
  }

  .navbar > .menu > li > a:hover > i:first-child,
  .navbar > .menu > li.submenu-wrapper:hover > a > i:first-child,
  .navbar > .menu > li.submenu-wrapper.mega-hover > a > i:first-child,
  .navbar > .menu > li.active > a > i:first-child {
    color: #a78bfa !important;
  }

  .navbar > .menu > li.active > a {
    background: linear-gradient(180deg, rgba(124, 98, 219, 0.22) 0%, rgba(79, 70, 229, 0.18) 100%) !important;
    border-color: rgba(167, 139, 250, 0.36);
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  /* Hide legacy vertical submenu on desktop; display rich categorized Mega-Menu instead */
  .submenu {
    display: none !important;
  }

  .xp-mega-menu {
    display: block;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.985);
    transform-origin: top center;
    width: min(860px, calc(100vw - 40px));
    background: rgba(11, 15, 27, 0.97);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    box-shadow:
      0 30px 70px -12px rgba(0, 0, 0, 0.85),
      0 0 0 1px rgba(124, 98, 219, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    z-index: 10000;
    overflow: visible;
    font-family: 'Outfit', sans-serif;
  }

  /* Invisible hover bridge so moving from TOOLS down into the Mega-Menu never drops hover */
  .xp-mega-menu::before {
    content: "";
    position: absolute;
    top: -28px;
    left: 0;
    right: 0;
    height: 28px;
  }

  .submenu-wrapper:hover .xp-mega-menu,
  .submenu-wrapper.mega-hover .xp-mega-menu,
  .submenu-wrapper:focus-within .xp-mega-menu,
  .submenu-wrapper.open .xp-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .xp-mega-accent-line {
    height: 2px;
    width: 100%;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, transparent 5%, rgba(167, 139, 250, 0.75) 35%, rgba(56, 189, 248, 0.7) 65%, transparent 95%);
  }

  .xp-mega-body {
    display: grid;
    grid-template-columns: 265px 1fr;
    min-height: 0;
  }

  .xp-mega-eyebrow {
    font-size: 0.69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .xp-mega-eyebrow i {
    color: #a78bfa;
    font-size: 0.72rem;
  }

  /* Left Featured Spotlight Column */
  .xp-mega-spotlight {
    padding: 18px 16px;
    background: linear-gradient(180deg, rgba(22, 29, 49, 0.72) 0%, rgba(13, 18, 32, 0.45) 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.11);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .xp-spotlight-card {
    display: block !important;
    padding: 13px 14px !important;
    border-radius: 14px !important;
    background: rgba(15, 21, 38, 0.85) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    text-decoration: none !important;
    transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  }

  .xp-spotlight--vault {
    background: linear-gradient(145deg, rgba(124, 98, 219, 0.14) 0%, rgba(249, 115, 22, 0.06) 100%) !important;
    border-color: rgba(167, 139, 250, 0.26) !important;
  }

  .xp-spotlight--yara {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(15, 21, 38, 0.9) 100%) !important;
    border-color: rgba(52, 211, 153, 0.22) !important;
  }

  .xp-spotlight--vault:hover,
  .xp-spotlight--vault.is-current {
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(124, 98, 219, 0.22) 0%, rgba(249, 115, 22, 0.1) 100%) !important;
    border-color: rgba(167, 139, 250, 0.6) !important;
    box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(167, 139, 250, 0.2);
  }

  .xp-spotlight--yara:hover,
  .xp-spotlight--yara.is-current {
    transform: translateY(-2px);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.18) 0%, rgba(15, 21, 38, 0.94) 100%) !important;
    border-color: rgba(52, 211, 153, 0.55) !important;
    box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(52, 211, 153, 0.2);
  }

  .xp-spotlight-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
  }

  .xp-spotlight-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.98rem;
  }

  .xp-pill {
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 3px 8px;
    border-radius: 999px;
  }

  .xp-pill--new {
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(251, 146, 60, 0.4);
    color: #fdba74;
  }

  .xp-pill--top {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #6ee7b7;
  }

  .xp-spotlight-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
  }

  .xp-spotlight-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.42;
    font-weight: 400;
    white-space: normal;
  }

  .xp-spotlight-trust {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.71rem;
    font-weight: 500;
    color: #94a3b8;
  }

  .xp-trust-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    flex-shrink: 0;
  }

  /* Right 2-Column Categorized Grid */
  .xp-mega-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 18px 14px;
  }

  .xp-mega-col {
    min-width: 0;
  }

  .xp-mega-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .xp-mega-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 9px 10px !important;
    border-radius: 11px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease !important;
  }

  .xp-mega-item:hover,
  .xp-mega-item.is-current {
    background: rgba(25, 34, 58, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
    transform: translateX(2px);
  }

  .xp-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    flex-shrink: 0;
    transition: transform 0.18s ease, border-color 0.18s ease;
  }

  .xp-mega-item:hover .xp-item-icon {
    transform: scale(1.05);
  }

  /* Distinct Refined Icon Color Accents */
  .xp-icon--amber   { background: rgba(245, 158, 11, 0.13); border: 1px solid rgba(251, 191, 36, 0.28); color: #fbbf24; }
  .xp-icon--emerald { background: rgba(16, 185, 129, 0.13); border: 1px solid rgba(52, 211, 153, 0.28); color: #34d399; }
  .xp-icon--indigo  { background: rgba(99, 102, 241, 0.14); border: 1px solid rgba(129, 140, 248, 0.28); color: #818cf8; }
  .xp-icon--violet  { background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.28); color: #c084fc; }
  .xp-icon--cyan    { background: rgba(6, 182, 212, 0.13);  border: 1px solid rgba(34, 211, 238, 0.28); color: #22d3ee; }
  .xp-icon--blue    { background: rgba(59, 130, 246, 0.13); border: 1px solid rgba(96, 165, 250, 0.28); color: #60a5fa; }
  .xp-icon--rose    { background: rgba(244, 63, 94, 0.13);  border: 1px solid rgba(251, 113, 133, 0.28); color: #fb7185; }
  .xp-icon--sky     { background: rgba(14, 165, 233, 0.13); border: 1px solid rgba(56, 189, 248, 0.28); color: #38bdf8; }
  .xp-icon--orange  { background: rgba(249, 115, 22, 0.13); border: 1px solid rgba(251, 146, 60, 0.28); color: #fb923c; }

  .xp-item-text {
    min-width: 0;
    flex: 1;
  }

  .xp-item-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .xp-mega-item:hover .xp-item-title {
    color: #ffffff;
  }

  .xp-item-desc {
    font-size: 0.73rem;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .xp-hover-arrow {
    font-size: 0.68rem;
    color: #a78bfa;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .xp-spotlight-card:hover .xp-hover-arrow,
  .xp-mega-item:hover .xp-hover-arrow {
    opacity: 1;
    transform: translateX(0);
  }

  /* Bottom Action Ribbon */
  .xp-mega-footer {
    padding: 11px 18px;
    background: rgba(8, 11, 21, 0.9);
    border-top: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 0 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .xp-mega-footer-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #94a3b8;
  }

  .xp-mega-footer-note i {
    color: #60a5fa;
  }

  .xp-mega-footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .xp-mega-quicklink {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    color: #cbd5e1 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    transition: all 0.16s ease !important;
  }

  .xp-mega-quicklink i {
    font-size: 0.68rem;
  }

  .xp-mega-quicklink:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    color: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
  }

  .xp-mega-quicklink--primary {
    background: rgba(124, 98, 219, 0.18) !important;
    border-color: rgba(167, 139, 250, 0.38) !important;
    color: #ddd6fe !important;
  }

  .xp-mega-quicklink--primary:hover {
    background: rgba(124, 98, 219, 0.3) !important;
    border-color: rgba(167, 139, 250, 0.65) !important;
    color: #ffffff !important;
  }
}

/* Mobile Hamburger Toggle Button — Modern Circular Style */
.toggle-btn {
  display: none;
  background: transparent;
  border: none;
  z-index: 1000;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-circle,
.toggle-btn .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  cursor: pointer;
}

.hamburger-circle:active,
.toggle-btn .icon:active {
  transform: scale(0.92);
}

.hamburger-line,
.toggle-btn .icon span {
  display: block !important;
  width: 18px !important;
  height: 2px !important;
  background: #ffffff !important;
  border-radius: 2px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-origin: center;
  margin: 0;
}

/* Middle bar is shorter and left-aligned with other bars like reference image */
.hamburger-line:nth-child(2),
.toggle-btn .icon span:nth-child(2) {
  width: 12px !important;
  align-self: flex-start;
  margin-left: 11px !important;
}

.toggle-btn.open .hamburger-line:nth-child(1),
.toggle-btn.open .icon span:nth-child(1),
.toggle-btn.active .hamburger-line:nth-child(1),
.toggle-btn.active .icon span:nth-child(1),
.icon.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg) !important;
  width: 18px !important;
  margin-left: 0 !important;
}

.toggle-btn.open .hamburger-line:nth-child(2),
.toggle-btn.open .icon span:nth-child(2),
.toggle-btn.active .hamburger-line:nth-child(2),
.toggle-btn.active .icon span:nth-child(2),
.icon.active span:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(0) !important;
}

.toggle-btn.open .hamburger-line:nth-child(3),
.toggle-btn.open .icon span:nth-child(3),
.toggle-btn.active .hamburger-line:nth-child(3),
.toggle-btn.active .icon span:nth-child(3),
.icon.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg) !important;
  width: 18px !important;
  margin-left: 0 !important;
}

/* --------------------------------------------------------------------------
 *   NAV ACTIONS (WEBAUTH BUTTON & WALLET DROPDOWN)
 *   -------------------------------------------------------------------------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-shrink: 0;
}

.btn-webauth,
#login-button {
  font-family: 'Outfit', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  height: 40px !important;
  background: linear-gradient(180deg, #1b243b 0%, #111827 100%) !important;
  border: 1px solid rgba(167, 139, 250, 0.36) !important;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  padding: 0 1.05rem !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  cursor: pointer !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

@media (hover: hover) and (pointer: fine) {
  .btn-webauth:hover,
  #login-button:hover {
    background: linear-gradient(180deg, #222d49 0%, #161f33 100%) !important;
    border-color: rgba(167, 139, 250, 0.62) !important;
    box-shadow: 0 10px 22px -6px rgba(15, 23, 42, 0.65), 0 0 0 1px rgba(124, 98, 219, 0.25) !important;
    transform: translateY(-1px);
  }
}

.btn-webauth:active,
#login-button:active {
  transform: scale(0.96);
}

.btn-webauth img,
#login-button img,
.btn-webauth .btn-wallet-icon,
#login-button .btn-wallet-icon {
  width: 1.12rem;
  height: 1.12rem;
  flex-shrink: 0;
  object-fit: contain;
  color: #a78bfa;
  transition: color 0.2s ease, transform 0.2s ease;
}

.btn-webauth i.fa-chevron-down,
#arrow {
  margin-left: 2px;
  font-size: 0.68rem;
  color: #c4b5fd;
  transition: transform 0.22s ease, color 0.2s ease;
}

#login-button.dropdown-open #arrow {
  transform: rotate(180deg);
}

#login-text {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Wallet Dropdown (Matched to Xprotect Wallet & Auth Modals) */
.wallet-dropdown,
#dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  width: 15.5rem;
  background: rgba(13, 18, 31, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(124, 98, 219, 0.14) !important;
  padding: 6px !important;
  overflow: hidden !important;
  display: none;
  z-index: 10000;
  font-family: 'Outfit', sans-serif !important;
}

.wallet-dropdown.show,
#dropdown.show {
  display: block !important;
  animation: walletDropdownFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.wallet-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.12);
  margin: 5px 6px;
}

.wallet-item {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 10px 12px !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: #e2e8f0 !important;
  border-bottom: none !important;
  border-radius: 10px !important;
  transition: background-color 0.16s ease, color 0.16s ease !important;
  text-decoration: none !important;
  cursor: pointer;
}

.wallet-user-header {
  cursor: default !important;
  font-weight: 600 !important;
  color: #c4b5fd !important;
  background: #161d2f !important;
  border: 1px solid rgba(167, 139, 250, 0.22) !important;
  margin-bottom: 5px !important;
  padding: 10px 12px !important;
  border-radius: 11px !important;
}

.wallet-user-icon {
  color: #a78bfa !important;
}

.wallet-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
}

.wallet-item.cursor-default,
.wallet-item[style*="cursor: default"] {
  cursor: default !important;
  color: #cbd5e1 !important;
}

.wallet-item:hover:not(.cursor-default):not([style*="cursor: default"]):not(.wallet-user-header) {
  background: rgba(124, 98, 219, 0.18) !important;
  color: #ffffff !important;
  cursor: pointer !important;
}

#logout-option:hover {
  background: rgba(248, 113, 113, 0.14) !important;
  color: #fca5a5 !important;
}

.wallet-item i {
  width: 18px;
  text-align: center;
  font-size: 0.92rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
 *   RESPONSIVE MOBILE STYLES (User Exact Spec)
 *   -------------------------------------------------------------------------- */
@media (max-width: 991px) {

  /* Site Header */
  .site-header {
    position: relative !important;
    top: auto !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.09) !important;
    box-shadow: none !important;
    background: rgba(14, 12, 30, 0.94) !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    padding: 0 !important;
  }

  /* Single-row header: [Logo] ............. [Wallet] [Hamburger] */
  .navbar-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    min-height: 70px !important;
    padding: 8px 16px !important;
    gap: 10px !important;
  }

  /* Logo - left side */
  .nav-brand {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 auto 0 0 !important;
    flex-shrink: 0 !important;
  }

  /* Wallet button area - second from right */
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    width: auto !important;
    position: relative !important;
    order: 2 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  /* Remove column-layout bottom margin; use compact padding and width capping on mobile */
  .btn-webauth,
  #login-button {
    margin-bottom: 0 !important;
    height: 36px !important;
    padding: 0 0.8rem !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    max-width: 150px !important;
    min-width: 0 !important;
    gap: 0.45rem !important;
  }

  #login-text {
    display: inline-block !important;
    max-width: 78px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  /* Wallet dropdown - align to right edge of button and cap within screen */
  .wallet-dropdown,
  #dropdown {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    max-width: calc(100vw - 24px) !important;
  }

  /* Navbar wrapper - strictly holds toggle + hidden menu without shrinking */
  .navbar {
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    order: 3 !important;
    flex-shrink: 0 !important;
  }

  /* Hamburger icon - far right, never pushed off-screen */
  .toggle-btn {
    display: block !important;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  .hamburger-circle,
  .toggle-btn .icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .toggle-btn.open .hamburger-circle,
  .toggle-btn.active .hamburger-circle,
  .toggle-btn.open .icon,
  .toggle-btn.active .icon {
    background: rgba(124, 98, 219, 0.18);
    border-color: rgba(167, 139, 250, 0.42);
    box-shadow: 0 0 0 1px rgba(124, 98, 219, 0.16);
  }

  /* Extra compact adjustments for very small screens (<= 380px) */
  @media (max-width: 380px) {
    .navbar-container {
      padding: 8px 10px !important;
      gap: 6px !important;
    }

    .nav-brand span {
      font-size: 1.35rem !important;
    }

    .btn-webauth,
    #login-button {
      height: 34px !important;
      max-width: 122px !important;
      padding: 0 0.6rem !important;
      border-radius: 9px !important;
      gap: 0.35rem !important;
      font-size: 12.5px !important;
    }

    #login-text {
      max-width: 56px !important;
    }

    #arrow {
      margin-left: 2px !important;
    }
  }

  /* Top-info bar layout on mobile */
  .top-info-bar {
    padding: 7px 0 !important;
  }

  .top-info-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 10px !important;
    gap: 8px !important;
  }

  .ip-display {
    display: none !important;
  }

  .dns-status {
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
  }

  .dns-status-pill {
    padding: 0 10px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    gap: 6px !important;
    font-size: 0.76rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .dns-status-text {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }

  .dns-tag-badge {
    display: none !important;
  }

  .dns-setup-btn {
    padding: 2.5px 7px !important;
    font-size: 0.65rem !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  /*
   * Menu panel: anchored directly to the bottom edge of .site-header (top: 100%),
   * natural full height (no inner scrollbar trap) so tapping TOOLS simply expands
   * downward in place and scrolling moves smoothly down through the entire website.
   */
  .menu {
    width: 100%;
    z-index: 1000;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 15, 27, 0.98) !important;
    backdrop-filter: blur(24px) saturate(165%);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 12px 14px !important;
    border-top: 1px solid rgba(167, 139, 250, 0.24);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0 0 20px 20px;
    box-shadow:
      0 28px 64px -12px rgba(0, 0, 0, 0.85),
      0 0 0 1px rgba(124, 98, 219, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    /* Smooth slide-down animation from bottom border of top header */
    transform-origin: top center;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.25s;
  }

  .menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.75) 35%, rgba(56, 189, 248, 0.7) 65%, transparent 100%);
    pointer-events: none;
  }

  .menu.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .menu > li:not(:last-child) {
    border-bottom: none !important;
  }

  .menu > li > a {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.035em !important;
    color: #cbd5e1 !important;
    justify-content: flex-start !important;
    padding: 0.68rem 0.85rem !important;
    border-radius: 12px !important;
    border: 1px solid transparent !important;
    gap: 0.75rem !important;
    background: transparent !important;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  }

  .menu > li > a > i:first-child {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.12);
    flex-shrink: 0;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  }

  .menu > li > a:active,
  .menu > li.submenu-wrapper.open > a {
    background: rgba(124, 98, 219, 0.14) !important;
    border-color: rgba(167, 139, 250, 0.28) !important;
    color: #ffffff !important;
  }

  .menu > li.active > a {
    background: linear-gradient(180deg, rgba(124, 98, 219, 0.22) 0%, rgba(79, 70, 229, 0.18) 100%) !important;
    border-color: rgba(167, 139, 250, 0.36) !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }

  .menu > li > a:active > i:first-child,
  .menu > li.submenu-wrapper.open > a > i:first-child,
  .menu > li.active > a > i:first-child {
    color: #c4b5fd !important;
    background: rgba(124, 98, 219, 0.2);
    border-color: rgba(167, 139, 250, 0.35);
  }

  .menu > li.submenu-wrapper > a .fa-chevron-down {
    color: #94a3b8;
    font-size: 0.72rem;
    margin-right: 2px;
    transform: rotate(0deg) !important;
  }

  .menu > li.submenu-wrapper.open > a .fa-chevron-down {
    color: #c4b5fd;
    transform: rotate(180deg) !important;
  }

  /* Recessed Dark Glass Accordion for TOOLS — expands smoothly in place with zero shift */
  .submenu,
  .submenu-wrapper:not(.open):hover .submenu,
  .submenu-wrapper:not(.open):focus-within .submenu {
    position: static !important;
    width: 100% !important;
    background: rgba(16, 22, 39, 0.82) !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12) !important;
    border-radius: 14px !important;
    border: none !important;
    transform: none !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column;
    gap: 3px;
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 6px !important;
    overflow: hidden !important;
    pointer-events: none;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, padding 0.22s ease, margin 0.22s ease !important;
  }

  .submenu-wrapper.open .submenu {
    max-height: 1100px !important;
    opacity: 1 !important;
    margin: 5px 0 3px !important;
    padding: 6px !important;
    overflow: hidden !important;
    pointer-events: auto;
  }

  .submenu li:not(:last-child),
  .submenu li:not(:last-child) a {
    border-bottom: none !important;
  }

  .submenu li a {
    padding: 9px 10px !important;
    border-radius: 11px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    gap: 10px !important;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease !important;
  }

  .submenu li a:hover,
  .submenu li a:active,
  .submenu li a.is-current {
    background: rgba(25, 34, 58, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
  }

  .tool-info {
    flex-direction: row !important;
    align-items: center !important;
    gap: 11px !important;
    text-align: left !important;
    min-width: 0;
    flex: 1;
  }

  /* Ensure colored icon inside .xp-item-icon keeps its accent color instead of legacy #60a5fa */
  .submenu .tool-info .xp-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .submenu .tool-info .xp-item-icon i {
    font-size: 0.92rem !important;
    color: inherit !important;
    width: auto !important;
  }

  .xp-mobile-tool-text {
    min-width: 0;
    flex: 1;
  }

  .submenu .tool-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.005em !important;
    color: #f1f5f9 !important;
    line-height: 1.25 !important;
  }

  .submenu .tool-desc {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.73rem !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    margin-top: 2px !important;
    line-height: 1.32 !important;
  }

  .xp-mobile-arrow {
    font-size: 0.68rem !important;
    color: #64748b !important;
    opacity: 0.65;
    flex-shrink: 0;
    transition: color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
  }

  .submenu li a:active .xp-mobile-arrow,
  .submenu li a.is-current .xp-mobile-arrow {
    color: #a78bfa !important;
    opacity: 1;
    transform: translateX(2px);
  }
}

/* --------------------------------------------------------------------------
 *   STRICT ANTI-UNDERLINE & HOVER PROTECTION FOR NAVBAR
 *   -------------------------------------------------------------------------- */
.top-info-bar a,
.top-info-bar a:hover,
.top-info-bar a:focus,
.site-header a,
.site-header a:hover,
.site-header a:focus,
.nav-menu a,
.nav-menu a:hover,
.nav-menu a:focus,
.menu a,
.menu a:hover,
.menu a:focus,
.submenu a,
.submenu a:hover,
.submenu a:focus,
.wallet-dropdown a,
.wallet-dropdown a:hover,
.wallet-dropdown a:focus {
  text-decoration: none !important;
}



/* --------------------------------------------------------------------------
 *   LIGHT / DARK THEME TOGGLE (header, next to WebAuth)
 *   -------------------------------------------------------------------------- */
.theme-toggle {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.theme-toggle:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.theme-toggle i { grid-area: 1 / 1; transition: transform 0.35s ease, opacity 0.25s ease; }
.theme-toggle .fa-sun { color: #fbbf24; }
.theme-toggle .fa-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
html[data-theme="light"] .theme-toggle .fa-sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
html[data-theme="light"] .theme-toggle .fa-moon { opacity: 1; transform: none; color: #4f46e5; }
@media (max-width: 991px) {
  .theme-toggle { width: 36px; height: 36px; border-radius: 10px; font-size: 0.88rem; }
  .nav-actions { gap: 8px !important; }
}
