/* English site overrides — 39kf theme + xiaohei footer & detail sections */
body {
  --tx-color: #148eff;
  --tx-border: #eeeeee;
  --tx-boxbg: #ffffff;
  --tx-bg: #f8f8f8;
  --tx-light: #888;
  --tx-light1: #aaa;
  --tx-txt: #333333;
  --tx-foottxt: #dfdfdf;
  --tx-link: #333333;
  --tx-footbg: #404553;
  --tx-radius: 1px;
  --tx-down_color: #5fb878;
}

.tx-wide { width: 1200px; max-width: 100%; margin: 0 auto; }

.home-flash {
  overflow: hidden;
  border-radius: 4px;
}
.home-flash .swiper-slide a {
  display: block;
}
.home-flash .swiper-slide img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

/* Breadcrumb */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--tx-light);
}
.breadcrumb a { color: var(--tx-color); }
.breadcrumb a:hover { text-decoration: underline; }

/* Detail page — app / game info */
.detail-wrap { margin-bottom: 20px; }
.detail-head {
  background: var(--tx-boxbg);
  padding: 20px;
  margin-bottom: 15px;
  overflow: hidden;
}
.detail-head h1 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--tx-txt);
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.detail-meta .icon-wrap {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--tx-border);
}
.detail-meta .icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta ul { flex: 1; min-width: 200px; }
.detail-meta ul li {
  line-height: 32px;
  font-size: 14px;
  color: var(--tx-light);
}
.detail-meta ul li span { color: var(--tx-txt); }
.detail-meta .star-box {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 14px;
  background: url('../images/star-gray.svg') repeat-x;
  vertical-align: middle;
}
.detail-meta .star-box .star-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: url('../images/star-gold.svg') repeat-x;
}
.detail-meta .score em {
  font-style: normal;
  color: #ff6633;
  margin-left: 6px;
}
.detail-download { margin-top: 15px; clear: both; }
.detail-download .tx-btn {
  display: inline-block;
  padding: 12px 36px;
  font-size: 16px;
  background: var(--tx-down_color);
  color: #fff;
  border-radius: 4px;
}
.detail-download .tx-btn:hover { opacity: 0.9; color: #fff; }

/* Introduction */
.detail-section {
  background: var(--tx-boxbg);
  padding: 20px;
  margin-bottom: 15px;
}
.detail-section .section-title {
  font-size: 18px;
  font-weight: bold;
  padding-bottom: 12px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--tx-color);
  color: var(--tx-txt);
}
.detail-section .textcon {
  line-height: 1.8;
  font-size: 14px;
  color: #555;
}
.detail-section .textcon h2 {
  font-size: 16px;
  margin: 20px 0 10px;
  color: var(--tx-txt);
}
.detail-section .textcon p { margin-bottom: 12px; }
.detail-section .textcon img {
  max-width: 100%;
  margin: 10px auto;
  display: block;
  border-radius: 4px;
}
.more-info-box {
  margin-top: 20px;
  padding: 15px;
  background: var(--tx-bg);
  border-radius: 4px;
}
.more-info-box .tit {
  font-weight: bold;
  margin-bottom: 10px;
}
.more-info-box p span {
  display: inline-block;
  width: 48%;
  line-height: 28px;
  font-size: 13px;
  color: var(--tx-light);
}

/* Screenshots slider */
.screenshot-box { overflow: hidden; }
.screenshot-box .screenshot-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.screenshot-box .screenshot-list li {
  flex-shrink: 0;
  width: 200px;
}
.screenshot-box .screenshot-list img {
  width: 200px;
  height: 355px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--tx-border);
}

/* Related topics — clean block for 39kf detail pages */
.related-topics { padding: 0; overflow: hidden; }
.related-topics .topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  clear: both;
}
.related-topics .topic-tabs a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--tx-color, #148eff);
  color: var(--tx-color, #148eff);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}
.related-topics .topic-tabs a.on,
.related-topics .topic-tabs a:hover {
  color: #fff;
  background: var(--tx-color, #148eff);
  border-color: var(--tx-color, #148eff);
}
.related-topics .topic-panel { display: none; clear: both; }
.related-topics .topic-panel.on { display: block; }
.related-topics .topic-intro {
  overflow: hidden;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--tx-border, #eee);
}
.related-topics .topic-intro .topic-cover {
  float: left;
  width: 240px;
  height: 128px;
  margin-right: 18px;
  border-radius: 4px;
  overflow: hidden;
}
.related-topics .topic-intro .topic-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-topics .topic-intro h3 {
  font-size: 18px;
  margin: 0 0 10px;
  font-weight: bold;
  color: var(--tx-txt, #333);
}
.related-topics .topic-intro h3 a { color: var(--tx-txt, #333); }
.related-topics .topic-intro h3 a:hover { color: var(--tx-color, #148eff); }
.related-topics .topic-intro p {
  line-height: 1.7;
  font-size: 14px;
  color: #666;
  overflow: hidden;
}
.topic-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topic-apps li {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topic-apps .app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.topic-apps .app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-apps .app-info {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.topic-apps .app-name {
  display: block;
  line-height: 22px;
  color: #333;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-apps .app-name:hover { color: var(--tx-color, #148eff); }
.topic-apps .app-meta {
  display: block;
  font-size: 12px;
  color: #999;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* List page */
.list-page-title {
  font-size: 22px;
  padding: 15px 0;
  color: var(--tx-txt);
}
.filter-bar {
  background: var(--tx-boxbg);
  padding: 12px 15px;
  margin-bottom: 15px;
}
.filter-bar a {
  display: inline-block;
  padding: 4px 12px;
  margin: 4px 6px 4px 0;
  font-size: 13px;
  border-radius: 3px;
  color: var(--tx-link);
}
.filter-bar a.on,
.filter-bar a:hover {
  background: var(--tx-color);
  color: #fff;
}

/* Unified footer — compact nav + legal links */
.footer {
  background-image: none;
}
.footer .copy .footer-nav {
  margin-bottom: 8px;
  line-height: 28px;
}
.footer .copy .footer-nav a {
  color: #fff;
  font-size: 14px;
  padding: 0 8px;
  transition: color 0.2s;
}
.footer .copy .footer-nav a:hover {
  color: var(--tx-color, #148eff);
}
.footer .copy .footer-notice {
  color: var(--tx-foottxt, #dfdfdf);
  opacity: 0.75;
  margin-bottom: 10px;
  line-height: 1.6;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.footer .copy .footer-links {
  margin-bottom: 6px;
  line-height: 28px;
}
.footer .copy .footer-links a {
  color: var(--tx-foottxt, #dfdfdf);
  font-size: 13px;
  padding: 0 6px;
  transition: color 0.2s;
}
.footer .copy .footer-links a:hover {
  color: #fff;
}
.footer .copy .footer-links .sep,
.footer .copy .footer-nav .sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  padding: 0 2px;
}
.footer .copy .footer-copy {
  color: var(--tx-foottxt, #dfdfdf);
  opacity: 0.85;
}

/* Topic list cards */
.topic-list > li {
  display: flex;
}
.topic-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.topic-card .topic-img {
  width: 100%;
  height: 160px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}
.topic-card .topic-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.topic-card:hover .topic-img img { transform: scale(1.05); }
.topic-card .topic-name {
  flex: 1;
  font-size: 15px;
  margin: 8px 0 4px;
  color: var(--tx-txt);
  line-height: 1.4;
  min-height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.topic-card .topic-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--tx-light);
}

/* Detail page sidebar — 39kf-style */
.side-box {
  margin-bottom: 20px;
}
.side-box dl {
  background: var(--tx-boxbg, #fff);
  margin-bottom: 20px;
  border-radius: var(--tx-radius, 1px);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.05);
}
.side-box dl dt {
  padding: 12px 15px;
  font-size: 16px;
  font-weight: bold;
  border-bottom: 1px solid var(--tx-border, #eee);
}
.side-box dl dd {
  padding: 0 15px 15px;
}
.side-box .ranking li {
  border-bottom: 1px dashed var(--tx-border, #eee);
}
.side-box .ranking li:last-child {
  border-bottom: 0;
}
.side-box .ul-26 li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--tx-border, #eee);
  line-height: 1.5;
}
.side-box .ul-26 li:last-child {
  border-bottom: 0;
}
.side-box .side-zt {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-box .img-zt {
  display: block;
}
.side-box .img-zt .img-box {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 8px;
}
.side-box .img-zt .img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-box .img-zt p {
  font-size: 14px;
  color: var(--tx-txt, #333);
  line-height: 1.4;
}

/* Compact pagination */
.pagebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}
.pagebar a,
.pagebar span {
  display: inline-block;
  min-width: 34px;
  padding: 7px 10px;
  border: 1px solid var(--tx-border, #eee);
  border-radius: 4px;
  font-size: 13px;
  color: var(--tx-txt, #333);
  background: var(--tx-boxbg, #fff);
  box-sizing: border-box;
}
.pagebar a:hover {
  color: var(--tx-color, #148eff);
  border-color: var(--tx-color, #148eff);
}
.pagebar span.on {
  color: #fff;
  background: var(--tx-color, #148eff);
  border-color: var(--tx-color, #148eff);
}
.pagebar span.disabled {
  opacity: 0.45;
  cursor: default;
}
.pagebar span.ellipsis {
  min-width: auto;
  padding: 7px 4px;
  border: none;
  background: transparent;
  color: var(--tx-light, #888);
}

/* Topic detail page — compact like xiaohei hjd-details */
.topic-detail-page { overflow: hidden; }
.topic-detail-head {
  overflow: hidden;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--tx-border, #eee);
}
.topic-detail-cover {
  float: left;
  width: 354px;
  max-width: 100%;
  height: 178px;
  margin-right: 25px;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
}
.topic-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-detail-info h1 {
  font-size: 24px;
  font-weight: normal;
  margin: 0 0 10px;
  line-height: 1.35;
}
.topic-detail-summary {
  margin: 0;
  line-height: 1.7;
  color: #999;
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.topic-detail-meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: #666;
}
.topic-detail-page .topic-apps {
  clear: both;
  background: #f5f5f5;
  padding: 16px;
  border-radius: 4px;
}
.topic-detail-empty {
  clear: both;
  margin: 0;
}

/* Homepage Featured strip — single row, truncate long titles */
.home-tj li.home-tj-featured {
  flex-wrap: nowrap;
  overflow: hidden;
}
.home-tj li.home-tj-featured > strong {
  flex: none;
}
.home-tj li.home-tj-featured a {
  flex: 0 1 auto;
  max-width: 10.5em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Static content pages */
.static-page {
  background: var(--tx-boxbg);
  padding: 30px;
  margin-bottom: 20px;
  line-height: 1.8;
}
.static-page h1 { font-size: 24px; margin-bottom: 12px; color: var(--tx-txt, #333); }
.static-page h2 { font-size: 18px; margin: 24px 0 10px; color: var(--tx-txt, #333); font-weight: 600; }
.static-page p { margin-bottom: 12px; color: #555; font-size: 14px; }
.static-page ul,
.static-page ol { margin: 0 0 14px 20px; color: #555; font-size: 14px; }
.static-page li { margin-bottom: 6px; }
.static-page a { color: var(--tx-color, #148eff); }
.static-page a:hover { text-decoration: underline; }
.static-page-lead {
  font-size: 15px;
  color: #666;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--tx-border, #eee);
}
.static-page-updated {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--tx-border, #eee);
  font-size: 13px;
  color: var(--tx-light, #888);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}
.contact-card {
  background: var(--tx-bg, #f8f8f8);
  border: 1px solid var(--tx-border, #eee);
  border-radius: 4px;
  padding: 18px;
}
.contact-card h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
.contact-card p { margin-bottom: 8px; }
.contact-card-inline { max-width: 520px; }
.sitemap-list { margin-left: 0; list-style: none; }
.sitemap-list li { margin-bottom: 8px; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .static-page { padding: 20px 16px; }
}

@media (max-width: 992px) {
  .topic-apps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topic-apps { grid-template-columns: 1fr; }
  .related-topics .topic-intro .topic-cover {
    float: none;
    width: 100%;
    height: auto;
    margin: 0 0 12px;
  }
  .related-topics .topic-intro .topic-cover img { height: 160px; }
  .related-topics .topic-tabs a { width: 100%; }
  .topic-detail-cover {
    float: none;
    width: 100%;
    height: auto;
    margin: 0 0 12px;
  }
  .topic-detail-cover img { height: 160px; }
}
