@layer components {
  .top-nav {
    --top-nav-band-width: min(1440px, calc(100% - 16px));
    position: sticky;
    top: 0;
    width: 100%;
    z-index: var(--layer-nav);
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
  }
  
  .top-nav::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 50%;
    width: var(--top-nav-band-width);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background:
      linear-gradient(
        90deg,
        rgba(12, 17, 26, 0) 0%,
        rgba(12, 17, 26, 0.58) 14%,
        rgba(12, 17, 26, 0.94) 30%,
        rgba(12, 17, 26, 0.94) 70%,
        rgba(12, 17, 26, 0.58) 86%,
        rgba(12, 17, 26, 0) 100%
      );
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  }
  
  .top-nav-inner {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 8px 20px 10px;
    display: grid;
    grid-template-columns: auto auto auto;
    grid-template-areas:
      "brand socials actions"
      "menu menu menu";
    justify-content: center;
    align-items: center;
    gap: 7px 12px;
  }
  
  .top-nav-brand {
    grid-area: brand;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  
  .top-nav-brand-logo {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    flex: 0 0 auto;
  }
  
  .top-nav-brand-text {
    display: inline-block;
  }
  
  .top-nav-center {
    grid-area: menu;
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
    position: relative;
  }
  
  .top-nav-socials {
    grid-area: socials;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  
  .top-nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
  }
  
  .top-nav-menu > [hidden] {
    display: none !important;
  }
  
  .top-nav-actions {
    grid-area: actions;
    display: flex;
    justify-self: end;
    justify-content: flex-end;
  }
  
  @media (min-width: 1680px) and (min-height: 900px) {
    .top-nav {
      --top-nav-band-width: min(1760px, calc(100% - 32px));
    }
  
    .top-nav-inner {
      max-width: none;
      width: 100%;
      grid-template-columns: auto auto 1fr auto;
      grid-template-areas: "brand socials . actions";
      padding: 10px 20px;
      gap: 10px 14px;
    }
  
    .top-nav-brand {
      justify-self: start;
      margin-right: 6px;
    }
  
    .top-nav-socials {
      justify-self: start;
    }
  
    .top-nav-center {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      justify-content: center;
      align-self: center;
      width: max-content;
      max-width: calc(100% - 760px);
      z-index: 2;
    }
  
    .top-nav-menu {
      width: auto;
      justify-content: center;
      gap: 6px;
    }
  
    .top-nav-actions {
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }
  
    .top-nav-news-bell {
      margin-right: 0;
    }
  
    .top-nav-link-primary,
    .top-nav-link-secondary {
      padding: 6px 10px;
      font-size: 0.7rem;
    }
  
    .nav-social {
      min-width: 34px;
      min-height: 34px;
      padding: 7px;
    }
  
    .lang-switch {
      gap: 6px;
      padding: 5px;
    }
  
    .lang-btn {
      min-width: 52px;
      height: 40px;
      padding: 0 8px;
    }
  }
  
  .top-nav-more {
    position: relative;
    display: none;
  }
  
  .top-nav-more.is-visible {
    display: block;
  }
  
  .top-nav-more-toggle {
    gap: 8px;
  }
  
  .top-nav-more-icon {
    font-size: 1rem;
    line-height: 1;
  }
  
  .top-nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(12, 17, 26, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  }
  
  .top-nav-more-menu[hidden] {
    display: none !important;
  }
  
  .top-nav-more-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #f4f8ff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .top-nav-more-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 209, 102, 0.26);
  }
  
  .top-nav-group {
    position: relative;
    flex: 0 0 auto;
  }
  
  .top-nav-group-toggle {
    gap: 8px;
  }
  
  .top-nav-group-caret {
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.8;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  
  .top-nav-group.is-open .top-nav-group-caret {
    transform: rotate(180deg);
    opacity: 1;
  }
  
  .top-nav-group-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 32;
    min-width: 220px;
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(12, 17, 26, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  }
  
  .top-nav-group-menu[hidden] {
    display: none !important;
  }
  
  .top-nav-group-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #f4f8ff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  }
  
  .top-nav-group-link:hover,
  .top-nav-group-link:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 209, 102, 0.26);
    transform: translateY(-1px);
  }
  
  .top-nav-group.is-current .top-nav-group-toggle,
  .top-nav-group.is-open .top-nav-group-toggle,
  .top-nav-group-link.is-current {
    border-color: rgba(255, 91, 46, 0.38);
    background:
      linear-gradient(180deg, rgba(255, 91, 46, 0.18), rgba(255, 255, 255, 0.03)),
      rgba(255, 91, 46, 0.08);
    color: #fff4ef;
  }
  
  .top-nav-group-link.is-current {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 10px 24px rgba(0, 0, 0, 0.18);
  }
  
  .top-nav-menu.has-nav-groups .top-nav-more,
  .top-nav-group ~ .top-nav-more {
    display: none !important;
  }
  
  .top-nav-link-primary,
  .top-nav-link-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.18s ease;
  }
  
  .top-nav-link-primary,
  .nav-link-primary,
  .top-nav .btn-primary {
    background: linear-gradient(135deg, var(--accent), #ff7d57);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(255, 91, 46, 0.28);
  }
  
  .top-nav-link-primary:hover,
  .nav-link-primary:hover,
  .top-nav .btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 14px 30px rgba(255, 91, 46, 0.36);
  }
  
  .top-nav-link-secondary,
  .nav-link-secondary {
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f4f8ff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 10px 24px rgba(0, 0, 0, 0.18);
  }
  
  .top-nav-link-secondary:hover,
  .nav-link-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 209, 102, 0.42);
    color: #ffffff;
    box-shadow:
      0 0 0 1px rgba(255, 209, 102, 0.16),
      0 14px 28px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
  }
  
  .top-nav-link-special,
  .top-nav-more-link-special {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.96), rgba(20, 184, 166, 0.88));
    border-color: rgba(134, 239, 172, 0.52);
    color: #ffffff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 12px 26px rgba(20, 184, 166, 0.26);
  }
  
  .top-nav-link-special:hover,
  .top-nav-more-link-special:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 1), rgba(45, 212, 191, 0.98));
    border-color: rgba(187, 247, 208, 0.7);
    box-shadow:
      0 0 0 1px rgba(187, 247, 208, 0.22),
      0 14px 30px rgba(20, 184, 166, 0.34);
  }
  
  .nav-social {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.015em;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  }
  
  .nav-social.nav-social-discord {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(88, 101, 242, 0.34);
  }
  
  .nav-social.nav-social-telegram {
    background: linear-gradient(135deg, #27a7e7, #168ac7);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(39, 167, 231, 0.3);
  }
  
  .nav-social:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
  }
  
  .nav-social.nav-social-discord:hover {
    box-shadow: 0 16px 34px rgba(88, 101, 242, 0.42);
  }
  
  .nav-social.nav-social-telegram:hover {
    box-shadow: 0 16px 34px rgba(39, 167, 231, 0.38);
  }
  
  .nav-social.nav-social-tiktok {
    background: linear-gradient(135deg, #151515, #2b2b2b);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  }
  
  .nav-social.nav-social-tiktok:hover {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
  }
  
  .nav-social.nav-social-youtube {
    background: linear-gradient(135deg, #ff2a23, #cc181e);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(204, 24, 30, 0.34);
  }
  
  .nav-social.nav-social-youtube:hover {
    box-shadow: 0 16px 34px rgba(204, 24, 30, 0.42);
  }
  
  .nav-social.nav-social-twitch {
    background: linear-gradient(135deg, #9146ff, #6f2cff);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(145, 70, 255, 0.34);
  }
  
  .nav-social.nav-social-twitch:hover {
    box-shadow: 0 16px 34px rgba(145, 70, 255, 0.42);
  }
  
  .social-icon {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
  }
}
