* {
  box-sizing: border-box;
}

html {
  color: #202833;
  background: #f5f7fa;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

body {
  min-width: 0;
  margin: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-slogan {
  background: #096cc2;
  color: #e9f4ff;
  font-size: 14px;
  line-height: 34px;
  text-align: right;
}

.site-bar {
  background: #0d78d4;
  color: #fff;
  box-shadow: 0 2px 8px rgba(9, 55, 100, .18);
}

.site-bar-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 82px;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-sub {
  font-size: 16px;
  opacity: .95;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  font-size: 18px;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active {
  background: rgba(255, 255, 255, .16);
}

.nav-toggle {
  display: none;
}

.home-top {
  padding: 24px 0 0;
}

.quick-tabs {
  display: grid;
  grid-template-columns: 100px 1fr;
  border: 1px solid #dde3ea;
  background: #fff;
}

.tab-labels {
  display: grid;
  border-right: 1px solid #dde3ea;
}

.tab-labels a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-bottom: 1px solid #edf1f5;
  color: #445160;
  font-size: 16px;
}

.tab-labels a:last-child {
  border-bottom: 0;
}

.tab-labels a.is-active {
  position: relative;
  background: #ff4d4f;
  color: #fff;
  font-weight: 700;
}

.tab-labels a.is-active::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 9px solid #ff4d4f;
  transform: translateY(-50%);
}

.icon-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
}

.icon-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  color: #394653;
  font-size: 14px;
}

.icon-item img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}

.icon-item span {
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(270px, 370px) minmax(360px, 1fr) 300px;
  gap: 24px;
  padding-top: 28px;
}

.hero-topic {
  min-width: 0;
  background: #fff;
}

.hero-topic a {
  position: relative;
  display: block;
  min-height: 350px;
  overflow: hidden;
}

.hero-topic img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.hero-topic strong {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 18px 18px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .72));
  font-size: 24px;
  text-align: center;
}

.panel,
.section-block {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8ef;
}

.panel-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border-bottom: 1px solid #e6ebf0;
}

.section-title {
  padding: 0 16px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.section-title h2 {
  font-size: 20px;
}

.section-title a,
.section-title span {
  color: #687583;
  font-size: 14px;
}

.tabs-head {
  justify-content: flex-start;
}

.tabs-head a,
.rank-tabs span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 46px;
  border-right: 1px solid #e6ebf0;
  color: #576575;
  font-size: 18px;
}

.tabs-head a.is-active,
.rank-tabs .is-active {
  background: #0d78d4;
  color: #fff;
}

.compact-list {
  padding: 12px 16px;
}

.compact-row {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 32px;
  gap: 10px;
  color: #384757;
  font-size: 15px;
}

.compact-row .tag {
  color: #1f5e9b;
  font-weight: 700;
}

.compact-row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row time {
  color: #ff4d4f;
  text-align: right;
}

.rank-panel {
  align-self: start;
}

.rank-tabs {
  justify-content: stretch;
}

.rank-tabs span {
  flex: 1;
  min-width: 0;
}

.rank-list,
.side-rank {
  margin: 0;
  padding: 12px 14px 16px;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  min-height: 48px;
  border-bottom: 1px solid #edf1f5;
}

.rank-list li:last-child,
.side-rank li:last-child {
  border-bottom: 0;
}

.rank-list i,
.side-rank i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 11px;
  background: #ff4d4f;
  color: #fff;
  font-style: normal;
  font-weight: 700;
}

.rank-list a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 0;
}

.rank-list img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.rank-list span,
.rank-list em {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  grid-column: 2;
  color: #6a7787;
  font-size: 13px;
  font-style: normal;
}

.content-columns {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 24px 0 40px;
}

.content-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.content-side {
  display: grid;
  align-content: start;
  gap: 24px;
  min-width: 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: #edf1f5;
  padding: 1px;
}

.app-card {
  display: grid;
  min-width: 0;
  min-height: 146px;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 18px 10px 12px;
  background: #fff;
  text-align: center;
}

.app-card img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.app-card span,
.app-card small {
  overflow: hidden;
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card span {
  color: #263342;
  font-size: 15px;
}

.app-card small {
  color: #718092;
  font-size: 12px;
}

.side-rank li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #edf1f5;
}

.side-rank i {
  margin-top: 0;
}

.side-rank a {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
}

.topic-mini-list a,
.related-topics a {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  border: 1px solid #dce4ec;
  padding: 0 10px;
  color: #38506a;
  background: #f8fafc;
  font-size: 14px;
}

.crumb-bar {
  border-bottom: 1px solid #e1e7ee;
  background: #fff;
}

.crumb-bar .wrap {
  overflow: hidden;
  min-height: 44px;
  color: #6b7785;
  font-size: 14px;
  line-height: 44px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumb-bar a {
  color: #3f76aa;
}

.list-layout {
  padding: 20px 0 40px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid #e3e9ef;
  padding: 14px 16px;
  background: #fff;
}

.category-filter span {
  color: #263342;
  font-weight: 700;
}

.category-filter a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  color: #526272;
}

.category-filter a.is-active,
.category-filter a:hover {
  background: #0d78d4;
  color: #fff;
}

.list-main,
.search-page,
.topic-page,
.topic-detail {
  min-width: 0;
}

.software-list {
  display: grid;
  gap: 12px;
}

.software-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 86px;
  gap: 16px;
  align-items: center;
  min-width: 0;
  border: 1px solid #e2e8ef;
  padding: 16px;
  background: #fff;
}

.row-icon img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
}

.row-body {
  min-width: 0;
}

.row-body h2 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #263342;
  font-size: 20px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 8px;
  color: #7a8795;
  font-size: 14px;
}

.row-meta a {
  color: #0d78d4;
}

.row-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #5f6d7c;
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  background: #21a663;
  color: #fff;
  font-size: 14px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 24px 0 0;
}

.pager a {
  display: inline-flex;
  min-width: 38px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e0e8;
  padding: 0 12px;
  background: #fff;
  color: #425164;
}

.pager a.is-current {
  border-color: #0d78d4;
  background: #0d78d4;
  color: #fff;
}

.empty-state {
  border: 1px dashed #ccd7e1;
  padding: 28px;
  background: #fff;
  color: #6f7d8c;
  text-align: center;
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  padding: 24px 0 40px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 24px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 22px;
  border: 1px solid #e2e8ef;
  padding: 22px;
  background: #fff;
}

.detail-icon {
  width: 128px;
  height: 128px;
  border-radius: 8px;
  object-fit: cover;
}

.detail-info {
  min-width: 0;
}

.detail-info h1 {
  margin: 0 0 10px;
  color: #1d2c3c;
  font-size: 30px;
  line-height: 1.25;
}

.detail-info p {
  margin: 0 0 14px;
  color: #5c6876;
  font-size: 15px;
  line-height: 1.7;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #657280;
  font-size: 14px;
}

.detail-meta a {
  color: #0d78d4;
}

.download-actions {
  margin-top: 18px;
}

.download-button {
  display: inline-flex;
  min-width: 180px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  background: #3fbd45;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.download-button.is-disabled {
  background: #9ba8b5;
}

.detail-tabs {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  margin-top: 18px;
  border: 1px solid #e2e8ef;
  background: #fff;
}

.detail-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-right: 1px solid #e2e8ef;
  padding: 0 18px;
  color: #425164;
  font-weight: 700;
}

.detail-tabs a:last-child {
  border-right: 0;
}

.article-content {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid #e2e8ef;
  padding: 20px 22px;
  background: #fff;
  color: #2f3d4c;
  font-size: 16px;
  line-height: 1.9;
}

.article-content h2 {
  margin: 0 0 14px;
  color: #1f8ad8;
  font-size: 22px;
}

.article-content h3,
.article-content h4 {
  margin: 22px 0 10px;
  color: #1d2c3c;
}

.article-content p {
  margin: 0 0 14px;
}

.article-content img {
  height: auto;
  margin: 12px auto;
}

.screenshot-block,
.download-list {
  margin-top: 18px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.screenshot-grid img {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid #e2e8ef;
  object-fit: cover;
}

.download-list {
  padding-bottom: 16px;
}

.download-list > a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin: 16px 0 0 16px;
  padding: 0 16px;
  background: #3fbd45;
  color: #fff;
}

.side-app-list {
  display: grid;
  gap: 1px;
  background: #edf1f5;
  padding: 1px;
}

.side-app-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: #fff;
}

.side-app-list img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.side-app-list span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-app-list em {
  color: #7a8795;
  font-size: 12px;
  font-style: normal;
}

.topic-page,
.search-page {
  padding: 24px 0 40px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.topic-card {
  display: grid;
  min-width: 0;
  border: 1px solid #e2e8ef;
  background: #fff;
}

.topic-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.topic-card strong {
  overflow: hidden;
  padding: 12px 12px 4px;
  color: #263342;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-card span {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  padding: 0 12px 12px;
  color: #667483;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.topic-detail {
  padding: 24px 0 40px;
}

.topic-intro {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid #e2e8ef;
  padding: 20px;
  background: #fff;
}

.topic-intro img {
  width: 180px;
  height: 120px;
  object-fit: cover;
}

.topic-intro h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.25;
}

.topic-intro p {
  margin: 0 0 12px;
  color: #5f6d7c;
  line-height: 1.8;
}

.topic-intro span {
  color: #0d78d4;
  font-weight: 700;
}

.related-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  border: 1px solid #e2e8ef;
  padding: 14px 16px;
  background: #fff;
}

.related-topics strong {
  display: inline-flex;
  align-items: center;
  color: #263342;
}

.site-footer {
  margin-top: 36px;
  border-top: 4px solid #ff4d4f;
  background: #162230;
  color: #dbe5ee;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 18px 40px;
  min-height: 138px;
  padding: 28px 0;
}

.footer-brand {
  display: grid;
  gap: 8px;
  align-content: center;
}

.footer-brand p {
  margin: 0;
  color: #aebdca;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
}

.footer-links a {
  color: #dbe5ee;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  border-top: 1px solid rgba(219, 229, 238, .18);
  padding-top: 14px;
  color: #9fb0c0;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .icon-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-grid {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  }

  .rank-panel {
    grid-column: 1 / -1;
  }

  .rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .wrap {
    width: min(100% - 24px, 760px);
  }

  .site-slogan {
    text-align: left;
  }

  .site-bar-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .nav-toggle {
    display: inline-grid;
    width: 42px;
    height: 38px;
    align-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, .55);
    background: transparent;
    padding: 0 9px;
  }

  .nav-toggle span {
    height: 2px;
    background: #fff;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, .18);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
    background: rgba(255, 255, 255, .08);
    font-size: 16px;
  }

  .quick-tabs {
    grid-template-columns: 86px 1fr;
  }

  .tab-labels a {
    font-size: 14px;
  }

  .icon-strip {
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    grid-template-columns: none;
    overflow-x: auto;
    padding: 12px;
  }

  .icon-item img {
    width: 58px;
    height: 58px;
  }

  .home-grid,
  .content-columns,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .hero-topic a,
  .hero-topic img {
    min-height: 260px;
  }

  .content-side,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 20px);
  }

  .site-slogan {
    display: none;
  }

  .brand-sub {
    font-size: 14px;
  }

  .home-top {
    padding-top: 12px;
  }

  .quick-tabs {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .tab-labels a.is-active::after {
    display: none;
  }

  .home-grid {
    gap: 14px;
    padding-top: 14px;
  }

  .hero-topic a,
  .hero-topic img {
    min-height: 210px;
  }

  .hero-topic strong {
    padding: 40px 12px 14px;
    font-size: 20px;
  }

  .tabs-head a {
    flex: 1;
    min-width: 0;
    font-size: 16px;
  }

  .compact-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .compact-row .tag {
    display: none;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .content-columns {
    padding-top: 14px;
  }

  .section-title {
    min-height: 42px;
    padding: 0 12px;
  }

  .section-title h1,
  .section-title h2 {
    font-size: 20px;
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-card {
    min-height: 132px;
    padding: 14px 8px 10px;
  }

  .software-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .row-icon img {
    width: 72px;
    height: 72px;
  }

  .row-body h2 {
    font-size: 17px;
  }

  .row-meta {
    gap: 6px 10px;
    font-size: 12px;
  }

  .row-summary {
    -webkit-line-clamp: 2;
  }

  .row-action {
    grid-column: 1 / -1;
    min-height: 34px;
  }

  .category-filter {
    gap: 8px;
    padding: 12px;
  }

  .detail-hero,
  .topic-intro {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .detail-icon {
    width: 88px;
    height: 88px;
  }

  .detail-info h1,
  .topic-intro h1 {
    font-size: 22px;
  }

  .detail-info p {
    display: none;
  }

  .detail-meta {
    gap: 8px;
    font-size: 13px;
  }

  .download-button {
    width: 100%;
    min-height: 44px;
    font-size: 18px;
  }

  .detail-tabs {
    overflow-x: auto;
  }

  .detail-tabs a {
    min-width: 92px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .article-content {
    padding: 16px 14px;
    font-size: 15px;
  }

  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-intro img {
    width: 88px;
    height: 88px;
    border-radius: 8px;
  }
}

@media (max-width: 420px) {
  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-tabs {
    grid-template-columns: 1fr;
  }

  .tab-labels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #dde3ea;
  }

  .tab-labels a {
    border-bottom: 0;
    border-right: 1px solid #edf1f5;
  }

  .tab-labels a:last-child {
    border-right: 0;
  }

  .icon-strip {
    grid-auto-columns: 72px;
  }

  .app-card img {
    width: 58px;
    height: 58px;
  }

  .side-app-list a {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .side-app-list em {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 24px 0;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-copy {
    grid-column: auto;
  }
}
