/* NAVBAR — same structure as Nabble: fixed top bar, fixed bottom tab bar */
.custom-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--navbar-height) + var(--safe-top));
  padding-top: var(--safe-top);
  background-color: var(--colorNavy);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  z-index: 10001;
  transform: translate3d(0, 0, 0);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--navbar-height);
  padding: 0 var(--uni_margin);
}

.nav-left,
.nav-center,
.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-left { justify-content: flex-start; }
.nav-center { justify-content: center; }
.nav-right { justify-content: flex-end; padding-right: 50px; }

.navbar-brand { margin: 0; display: flex; }

#logo {
  height: 36px;
  width: auto;
}

.navbar-toggler {
  border: none;
  outline: none;
  background: none;
  padding: 10px 4px;
  cursor: pointer;
}

.nav-button {
  border: none;
  background: var(--colorBlue);
  color: var(--colorWhite);
  border-radius: var(--uniRadius);
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 200ms ease-out;
}

.nav-button:active { transform: scale(0.94); transition: transform 80ms ease-in; }

/* Avatar overlays the right edge, as in Nabble */
#avatar {
  position: absolute;
  right: var(--uni_margin);
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

#avatar .avatar {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

/* Bottom bar: Account | Nearby | + | History | Stats */
.navbot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--navbar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 -1px 0 rgba(20, 31, 58, 0.08), 0 -4px 20px rgba(20, 31, 58, 0.06);
  z-index: 10001;
}

.nav-col {
  display: flex;
  align-items: stretch;
  height: var(--navbar-height);
}

.nav-link-bottom {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--colorMuted);
  cursor: pointer;
  line-height: 1;
  touch-action: manipulation;
  transition: color 150ms ease-out;
}

.nav-link-bottom i { font-size: 1.15rem; }
.nav-link-bottom span { font-size: 12px; font-weight: 600; }

.nav-link-bottom.nav-link-selected {
  color: var(--colorBlue);
}

.nav-link-bottom.nav-link-selected span { font-weight: 800; }

/* Centre "+" challenge button, raised above the bar */
.nav-col-plus {
  justify-content: center;
  align-items: center;
}

.nav-plus {
  width: 58px;
  height: 58px;
  margin-top: -26px;
  border-radius: 50%;
  border: 4px solid var(--colorBg);
  background: linear-gradient(90deg, var(--colorBlue) 0 50%, var(--colorRed) 50% 100%);
  color: var(--colorWhite);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(20, 31, 58, 0.25);
  cursor: pointer;
  transition: transform 200ms ease-out;
  touch-action: manipulation;
}

.nav-plus:active { transform: scale(0.92); transition: transform 80ms ease-in; }
.nav-plus.nav-link-selected { box-shadow: 0 0 0 3px var(--colorNavy), 0 6px 16px rgba(20, 31, 58, 0.25); }
