.navbar {
  position: relative;
  margin: 15px auto 0 auto;
  width: 85%;
  z-index: 100;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    135deg,
    rgba(61, 115, 235, 0.3),
    rgba(222, 143, 255, 0.3)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  position: relative;
}

/* ===== УГЛОВЫЕ ЭЛЕМЕНТЫ НАВБАРА ===== */

.navbar-content::before,
.navbar-content::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid #000000;
  z-index: 2;
  pointer-events: none;
}

.navbar-content::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.navbar-content::after {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
}

.navbar-corner {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid #000000;
  z-index: 2;
  pointer-events: none;
}

.navbar-corner--bottom-left {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
}

.navbar-corner--bottom-right {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

/* ===== СТРУКТУРА НАВБАРА ===== */
.navbar__left {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.navbar__center {
  display: flex;
  gap: 32px;
  align-items: center;
}

.navbar__right {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ===== ЛОГОТИП ===== */
.logo {
  height: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
}

.logo--desktop {
  display: block;
}

.logo--mobile {
  display: none;
}

.logo:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.navbar__left::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  background-image: url("images/logo2.svg");
  pointer-events: none;
}

/* ===== НАВИГАЦИЯ ===== */
.nav-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link--active {
  color: #1f2937;
  font-weight: 600;
}

.nav-link:hover {
  color: #1f2937;
}

/* ===== КНОПКИ ===== */
.btn-login,
.btn-signup {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  border-radius: 0;
  white-space: nowrap;
  width: 90px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
}

.btn-login {
  display: block;
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  text-decoration: none;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #1f2937;
}

.btn-signup {
  display: block;
  background: linear-gradient(30deg, #3d73eb, #de8fff);
  border: none;
  color: white;
  font-weight: 600;
  text-decoration: none;
}

.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* ===== УГЛОВЫЕ ЭЛЕМЕНТЫ КНОПОК ===== */

.btn-login::before,
.btn-login::after,
.btn-signup::before,
.btn-signup::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid #000000;
  z-index: 3;
  pointer-events: none;
}

.btn-login::before,
.btn-signup::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.btn-login::after,
.btn-signup::after {
  top: -1px;
  right: -1px;
  border-left: none;
  border-bottom: none;
}

.btn-login-corners,
.btn-signup-corners {
  position: relative;
  display: inline-block;
}

.btn-login-corners::before,
.btn-login-corners::after,
.btn-signup-corners::before,
.btn-signup-corners::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid #000000;
  z-index: 3;
  pointer-events: none;
}

.btn-login-corners::before,
.btn-signup-corners::before {
  bottom: -1px;
  left: -1px;
  border-right: none;
  border-top: none;
}

.btn-login-corners::after,
.btn-signup-corners::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

/* ===== МОБИЛЬНАЯ КНОПКА ===== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #1f2937;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid #000000;
  z-index: 3;
  pointer-events: none;
}

.mobile-menu-toggle::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.mobile-menu-toggle::after {
  top: -1px;
  right: -1px;
  border-left: none;
  border-bottom: none;
}

.mobile-menu-toggle-corners {
  position: relative;
  display: none;
}

.mobile-menu-toggle-corners::before,
.mobile-menu-toggle-corners::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid #000000;
  z-index: 3;
  pointer-events: none;
}

.mobile-menu-toggle-corners::before {
  bottom: -1px;
  left: -1px;
  border-right: none;
  border-top: none;
}

.mobile-menu-toggle-corners::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    rgba(61, 115, 235, 0.3),
    rgba(222, 143, 255, 0.3)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px;
  z-index: 50;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.mobile-menu.mobile-menu--open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.mobile-menu .nav-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 500;
}

.mobile-menu .nav-link:last-child {
  border-bottom: none;
}

.mobile-menu .nav-link:hover {
  color: #ffffff;
  opacity: 0.8;
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-auth-buttons .btn-login-corners,
.mobile-auth-buttons .btn-signup-corners {
  width: 100%;
}

.mobile-auth-buttons .btn-login,
.mobile-auth-buttons .btn-signup {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
}

/* ===== СОСТОЯНИЯ ===== */
.navbar.menu-open .mobile-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navbar.menu-open .mobile-menu-toggle {
  background: rgba(255, 255, 255, 0.3);
}

.mobile-menu-toggle.active svg line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  transition: transform 0.3s ease;
}

.mobile-menu-toggle.active svg line:nth-child(2) {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-toggle.active svg line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  transition: transform 0.3s ease;
}

/* ===== АДАПТИВНЫЕ БРЕЙКПОИНТЫ ===== */

@media (max-width: 1600px) {
  .navbar {
    width: 95%;
  }
}

@media (max-width: 1400px) {
  .navbar {
    width: 100%;
  }
  .navbar__center {
    gap: 20px;
  }
}

@media (max-width: 1200px) {
  .navbar {
    width: 100%;
  }
  .navbar-content {
    padding: 12px 12px;
  }
  .navbar__center {
    gap: 14px;
  }
  .navbar__right {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .btn-login,
  .btn-signup {
    padding: 6px 12px;
    font-size: 13px;
    width: 80px;
    min-width: 60px;
  }
}

@media (max-width: 1000px) {
  .navbar {
    width: 98%;
  }
  .navbar-content {
    padding: 12px 20px;
    min-height: 60px;
  }
  .navbar__center {
    gap: 16px;
  }

  .navbar__right {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .logo--desktop {
    display: none;
  }
  .logo--mobile {
    display: block;
    animation: logoFadeIn 0.5s ease;
    height: 32px;
    max-width: 140px;
  }

  .navbar-content::before,
  .navbar-content::after,
  .navbar-corner {
    width: 12px;
    height: 12px;
  }
  .btn-login::before,
  .btn-login::after,
  .btn-signup::before,
  .btn-signup::after,
  .btn-login-corners::before,
  .btn-login-corners::after,
  .btn-signup-corners::before,
  .btn-signup-corners::after {
    width: 6px;
    height: 6px;
  }
  .btn-login,
  .btn-signup {
    padding: 5px 8px;
    font-size: 12px;
    width: 65px;
    min-width: 55px;
  }
}

@media (max-width: 950px) {
  .navbar-content {
    padding: 12px 16px;
    min-height: 50px;
  }

  .navbar__center {
    display: none !important;
  }
  .navbar__right .btn-login-corners,
  .navbar__right .btn-signup-corners {
    display: none !important;
  }

  .mobile-menu-toggle-corners {
    display: block !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }

  .navbar-content::before,
  .navbar-content::after,
  .navbar-corner {
    width: 10px;
    height: 10px;
  }

  .logo--desktop {
    display: block;
    animation: logoFadeIn 0.5s ease;
    height: 32px;
    max-width: 140px;
  }
  .logo--mobile {
    display: none;
  }
}

@media (max-width: 700px) {
  .logo--mobile {
    height: 28px;
    max-width: 120px;
  }
}

@media (max-width: 600px) {
  .navbar-content {
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .navbar {
    width: 98%;
  }
  .logo--mobile {
    height: 26px;
    max-width: 100px;
  }
  .navbar-content::before,
  .navbar-content::after,
  .navbar-corner {
    width: 8px;
    height: 8px;
    border-width: 1px;
  }
  .mobile-menu-toggle::before,
  .mobile-menu-toggle::after,
  .mobile-menu-toggle-corners::before,
  .mobile-menu-toggle-corners::after {
    width: 4px;
    height: 4px;
  }
  .mobile-auth-buttons .btn-login,
  .mobile-auth-buttons .btn-signup {
    font-size: 14px;
    padding: 12px 16px;
    min-height: 40px;
  }
}

@media (max-width: 360px) {
  .navbar-content {
    padding: 8px 12px;
  }
  .mobile-menu {
    padding: 12px;
  }
  .logo--mobile {
    height: 22px;
    max-width: 80px;
  }
  .navbar-content::before,
  .navbar-content::after,
  .navbar-corner,
  .mobile-menu-toggle::before,
  .mobile-menu-toggle::after,
  .mobile-menu-toggle-corners::before,
  .mobile-menu-toggle-corners::after {
    width: 3px;
    height: 3px;
    border-width: 1px;
  }
  .mobile-auth-buttons .btn-login,
  .mobile-auth-buttons .btn-signup {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 36px;
  }
}

.btn-login:hover::before,
.btn-login:hover::after,
.btn-signup:hover::before,
.btn-signup:hover::after,
.btn-login-corners:hover::before,
.btn-login-corners:hover::after,
.btn-signup-corners:hover::before,
.btn-signup-corners:hover::after {
  border-color: #333333;
}

.mobile-menu-toggle:focus,
.nav-link:focus,
.btn-login:focus,
.btn-signup:focus {
}

@media (hover: none) and (pointer: coarse) {
  .btn-login:hover,
  .btn-signup:hover,
  .mobile-menu-toggle:hover {
    transform: none;
    box-shadow: none;
  }
  .logo:hover {
    transform: none;
    filter: none;
  }
  .btn-login:active {
    background: rgba(255, 255, 255, 0.3);
  }
  .btn-signup:active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo--desktop,
  .logo--mobile {
    transition: none;
  }
  .logo:hover {
    transform: none;
    filter: none;
  }
  @keyframes logoFadeIn {
    from,
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media print {
  .navbar {
    display: none !important;
  }
}
