/* Original home structure: banner + guides, app grids + rankings, topics, three site ranks. */

.home-feature,.home-catalog,.home-topics,.website-rank {
  width: min(1200px,calc(100% - 48px));
  margin: 24px auto;
}

.home-feature {
  display: grid;
  grid-template-rows: 360px;
  grid-template-columns: minmax(0,1.35fr) minmax(0,1fr);
  gap: 24px;
}

.home-banner {
  min-width: 0;
  align-self: stretch;
  border-radius: var(--radius);
  background: linear-gradient(125deg,#d9f0ff,#ebf5fd);
  overflow: hidden;
}

.home-banner .carousel {
  height: 100%;
  min-height: 310px;
}

.home-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-banner .is-active {
  background: #fff;
}

.home-guides,.home-apps,.home-rank,.home-topics,.rank-item {
  min-width: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.home-guides {
  padding: 22px;
}

.home-guides .section-title {
  margin-bottom: 12px;
  line-height: 1.4;
}

.guide-list {
  display: grid;
  gap: 5px;
}

.guide-list>a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  line-height: 18px;
}

.guide-list i {
  flex-shrink: 0;
  color: var(--brand);
}

.guide-list p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-list u {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
}

.home-catalog {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 24px;
  align-items: start;
}

.home-apps {
  position: relative;
}

.home-section-more {
  position: absolute;
  top: 27px;
  right: 24px;
  font-size: 13px;
  color: var(--muted);
}

.home-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-bottom: 20px;
  color: #65758a;
  font-size: 13px;
}

.home-categories a {
  padding-block: 3px;
}

.home-categories .is-active {
  color: var(--brand);
}

.home-app-grid ul {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 24px 16px;
}

.home-app-grid li {
  min-width: 0;
  text-align: center;
}

.home-app-grid img {
  width: 64px;
  aspect-ratio: 1;
  margin: 0 auto 10px;
  border-radius: 14px;
  box-shadow: 0 3px 10px #1e426014;
}

.home-app-grid p {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-header {
  justify-content: space-between;
  font-size: 18px;
}

.section-header h5 {
  font-size: 18px;
}

.rank-tabs {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.rank-tabs span {
  cursor: pointer;
}

.rank-tabs .is-active {
  color: var(--brand);
  font-weight: 600;
}

.rank-panel {
  display: none;
}

.rank-panel.is-active {
  display: block;
}

.rank-panel li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rank-summary {
  display: flex;
  gap: 10px;
  align-items: center;
}

.rank-summary>span {
  color: var(--brand);
  width: 16px;
  text-align: center;
}

.rank-summary h5 {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-summary em {
  font-size: 11px;
  color: var(--muted);
}

.rank-detail {
  display: none;
  align-items: center;
  gap: 10px;
}

.rank-panel li.is-active .rank-summary {
  display: none;
}

.rank-panel li.is-active .rank-detail {
  display: flex;
}

.rank-cover {
  flex-shrink: 0;
}

.rank-cover img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
}

.rank-content {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.rank-category,.rank-date {
  font-size: 11px;
  color: var(--muted);
}

.rank-download {
  padding: 3px 9px;
  border: 1px solid #a4daf4;
  color: var(--brand);
  border-radius: 5px;
  font-size: 12px;
}

.topic-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.topic-section-title {
  font-size: 20px;
}

.topic-section-title span {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  color: #aab5c2;
  margin-left: 15px;
}

.topic-section-header>a {
  color: var(--muted);
  font-size: 13px;
}

.home-topic-layout {
  display: grid;
  grid-template-columns: minmax(0,2fr) minmax(0,1fr);
  gap: 28px;
}

.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}

.home-topic-grid img {
  width: 100%;
  aspect-ratio: 2/1;
  border-radius: 8px;
}

.home-topic-grid p {
  margin-top: 10px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-topic-list li {
  position: relative;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.home-topic-list li>a {
  display: block;
  padding-right: 46px;
  font-weight: 500;
}

.home-topic-list p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.home-topic-list time {
  position: absolute;
  right: 0;
  top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.website-rank {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 24px;
}

.site-rank-title {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 650;
}

.site-rank-title i {
  color: var(--brand);
}

.site-rank-list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.site-rank-list li>a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-rank-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 5px;
  background: #f0f5fa;
  color: #8998a9;
  font-size: 12px;
}

.site-rank-list li:nth-child(-n/**/+3) .site-rank-number {
  color: #fff;
  background: var(--brand);
}

.site-rank-content {
  min-width: 0;
}

.site-rank-summary h5 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
}

.site-rank-detail {
  display: none;
  gap: 12px;
  align-items: center;
}

.site-rank-detail img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.site-rank-info {
  min-width: 0;
}

.site-rank-info h5 {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-rank-category {
  color: var(--muted);
  font-size: 12px;
}

.site-rank-list li.is-active .site-rank-summary {
  display: none;
}

.site-rank-list li.is-active .site-rank-detail {
  display: flex;
}

@media (max-width:1100px) {
  .home-catalog {
    grid-template-columns: minmax(0,1fr) 270px;
  }

  .home-app-grid ul {
    grid-template-columns: repeat(5,minmax(0,1fr));
  }

  .guide-list i {
    display: none;
  }
}
