html,
body {
  font-family: var(--main-font);
}

:root {
  --nav-h: 78px;
  --nav-wrap-w: min(1280px, calc(100% - 40px));

  --nav-bg: rgba(12, 12, 16, 0.8);
  --nav-bg-strong: rgba(15, 15, 19, 0.96);
  --nav-border: rgba(255, 255, 255, 0.08);

  --nav-text: rgba(255, 255, 255, 0.96);
  --nav-text-soft: rgba(255, 255, 255, 0.74);
  --nav-text-muted: rgba(255, 255, 255, 0.5);

  --nav-accent: #3be22e;
  --nav-accent-dark: #30b129;

  --nav-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --nav-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.nav-lock {
  overflow: hidden;
}

.navbar-shell {
  position: relative;
  z-index: 99999;
}

.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--nav-wrap-w);
  height: var(--nav-h);
  padding: 0 18px;

  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;

  z-index: 99999;
  isolation: isolate;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 22px;
  box-shadow: var(--nav-shadow);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  overflow: visible;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(
      60% 80% at 50% 0%,
      rgba(48, 177, 41, 0.035),
      rgba(48, 177, 41, 0) 62%
    );
  opacity: 0.9;
}

.nav-left,
.nav-center,
.nav-right {
  position: relative;
  z-index: 2;
}

.nav-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.nav-brandWrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--nav-text);
  min-width: 0;
}

.nav-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-brandText {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  line-height: 1.05;
}

.nav-brand-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(48, 177, 41, 0.1);
  border: 1px solid rgba(48, 177, 41, 0.16);
  color: rgba(48, 177, 41, 0.96);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-brand-main {
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.nav-link,
.nav-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--nav-text-soft);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--main-font);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;

  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.nav-link:hover,
.nav-dropdown-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.nav-link::after,
.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(59, 226, 46, 0.92),
    rgba(48, 177, 41, 0.72)
  );
  opacity: 0;
  transform: scaleX(0.7);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  pointer-events: none;
}

.nav-link:hover::after,
.nav-dropdown-toggle:hover::after {
  opacity: 0.35;
  transform: scaleX(1);
}

.nav-link-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.nav-link-active::after {
  opacity: 0.85;
  transform: scaleX(1);
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 100000;
  flex-shrink: 0;
  overflow: visible;
}

.nav-dropdown-toggle {
  white-space: nowrap;
}

.nav-dropdown-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.78);
  margin-top: 1px;
  transition:
    transform 0.18s ease,
    border-top-color 0.18s ease,
    opacity 0.18s ease;
  opacity: 0.9;
}

.nav-dropdown-toggle:hover .nav-dropdown-caret {
  border-top-color: var(--nav-accent);
}

.nav-dropdown-caret.open {
  transform: rotate(180deg);
  border-top-color: var(--nav-accent);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -4px;
  min-width: 220px;
  padding: 8px;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    var(--nav-bg-strong);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  box-shadow: var(--nav-shadow-lg);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0.14s ease;
  z-index: 100001;
}

.nav-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.12s ease,
    transform 0.12s ease,
    border-color 0.12s ease;
}

.nav-dropdown-item:hover {
  background: rgba(48, 177, 41, 0.08);
  border-color: rgba(48, 177, 41, 0.14);
  transform: translateY(-1px);
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: max-content;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-btn,
.nav-btn:link,
.nav-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--nav-border);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--main-font);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
}

.nav-btn--soft,
.nav-btn--soft:link,
.nav-btn--soft:visited {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nav-border);
  color: rgba(255, 255, 255, 0.94);
}

.nav-btn--soft:hover,
.nav-btn--soft:active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(48, 177, 41, 0.18);
  color: #fff;
}

.nav-btn--accent,
.nav-btn--accent:link,
.nav-btn--accent:visited {
  background: linear-gradient(135deg, #3be22e, #30b129);
  border: 1px solid rgba(48, 177, 41, 0.28);
  color: #fff;
  box-shadow: 0 8px 18px rgba(234, 88, 12, 0.16);
}

.nav-btn--accent:hover,
.nav-btn--accent:active {
  background: linear-gradient(135deg, #3be22e, #30b129);
  border-color: rgba(48, 177, 41, 0.34);
  color: #fff;
  box-shadow: 0 12px 22px rgba(234, 88, 12, 0.2);
}

.nav-profile {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 100000;
  flex-shrink: 0;
}

.nav-profile-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.nav-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(48, 177, 41, 0.72);
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

.nav-profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 190px;
  padding: 8px;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    var(--nav-bg-strong);
  border: 1px solid var(--nav-border);
  border-radius: 16px;
  box-shadow: var(--nav-shadow-lg);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0.14s ease;
  z-index: 100001;
}

.nav-profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-profile-item {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.12s ease,
    transform 0.12s ease,
    border-color 0.12s ease;
}

.nav-profile-item:hover {
  background: rgba(48, 177, 41, 0.08);
  border-color: rgba(48, 177, 41, 0.14);
  transform: translateY(-1px);
}

.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--nav-border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  color: rgba(255, 255, 255, 0.92);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.nav-burger:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(48, 177, 41, 0.16);
}

.nav-burger-icon {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto;
}

.nav-burger-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.nav-burger.is-open .nav-burger-icon .line1 {
  transform: translateY(5px) rotate(45deg);
}

.nav-burger.is-open .nav-burger-icon .line2 {
  opacity: 0;
}

.nav-burger.is-open .nav-burger-icon .line3 {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: 100002;
  display: flex;
  justify-content: flex-end;
}

.nav-mobile[hidden] {
  display: none !important;
}

.nav-mobile-panel {
  width: min(86vw, 360px);
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(14, 14, 18, 0.98);
  border-left: 1px solid var(--nav-border);
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.42);
  padding: 14px 14px 18px;
  overflow-y: auto;
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.nav-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.nav-mobile-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile-brand-kicker {
  color: rgba(48, 177, 41, 0.95);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.nav-mobile-brand-main {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.nav-mobile-close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 6px 0;
}

.nav-mobile-link,
.nav-mobile-sublink {
  display: block;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.94);
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 0.92rem;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}

.nav-mobile-link--accent {
  background: rgba(48, 177, 41, 0.12);
  border-color: rgba(48, 177, 41, 0.22);
}

.nav-mobile-sublink {
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.nav-mobile-link:hover,
.nav-mobile-sublink:hover {
  border-color: rgba(48, 177, 41, 0.22);
  background: rgba(48, 177, 41, 0.08);
  transform: translateY(-1px);
}

.nav-mobile-acc {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-family: var(--main-font);
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 0.92rem;
}

.nav-mobile-caret {
  opacity: 0.8;
}

.nav-mobile-sub {
  display: grid;
  gap: 10px;
  padding-left: 10px;
}

.nav-mobile-sub[hidden] {
  display: none !important;
}

.nav-mobile-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 6px;
}

@media (max-width: 1180px) {
  .nav-center {
    gap: 2px;
  }

  .nav-link,
  .nav-dropdown-toggle {
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .nav-btn {
    padding: 0 10px;
    font-size: 0.7rem;
  }
}

@media (max-width: 980px) {
  :root {
    --nav-h: 72px;
  }

  .navbar {
    width: min(100% - 24px, 1240px);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-center {
    display: none;
  }

  .nav-actions {
    display: none !important;
  }

  .nav-profile {
    display: none;
  }

  .nav-right {
    gap: 10px;
    min-width: auto;
  }

  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-logo {
    width: 42px;
    height: 42px;
  }

  .nav-brand-main {
    font-size: 0.9rem;
    max-width: 52vw;
  }

  .nav-brand-kicker {
    font-size: 0.62rem;
    max-width: 52vw;
  }
}

@media (max-width: 650px) {
  :root {
    --nav-h: 68px;
  }

  .navbar {
    top: 10px;
    width: min(100% - 16px, 1240px);
    padding: 0 12px;
    border-radius: 18px;
  }

  .nav-logo {
    width: 38px;
    height: 38px;
  }

  .nav-brand-main {
    font-size: 0.84rem;
    max-width: 56vw;
  }

  .nav-brand-kicker {
    font-size: 0.56rem;
    max-width: 56vw;
  }
}

@media (max-width: 420px) {
  .nav-brand-kicker {
    display: none;
  }

  .nav-brand-main {
    max-width: 62vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .nav-dropdown-toggle,
  .nav-btn,
  .nav-profile-item,
  .nav-dropdown-item,
  .nav-mobile-link,
  .nav-mobile-sublink {
    transition: none !important;
  }
}