:root {
  --brand: #0d6efd;
  --brand-soft: #eef5ff;
  --brand-2: #1d4ed8;
  --brand-3: #3b82f6;
  --brand-4: #60a5fa;
  --text-main: #172033;
  --text-sub: #607089;
  --line: #d9e7fb;
  --bg: #f2f7ff;
  --text-on-dark: #f8fbff;
  --text-on-light: #1e3a8a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #eff6ff 0%, #f6f9ff 180px, #f2f7ff 180px, #f2f7ff 100%);
  background-attachment: fixed;
  color: var(--text-main);
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 82px;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(135deg, #1463ea 0%, #1f7bfd 58%, #3f95ff 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 24px rgba(20, 99, 234, 0.32);
}

.page-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 9px;
}

.site-logo {
  width: 100px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.site-logo svg {
  width: 100px;
  height: 32px;
  display: block;
}

.back-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(8, 45, 109, 0.26);
}

.back-icon-btn i,
.back-icon-btn span {
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
}

.back-icon-btn:hover,
.back-icon-btn:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.95);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  color: #1463ea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(6, 46, 122, 0.24);
}

.search-box {
  flex: 1;
}

.top-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #0f4db8;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px rgba(10, 61, 154, 0.2);
}

.top-menu-link:hover,
.top-menu-link:focus {
  color: #0c3f95;
  background: #f4f8ff;
}

.hdMenu {
  position: relative;
  z-index: 1051;
}

.hdMenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: #ffffff;
  color: #0f4db8;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(10, 61, 154, 0.2);
}

.hdMenu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 176px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #d7e7fc;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(23, 78, 180, 0.2);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.hdMenu.is-open .hdMenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hdMenu-item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 30px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #1e3a8a;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf4ff 100%);
  border: 1px solid #dbe7fb;
}

.hdMenu-item:hover,
.hdMenu-item:focus {
  color: #ffffff;
  background: linear-gradient(180deg, #2a78ee 0%, #145fdc 100%);
  border-color: #1f66df;
}

.hdMenu-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 79, 0.22);
  backdrop-filter: blur(1px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
  z-index: 1020;
}

.hdMenu-mask.is-open {
  opacity: 1;
  visibility: visible;
}

.search-box .form-control {
  border-radius: 999px;
  font-size: 14px;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.96);
  color: #1e3a8a;
  box-shadow: none;
}

.search-box .form-control:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
  background: #fff;
}

.search-box .form-control::placeholder {
  color: #7b8ba7;
}

.main-tabs {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 8px 11px;
  scrollbar-width: none;
}

.main-tabs::-webkit-scrollbar {
  display: none;
}

.main-tabs .btn {
  border-radius: 999px;
  margin-right: 8px;
  font-size: 13px;
  font-weight: 600;
  border-width: 1px;
  padding: 4px 12px;
}

.main-tabs .btn-primary {
  background: #ffffff;
  color: #1258d6;
  border-color: #ffffff;
  box-shadow: 0 6px 14px rgba(10, 61, 154, 0.2);
}

.main-tabs .btn-outline-primary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
}

.main-tabs .btn-outline-primary:hover,
.main-tabs .btn-outline-primary:focus {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.28);
}

.page-breadcrumb {
  margin: 10px 12px 0;
  background: #ffffff;
  border: 1px solid #dce8fb;
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
}

.page-breadcrumb .breadcrumb {
  font-size: 12px;
}

.page-breadcrumb .breadcrumb-item,
.page-breadcrumb .breadcrumb-item a {
  color: #476086;
  text-decoration: none;
}

.page-breadcrumb .breadcrumb-item.active {
  color: #1d4ed8;
  font-weight: 600;
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: #98afcf;
}

.filter-strip {
  padding: 10px 12px 0;
}

.tabs-standalone {
  background: #ffffff;
  border: 1px solid #d9e7fb;
  border-radius: 14px;
  padding: 10px 10px;
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.08);
}

.tabs-standalone .btn-primary {
  background: linear-gradient(135deg, #1d63df, #2a7fff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 12px rgba(29, 99, 223, 0.24);
}

.tabs-standalone .btn-outline-primary {
  color: #1f65dd;
  border-color: #cfe1fb;
  background: #f5f9ff;
}

.tabs-standalone .btn-outline-primary:hover,
.tabs-standalone .btn-outline-primary:focus {
  color: #fff;
  border-color: #1f65dd;
  background: #1f65dd;
}

.section-card {
  background: #fff;
  border: 1px solid #d9e7fb;
  border-radius: 16px;
  margin: 13px 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.08);
}

.section-card:nth-of-type(3n+1) {
  border-top: 3px solid #3b82f6;
}

.section-card:nth-of-type(3n+2) {
  border-top: 3px solid #2563eb;
}

.section-card:nth-of-type(3n+3) {
  border-top: 3px solid #60a5fa;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #e7effb;
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9ff 100%);
}

.section-header a {
  color: #1d4ed8;
  font-weight: 600;
}

.section-header a:hover,
.section-header a:focus {
  color: #1e40af;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1px;
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d4ed8, #3b82f6);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px dashed #e4ecfa;
  align-items: flex-start;
  transition: background-color .2s ease;
}

.media-item:hover {
  background: linear-gradient(90deg, #f7faff 0%, #ffffff 70%);
}

.media-item:last-child {
  border-bottom: none;
}

.thumb {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef2f7;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  border: 1px solid #dbeafe;
}

.media-item.media-news {
  gap: 12px;
}

.thumb-news {
  width: 128px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef2f7;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
  border: 1px solid #dbeafe;
}

.media-title {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-title a {
  color: #1b2b44 !important;
}

.media-title a:hover,
.media-title a:focus {
  color: #1d4ed8 !important;
}

.meta {
  color: var(--text-sub);
  font-size: 12px;
}

.news-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.tag-pill {
  display: inline-block;
  background: linear-gradient(135deg, #edf4ff, #dbeafe);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.media-item:nth-child(3n+2) .tag-pill {
  background: linear-gradient(135deg, #ebf3ff, #cfe2ff);
  color: #1d4ed8;
}

.media-item:nth-child(3n+3) .tag-pill {
  background: linear-gradient(135deg, #eaf4ff, #d6e8ff);
  color: #1e40af;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #1d64dc 0%, #0f56ce 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  height: 66px;
  z-index: 1030;
  box-shadow: 0 -8px 24px rgba(10, 49, 117, 0.32);
  padding: 6px 8px;
}

.bottom-nav a {
  text-decoration: none;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all .18s ease;
  line-height: 1.1;
}

.bottom-nav a .nav-icon {
  font-size: 16px;
  margin-bottom: 4px;
  opacity: .95;
}

.bottom-nav a[data-page="index"] .nav-icon {
  color: rgba(255, 255, 255, 0.88);
}

.bottom-nav a[data-page="app"] .nav-icon {
  color: rgba(255, 255, 255, 0.88);
}

.bottom-nav a[data-page="game"] .nav-icon {
  color: rgba(255, 255, 255, 0.88);
}

.bottom-nav a[data-page="top"] .nav-icon {
  color: rgba(255, 255, 255, 0.88);
}

.bottom-nav a.active {
  color: #0f4db8;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 5px 12px rgba(8, 45, 109, 0.2);
}

.bottom-nav a.active .nav-icon {
  color: #0f4db8 !important;
}

.bottom-nav a:hover {
  color: #fff;
}

.hero-banner {
  margin: 12px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid #d5e5fb;
  box-shadow: 0 16px 34px rgba(29, 78, 216, 0.22);
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 26%, rgba(17, 52, 114, 0.36) 100%);
  pointer-events: none;
}

.hero-banner img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.hero-banner .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.72);
}

.hero-banner .carousel-control-prev,
.hero-banner .carousel-control-next {
  width: 10%;
}

.hero-banner .carousel-control-prev-icon,
.hero-banner .carousel-control-next-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.article {
  background: #fff;
  border: 1px solid #d7e6fb;
  border-radius: 16px;
  margin: 12px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.08);
  font-size: 16px;
  line-height: 1.75;
}

.article h1 {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.article h2,
.article .h5 {
  font-size: 19px;
  line-height: 1.45;
  margin-top: 14px;
}

.article p,
.article li {
  font-size: 16px;
  line-height: 1.8;
}

.article .meta {
  font-size: 14px;
  line-height: 1.7;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-app-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
  flex: 0 0 auto;
}

.detail-head-main {
  min-width: 0;
}

.detail-head .meta {
  font-size: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 28px 68px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px dashed #e4ecfa;
  transition: background-color .2s ease;
}

.rank-item:hover {
  background: linear-gradient(90deg, #f3f8ff 0%, #ffffff 70%);
}

.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f1ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
}

.rank-num.top3 {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #fff;
}

.rank-thumb {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  border: 1px solid #dbeafe;
}

.cta-download {
  border-radius: 999px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-weight: 700;
  background-image: linear-gradient(135deg, #1d63df, #2a7fff);
  border: none;
  box-shadow: 0 10px 24px rgba(29, 99, 223, 0.34);
}

.cta-download:hover,
.cta-download:focus {
  background-image: linear-gradient(135deg, #1753bd, #1f72ec);
}

.btn-outline-primary {
  border-color: #b9d4fb;
  color: #1f65dd;
  background: #f8fbff;
}

.btn-outline-primary:hover {
  background: #1f65dd;
  border-color: #1f65dd;
  color: #ffffff;
}

.btn-outline-primary:focus-visible,
.btn-primary:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.back-to-top {
  position: fixed;
  right: calc((100vw - min(100vw, 640px)) / 2 + 14px);
  bottom: 86px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f66df, #1b59cb);
  color: #fff;
  font-size: 18px;
  line-height: 40px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(20, 86, 197, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 1040;
}

body.no-bottom-nav .back-to-top {
  bottom: 20px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
  background: linear-gradient(135deg, #1a56c1, #174aa6);
}

@media (max-width: 380px) {
  .back-icon-btn {
    width: 34px;
    height: 34px;
  }

  .back-icon-btn i {
    font-size: 22px;
  }

  .thumb {
    width: 78px;
    height: 78px;
  }

  .detail-head {
    gap: 10px;
  }

  .detail-app-icon {
    width: 82px;
    height: 82px;
    border-radius: 16px;
  }

  .thumb-news {
    width: 112px;
    height: 70px;
  }

  .hero-banner img {
    height: 150px;
  }

  .back-to-top {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 16px;
    bottom: 82px;
  }

  body.no-bottom-nav .back-to-top {
    bottom: 14px;
  }
}
