.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background: rgba(93, 93, 93, 0.24);
  border-bottom: 1px solid rgba(84, 84, 84, 0.4);
  z-index: 10;
}

.nav-left {
  margin-left: -40px;
}

.nav-center {
  display: flex;
  gap: 40px;
}

.nav-center a {
  color: white;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  transition: 0.3s ease;
}

.nav-center a:hover {
  opacity: 0.8;
}

.nav-right {
  position: absolute;
  right: 5%;
  font-size: 17px;
  font-weight: 500;
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 18px;
  text-decoration: none;
  color: white;
  transition: 0.2s ease;
}

.nav-right .account-btn:hover {
  opacity: 0.8;
}

.account-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) inset;
}

.account-menu {
  min-width: 220px;
  padding: 8px;
  border-radius: 18px;
  margin-top: 10px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  background: rgba(93, 93, 93, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.account-menu.account-menu--floating {
  position: fixed;
  z-index: 9999;
}

.account-menu.account-menu--floating::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: rgba(93, 93, 93, 0.22);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 14px;
  transition: 0.18s ease;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-item:active {
  transform: scale(0.985);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) inset;
}

.menu-item.danger {
  color: rgba(255, 140, 140, 0.95);
}

.menu-item.danger:hover {
  background: rgba(255, 90, 90, 0.1);
}

#accountChevron {
  display: none;
}

.account-wrap.is-auth #accountChevron {
  display: inline-block;
}

.account-wrap.is-loading #accountName,
.account-wrap.is-loading #accountIcon,
.account-wrap.is-loading #accountChevron {
  visibility: hidden;
}

/* ===== Mobile drawer nav (no HTML changes) ===== */
:root {
  --nav-h: 60px;
  --drawer-w: 88vw;      /* почти весь экран */
  --drawer-max: 420px;   /* чтобы на больших телефонах не было «простыни» */
}

.nav-left .nav-burger {
  display: none;
}

/* Мобильная шапка: скрываем центр, показываем бургер */
@media (max-width: 768px) {
  .nav-center {
    display: none;
  }

  .nav-left {
    position: absolute;
    left: 5%;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-left .nav-burger {
    display: inline-flex;
  }
}

/* Кнопка-бургер */
.nav-burger {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.nav-burger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-burger:active {
  transform: scale(0.96);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) inset;
}

.nav-burger i {
  font-size: 20px;
}

/* Блокировка прокрутки при открытом меню */
body.is-nav-locked {
  overflow: hidden;
  touch-action: none;
}

/* Размытый слой (только под хедером — чтобы справа кнопка аккаунта оставалась кликабельной) */
#mobileDrawerBackdrop {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 9990;
}

#mobileDrawerBackdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Само выезжающее меню слева */
#mobileDrawer {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: min(var(--drawer-w), var(--drawer-max));
  transform: translateX(-105%);
  transition: transform 0.22s ease;
  z-index: 9991;

  padding: 16px 14px;
  overflow: auto;

  border-radius: 0 22px 22px 0;
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  background: rgba(93, 93, 93, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

#mobileDrawer.is-open {
  transform: translateX(0);
}

#mobileDrawer .drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 12px 4px;
}

#mobileDrawer .drawer-title {
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

#mobileDrawer .drawer-close {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
}

#mobileDrawer .drawer-close:hover {
  background: rgba(255, 255, 255, 0.10);
}

#mobileDrawer .drawer-close:active {
  transform: scale(0.96);
}

/* Ссылки внутри меню */
#mobileDrawer .drawer-links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: 0.18s ease;
}

#mobileDrawer .drawer-links a:hover {
  background: rgba(255, 255, 255, 0.08);
}

#mobileDrawer .drawer-links a:active {
  transform: scale(0.985);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) inset;
}

/* Уважение к настройкам “уменьшить анимацию” */
@media (prefers-reduced-motion: reduce) {
  #mobileDrawer,
  #mobileDrawerBackdrop {
    transition: none;
  }
}
/* Улучшаем компоновку внутри drawer */
#mobileDrawer {
  padding: 14px 14px 18px;
}

/* “Ручка” сверху — без текста, просто визуально */
#mobileDrawer .drawer-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  margin: 10px auto 14px;
  background: rgba(255, 255, 255, 0.18);
}

/* Нормальная сетка ссылок + промежутки */
#mobileDrawer .drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

/* Чуть более “карточные” пункты */
#mobileDrawer .drawer-links a {
  padding: 14px 14px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.2;
}

/* Чтобы не было ощущения “всё липнет к краям” на iPhone */
#mobileDrawer {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
