.navbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: min(360px, calc(100% - 28px));
  padding: 6px 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -40%, rgba(255, 98, 98, 0.22), transparent 60%),
    linear-gradient(145deg, rgba(36, 0, 0, 0.62), rgba(12, 0, 0, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.42),
    0 0 30px rgba(255, 40, 40, 0.18),
    inset 0 1px 3px rgba(255, 255, 255, 0.09);
  z-index: 120;
  -webkit-tap-highlight-color: transparent;
  animation: fadeInNav 0.25s ease-out forwards;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.navbar.is-hidden {
  opacity: 0;
  transform: translate(-50%, 120%);
  pointer-events: none;
  visibility: hidden;
}

.nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  background: none;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.nav-btn img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.nav-btn span {
  font-size: 13px;
  letter-spacing: 0.3px;
}

.nav-btn:hover {
  color: rgba(255, 255, 255, 0.96);
}

.nav-btn:hover img {
  opacity: 1;
  transform: scale(1.04);
}

/* Активное состояние без подсветки — оставляем только смену иконки */
.nav-btn.active {
  background: none;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.nav-btn.active img {
  opacity: 0.9;
  transform: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.nav-btn:active {
  transform: translateY(1px);
}

@keyframes fadeInNav {
  from { opacity: 0; transform: translate(-50%, 22px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 480px) {
  .navbar {
    width: calc(100% - 20px);
    padding: 6px 18px;
    border-radius: 24px;
  }

  .nav-btn {
    gap: 4px;
    padding: 8px 6px;
  }

  .nav-btn img {
    width: 30px;
    height: 30px;
  }

  .nav-btn span {
    font-size: 12px;
  }
}

