/* Application list page */

.app-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.app-category-tab {
  min-width: 119px;
  height: 50px;
  padding: 13px 24px;
  border-radius: 25px;
  border: 1px solid var(--color-black-alpha-10);
  background: var(--color-black-alpha-5);
  color: #999;
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  white-space: nowrap;
}

.app-category-tab--active {
  background: var(--color-primary-500);
  color: #fff;
  border-color: var(--color-primary-500);
}

.app-list-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.app-list-section__head {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.app-list-section__title {
  margin: 0;
  width: 100%;
  text-align: center;
  color: var(--text-primary);
  font-size: 36px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  word-wrap: break-word;
}

.app-list-section__subtitle {
  margin: 0;
  width: 100%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 24px;
  word-wrap: break-word;
}

.app-list-section__subtitle--bold {
  font-weight: 600;
}

.app-card-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 45px;
}

.app-card {
  width: 120px;
  border-radius: 18px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

.app-card__icon-wrap {
  width: 120px;
  height: 120px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.app-card__icon {
  width: 120px;
  height: 120px;
  display: block;
  object-fit: cover;
}

.app-card__title {
  align-self: stretch;
  text-align: center;
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
  word-wrap: break-word;
}

.app-card__desc {
  align-self: stretch;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 18px;
  word-wrap: break-word;
}

.app-list-section__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 13px 24px;
  border: none;
  border-radius: 25px;
  background: var(--color-primary-500);
  color: #fff;
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
}
.app-list-section__more-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.app-list-section__more-icon--up {
  transform: rotate(180deg);
}

.app-list-section__more[hidden] {
  display: none;
}

.app-list-section__empty {
  margin: 0;
  width: 100%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
}

.app-card {
  text-decoration: none;
  color: inherit;
}

.app-list-section--collapsible:not(.app-list-section--expanded) .app-card-grid--collapsible .app-card:nth-child(n + 9) {
  display: none;
}

.app-list-section--expanded .app-card-grid--collapsible .app-card:nth-child(n + 9) {
  display: inline-flex;
}

@media (max-width: 1280px) {
  .app-card-grid {
    justify-content: center;
    gap: 24px 18px;
  }
}

@media (max-width: 768px) {
  .app-category-tabs {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .app-category-tabs::-webkit-scrollbar {
    display: none;
  }

  .app-category-tab {
    min-width: 0;
    height: auto;
    padding: 6px 12px;
    border-radius: 25px;
    font-size: 12px;
    line-height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary);
  }

  .app-category-tab--active {
    color: #fff;
  }

  .app-list-section {
    gap: 12px;
  }

  .app-list-section__head {
    gap: 12px;
  }

  .app-list-section__title {
    font-size: 18px;
    line-height: 24px;
    font-weight: 400;
    color: var(--color-primary-500, #8859f9);
  }

  .app-list-section:has(.app-list-section__subtitle--bold) .app-list-section__title {
    color: var(--text-primary);
    font-weight: 600;
  }

  .app-list-section__subtitle {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
  }

  .app-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 77px);
    justify-content: space-between;
    row-gap: 12px;
    column-gap: 0;
  }

  .app-card {
    width: 77px;
    gap: 4px;
    border-radius: 12px;
  }

  .app-card__icon-wrap {
    width: 77px;
    height: 77px;
    border-radius: 18px;
  }

  .app-card__icon {
    width: 77px;
    height: 77px;
  }

  .app-card__title {
    font-size: 14px;
    line-height: 20px;
  }

  .app-card__desc {
    font-size: 12px;
    line-height: 18px;
  }

  .app-list-section__more {
    height: auto;
    padding: 10px 18px;
    font-size: 12px;
    line-height: 18px;
    gap: 6px;
  }

  .app-list-section__more-icon {
    width: 6px;
    height: 6px;
  }
}
