/* ================================================================
   软件库 - 公共样式
   ================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { overflow-y: scroll; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5; color: #333; padding-bottom: 0; min-height: 100vh;
  transition: background .3s, color .3s; overflow-x: hidden;
}
body.dark-mode { background: #1a1a1a; color: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* 顶部搜索栏 */
.search-header {
  background: #fff; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #eee;
  display: flex; align-items: center;
}
body.dark-mode .search-header { background: #1f1f1f; border-bottom-color: #333; }
.search-bar {
  flex: 1; display: flex; align-items: center; background: #f5f5f5;
  border-radius: 20px; padding: 8px 16px; cursor: pointer;
}
body.dark-mode .search-bar { background: #333; }
.search-icon { width: 18px; height: 18px; margin-right: 8px; color: #999; flex-shrink: 0; }
.search-input {
  flex: 1; border: none; outline: none; font-size: 15px; background: transparent;
  color: #333; cursor: pointer;
}
body.dark-mode .search-input { color: #fff; }
.search-input::placeholder { color: #999; }
body.dark-mode .search-input::placeholder { color: #666; }
.dark-mode-toggle {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  margin-left: 10px; cursor: pointer; border-radius: 50%; transition: background .2s;
}
.dark-mode-toggle:active { background: rgba(0,0,0,.05); }
body.dark-mode .dark-mode-toggle:active { background: rgba(255,255,255,.1); }
.dark-mode-toggle svg { width: 22px; height: 22px; color: #000; }
body.dark-mode .dark-mode-toggle svg { color: #fff; }

/* 搜索栏（发现页内嵌） */
.search-box-bar {
  background: #fff; padding: 8px 16px; border-bottom: 1px solid #eee;
  display: flex; align-items: center;
}
body.dark-mode .search-box-bar { background: #1f1f1f; border-bottom-color: #333; }
.search-input-field {
  flex: 1; padding: 10px 16px; border: 1px solid #ddd; border-radius: 20px;
  font-size: 15px; outline: none; background: #fff;
}
body.dark-mode .search-input-field { background: #2a2a2a; border-color: #444; color: #fff; }
.search-submit-btn {
  padding: 10px 20px; background: #07c160; color: #fff; border: none;
  border-radius: 20px; font-size: 14px; cursor: pointer;
}

/* Banner */
.banner {
  position: relative; margin: 12px; height: 180px; border-radius: 12px;
  overflow: hidden; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff;
}
.banner-overlay-center {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 20px; color: #fff;
}
.banner-title { font-size: 20px; font-weight: bold; margin-bottom: 4px; }
.banner-subtitle { font-size: 13px; opacity: .9; }

/* 分类图标区 */
.category-section {
  background: #fff; margin: 12px; border-radius: 12px; padding: 20px 10px;
  display: flex; flex-wrap: wrap; justify-content: space-around;
}
body.dark-mode .category-section { background: #2a2a2a; }
.category-item {
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
  transition: transform .2s; min-width: 60px;
}
.category-item:active { transform: scale(.95); }
.category-icon {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 8px;
}
.category-icon.purple { background: linear-gradient(135deg, #667eea, #764ba2); }
.category-icon.blue { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.category-icon.orange { background: linear-gradient(135deg, #fa709a, #fee140); }
.category-icon.green { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.category-icon.cyan { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.category-icon-image { background: transparent !important; border-radius: 16px; overflow: hidden; }
.category-icon-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.category-name { font-size: 13px; color: #333; }
body.dark-mode .category-name { color: #ddd; }
.category-horizontal {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border-radius: 12px; padding: 12px 14px; text-decoration: none; color: #333;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
body.dark-mode .category-horizontal { background: #2a2a2a; color: #ddd; box-shadow: none; }

/* 节标题 */
.section-title { padding: 16px 16px 8px; font-size: 16px; font-weight: bold; }
.hot-section-title { display: flex; align-items: center; gap: 7px; }
.section-title-icon { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; vertical-align: -5px; }
.header-title-icon { width: 22px; height: 22px; object-fit: contain; vertical-align: -4px; margin-right: 5px; }
.page-title-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: -4px; margin-right: 5px; }
.balance-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: -4px; }
.coin-icon { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; }
.log-icon-img { width: 24px; height: 24px; object-fit: contain; display: block; }
.task-icon-img { width: 28px; height: 28px; object-fit: contain; display: block; }
.btn-icon { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; }
.stat-icon { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; }
.checkin-main-icon { width: 48px; height: 48px; object-fit: contain; display: block; margin: 0 auto 12px; }

/* 首页分段控件（热门推荐 / 最新上架）：胶囊轨道 + 选中项白底凸起，与 APP 端 homeTabRow 同源 */
.home-tabs { display: flex; justify-content: center; padding: 16px 16px 8px; }
.home-tabs-track {
  display: inline-flex; align-items: center; padding: 4px;
  border-radius: 999px; background: #f1f3f5;
}
.home-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 15px; font-weight: normal; color: #888;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .18s, color .18s, box-shadow .18s;
}
.home-tab.active { background: #fff; color: #333; font-weight: bold; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.home-tab-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
body.dark-mode .home-tabs-track { background: #333; }
body.dark-mode .home-tab { color: #888; }
body.dark-mode .home-tab.active { background: #4c4c4c; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* MOD游戏列表 · 角标类型筛选（第十八轮附）：与首页 .home-tabs 同源，字号小一档，居中嵌入列表卡片顶部 */
.badge-filter { display: flex; justify-content: center; padding: 12px 16px 10px; border-bottom: 1px solid #f0f0f0; }
.badge-filter-track {
  display: inline-flex; align-items: center; padding: 3px;
  border-radius: 999px; background: #f1f3f5;
}
.badge-filter-item {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: normal; color: #888;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .18s, color .18s, box-shadow .18s;
}
.badge-filter-item.active { background: #fff; color: #333; font-weight: bold; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.badge-filter-empty { padding: 48px 20px; text-align: center; font-size: 14px; color: #999; }
body.dark-mode .badge-filter { border-bottom-color: #3a3a3a; }
body.dark-mode .badge-filter-track { background: #333; }
body.dark-mode .badge-filter-item { color: #888; }
body.dark-mode .badge-filter-item.active { background: #4c4c4c; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* 应用列表 */
.app-list { background: #fff; margin: 0 12px; border-radius: 12px; overflow: hidden; }
body.dark-mode .app-list { background: #2a2a2a; }
.app-item {
  display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background .2s;
}
body.dark-mode .app-item { border-bottom-color: #3a3a3a; }
.app-item:last-child { border-bottom: none; }
.app-item:active { background: #f8f8f8; }
body.dark-mode .app-item:active { background: #333; }
.app-icon {
  width: 60px; height: 60px; border-radius: 12px; object-fit: cover;
  flex-shrink: 0;
}
.app-icon-placeholder {
  width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; font-weight: 700;
}
.icon-badge-wrap {
  position: relative; width: 60px; height: 60px; margin-right: 14px;
  border-radius: 12px; overflow: hidden; flex: 0 0 60px;
}
.icon-badge-wrap-detail {
  width: 72px; height: 72px; border-radius: 16px; flex-basis: 72px;
}
.icon-badge {
  position: absolute; z-index: 2; top: 8px; right: -28px; width: 88px; height: 17px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: #fff; background: var(--badge-color, #2389da); transform: rotate(45deg);
  box-shadow: 0 1px 3px rgba(0,0,0,.24); font-size: 9px; font-weight: 700; line-height: 1;
  white-space: nowrap; pointer-events: none;
}
.icon-badge-wrap-detail .icon-badge { top: 10px; right: -30px; width: 100px; height: 19px; font-size: 10px; }
.icon-badge-medium { font-size: 8px; }
.icon-badge-long { font-size: 7px; }
.icon-badge > span { position: relative; z-index: 1; max-width: 78%; overflow: hidden; text-overflow: ellipsis; }
.icon-badge::after {
  content: ''; position: absolute; top: -10px; bottom: -10px; left: -24px; width: 14px;
  background: rgba(255,255,255,.62); filter: blur(2px); transform: skewX(-20deg);
  animation: icon-badge-shine 2.4s ease-in-out infinite;
}
@keyframes icon-badge-shine {
  0%, 35% { transform: translateX(0) skewX(-20deg); opacity: 0; }
  45% { opacity: .9; }
  65%, 100% { transform: translateX(136px) skewX(-20deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .icon-badge::after { animation: none; display: none; }
}

/* ── 首页角落标识 Hot / New（第二十二轮） ─────────────────────────────
   与 APP 端 ui/ShineTagView.java 同源：字母本身着色 + 渐变按周期横向循环平移 = 流光扫动。
   两端共用同一组颜色停靠点与周期宽度，保证视觉一致。
   仅首页「热门推荐 / 最新上架」两个列表使用，由服务端 render_app_icon() 第三参控制。 */

/* 🔴 标识的载体是**外层 holder**，图标容器 `.icon-badge-wrap` 的 overflow 一个字都不改。
   2026-09-23 线上缺陷复盘：第二十二轮曾用 `.icon-badge-wrap-tag{overflow:visible}` 放开容器裁剪，
   结果把既有的 45° 角标（`right:-28px; width:88px; transform:rotate(45deg)`，靠容器裁剪才呈
   「贴角三角」）整条放了出来 —— 首页角标变成斜条幅，且因角标本身高 20px 还压到上一行。
   正确做法是分层：holder 不裁剪（只让 Hot/New 露出去），图标容器照旧裁剪（45° 角标观感不变）。 */
.icon-tag-holder {
  position: relative;
  width: 60px; height: 60px; margin-right: 14px; flex: 0 0 60px;
}
.icon-tag-holder > .icon-badge-wrap {
  width: 100%; height: 100%; margin-right: 0; flex: none;
}

.corner-tag {
  --tag-h: 16px;
  /* 大写字母的**字形高度** ≈ 0.72em（系统字体经验值）。
     探出量必须按它算，不能按 --tag-h（行盒）算：行盒含字体上下留白，
     按行盒算的探出量会被留白吃掉，字母会正好落回图标边界内、看起来完全没露出
     —— APP 端首版在真机上就是这样，靠截图像素取证才发现。 */
  --tag-glyph-h: 0.72em;
  /* 探出量 = 字形高的 2/3（第二十四轮：原为 1/3，按需求「再增加三分之一」翻倍） */
  --tag-over: calc(var(--tag-glyph-h) * 2 / 3);
  /* 行盒内「字形 → 盒边」的间距（**实测校准常数**，随系统字体栈而变）。
     不把 --tag-h 直接改成字形高，是为了沿用已被真机验证过的行盒模型（字体兼容性更好）。
     X = 字形左边缘到盒左（含字形左侧侧边距），Y = 字形底边缘到盒底（行盒底部留白）。
     取值来源：先把两个补偿置 0 实测字形探出（左 5.00 / 下 4.00 CSSpx），
     与目标 5.76 的差额即为补偿量（0.76 / 1.76，Y 再叠加原 1.6）。见 §40。 */
  --tag-tail-x: 0.76px;
  --tag-tail-y: 3.36px;
  --tag-period: 120px;
  position: absolute; z-index: 3;
  left: 0; bottom: 0;
  height: var(--tag-h); line-height: var(--tag-h);
  font-size: 12px; font-weight: 800; letter-spacing: .3px;
  /* 左下角：字母**向左、向下各探出字形高的 2/3**（需求原文）。
     两个补偿量加在**盒**的偏移上，使「字形」（可见的字母，而非不可见的行盒）恰好探出 --tag-over。 */
  transform: translate(calc((var(--tag-over) + var(--tag-tail-x)) * -1),
                       calc(var(--tag-over) + var(--tag-tail-y)));
  white-space: nowrap; pointer-events: none; user-select: none;
  /* 字母本身着色：横向循环渐变裁进文字，再平移背景色位置 = 流光 */
  color: transparent;
  -webkit-background-clip: text; background-clip: text;
  background-repeat: repeat-x; background-size: var(--tag-period) 100%;
  animation: corner-tag-flow 2.4s linear infinite;
  /* 字母压在图标上，加一层文字投影保证可读性（透明填充下投影仍按字形绘制） */
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

/* Hot：红色流光 —— 红底 + 一道白色高光扫过 */
.corner-tag-hot {
  --tag-period: 120px;
  background-image: linear-gradient(90deg,
      #ff1a1a 0%, #ff1a1a 18%, #ff6b6b 28%, #ffffff 34%,
      #ff6b6b 40%, #ff1a1a 52%, #ff1a1a 100%);
}

/* New：彩色渐变流光 —— 红橙黄绿青蓝紫循环 + 白光扫过（仅当天发布显示） */
.corner-tag-new {
  --tag-period: 180px;
  background-image: linear-gradient(90deg,
      #ff3b30 0%, #ff9500 12%, #ffcc00 24%, #34c759 36%,
      #00c7be 48%, #007aff 60%, #af52de 72%, #ff2d95 82%,
      #ffffff 90%, #ff3b30 100%);
}

/* 一个周期内平移一个周期宽度 ⇒ 无缝循环 */
@keyframes corner-tag-flow {
  from { background-position: 0 0; }
  to   { background-position: calc(var(--tag-period) * -1) 0; }
}

@media (prefers-reduced-motion: reduce) {
  .corner-tag { animation: none; }
}

.app-info { flex: 1; min-width: 0; }
.app-name {
  font-size: 17px; font-weight: 500; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-stats { font-size: 13px; color: #999; display: flex; align-items: center; gap: 12px; }
.app-stat-icon { width: 14px; height: 14px; object-fit: contain; vertical-align: -2px; margin-right: 3px; }
body.dark-mode .app-stats { color: #888; }
.stat-item { display: flex; align-items: center; gap: 4px; }
.download-btn {
  padding: 6px 20px; background: #07c160; color: #fff;
  border: none; border-radius: 20px; font-size: 14px;
  cursor: pointer; flex-shrink: 0; transition: all .2s; font-weight: 500;
}
.download-btn:active { opacity: .7; }

/* 首页列表底部提示（第二十五轮）：居中、始终显示、不参与任何数据/加载状态判断。
   颜色取与 .app-stats 同一档的次要灰字（浅色 #999 / 暗色 #888），跟随明暗主题。
   底部留白无需在此处理：bottom-nav.php 已注入 body 的 padding-bottom 70px（fixed 底栏 60px）。
   与 APP 端 view_home.xml 的 homeFooterTip / MainActivity 的 palette.secondary 同源，改动需同步。 */
.home-footer-tip {
  margin: 16px 12px 4px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: #999;
}
body.dark-mode .home-footer-tip { color: #888; }

/* 底部导航 */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; width: 100%; height: 60px;
  background: #fff; display: flex; align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,.05); z-index: 1000; padding: 0 4px;
  border-top: 1px solid #eee;
}
body.dark-mode .bottom-nav { background: #1f1f1f; border-top: 1px solid #333; }
.nav-item, .nav-post-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; height: 50px; text-decoration: none; cursor: pointer;
  color: #888; font-size: 10px;
}
.nav-item.active { color: #333; font-weight: 600; }
body.dark-mode .nav-item { color: #888; }
body.dark-mode .nav-item.active { color: #fff; }
.nav-item .nav-icon { width: 20px; height: 20px; margin-bottom: 3px; fill: currentColor; }
.nav-item span, .nav-post-btn span { font-size: 10px; line-height: 1; }
.nav-post-btn { position: relative; }
.nav-post-btn.active { color: #333; }
body.dark-mode .nav-post-btn.active { color: #fff; }
.nav-post-btn .post-circle {
  width: 44px; height: 44px; background: linear-gradient(135deg, #ff4444, #d63031);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; box-shadow: 0 4px 12px rgba(255,68,68,.4);
  border: 3px solid #fff; transition: all .3s;
}
.nav-post-btn:active .post-circle { transform: scale(.9); }
body.dark-mode .nav-post-btn .post-circle { border-color: #121212; }
.nav-post-btn .post-circle svg { width: 24px; height: 24px; fill: white; }

/* 发现页分类栏 */
.discover-category-bar {
  display: flex; overflow-x: auto; gap: 8px; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid #eee; white-space: nowrap;
  scrollbar-width: none; position: sticky; top: 56px; z-index: 99;
}
body.dark-mode .discover-category-bar { background: #1f1f1f; border-bottom-color: #333; }
.discover-category-bar::-webkit-scrollbar { display: none; }
.discover-cat-btn {
  padding: 6px 16px; border-radius: 20px; border: 1px solid #d9d9d9;
  background: #fff; cursor: pointer; font-size: 13px; flex-shrink: 0;
  text-decoration: none; color: #333; transition: all .2s;
}
body.dark-mode .discover-cat-btn { background: #2a2a2a; border-color: #444; color: #ddd; }
.discover-cat-btn:hover { border-color: #07c160; color: #07c160; }
.discover-cat-btn.active { background: #07c160; color: #fff; border-color: #07c160; }
.discover-list { padding: 12px; }
.discover-list .app-list { margin: 0; }

/* 详情页 - 顶部导航 */
.top-nav {
  position: sticky; top: 0; background: #fff; padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  display: flex; align-items: center; z-index: 100; border-bottom: 1px solid #eee;
}
body.dark-mode .top-nav { background: #1f1f1f; border-bottom-color: #333; }
.back-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-right: 12px;
}
.back-btn svg { width: 24px; height: 24px; color: #333; }
body.dark-mode .back-btn svg { color: #fff; }

/* 游戏列表页置顶栏 · 右上角小型搜索框（第二十轮）
   绝对定位：**不参与 .search-header 的 flex 布局** ⇒ 标题的盒子与居中位置与改动前完全一致，
   搜索框放多宽都不会把标题挤离中心。
   .search-header 本身是 position:sticky（sticky 即定位元素），直接充当绝对定位的包含块。
   top:50% + translateY(-50%) = 与置顶栏文本垂直居中对齐。 */
.header-search {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 1;
  display: flex; align-items: center; box-sizing: border-box;
  width: 104px; height: 32px; padding: 0 12px;
  border-radius: 16px; background: #f5f5f5;
}
body.dark-mode .header-search { background: #333; }
.header-search-icon { width: 15px; height: 15px; margin-right: 6px; color: #999; flex-shrink: 0; }
.header-search-input {
  flex: 1; width: 100%; min-width: 0; padding: 0; border: none; outline: none;
  background: transparent; font-size: 13px; color: #333;
}
body.dark-mode .header-search-input { color: #fff; }
.header-search-input::placeholder { color: #999; }
body.dark-mode .header-search-input::placeholder { color: #666; }
.nav-title {
  flex: 1; font-size: 17px; font-weight: 500; text-align: center;
  margin-right: 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 轮播 */
.swiper-container { width: 100%; overflow: hidden; position: relative; background: #000; }
.swiper-wrapper {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.swiper-wrapper::-webkit-scrollbar { display: none; }
.swiper-slide { flex-shrink: 0; width: 100%; scroll-snap-align: start; }
.swiper-slide img { width: 100%; height: 220px; object-fit: contain; display: block; background: #f5f5f5; }
/* 应用详情页截图 - 横向滑动，按屏幕宽度自适应每屏数量 */
.screenshot-swiper { background: transparent !important; }
.screenshot-swiper .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  padding: 6px;
  box-sizing: border-box;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch;
}
.screenshot-swiper .swiper-wrapper::-webkit-scrollbar { display: none; }
.screenshot-swiper .swiper-slide {
  flex: 0 0 calc((100% - 8px) / 2) !important;
  width: calc((100% - 8px) / 2) !important;
  padding: 0 !important;
  scroll-snap-align: start !important;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}
.screenshot-swiper .swiper-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 340px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  border-radius: 12px;
  background: #f5f5f5;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
body.dark-mode .screenshot-swiper .swiper-slide img { background: #2a2a2a; }
.screenshot-swiper .swiper-dots { display: none !important; }

@media (min-width: 481px) {
  .screenshot-swiper .swiper-slide {
    flex: 0 0 calc((100% - 20px) / 3) !important;
    width: calc((100% - 20px) / 3) !important;
  }
}

@media (min-width: 768px) {
  .screenshot-swiper .swiper-wrapper {
    gap: 12px;
    padding: 4px 0;
  }
  .screenshot-swiper .swiper-slide {
    flex: 0 0 calc((100% - 36px) / 4) !important;
    width: calc((100% - 36px) / 4) !important;
  }
}

/* ===== 截图点击放大 Lightbox ===== */
#lightbox {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  cursor: zoom-out; overflow: hidden;
  touch-action: none;
}
#lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
#lightbox .lb-close {
  position: absolute; top: 14px; right: 18px;
  width: 40px; height: 40px; color: #fff;
  font-size: 30px; line-height: 40px; text-align: center;
  cursor: pointer; background: rgba(255,255,255,.15); border-radius: 50%;
  user-select: none;
}
#lightbox .lb-prev,
#lightbox .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; color: #fff;
  font-size: 30px; line-height: 44px; text-align: center;
  cursor: pointer; background: rgba(0,0,0,.45); border-radius: 50%;
  user-select: none; z-index: 10; border: 1.5px solid rgba(255,255,255,.25);
}
#lightbox .lb-prev { left: 12px; }
#lightbox .lb-next { right: 12px; }
#lightbox .lb-prev:active, #lightbox .lb-next:active { background: rgba(0,0,0,.65); }
#lightbox .lb-prev.hidden, #lightbox .lb-next.hidden { display: none; }
.placeholder-slide {
  width: 100%; height: 220px; display: flex; align-items: center;
  justify-content: center; background: #2a2a2a; color: #666; font-size: 14px;
}
.swiper-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.swiper-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.5); transition: all .3s;
}
.swiper-dot.active { width: 18px; border-radius: 3px; background: #fff; }

/* 详情信息区 */
.app-info-section { background: #fff; padding: 16px; margin-bottom: 10px; }
body.dark-mode .app-info-section { background: #2a2a2a; }
.app-header { display: flex; align-items: flex-start; margin-bottom: 14px; }
.detail-app-icon {
  width: 72px; height: 72px; border-radius: 16px; object-fit: cover;
  flex-shrink: 0;
}
.detail-app-icon-placeholder {
  width: 72px; height: 72px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; font-weight: 700;
}
.app-basic-info { flex: 1; min-width: 0; }
.detail-app-name { font-size: 19px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.app-tags { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 8px; }
.app-tag { font-size: 12px; color: #666; }
body.dark-mode .app-tag { color: #aaa; }
.app-tag:not(.row-start)::before { content: '|'; color: #ddd; margin: 0 8px; }
body.dark-mode .app-tag:not(.row-start)::before { color: #444; }

/* 特色标签 */
.feature-tags {
  display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
body.dark-mode .feature-tags { border-top-color: #3a3a3a; }
.feature-tag {
  display: flex; align-items: center; padding: 4px 10px;
  background: #f5f5f5; border-radius: 14px; font-size: 13px; color: #1a73e8;
}
body.dark-mode .feature-tag { background: #333; color: #5b9cf0; }

/* 卡片 */
.section-card { background: #fff; margin-bottom: 10px; padding: 16px; }
body.dark-mode .section-card { background: #2a2a2a; }
.section-card .section-title { padding: 0 0 14px; font-size: 17px; font-weight: 600; }

/* 福利列表 */
.welfare-list { display: flex; flex-direction: column; gap: 8px; }
.welfare-item { font-size: 14px; color: #ff6b35; display: flex; align-items: center; gap: 6px; }
body.dark-mode .welfare-item { color: #ff8c5a; }
.welfare-item::before { content: '•'; font-size: 18px; line-height: 1; }

/* 介绍 */
.intro-content {
  font-size: 14px; line-height: 1.7; color: #666; position: relative;
  max-height: 80px; overflow: hidden; transition: max-height .3s;
}
body.dark-mode .intro-content { color: #aaa; }
.intro-content.expanded { max-height: 1000px; }
.intro-toggle {
  display: none; align-items: center; justify-content: center; gap: 4px;
  margin-top: 10px; color: #07c160; font-size: 14px; cursor: pointer;
}
.intro-toggle.visible { display: flex; }

/* 详细信息 */
.detail-list { display: flex; flex-direction: column; gap: 12px; }
.detail-item { display: flex; justify-content: space-between; align-items: center; }
.detail-label { font-size: 14px; color: #999; }
body.dark-mode .detail-label { color: #888; }
.detail-value { font-size: 14px; color: #333; }
body.dark-mode .detail-value { color: #ddd; }

/* ===== 暂未开放占位页（coming-soon.php，受 settings.category_placeholder 控制） ===== */
.coming-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px 24px 48px;
  min-height: calc(100vh - 132px);
}
.coming-soon-art {
  width: 62vw; max-width: 232px; height: auto; display: block;
  animation: csFloat 3.6s ease-in-out infinite;
  user-select: none; -webkit-user-drag: none;
}
@keyframes csFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .coming-soon-art { animation: none; }
}
.coming-soon-title {
  margin-top: 10px; font-size: 20px; font-weight: 700; color: #333; letter-spacing: .5px;
}
.coming-soon-sub {
  margin-top: 9px; font-size: 13px; color: #999; line-height: 1.75; max-width: 260px;
}
.coming-soon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 24px; height: 40px; padding: 0 26px; border-radius: 20px;
  background: #07c160; color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(7,193,96,.28); transition: transform .15s;
}
.coming-soon-btn:active { transform: scale(.97); }
body.dark-mode .coming-soon-title { color: #fff; }
body.dark-mode .coming-soon-sub { color: #8f8f8f; }

/* 响应式 */
@media (max-width: 640px) {
  .search-header { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .category-section { justify-content: space-around; }
}
