.header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  padding: 0;
  line-height: normal;
  border-bottom: 1px solid var(--vp-c-divider);
  background: var(--vp-c-header);
  backdrop-filter: saturate(180%) blur(12px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  min-width: 0;
  color: var(--vp-c-text-1);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.nav-bar > .brand,
.nav-bar > .brand:visited,
.nav-bar > .brand:hover {
  color: var(--vp-c-text-1);
}

.brand img {
  display: block;
  width: 18px;
  height: 18px;
  margin-right: 2px;
  border-radius: 4px;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(0.5px);
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
  min-width: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  border-bottom: 1px solid transparent;
  color: var(--vp-c-text-1);
  font-size: 14px;
  font-weight: 500;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--vp-c-brand-1);
  color: var(--vp-c-brand-1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vp-c-text-2);
}

.locale-button.ant-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--vp-c-divider);
  border-radius: 18px;
  background: var(--vp-c-control);
  color: var(--vp-c-text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.locale-button.ant-btn:hover {
  border-color: var(--vp-c-brand-1);
  color: var(--vp-c-brand-1);
  background: var(--vp-c-control-hover);
}

.locale-button__arrow {
  font-size: 10px;
  color: var(--vp-c-text-3);
}

.theme-toggle.ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--vp-c-divider);
  border-radius: 50%;
  background: var(--vp-c-control);
  color: var(--vp-c-text-2);
}

.theme-toggle.ant-btn:hover {
  border-color: var(--vp-c-brand-1);
  background: var(--vp-c-control-hover);
  color: var(--vp-c-brand-1);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--vp-c-text-2);
  transition: color 0.2s;
  font-size: 20px;
}

.icon-link:hover {
  color: var(--vp-c-text-1);
}

.footer {
  border-top: 1px solid var(--vp-c-divider);
  padding: 32px 24px;
  color: var(--vp-c-text-3);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.footer a {
  color: var(--vp-c-text-3);
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--vp-c-brand-1);
}

@media (max-width: 900px) {
  .nav-bar {
    padding: 0 24px;
  }
}

@media (max-width: 720px) {
  .header {
    height: auto;
  }

  .nav-bar {
    flex-wrap: wrap;
    padding: 12px 20px 0;
    gap: 8px 12px;
  }

  .brand {
    height: 40px;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-links {
    order: 3;
    flex: 0 0 calc(100% + 40px);
    width: calc(100% + 40px);
    margin: 0 -20px;
    padding: 0 20px;
    overflow-x: auto;
    justify-content: flex-start;
    border-top: 1px solid var(--vp-c-divider);
  }

  .nav-links a {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 10px;
  }
}
