/* 摸鱼分享站 — 极简风（3:4 卡片 + 弹窗详情），支持深/浅双主题 */
:root {
  --bg: #0e1116;
  --panel: #171b23;
  --panel-2: #1f2530;
  --border: #2a3140;
  --text: #e8ebf0;
  --text-dim: #9aa4b5;
  --accent: #ff7a3c;
  --accent-2: #3aa7ff;
  --ok: #3ecf8e;
  --header-bg: rgba(14, 17, 22, .88);
  --overlay: rgba(0, 0, 0, .7);
  --shadow: rgba(0, 0, 0, .35);
  --notice-bg: rgba(255, 178, 36, .07);
  --notice-border: rgba(255, 178, 36, .45);
  --notice-text: #e8c87a;
  --notice-title: #ffd08a;
  --radius: 14px;
}
:root[data-theme="light"] {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #eef1f5;
  --border: #dfe3ea;
  --text: #1c2330;
  --text-dim: #6c7688;
  --accent: #f2682e;
  --accent-2: #1f86d8;
  --ok: #1ea36a;
  --header-bg: rgba(255, 255, 255, .9);
  --overlay: rgba(20, 28, 40, .45);
  --shadow: rgba(30, 40, 60, .18);
  --notice-bg: #fff7e6;
  --notice-border: #f5d590;
  --notice-text: #9a6a08;
  --notice-title: #7a5205;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ---------- SVG 图标 ---------- */
.ic {
  width: 1em; height: 1em; display: inline-block;
  vertical-align: -0.12em; flex-shrink: 0;
}

/* ---------- 头部 ---------- */
header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo h1 { margin: 0; font-size: 19px; font-weight: 600; }
.logo .count { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search {
  display: flex; align-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; min-width: 200px;
}
.search input {
  background: none; border: none; outline: none; color: var(--text);
  font-size: 14px; width: 100%;
}
.search input::placeholder { color: var(--text-dim); }
.view-toggle {
  display: flex; gap: 2px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px;
}
.view-toggle button {
  background: none; border: none; color: var(--text-dim);
  font-size: 12px; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.view-toggle button:hover { color: var(--text); }
.view-toggle button.active { background: var(--accent); color: #fff; font-weight: 600; }
/* 主题切换按钮 */
.theme-toggle {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-dim); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .ic { width: 17px; height: 17px; }

/* ---------- 声明条 ---------- */
.notice {
  max-width: 1080px; margin: 16px auto 0;
  padding: 0 20px;
}
.notice-inner {
  display: flex; align-items: center; gap: 12px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: 12px; padding: 12px 16px;
  font-size: 13px; color: var(--notice-text);
}
.notice-inner .ic { font-size: 18px; flex-shrink: 0; }
.notice-inner span { flex: 1; }

/* ---------- 分类 chips ---------- */
.chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 16px 20px 4px; max-width: 1080px; margin: 0 auto;
}
.chip {
  padding: 6px 16px; border-radius: 999px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer; user-select: none; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--text-dim); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---------- 3:4 卡片墙（封面 70% + 信息 30%） ---------- */
.grid {
  max-width: 1080px; margin: 0 auto;
  padding: 14px 20px 40px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px;
}
/* 列表模式：两三列并排，一屏放满 */
.grid.list-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  align-content: start;
}
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-2px); border-color: rgba(255,122,60,.55);
  box-shadow: 0 0 0 1px rgba(255,122,60,.18), 0 8px 24px rgba(0,0,0,.4);
}
.card:active { transform: translateY(1px) scale(.99); }
.cover {
  position: relative; aspect-ratio: 1 / 1;
  background: var(--panel-2);
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.card:hover .cover img { transform: scale(1.05); }
.cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; font-weight: 600;
}
/* 封面底部微弱渐变遮罩 */
.cover-shade {
  position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(to top, rgba(6,8,12,.55), transparent);
  pointer-events: none;
}
/* 左上状态角标 */
.corner-status {
  position: absolute; top: 6px; left: 6px;
  color: #fff; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 5px;
  backdrop-filter: blur(3px);
}
.corner-status.dl { background: var(--accent); }
.corner-status.play { background: #2d8ce6; }
/* 右上运营角标 */
.corner-op {
  position: absolute; top: 6px; right: 6px;
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  backdrop-filter: blur(3px);
}
.corner-op.hot { background: #e5484d; }
.corner-op.new { background: #2fa96b; }
.corner-op.pick { background: linear-gradient(135deg,#d4a017,#f2c94c); color:#241a00; }
/* 信息区：标题 + 一行辅助标签 */
.card-info {
  padding: 8px 10px 9px;
  border-top: 1px solid rgba(255,255,255,.03);
}
.card-title {
  font-size: 12px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub {
  font-size: 10px; color: var(--text-dim); margin-top: 4px;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden;
}
.card-sub i { width: 2px; height: 2px; background: var(--text-dim); border-radius: 50%; flex-shrink: 0; }
.card-sub .sub-crack { color: #b98cff; }
/* 列表视图行：封面 + 标题 + 彩色标签 + 右侧下载按钮 */
.list-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.list-row:hover { border-color: rgba(255,122,60,.5); transform: translateY(-1px); }
.list-row .lr-cover {
  width: 54px; height: 54px; border-radius: 8px; overflow: hidden;
  background: var(--panel-2); flex-shrink: 0; position: relative;
}
.list-row .lr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title {
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-row .lr-title .tag { font-size: 10px; padding: 1px 6px; flex-shrink: 0; }
.list-row .lr-meta { display: flex; gap: 4px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.list-row .lr-meta .tag.cat { font-size: 10px; padding: 1px 7px; background: rgba(58,167,255,.12); color: var(--accent-2); border-radius: 999px; }
/* 彩色特色标签：每个不同颜色 */
.ftag {
  font-size: 10px; line-height: 1.4; padding: 1px 6px; border-radius: 4px;
  white-space: nowrap; border: 1px solid transparent;
}
.ftag.f-green  { color: #4ade80; background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.3); }
.ftag.f-blue   { color: #5eb8ff; background: rgba(94,184,255,.1); border-color: rgba(94,184,255,.3); }
.ftag.f-purple { color: #c79cff; background: rgba(199,156,255,.1); border-color: rgba(199,156,255,.3); }
.ftag.f-orange { color: #ff9f5a; background: rgba(255,159,90,.1); border-color: rgba(255,159,90,.3); }
/* 右侧操作按钮：点击直接跳转 */
.lr-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 12px;
  padding: 8px 12px; border-radius: 8px; transition: filter .15s;
}
.lr-btn:hover { filter: brightness(1.12); color: #fff; }
.lr-btn.play { background: #2d8ce6; }
.lr-btn .ic { font-size: 13px; }

/* ---------- 分页器 ---------- */
.pager {
  max-width: 1080px; margin: 0 auto; padding: 6px 20px 28px;
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.pager button {
  min-width: 36px; height: 36px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.pager button:hover:not(:disabled) { color: var(--text); border-color: #3a4356; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager button.pg-num.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pager .pg-gap { color: var(--text-dim); padding: 0 2px; }
.pager .pg-info { font-size: 12px; color: var(--text-dim); margin-left: 8px; }

/* ---------- 空状态 / 加载 ---------- */
.empty, .loading {
  grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--text-dim);
}
.empty .icon { font-size: 46px; margin-bottom: 10px; }

/* ---------- 详情弹窗：桌面左右分栏 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: var(--overlay); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.app-modal {
  position: relative;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  padding: 22px;
  animation: pop .18s ease-out;
}
@keyframes pop {
  from { transform: scale(.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.am-close, .dm-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all .15s;
}
.am-close:hover, .dm-close:hover { color: var(--accent); border-color: var(--accent); }

/* 详情弹窗（新） */
.detail-modal { max-width: min(900px, 68vw); padding: 0; overflow: hidden; }
.dm-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
  padding-right: 62px;
}
.dm-head-text { flex: 1; min-width: 0; }
.dm-head h3 { margin: 0 0 8px; font-size: 21px; font-weight: 700; line-height: 1.3; }
.dm-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(58,167,255,.12); color: var(--accent-2); }
.tag.cr { background: rgba(164,120,255,.14); color: #b98cff; }
.tag.pin { background: rgba(229,72,77,.14); color: #ff6b6b; }
.tag.on { background: rgba(62,207,142,.12); color: var(--ok); }
.dm-body { display: flex; gap: 20px; padding: 18px 22px 8px; min-height: 320px; }
.dm-left { width: 45%; flex-shrink: 0; }
.dm-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.dm-cover {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
  background: var(--panel-2); position: relative;
}
.dm-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.dm-noimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.dm-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.dm-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 10px; color: var(--text-dim); font-size: 12px;
}
.dm-loading img { width: 100px; height: 100px; object-fit: contain; }
.dm-meta { font-size: 11px; color: var(--text-dim); line-height: 1.8; }
.dm-desc-wrap { position: relative; }
.dm-desc { margin: 0; font-size: 13px; color: var(--text); line-height: 1.75; white-space: pre-wrap; }
.dm-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-dim); padding: 8px 0; }
.dm-empty img { width: 96px; height: 96px; object-fit: contain; }
.dm-desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dm-more {
  background: none; border: none; color: var(--accent-2); font-size: 12px;
  padding: 4px 0 0; cursor: pointer;
}
.dm-more:hover { text-decoration: underline; }
/* 特色标签 + 声明：绑定成一组固定在底部，标签紧贴声明上方 */
.dm-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.dm-features { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.dm-features span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; line-height: 1.4; color: var(--ok);
}
.dm-features .ic { font-size: 14px; vertical-align: middle; margin: 0; }
.dm-note {
  font-size: 11px; color: var(--text-dim); line-height: 1.6;
  background: rgba(255,255,255,.02); border-radius: 6px; padding: 8px 10px;
}
.dm-actions { border-top: 1px solid var(--border); padding: 14px 22px 18px; }
.dm-actions-inner { display: flex; gap: 10px; align-items: stretch; }
.dm-primary {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  border: none; border-radius: 8px; padding: 13px; cursor: pointer;
  transition: filter .15s;
}
.dm-primary:hover { filter: brightness(1.1); }
.dm-primary.play { background: #2d8ce6; }
.dm-primary.disabled { background: var(--panel-2); color: var(--text-dim); cursor: default; }
.dm-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 8px; padding: 0 14px; font-size: 12px; cursor: pointer;
}
.dm-secondary:hover { color: var(--text); border-color: #3a4356; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 20px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
footer {
  text-align: center; color: var(--text-dim); font-size: 12px;
  padding: 20px; border-top: 1px solid var(--border);
}
footer a { color: var(--text-dim); text-decoration: underline; }

/* ============================================================
   后台 admin 样式（与前台共用文件）
   ============================================================ */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; }
.login-box {
  max-width: 360px; margin: 80px auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.login-box h1 { font-size: 20px; margin: 0 0 4px; }
.login-box p { margin: 0 0 20px; color: var(--text-dim); font-size: 13px; }
.input, textarea.input, select.input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 14px;
  outline: none; font-family: inherit;
}
.input:focus { border-color: var(--accent-2); }
.btn-primary {
  background: var(--accent); border: none; color: #fff; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; cursor: pointer; width: 100%;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: #3a4356; }
.err { color: #ff6b6b; font-size: 13px; margin-top: 10px; min-height: 16px; }

.admin-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
}
.admin-top h1 { font-size: 20px; margin: 0; margin-right: auto; }
.app-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 10px;
}
.app-row img.thumb {
  width: 60px; height: 60px; object-fit: cover; border-radius: 6px;
  background: var(--panel-2); flex-shrink: 0;
}
.app-row .thumb-ph {
  width: 60px; height: 60px; border-radius: 6px; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: .4;
}
.app-row .info { flex: 1; min-width: 0; }
.app-row .info .t { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.app-row .info .m { font-size: 12px; color: var(--text-dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-row .tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(58,167,255,.12); color: var(--accent-2); }
.app-row .tag.pin { background: rgba(255,122,60,.15); color: var(--accent); }
.row-btns { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--text); border-color: #3a4356; }
.icon-btn.danger:hover { color: #ff6b6b; border-color: #ff6b6b; }

/* 后台编辑弹窗 */
.modal-mask.edit-mask { align-items: flex-start; overflow-y: auto; padding: 40px 16px; }
.modal.edit-modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 560px; padding: 24px;
}
.modal.edit-modal h2 { margin: 0 0 16px; font-size: 17px; }
.modal .field { margin-bottom: 14px; }
.modal label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
.modal .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.modal .foot .btn-primary { width: auto; }

/* 网盘链接编辑行 */
.pan-row { display: grid; grid-template-columns: 90px 1fr 90px 32px; gap: 6px; margin-bottom: 6px; }
.pan-row .input { padding: 8px 10px; font-size: 13px; }
.pan-add { font-size: 13px; color: var(--accent-2); background: none; border: none; cursor: pointer; padding: 4px 0; }
.pan-add:hover { text-decoration: underline; }

/* 封面预览 */
.cover-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cover-preview img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.cover-preview .meta { font-size: 12px; color: var(--text-dim); }
.cover-preview .meta b { color: var(--ok); }

/* 批量导入预览 */
.batch-preview { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 12px; }
.batch-item { display: flex; gap: 8px; padding: 6px 8px; font-size: 13px; border-bottom: 1px solid var(--border); align-items: center; }
.batch-item:last-child { border-bottom: none; }
.batch-item .n { flex-shrink: 0; font-weight: 600; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-item .u { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.batch-item .p { color: var(--ok); font-size: 12px; flex-shrink: 0; }

@media (max-width: 640px) {
  header { padding: 10px 12px; gap: 10px; }
  .header-right { width: 100%; order: 3; margin-left: 0; }
  .search { flex: 1; min-width: 0; }
  .notice { margin-top: 10px; padding: 0 12px; }
  .notice-inner { font-size: 12px; padding: 10px 12px; }

  /* 手机：一排四个小卡片 */
  .grid { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 12px 30px; }
  .grid.list-view { grid-template-columns: 1fr; gap: 8px; }
  .list-row { padding: 7px; gap: 8px; }
  .list-row .lr-cover { width: 46px; height: 46px; }
  .list-row .lr-title { font-size: 12px; }
  .list-row .lr-meta { gap: 3px; }
  .ftag { font-size: 9px; padding: 1px 5px; }
  .lr-btn { padding: 7px 10px; font-size: 11px; }
  .pager { padding: 4px 10px 24px; gap: 4px; }
  .pager button { min-width: 30px; height: 32px; padding: 0 7px; font-size: 12px; }
  .pager .pg-info { display: none; }
  .chips { padding: 10px 12px 0; }
  .chip { font-size: 12px; padding: 5px 12px; }
  .card { border-radius: 9px; }
  .card-title { font-size: 11px; padding: 5px 7px 7px; min-height: 30px; -webkit-line-clamp: 1; line-height: 1.5; }
  .type-badge, .pin-badge { font-size: 9px; padding: 1px 5px; }
  .cover-overlay { display: none; }
  .pan-row { grid-template-columns: 70px 1fr 60px 32px; }
  .app-modal { padding: 18px; }
  .am-head { flex-direction: column; }
  .am-cover { width: 132px; }

  /* 弹窗：上下布局 + 底部固定悬浮下载按钮 */
  .detail-modal { max-width: 100vw; width: 100%; height: 100%; max-height: none; border-radius: 0; display: flex; flex-direction: column; }
  .dm-head { padding: 14px 16px 12px; padding-right: 54px; }
  .dm-head h3 { font-size: 17px; }
  .dm-body { flex-direction: column; gap: 14px; padding: 14px 16px 120px; flex: 1; overflow-y: auto; min-height: 0; }
  .dm-left { width: 100%; }
  .dm-cover { max-height: 46vh; }
  .dm-right { gap: 10px; }
  .dm-actions {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--panel); border-top: 1px solid var(--border);
  }
  .dm-primary { padding: 14px; font-size: 16px; }

  /* IP 移动端适配 */
  .logo-img { display: none; }
  .logo-mini { display: block; }
  .logo-blink { display: none; }
  .logo .count { font-size: 11px; }
  .notice-mascot { width: 30px; height: 34px; }
  .notice-title { font-size: 12px; }
  .notice-inner { font-size: 11px; }
  .chip { padding: 5px 11px; font-size: 12px; }
  .chip-ic { width: 15px; height: 15px; }
  .hot-crown { width: 14px; height: 14px; top: 4px; right: 4px; }
  #toTop { right: 12px; bottom: 74px; width: 38px; height: 38px; }
  #feedbackBtn { right: 12px; bottom: 18px; height: 38px; }
}

/* ============================================================
   机仔 IP 视觉体系（街机机器人 / 像素皇冠 / 屏幕笑脸）
   ============================================================ */
.logo { position: relative; align-items: center; gap: 8px; }
.logo-mark { position: relative; display: inline-flex; align-items: center; }
.logo-img {
  height: 34px; width: auto; display: block;
  filter: saturate(.92) drop-shadow(0 0 6px rgba(255, 122, 60, .18));
}
.logo-mini { display: none; width: 34px; height: 34px; }
.logo .count { align-self: center; }
/* hover 时屏幕眼睛眨一下：两条与屏幕同色的细条盖住白眼 */
.logo-blink {
  position: absolute; left: 1.5%; top: 51%; width: 10.5%; height: 3px;
  display: flex; justify-content: space-between; pointer-events: none;
}
.logo-blink i {
  width: 38%; height: 100%; background: #0d2533; border-radius: 2px;
  transform: scaleY(0); transform-origin: center;
}
.logo:hover .logo-blink i { animation: eyeBlink .3s ease 1; }
@keyframes eyeBlink { 0%, 100% { transform: scaleY(0); } 45% { transform: scaleY(1); } }

/* 公告栏：挥手机器人 */
.notice-inner { gap: 10px; }
.notice-mascot {
  width: 42px; height: 46px; object-fit: contain; flex-shrink: 0;
  filter: saturate(.92) drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
.notice-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.notice-title { font-weight: 700; color: var(--notice-title); }

/* 分类 Tab 迷你机器人 */
.chip { display: inline-flex; align-items: center; gap: 5px; }
.chip-ic { width: 17px; height: 17px; opacity: .7; }
.chip.active .chip-ic { opacity: 1; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .55)); }

/* 缺省封面：机仔 3:4 图 */
.cover-ph-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 热门皇冠贴纸 */
.hot-crown {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}

/* 加载态：机器人屏幕像素转圈 */
.robot-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pixel-spin { width: 30px; height: 30px; position: relative; }
.pixel-spin i {
  position: absolute; width: 6px; height: 6px; background: var(--accent);
  animation: pixelPulse 1s infinite ease-in-out;
}
.pixel-spin i:nth-child(1) { top: 0; left: 12px; animation-delay: 0s; }
.pixel-spin i:nth-child(2) { top: 4px; right: 2px; animation-delay: .12s; }
.pixel-spin i:nth-child(3) { top: 12px; right: 0; animation-delay: .25s; }
.pixel-spin i:nth-child(4) { bottom: 2px; right: 4px; animation-delay: .37s; }
.pixel-spin i:nth-child(5) { bottom: 0; left: 12px; animation-delay: .5s; }
.pixel-spin i:nth-child(6) { bottom: 4px; left: 2px; animation-delay: .62s; }
.pixel-spin i:nth-child(7) { top: 12px; left: 0; animation-delay: .75s; }
.pixel-spin i:nth-child(8) { top: 4px; left: 2px; animation-delay: .87s; }
@keyframes pixelPulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* 空结果：机仔摊手 + 热门推荐 */
.empty-mascot { width: 110px; height: auto; display: block; margin: 0 auto 8px; }
.empty-title { font-size: 15px; color: var(--text); font-weight: 600; }
.empty-sub { font-size: 12px; margin-top: 5px; }
.hot-recs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.hot-rec {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 12px; color: var(--text); cursor: pointer;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-rec:hover { border-color: var(--accent); color: var(--accent); }

/* 返回顶部 / 反馈入口 */
#toTop, #feedbackBtn {
  position: fixed; z-index: 30; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
#toTop {
  right: 16px; bottom: 78px; width: 42px; height: 42px; border-radius: 12px;
  display: none; align-items: center; justify-content: center; font-size: 20px;
}
#toTop.show { display: flex; }
#toTop:hover { border-color: var(--accent); }
#toTop:active svg { animation: flyUp .3s ease; }
@keyframes flyUp { 50% { transform: translateY(-5px); } }
#feedbackBtn {
  right: 16px; bottom: 20px; height: 42px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
}
#feedbackBtn:hover { border-color: var(--accent); color: var(--accent); }
#feedbackIc .ic { font-size: 16px; }

/* 反馈弹窗 */
.feedback-modal { max-width: 420px; }
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 34px; }
.fb-head img { width: 52px; height: 52px; object-fit: contain; }
.fb-head h3 { margin: 0 0 4px; font-size: 16px; }
.fb-head p { margin: 0; font-size: 12px; color: var(--text-dim); }
.fb-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.fb-foot .btn-primary { width: auto; padding: 9px 20px; }

/* 新手引导气泡 */
.guide-mask { z-index: 60; }
.guide-card { max-width: 360px; text-align: center; }
.guide-card img { width: 96px; height: 96px; object-fit: contain; }
.guide-card h3 { margin: 8px 0 6px; font-size: 17px; }
.guide-card p { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.guide-card .btn-primary { margin-top: 14px; }

/* 页脚小机器人 */
footer { display: flex; align-items: center; justify-content: center; gap: 7px; }
footer img { width: 24px; height: 24px; object-fit: contain; }

/* 404 / 维护 状态页 */
.state-page { min-height: 100vh; display: flex; flex-direction: column; }
.state-box {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px 80px;
}
.state-box > img { width: 220px; max-width: 60vw; height: auto; margin-bottom: 14px; }
.state-box h1 { margin: 0 0 10px; font-size: 22px; }
.state-box p { margin: 0 0 22px; color: var(--text-dim); font-size: 14px; line-height: 1.8; }
.state-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
  padding: 11px 22px; border-radius: 999px;
}
.state-btn:hover { filter: brightness(1.1); }

/* 移动端最终覆盖（必须放在 IP 样式之后） */
@media (max-width: 640px) {
  .logo-img, .logo-blink { display: none; }
  .logo-mini { display: block; }
  .logo .count { font-size: 11px; }
  .notice-mascot { width: 30px; height: 34px; }
  .notice-title { font-size: 12px; }
  .notice-inner { font-size: 11px; }
  .chip-ic { width: 15px; height: 15px; }
  .hot-crown { width: 14px; height: 14px; top: 4px; right: 4px; }
  #toTop { right: 12px; bottom: 74px; width: 38px; height: 38px; }
  #feedbackBtn { right: 12px; bottom: 18px; height: 38px; }
  .empty-mascot { width: 84px; }
  .state-box > img { width: 170px; }
  .fb-head img { width: 42px; height: 42px; }
}
