@media (max-width: 899px) {
  .top-header, 
  body > .nav {
    padding: 8px 12px;
  }

  .nav {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-left {
    flex: 1;
    justify-content: flex-start;
  }

  .nav-right {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .nav-center {
    display: flex !important;
    width: 100%;
    order: 3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: flex-start !important;
  }

  .nav-center::-webkit-scrollbar {
    display: none;
  }

  .nav-center {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .category-options {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 2px 4px !important;
  }

  .category-option {
    padding: 0 14px !important;
    height: 32px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }

  .nav-search {
    display: none; /* 移动端暂时隐藏搜索框以节省空间 */
  }

  .lang-btn, .theme-btn {
    padding: 0 8px;
    height: 36px;
    min-width: 36px;
  }

  .lang-btn span:last-child {
    display: none; /* 移动端只显示图标 */
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-icon-container {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media (max-width: 1024px) {
  /* 平板端保持 nav-center 隐藏，由侧边栏或后续逻辑处理 */
  /* 如果是首页，我们希望在 1024px 以下也能看到分类 */
  .is-home-page .nav-center {
    display: flex;
  }
  
  /* 非首页则保持隐藏 */
  body:not(.is-home-page) .nav-center {
    display: none;
  }
}
