/* ============================================================
   全站排版美化 cp-beautify.css  v1 (2026-10-08)
   仅作用于 <main> 正文区，不影响导航/侧栏/弹窗
   ============================================================ */

/* ---------- 标题层级 ---------- */
main h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.3;
  margin: .25rem 0 .9rem;
  padding-bottom: .65rem;
  position: relative;
}
main h1::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 2.75rem; height: .28rem;
  border-radius: .2rem;
  background: linear-gradient(90deg, #4a6cf7, #8aa2ff);
}
main h2 {
  font-size: 1.32rem;
  font-weight: 600;
  margin: 2.1rem 0 .85rem;
  padding-left: .65rem;
  border-left: .28rem solid #4a6cf7;
  border-bottom: none;
  border-radius: .1rem;
  line-height: 1.4;
}
main h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.5rem 0 .6rem;
}
main p { line-height: 1.85; }

/* ---------- 面包屑 ---------- */
#cp-breadcrumb {
  font-size: .82rem;
  opacity: .82;
  margin-bottom: .35rem;
}
#cp-breadcrumb a { text-decoration: none; }
#cp-breadcrumb a:hover { text-decoration: underline; }

/* ---------- 按钮 ---------- */
main .btn-primary,
main .btn-secondary,
main button[class*="btn-"] {
  border-radius: .55rem;
  font-weight: 500;
  letter-spacing: .02em;
  padding: .42rem 1.05rem;
  transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
  cursor: pointer;
}
main .btn-primary {
  box-shadow: 0 .15rem .5rem rgba(74, 108, 247, .28);
}
main .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 .3rem .8rem rgba(74, 108, 247, .34);
}
main .btn-primary:active,
main .btn-secondary:active { transform: scale(.97); }
main .btn-secondary:hover { transform: translateY(-1px); }

/* ---------- 输入控件 ---------- */
main input[type="search"],
main input[type="text"],
main input:not([type]),
main select,
main textarea {
  border-radius: .5rem;
  border: .08rem solid #d6d9e0;
  padding: .42rem .7rem;
  font-size: .92rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
  color: #1f2329;
}
body.cp-theme-dark main input[type="search"],
body.cp-theme-dark main input[type="text"],
body.cp-theme-dark main input:not([type]),
body.cp-theme-dark main select,
body.cp-theme-dark main textarea {
  background: #1c1e22;
  border-color: #33373e;
  color: #e2e4e9;
}
main input:focus, main select:focus, main textarea:focus {
  outline: none;
  border-color: #4a6cf7;
  box-shadow: 0 0 0 .18rem rgba(74, 108, 247, .18);
}

/* ---------- 卡片（阵型 / 分类大卡） ---------- */
main .layouts-card,
main .cp-featured-card {
  border-radius: .9rem;
  transition: transform .18s ease, box-shadow .22s ease;
}
main .layouts-card:hover,
main .cp-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .8rem 1.6rem -.6rem rgba(15, 23, 42, .18), 0 .25rem .6rem -.3rem rgba(15, 23, 42, .1);
}
body.cp-theme-dark main .layouts-card:hover,
body.cp-theme-dark main .cp-featured-card:hover {
  box-shadow: 0 .8rem 1.6rem -.6rem rgba(0, 0, 0, .55);
}
main .cp-featured-card-img-container,
main .cp-img-container,
main .layouts-card-img { overflow: hidden; }
main .cp-featured-card-img-container img,
main .cp-img-container img {
  transition: transform .35s ease;
}
main .cp-featured-card:hover .cp-featured-card-img-container img,
main .cp-featured-card:hover .cp-img-container img {
  transform: scale(1.04);
}

/* ---------- 选项卡 tabs ---------- */
main .cp-tabs-container {
  border-radius: .7rem;
  padding: .3rem .35rem;
}
main .cp-tab {
  border-radius: .5rem;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
main .cp-tab.cp-tab-active { font-weight: 600; }

/* ---------- 公告 / 提示块 ---------- */
main .cp-callout {
  border-radius: .65rem;
  border-left: .28rem solid #4a6cf7;
  padding: .7rem .95rem;
  line-height: 1.75;
}
main .cp-callout.cp-callout-warning { border-left-color: #e6a23c; }

/* ---------- 首页专区 ---------- */
#homepage-site-name h1 { font-size: 2.1rem; }
#homepage-site-description { line-height: 1.7; }
main .homepage-countdown-cards { gap: .5rem; }
main .homepage-countdown-group {
  width: calc(33.333% - .34rem) !important;
  flex: 0 0 auto;
  border-radius: .8rem;
  border: .06rem solid #e7e9ee;
  background: #fafbfd;
  margin: 0;
  transition: transform .18s ease, box-shadow .2s ease;
}
@media (max-width: 640px) {
  main .homepage-countdown-group { width: calc(50% - .25rem) !important; }
}
body.cp-theme-dark main .homepage-countdown-group {
  background: #1c1e22;
  border-color: #2c2f36;
}
main .homepage-countdown-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1.2rem -.5rem rgba(15, 23, 42, .15);
}
main .homepage-recommend-item {
  border-radius: .65rem;
  transition: background-color .15s ease, transform .15s ease;
}
main .homepage-recommend-item:hover { transform: translateX(.2rem); }

/* ---------- 文章排版（apk / faq / 攻略等） ---------- */
main a { text-underline-offset: .18em; }
main table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 1rem 0;
  border: .06rem solid #e2e4ea;
  border-radius: .6rem;
  overflow: hidden;
  font-size: .9rem;
}
body.cp-theme-dark main table { border-color: #2c2f36; }
main table th, main table td {
  padding: .55rem .8rem;
  border-bottom: .05rem solid #eceef2;
}
body.cp-theme-dark main table th,
body.cp-theme-dark main table td { border-bottom-color: #26292f; }
main table tr:last-child td { border-bottom: none; }
main table thead th {
  background: #f5f7fb;
  font-weight: 600;
  text-align: left;
}
body.cp-theme-dark main table thead th { background: #22252b; }
main table tbody tr:hover td { background: rgba(74, 108, 247, .05); }
main blockquote {
  margin: 1rem 0;
  padding: .55rem 1rem;
  border-left: .28rem solid #c7cdd8;
  border-radius: .35rem;
  background: rgba(127, 135, 150, .08);
}
main hr {
  border: none;
  height: .06rem;
  background: linear-gradient(90deg, transparent, #d2d6de 20%, #d2d6de 80%, transparent);
  margin: 2rem 0;
}
main img { border-radius: .5rem; }
main .layouts-card-img, main .cp-featured-card-img-container img { border-radius: 0; }

/* ---------- 页脚 ---------- */
#cp-footer {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: .06rem solid #e7e9ee;
  font-size: .82rem;
  opacity: .78;
  line-height: 1.8;
}
body.cp-theme-dark #cp-footer { border-top-color: #2c2f36; }

/* ---------- 移动端微调 ---------- */
@media (max-width: 640px) {
  main h1 { font-size: 1.55rem; }
  main h2 { font-size: 1.18rem; margin-top: 1.7rem; }
  #homepage-site-name h1 { font-size: 1.7rem; }
  main { padding-left: .9rem; padding-right: .9rem; }
}

/* ===== 全站正文宽度统一：对称居中（2026-10-10） =====
   背景：部分页面（如 /apk）内联了 @media(min-width:768px){main{padding-right:1rem}}，
   把主题的右边距覆盖掉，导致大屏上正文一路铺到最右侧、与侧栏不对称。
   这里强制恢复主题原生的对称边距：>=1632px 两侧各 calc(50% - 528px)（正文 1056px 居中），
   1280~1631px 两侧各 272px。 */
@media (min-width: 1280px) and (max-width: 1631px) {
  main { padding-right: 272px !important; }
}
@media (min-width: 1632px) {
  main {
    padding-left: calc(50% - 528px) !important;
    padding-right: calc(50% - 528px) !important;
  }
}

/* ---------- 页脚备案号（ICP + 公安联网备案） ---------- */
#cp-footer .cp-beian-line { margin-top: .35rem; font-size: .78rem; line-height: 1.7; }
#cp-footer .cp-beian-line a { text-decoration: none; }
#cp-footer .cp-beian-line a:hover { text-decoration: underline; }
#cp-footer .cp-beian-icon { vertical-align: -.12em; margin-right: .18rem; display: inline-block; }
