.menu {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff80;
  font-size: 16px;
  transition: color 0.22s ease;
}

.menu i {
  pointer-events: none;
  transition: transform 0.3s ease;
}

.menu:hover {
  color: var(--white);
}

.menu:hover i {
  transform: scale(1.15);
}

/* Блур для сайдбара (аналог blur__up) */
.sidebar-blur {
  display: none; /* Скрыт по умолчанию */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 22%;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  mask-image:
    radial-gradient(ellipse 120% 100% at 50% 100%, transparent 0%, transparent 35%, rgba(0,0,0,1) 70%),
    linear-gradient(to top, transparent 0%, rgba(0,0,0,1) 100%);
  -webkit-mask-image:
    radial-gradient(ellipse 120% 100% at 50% 100%, transparent 0%, transparent 35%, rgba(0,0,0,1) 70%),
    linear-gradient(to top, transparent 0%, rgba(0,0,0,1) 100%);
}

/* Фиксированный заголовок сайдбара (аналог .card .heading) */
.sidebar-header {
  display: none; /* Скрыт по умолчанию */
  position: sticky;
  top: 0;
  z-index: 10;

  transition: background 0.3s ease;
  overflow: hidden;
  min-height: 72px;
      padding-left: var(--xxl);
    padding-right: var(--xxl);
    display: flex
;
    align-items: center;


}

/* Создаем слой с градиентным размытием для заголовка */
.sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  mask: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 0) 100%);
  -webkit-mask: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 0) 100%);
  z-index: -1;
}

/* Обеспечиваем корректное отображение контента заголовка */
.sidebar-header > * {
  position: relative;
  z-index: 1;
}

/* Padding классы для сайдбара */
.sidebar-padding {
  padding: var(--xxl);
}

.sidebar-padding-left {
  padding-left: var(--xxl);
}

.sidebar-padding-right {
  padding-right: var(--xxl);
}

.sidebar-logo {
  display: flex;
  align-items: center;
}

.sidebar-logo-img {
  max-width: 100px;
  height: auto;
  filter: brightness(1) contrast(1);
}

/* Кнопка закрытия сайдбара использует общие стили btn--round без переопределений */

.sidebar-close i {
  pointer-events: none;
}

/* Показываем элементы только на мобильных устройствах */
@media (max-width: 768px) {
  .sidebar-blur.mobile-only,
  .sidebar-header.mobile-only {
    display: block;
  }
  
  .sidebar-header.mobile-only {
display: flex
;
        justify-content: space-between;
        align-items: center;
  }
}


.sidebar {
  overflow-y: auto;
  flex-shrink: 0;
  position: sticky;
  align-self: stretch;
  height: 100vh;
  display: flex;
  flex-direction: column;
  width: 0;
  opacity: 0;
  transform: translateY(40px) scale(0.96) rotateX(8deg) skewY(2deg);
  filter: blur(12px) brightness(0.7) grayscale(0.2);
  transition: width 0.5s cubic-bezier(0.77,0,0.175,1),
    opacity 0.5s cubic-bezier(0.77,0,0.175,1),
    transform 0.7s cubic-bezier(0.77,0,0.175,1),
    filter 0.6s cubic-bezier(0.77,0,0.175,1);
  pointer-events: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
  top: 10%;
  height: 80vh;
  bottom: 10%;
  justify-content: flex-start;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

}

.sidebar::-webkit-scrollbar {
  display: none;
}

body.menu-open .sidebar {
  width: 100%;
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0) skewY(0);
  filter: blur(0) brightness(1) grayscale(0);
  pointer-events: auto;
}

/* Принудительная перерисовка содержимого сайдбара */
body.menu-open .sidebar * {
  transform: translateZ(0);
}

.sidebar a, .sidebar span {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sidebar .title {
  text-align: left;
}

.sidebar a {
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.sidebar a:hover {
  opacity: 1;
  color: var(--white);
}

.sidebar a.active {
  color: #00ecff;
  font-weight: 700;
  background: linear-gradient(90deg, #00ecff22 0%, #00ecff09 100%);
  border-radius: 8px;
  box-shadow: 0 2px 16px #00ecff22;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}



@media (min-width: 300px) and (max-width: 576px) {
  /* Открываем .aside при активном меню */
  body.menu-open .aside {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    z-index: 10002;
  }

  .sidebar {
    z-index: 998;
    opacity: 0;
    transform: translateY(40px) scale(0.96) rotateX(8deg) skewY(2deg);
    filter: blur(12px) brightness(0.7) grayscale(0.2);
    transition:
      opacity 0.55s cubic-bezier(0.77,0,0.175,1),
      transform 0.7s cubic-bezier(0.77,0,0.175,1),
      filter 0.6s cubic-bezier(0.77,0,0.175,1);
    top: 0%;
    height: 100vh;
    overflow: auto;
    bottom: 0%;
    overflow-x: visible;
    background: rgba(0, 13, 12, 0.85);
    z-index: 999;
    position: absolute;

    backdrop-filter: blur(5px);
 
    position: fixed;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  /* Открываем .aside при активном меню */
  body.menu-open .aside {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    z-index: 10002;
  }

  .sidebar {
    z-index: 998;
    opacity: 0;
    transform: translateY(40px) scale(0.96) rotateX(8deg) skewY(2deg);
    filter: blur(12px) brightness(0.7) grayscale(0.2);
    transition:
      opacity 0.55s cubic-bezier(0.77,0,0.175,1),
      transform 0.7s cubic-bezier(0.77,0,0.175,1),
      filter 0.6s cubic-bezier(0.77,0,0.175,1);
    top: 0%;
    height: 100vh;
    overflow: auto;
    bottom: 0%;
    overflow-x: visible;
    background: rgba(0, 13, 12, 0.85);
    z-index: 990;
    position: absolute;
    padding: 24px;
    backdrop-filter: blur(5px);
    padding-top: 10%;
    position: fixed;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Открываем .aside при активном меню */
  body.menu-open .aside {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    z-index: 10002;
  }

  .sidebar {
    z-index: 998;
    opacity: 0;
    transform: translateY(40px) scale(0.96) rotateX(8deg) skewY(2deg);
    filter: blur(12px) brightness(0.7) grayscale(0.2);
    transition:
      opacity 0.55s cubic-bezier(0.77,0,0.175,1),
      transform 0.7s cubic-bezier(0.77,0,0.175,1),
      filter 0.6s cubic-bezier(0.77,0,0.175,1);
    top: 0%;
    height: 100vh;
    overflow: auto;
    bottom: 0%;
    overflow-x: visible;
    background: rgba(0, 13, 12, 0.85);
    z-index: 990;
    position: absolute;
    padding: 24px;
    backdrop-filter: blur(5px);
    padding-top: 10%;
    position: fixed;
  }
}



@media (min-width: 300px) and (max-width: 576px) {
  .sidebar {}

}
@media (min-width: 577px) and (max-width: 768px) {
    .sidebar {
              padding: 0;
        left: 0;
    }
}


@media (min-width: 769px) and (max-width: 1024px){
    .sidebar {
              padding: 0;
        left: 0;
    }
        .sidebar-header.mobile-only {
              display: flex
;
        justify-content: space-between;
          }
    

    .sidebar-header.mobile-only {
              display: flex
;
        justify-content: space-between;
          }

}
@media (min-width: 1024px) {
    .sidebar {
        padding: 0;
        left: 0;
    }
        .sidebar-header.mobile-only {
                  display: flex
;
        justify-content: space-between;
          }
}


@media (min-width: 1025px) {
    .sidebar {
        padding: 0;
        left: 0;
    }
        .sidebar-header.mobile-only {
                  display: none
;
}

.mobilesidebar {
  padding-left: 0;
  padding-right: 0;
}}


