/* ============================================================
 * subpage.css —— 子页面体系专用样式（独立文件，不动 style.css）
 * ============================================================
 * 谁用它：
 *   1. 所有子页面（通过 _inc/head.php 引用）—— 顶部条 / 内容区 / 卡片 / Tab
 *   2. 首页的「更多页面」入口区块（index.php 额外引用一次）
 *   3. 搜索结果的「子页面」结果块
 *
 * 设计语言与站内一致：底 #0f0f1a，卡片 rgba(255,255,255,.04)，
 * 强调色渐变 #6366f1 → #8b5cf6。
 * 全部为新增类名，不与 style.css 中任何既有选择器冲突。
 * ============================================================ */

/* ===== 顶部条（在 .header 基础上追加微调） ===== */
.subpage-topbar { gap: 8px; }
.subpage-topbar-icon { margin-right: 4px; }
.subpage-topbar .header-back {
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  padding-bottom: 3px;
}
.subpage-topbar .header-right {
  text-decoration: none;
  font-size: 17px;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.subpage-topbar .header-right:active { opacity: 0.5; }

/* ===== 内容区 ===== */
.subpage-main { padding: 12px 0 0; }

/* ===== 子页面内页头（群号 / 公众号 / 安卓获取 / 更新时间） ===== */
.sub-hero {
  margin: 0 12px 12px;
  padding: 18px 16px;
  border-radius: 12px;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid rgba(255,255,255,0.07);
}
.sub-hero h1 {
  font-size: 17px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
}
.sub-hero-info {
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255,255,255,0.72);
}
.sub-hero-info a { color: #a5b4fc; }
.sub-hero-get {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 14px;
  font-weight: 600;
}
.sub-hero-get a { color: #fbbf24; }
.sub-hero-time {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

/* ===== Tab 切换（通用：任意数量） ===== */
.sub-tabs {
  position: sticky;
  top: 52px;              /* 吸在顶部条下面 */
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: #0f0f1a;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 12px;
}
.sub-tab {
  flex: 1;
  padding: 9px 4px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.sub-tab.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(99,102,241,0.3);
}
.sub-tab .cnt {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

/* ===== 面板 ===== */
.sub-pane { display: none; padding: 0 12px; }
.sub-pane.active { display: block; }

/* ===== APP 卡片 ===== */
.app-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  scroll-margin-top: 110px;   /* 锚点跳转时不被吸顶的 Tab 挡住 */
}
.app-card:target {
  border-color: rgba(99,102,241,0.55);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.35);
}
.app-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stars { color: #fbbf24; font-size: 13px; font-weight: 400; letter-spacing: 1px; }
.app-card > div {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.62);
}
.app-link { color: #a5b4fc; word-break: break-all; }
.app-link:active { color: #c7d2fe; }
.app-note { color: #4ade80; font-weight: 500; }
.meta { font-size: 12px; color: rgba(255,255,255,0.38); }
.method { color: rgba(255,255,255,0.58); }
.comment { color: rgba(255,255,255,0.58); }
.note { color: #fbbf24; font-size: 12px; }
.source {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  background: rgba(255,255,255,0.06);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ===== 页脚补充 ===== */
.subpage-footer-note {
  font-size: 12px;
  color: rgba(255,255,255,0.32);
  margin-bottom: 14px;
}

/* ============================================================
 * 首页「更多页面」入口区块
 * ============================================================ */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.page-item {
  display: block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s;
}
.page-item:active { transform: scale(0.98); background: rgba(255,255,255,0.07); }
.page-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  margin-bottom: 9px;
  background: linear-gradient(135deg, rgba(99,102,241,0.32), rgba(139,92,246,0.32));
}
.page-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 4px;
}
.page-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.42);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-tags {
  margin-top: 8px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.page-cat {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  color: #c7d2fe;
  background: rgba(99,102,241,0.2);
}
.page-updated {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
}

/* ============================================================
 * 搜索结果里的「子页面」结果块
 * ============================================================ */
.sp-result-group { margin-bottom: 6px; }
.sp-result-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.sp-result-head .sp-result-head-bar {
  width: 3px; height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
.sp-item {
  display: block;
  margin: 0 12px 8px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: all 0.2s;
}
.sp-item:active { background: rgba(255,255,255,0.08); }
.sp-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e8e8f0;
  font-weight: 500;
  line-height: 1.4;
}
.sp-item-icon { font-size: 14px; flex-shrink: 0; }
.sp-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-item-badge {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #c7d2fe;
  background: rgba(99,102,241,0.2);
}
.sp-item-snippet {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-item-group {
  margin-top: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}
.sp-item mark {
  background: transparent;
  color: #a5b4fc;
  font-weight: 600;
}
.sp-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.sp-divider .sp-result-head-bar {
  width: 3px; height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
.sp-loading {
  text-align: center;
  padding: 10px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ===== 响应式 ===== */
@media (min-width: 480px) {
  .pages-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .sub-hero { margin: 0 20px 14px; padding: 22px 20px; }
  .sub-tabs { padding: 10px 20px; }
  .sub-pane { padding: 0 20px; }
  .pages-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}
@media (min-width: 1024px) {
  .sub-hero { max-width: 860px; margin-left: auto; margin-right: auto; }
  .sub-tabs { max-width: 860px; margin-left: auto; margin-right: auto; }
  .sub-pane { max-width: 860px; margin-left: auto; margin-right: auto; }
}

/* ============================================================
 * 更新记录（/updates/）—— 页头统计 / 月份Tab / 天分组 / 资源条目
 * 复用了 .sub-hero / .sub-tabs / .sub-pane / .sub-tab 的通用样式，
 * 这里只补本页独有的部分。
 * ============================================================ */

/* ===== 页内搜索框（替换原「安卓软件总目录」入口） ===== */
.upd-search {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.upd-search-box { position: relative; }
.upd-search input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 36px 9px 33px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.28);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.upd-search input::placeholder { color: rgba(255,255,255,0.3); }
.upd-search input::-webkit-search-cancel-button { display: none; }
.upd-search input:focus {
  border-color: rgba(165,180,252,0.55);
  background: rgba(0,0,0,0.4);
}
.upd-search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  line-height: 1;
  opacity: 0.5;
  pointer-events: none;
}
.upd-search-clr {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.upd-search-clr.on { display: flex; }
.upd-search-clr:active { background: rgba(255,255,255,0.2); }

/* ===== 搜索结果（纯前端渲染；无 id，不会和列表锚点冲突） ===== */
.upd-search-res { margin: 0 12px 12px; }
.upd-search-cnt {
  padding: 0 2px 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.upd-hit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upd-hit-date {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
}
.upd-hit-none {
  padding: 26px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* ===== 页头三格统计 ===== */
.upd-stats {
  display: flex;
  gap: 8px;
  margin: 0 12px 12px;
}
.upd-stat {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.upd-stat b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.upd-stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ===== 月份 Tab：横向可滚、不换行、隐藏滚动条 ===== */
.upd-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.upd-tabs::-webkit-scrollbar { display: none; }
.upd-tabs .sub-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  white-space: nowrap;
}

/* ===== 按天分组 ===== */
.upd-day { margin-bottom: 14px; }
.upd-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px 8px;
}
.upd-day-date {
  font-size: 14px;
  font-weight: 700;
  color: #c7d2fe;
  letter-spacing: 0.5px;
}
.upd-day-week {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.upd-day-count {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(99,102,241,0.16);
  color: #a5b4fc;
}

/* ===== 资源条目 ===== */
.upd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upd-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  scroll-margin-top: 110px;   /* 锚点跳转时不被吸顶的 Tab 挡住 */
}
.upd-item:target {
  border-color: rgba(99,102,241,0.55);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.35);
}
.upd-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.upd-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
}
.upd-ver,
.upd-plat {
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.upd-ver  { background: rgba(99,102,241,0.18); color: #a5b4fc; }
.upd-plat { background: rgba(251,191,36,0.14); color: #fbbf24; }

.upd-sub {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
/* 分类 / 大小之间点分隔（链接除外，它靠右） */
.upd-sub > .upd-cat:not(:first-child)::before,
.upd-sub > .upd-size:not(:first-child)::before {
  content: "·";
  margin-right: 7px;
  color: rgba(255,255,255,0.2);
}
.upd-cat { color: rgba(255,255,255,0.45); }
.upd-link {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  text-decoration: none;
}
.upd-link:active { opacity: 0.6; }
.upd-nolink {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.22);
}

@media (min-width: 768px) {
  .upd-stats { margin: 0 20px 14px; gap: 12px; }
  .upd-stat b { font-size: 19px; }
  .upd-search-res { margin: 0 20px 14px; }
  .upd-search input { font-size: 14px; }
}
@media (min-width: 1024px) {
  .upd-stats { max-width: 860px; margin-left: auto; margin-right: auto; }
  .upd-search-res { max-width: 860px; margin-left: auto; margin-right: auto; }
}

/* ============================================================
 * 子页面「访问权限」锁定页  (2026-09-16)
 * 由 functions.php 的 page_lock_body() 输出，配合 _inc/head.php 的权限门。
 * 类型：password（口令框） / partial（预览+口令框） / guide（只放引导）
 * ============================================================ */
.page-item-locked { border-color: rgba(251,191,36,0.22); }
.page-icon { position: relative; }
.page-lock {
  position: absolute;
  right: -3px;
  bottom: -3px;
  font-size: 12px;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}

.lock-card {
  max-width: 560px;
  margin: 8px 16px 24px;
  padding: 26px 20px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  text-align: center;
}
.lock-icon { font-size: 34px; line-height: 1; margin-bottom: 12px; }
.lock-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.lock-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* --- 口令表单 --- */
.lock-form {
  display: flex;
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}
.lock-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.lock-input:focus { border-color: rgba(139,92,246,0.65); }
.lock-btn {
  flex: 0 0 auto;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
}
.lock-btn:active { transform: scale(0.97); }
.lock-err {
  margin-top: 12px;
  font-size: 12.5px;
  color: #fca5a5;
}
.lock-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.35);
}

/* --- 部分预览 --- */
.lock-preview {
  position: relative;
  margin: 0 0 20px;
  padding: 14px 14px 0;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  text-align: left;
  overflow: hidden;
}
.lock-preview-hd {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #fbbf24;
  margin-bottom: 10px;
}
.lock-preview-body {
  margin: 0;
  max-height: 260px;
  overflow: hidden;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  white-space: pre-wrap;
  word-break: break-word;
}
.lock-preview-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(15,15,26,0), rgba(15,15,26,0.92));
  pointer-events: none;
}

/* --- 引导内容 --- */
.lock-guide {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  text-align: center;
}
.lock-guide-img {
  display: block;
  max-width: 220px;
  width: 60%;
  margin: 0 auto 14px;
  border-radius: 12px;
}
.lock-guide-text {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  text-align: left;
  word-break: break-word;
}

@media (min-width: 768px) {
  .lock-card { margin: 12px auto 30px; padding: 32px 32px 26px; }
  .lock-title { font-size: 20px; }
}

