:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --accent: #e74f4c;
  --accent-hover: #ed8280;
  --border: rgba(226, 232, 240, 0.85);
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

/* 页面整体背景：严格对照 61ku.com/software 源码（两角径向渐变 + 网格） */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, .12), transparent 38%),
    radial-gradient(circle at 90% 10%, rgba(139, 92, 246, .10), transparent 35%),
    #f8fafc;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* 背景网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(15, 23, 42, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 页面容器 ---------- */
.soft-page {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 80px;
  width: 100%;
}

/* 柔光装饰：严格对照 61ku.com/software 源码（左蓝 / 右紫 两团高斯模糊光晕）。
   注意：此处不可加 overflow-x:clip，否则会把光晕裁成左右两段 → 视觉上“纵向三段式”。
   页面的横向溢出已由 body 的 overflow-x:clip 统一收口。 */
.soft-page::before {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  left: -350px;
  top: -300px;
  background: radial-gradient(circle, rgba(59, 130, 246, .10), transparent 70%);
  filter: blur(80px);
  z-index: -1;
}
.soft-page::after {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  right: -350px;
  top: -250px;
  background: radial-gradient(circle, rgba(139, 92, 246, .08), transparent 70%);
  filter: blur(90px);
  z-index: -1;
}

/* ---------- 顶部 Hero ---------- */
.soft-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 380px;
  margin-bottom: 25px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.soft-hero h1 {
  margin: 0 0 20px;
  font-size: 52px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #0f172a, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.soft-hero .sub {
  max-width: 680px;
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  max-width: 700px;
  margin-top: 35px;
}

.hero-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, .8);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  cursor: default;
}
.hero-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, .10);
  border-color: rgba(37, 99, 235, .25);
  background: rgba(255, 255, 255, .9);
}

.hero-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: white;
  overflow: hidden;
}

.hero-icon img {
  width: 36px; height: 36px;
  object-fit: contain;
  display: block;
}

.hero-item strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.hero-item span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted-light);
}

/* 右侧动画装饰 */
.hero-animation {
  position: absolute;
  right: 30px; top: 30px;
  width: 360px; height: 360px;
}

.main-device {
  position: absolute;
  left: 90px; top: 90px;
  width: 170px; height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 35px;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(241,245,249,.8));
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(37, 99, 235, .15);
  animation: deviceFloat 5s infinite;
}

.device-top {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted-light);
}

.device-icon {
  width: 70px; height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 22px;
  background: white;
}

.device-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.device-text {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(37, 99, 235, .18);
}

.orbit-one {
  width: 300px; height: 300px;
  left: 25px; top: 25px;
  animation: rotate 18s linear infinite;
}

.orbit-two {
  width: 240px; height: 240px;
  left: 55px; top: 55px;
  animation: rotate 12s linear infinite reverse;
}

.float-card {
  position: absolute;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 40px rgba(15, 23, 42, .08);
  font-size: 13px;
  color: #334155;
}

.float-card span { color: var(--brand); margin-right: 5px; }

.card-a { left: 0; top: 90px; }
.card-b { right: 0; top: 160px; }
.card-c { left: 70px; bottom: 10px; }

@keyframes rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes deviceFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- 搜索 & 分类工具条 ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  padding: 16px 0 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  margin-bottom: 16px;
  transition: box-shadow .2s, border-radius .2s, background .2s;
}
/* 真正吸顶后才把四角上半部分变直角 */
.toolbar.scrolled {
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.98);
  border-radius: 0 0 14px 14px;
}
.toolbar-sentinel {
  height: 1px;
  margin-top: -1px;
  pointer-events: none;
}
.search-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 0 1 320px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
}
.search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--text); }
.search svg { flex: none; color: var(--muted); }
.catnav { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; justify-content: flex-end; }
.catnav a {
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.8); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
  transition: all 0.15s ease;
}
.catnav a:hover, .catnav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 分类标题 ---------- */
.soft-section { margin-bottom: 35px; scroll-margin-top: 130px; margin-top: 24px; }
.soft-section h2 {
  position: relative;
  padding-left: 18px;
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.soft-section h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 24px;
  border-radius: 20px;
  background: linear-gradient(#2563eb, #8b5cf6);
}

/* ---------- 软件网格 ---------- */
.soft-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ---------- 软件卡片 ---------- */
.soft-card {
  height: 160px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 232, 240, .85);
  box-shadow: var(--shadow);
  transition: .3s;
}
.soft-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.soft-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
}

.soft-logo {
  width: 44px; height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.soft-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.logo-error { display: none; font-size: 22px; }

.soft-info {
  min-width: 0;
  width: calc(100% - 56px);
  padding-top: 1px;
  overflow: hidden;
  position: relative;
}
.soft-info h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  color: var(--text);
  white-space: nowrap;
}
.soft-info span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted-light);
  white-space: nowrap;
}

.scroll-window {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.scroll-window.need-scroll { cursor: pointer; }
.scroll-window.need-scroll:hover h3,
.scroll-window.need-scroll:hover span {
  animation: text-scroll var(--scroll-time) linear forwards;
}

@keyframes text-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(var(--scroll-distance)); }
}

.soft-info h3, .soft-info span, .soft-tags { white-space: nowrap; }

.soft-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin-top: 14px;
  margin-bottom: 8px;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.tag {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  line-height: 18px;
}

.soft-download {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: none;
  flex-shrink: 0;
  margin-left: auto;
}
.btn-download:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-download svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.btn-download:disabled, .btn-download.disabled { background: #cbd5e1; cursor: default; transform: none; }

/* ---------- 倒计时标签 ---------- */
.countdown {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 下载弹窗 ---------- */
.download-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s ease;
}
.download-modal-overlay.active { display: flex; }
.download-modal {
  max-width: 440px;
  width: min(440px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.3s ease;
  position: relative;
  box-sizing: border-box;
}
.modal-close-btn {
  position: absolute;
  top: 16px; right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--muted-light);
  cursor: pointer;
  transition: 0.2s;
  line-height: 1;
}
.modal-close-btn:hover { color: var(--text); transform: rotate(90deg); }
.modal-header { margin-bottom: 20px; }
.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.modal-body { display: flex; flex-direction: column; gap: 10px; }

.modal-disk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f8fafc;
  transition: 0.2s;
  border: 1px solid transparent;
}
.modal-disk-item:hover { background: #f1f5f9; border-color: #e2e8f0; }
.modal-disk-item .disk-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
}
.modal-disk-item .disk-label .disk-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.modal-disk-item .disk-label img {
  width: 28px; height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 2px;
}
.modal-disk-item .disk-label .badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 0 10px;
  border-radius: 12px;
  line-height: 20px;
}
.modal-disk-item .disk-label .badge.recommend { background: #dbeafe; color: var(--brand); }
.modal-disk-item .disk-label .badge.official { background: #dcfce7; color: #16a34a; }
.modal-disk-item .btn-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.modal-disk-item .btn-go:hover { background: var(--accent-hover); transform: translateY(-1px); }
.modal-disk-item .btn-go.outline { background: transparent; color: #64748b; border: 1px solid #e2e8f0; }
.modal-disk-item .btn-go.outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.modal-disk-item .btn-go svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

.modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}
.modal-footer a {
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.modal-footer a:hover { color: var(--brand-dark); text-decoration: underline; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- 求软件/留言弹窗 ---------- */
.request-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s ease;
}
.request-overlay.active { display: flex; }
.request-modal {
  max-width: 440px;
  width: min(440px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.3s ease;
  position: relative;
  box-sizing: border-box;
}
.request-modal .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.request-modal .field label { font-size: 13px; color: var(--muted); }
.request-modal .field input,
.request-modal .field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.request-modal .field input:focus,
.request-modal .field textarea:focus { border-color: var(--brand); }
.request-modal .field textarea { resize: vertical; min-height: 80px; }
.request-modal .btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
}
.request-modal .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 空状态 / 页脚 ---------- */
.empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 15px; }
.footer {
  padding: 36px 0;
  background: #0f172a;
  color: #cbd5e1;
  text-align: center; font-size: 13px;
}
.footer p { color: #cbd5e1; margin: 6px 0; }
.footer a { color: #93c5fd; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%);
  background: #1f2933; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 1010; opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- 响应式 ---------- */
@media(max-width: 1100px) {
  .soft-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-animation { opacity: .45; }
}

@media(max-width: 860px) {
  .soft-page { padding: 30px 15px 60px; }
  .soft-hero { min-height: auto; }
  .soft-hero h1 { font-size: 34px; }
  .hero-animation { display: none; }
  .hero-feature-grid { grid-template-columns: 1fr; }
  .soft-grid { grid-template-columns: 1fr; }
  .soft-card { height: 160px; }
  .toolbar { padding: 12px 0 18px; border-radius: 14px; top: 0; margin: 0; }
  .toolbar.scrolled { border-radius: 0 0 14px 14px; }
  .search { flex: 1 1 100%; max-width: none; }
  .catnav { justify-content: flex-start; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; -ms-overflow-style: none; }
  .catnav::-webkit-scrollbar { display: none; }
  .catnav a { white-space: nowrap; }
  /* 移动端：整条侧栏默认贴边隐藏（仅露 24px 把手），点击把手滑出 */
  .side-tools {
    right: 0;
    top: 50%;
    transform: translate(calc(100% - 24px), -50%);
    flex-direction: column;
    border-radius: 16px 0 0 16px;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    transition: transform .25s ease;
  }
  .side-tools.mobile-open { transform: translate(0, -50%); }
  .side-item { position: relative; }
  .side-btn {
    width: 46px; min-height: 46px;
    border-radius: 0;
    box-shadow: none;
  }
  .side-tools > .side-item:first-child .side-btn { border-top-left-radius: 16px; }
  .side-tools > .side-btn:last-child { border-bottom-left-radius: 16px; }
  /* 回顶部隐藏时，求软件按钮兜底圆角；回顶部显示时它变直角（与桌面端一致） */
  .side-tools > .side-btn#btnRequest { border-bottom-left-radius: 0; }
  .side-tools > .side-btn#btnRequest.last-visible { border-bottom-left-radius: 16px; }
  .side-btn + .side-btn,
  .side-item + .side-btn,
  .side-btn + .side-item { border-top: 1px solid rgba(255,255,255,.18); border-left: none; }
  .side-btn.side-text { writing-mode: horizontal-tb; letter-spacing: 0; font-size: 12px; padding: 4px; }
  /* 分享弹窗：滑出后在把手左侧展开 */
  .share-popover {
    right: calc(100% + 12px); left: auto; top: 50%; bottom: auto;
    transform: translateY(-50%);
    width: 188px;
  }
  .side-share-wrap:hover .share-popover,
  .side-share-wrap.active .share-popover {
    opacity: 1; visibility: visible;
    transform: translateY(-50%);
    pointer-events: auto;
  }
}

@media(max-width: 480px) {
  .soft-hero h1 { font-size: 28px; }
  .download-modal { padding: 24px 18px; }
  .modal-disk-item { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .modal-disk-item .disk-label { min-width: 0; }
  .modal-disk-item .disk-label img { width: 24px; height: 24px; }
  .modal-disk-item .disk-label span:not(.badge) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .modal-disk-item .btn-go { flex: 0 0 auto; padding: 0 10px; height: 26px; font-size: 11px; }
  .soft-download { gap: 8px; }
  .countdown { font-size: 10px; padding: 2px 6px; }
  .footer { font-size: 12px; }
}

/* 持续更新区块（分类样式，间隔与分类区块一致） */
.section-update { margin-top: 24px; margin-bottom: 35px; padding-bottom: 0; }
.section-update h2 { position: relative; padding-left: 18px; margin: 0 0 18px; font-size: 22px; font-weight: 700; color: var(--text); }
.section-update h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 24px; border-radius: 20px; background: linear-gradient(#2563eb, #8b5cf6);
}
.update-card {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px; border-radius: 14px;
  background: rgba(255,255,255,.9); border: 1px solid var(--border);
  color: var(--muted); font-size: 14px;
  box-shadow: var(--shadow);
}
.update-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* 下载弹窗倒计时提示 */
.dl-countdown-hint {
  flex: 1 1 auto;
  font-size: 13px;
  line-height: 1.5;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 10px;
}
.modal-footer { align-items: center; }
.dl-countdown-hint + a { white-space: nowrap; }

/* 页脚「持续更新中……」渐变动画（参考 61ku 风格） */
.footer-update {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footerUpdateFlow 3s linear infinite;
}
@keyframes footerUpdateFlow {
  to { background-position: 200% center; }
}

/* ---------- 右侧悬浮工具 ---------- */
.side-tools {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
/* 去掉容器裁剪后，手动补全外层按钮圆角，保持一体化胶囊外观 */
.side-tools > .side-item:first-child .side-btn { border-top-left-radius: 14px; border-top-right-radius: 14px; }
/* 回顶部隐藏时，求软件按钮兜底圆角；回顶部显示时，它变直角 */
.side-tools > .side-btn#btnRequest { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.side-tools > .side-btn#btnRequest.last-visible { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.side-tools > .side-btn#btnTop { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.side-item { position: relative; }
.side-btn {
  width: 48px;
  min-height: 48px;
  border: none;
  background: #e74f4c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  padding: 8px 4px;
}
.side-btn + .side-btn,
.side-item + .side-btn,
.side-btn + .side-item { border-top: 1px solid rgba(255, 255, 255, 0.2); }
.side-btn:hover { background: #c53030; }
.side-btn svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.side-btn.side-text {
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 500;
}

/* hover 分享面板 */
.share-popover {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 901;
  pointer-events: none;
}
/* 透明桥接：从分享按钮移入弹窗时不至于因间隙而丢失 hover */
.side-share-wrap::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: 14px;
  pointer-events: auto;
  z-index: 900;
}
@media(max-width: 860px) {
  .side-share-wrap::after { display: none; }
}
.share-popover-title {
  font-size: 12px; color: var(--muted);
  margin-bottom: 8px; padding-left: 4px;
}
.share-popover-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.share-popover-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 2px;
  cursor: pointer;
  transition: 0.15s;
}
.share-popover-item:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.share-popover-item:hover .share-qr { opacity: 1; visibility: visible; transform: translate(-50%, -6px); }
.share-popover-ico {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--c, #2563eb);
}
.share-popover-ico svg { width: 17px; height: 17px; }
.share-popover-name { font-size: 11px; color: var(--text); writing-mode: horizontal-tb; letter-spacing: 0; }
/* 仅“复制链接”四字拆成两行：复制 / 链接 */
.share-popover-name.name-2line { writing-mode: horizontal-tb; line-height: 1.15; letter-spacing: 0; }
.share-qr {
  position: absolute;
  left: 50%; bottom: 100%;
  transform: translate(-50%, 0);
  width: 150px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  pointer-events: none;
  z-index: 10;
}
.share-qr img { width: 100%; height: auto; border-radius: 6px; display: block; }
.share-qr span { display: block; text-align: center; font-size: 11px; color: var(--muted); margin-top: 5px; }
/* 桌面端 hover 展开；移动端 JS 控制 active 类 */
.side-share-wrap:hover .share-popover,
.side-share-wrap.active .share-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  pointer-events: auto;
}

/* ---------- 后台管理页样式 ---------- */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { font-size: 22px; margin: 0; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 9px; font-size: 14px; cursor: pointer; transition: all .15s; }
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.danger { color: #d9534f; border-color: #f0c7c5; }
.btn.danger:hover { background: #fdeceb; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.panel h3 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-dark);
  padding: 5px 10px; border-radius: 999px; font-size: 13px; }
.cat-chip .cat-ops { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; }
.cat-chip button { border: none; background: transparent; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.cat-chip button:hover { background: rgba(37,99,235,0.12); }
.row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text); }
.field textarea { resize: vertical; min-height: 60px; }
.dl-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.dl-row label { display: flex; align-items: center; justify-content: space-between; }
.dl-row .rec-lbl { font-size: 12px; color: var(--text); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.dl-row .rec-lbl input { width: 14px; height: 14px; }
.icon-row { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: end; }
.icon-preview { width: 80px; height: 80px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.icon-preview img { width: 64px; height: 64px; object-fit: contain; }
.icon-inputs { display: flex; flex-direction: column; gap: 8px; }
.icon-inputs small { font-size: 12px; color: var(--muted); }
.toggle-section { margin-top: 6px; }
.toggle-btn { font-size: 12px; color: var(--brand); background: transparent; border: none; cursor: pointer; padding: 0; }
.toggle-btn:hover { text-decoration: underline; }
.collapse { display: none; }
.collapse.show { display: block; }
.more-dl-hint { font-size: 12px; color: var(--muted); margin-left: 8px; }
/* 图标库：强制先横向排列，再纵向换行 */
.icon-gallery {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  margin-top: 8px;
}
.icon-gallery .icon-grid-item { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; border: 2px solid transparent; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.icon-gallery .icon-grid-item:hover, .icon-gallery .icon-grid-item.selected { border-color: var(--brand); }
.icon-gallery .icon-grid-item img { width: 40px; height: 40px; object-fit: contain; }
/* 关键：覆盖 manage.html 内联的 .collapse.show{display:block}，保证图标库展开后是横向 flex */
.icon-gallery.collapse.show { display: flex; flex-wrap: wrap; align-content: flex-start; }
.icon-gallery-empty { font-size: 12px; color: var(--muted); padding: 6px 2px; }

/* 居中删除弹窗 */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
  background: var(--surface);
  border-radius: 18px;
  width: 100%; max-width: 400px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
  animation: modalSlideUp 0.2s ease;
}
.confirm-box h4 { margin: 0 0 12px; font-size: 17px; }
.confirm-box p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.confirm-box .actions { display: flex; justify-content: flex-end; gap: 10px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.mini-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; vertical-align: middle; }
.ops { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; }
.filter-bar button.active, .filter-bar button:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.category-select { font-size: 13px; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); max-width: 120px; }
.admin-tag { font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; display: inline-block; margin: 1px; }
.status-toggle { cursor: pointer; user-select: none; padding: 4px 8px; border-radius: 8px; transition: background .15s; white-space: nowrap; }
.status-toggle:hover { background: var(--brand-soft); }

/* 后台软件列表：固定列宽 + 横向滚动，防止错位换行 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.software-table { table-layout: fixed; min-width: 840px; }
.software-table th, .software-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 列宽精确定义（PC 最佳）：选择40 / ☰40 / 图标55 / 名称250 / 分类110 / 标签自适应 / 状态90 / 操作130 */
.software-table th:nth-child(1), .software-table td:nth-child(1) { width: 40px; }   /* 选择 */
.software-table th:nth-child(2), .software-table td:nth-child(2) { width: 40px; }   /* 拖拽 ☰ */
.software-table th:nth-child(3), .software-table td:nth-child(3) { width: 55px; }   /* 图标 */
.software-table th:nth-child(4), .software-table td:nth-child(4) { width: 280px; }  /* 名称（固定，不撑满） */
.software-table th:nth-child(5), .software-table td:nth-child(5) { width: 110px; }  /* 分类 */
.software-table th:nth-child(6), .software-table td:nth-child(6) { width: auto; min-width: 120px; } /* 标签（自适应占满剩余） */
.software-table th:nth-child(7), .software-table td:nth-child(7) { width: 90px; }   /* 状态 */
.software-table th:nth-child(8), .software-table td:nth-child(8) { width: 130px; }  /* 操作 */
.software-table td:nth-child(4) > span { display: inline; }
.software-table .ops { flex-wrap: nowrap; gap: 6px; }
.software-table .ops .btn { padding: 6px 10px; }
.drag-handle { cursor: grab; color: var(--muted-light); padding: 0 4px; font-size: 16px; }
.drag-handle:active { cursor: grabbing; }
tr.dragging { opacity: .5; background: var(--brand-soft); }
tr.drop-before { box-shadow: inset 0 2px 0 var(--brand); }
tr.drop-after { box-shadow: inset 0 -2px 0 var(--brand); }

/* 遮罩与弹窗 */
.overlay { position: fixed; inset: 0; background: rgba(20,30,25,.45); display: none; align-items: center; justify-content: center; padding: 60px 16px; z-index: 100; overflow: auto; }
.overlay.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; padding: 24px; position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--muted); font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #e2e8f0; color: var(--text); }
.modal h3 { margin: 0 28px 18px 0; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.login-box { max-width: 380px; margin: 0; }
.login-box .field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

@media (max-width: 640px) {
  .overlay { padding: 16px 10px; align-items: flex-start; }
  .modal { padding: 16px; border-radius: 12px; }
  .modal h3 { font-size: 18px; margin-bottom: 14px; }
  .modal .actions { flex-direction: column; gap: 8px; }
  .modal .actions .btn { width: 100%; justify-content: center; }
  .admin-wrap { padding: 18px 14px 60px; }
  .row { grid-template-columns: 1fr; }
  .dl-row { grid-template-columns: 1fr; gap: 6px; }
  .dl-row .rec-lbl { justify-self: start; }
  .icon-row { grid-template-columns: 1fr; gap: 10px; }
  .icon-preview { width: 64px; height: 64px; justify-self: center; }
  .icon-inputs { width: 100%; }
  .field input, .field textarea, .field select { font-size: 16px; }
  table { font-size: 12px; }
  th, td { padding: 8px 5px; }
  .ops { gap: 5px; }
  .ops .btn { padding: 6px 9px; font-size: 12px; }
  .confirm-box { padding: 20px; }
}

/* ===== 移动端右侧悬浮工具：仅保留求软件(聊天图标)作为蓝色圆形 FAB ===== */
@media(max-width: 860px) {
  .side-tools {
    position: fixed;
    right: 12px;
    bottom: 20%;
    top: auto;
    transform: none;
    z-index: 900;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }
  /* 移动端隐藏分享与回顶部，只保留求软件 */
  .side-tools > .side-share-wrap,
  .side-tools > .side-btn#btnTop { display: none !important; }
  /* 求软件 = 蓝色圆形聊天图标（参考截图位置） */
  .side-tools > .side-btn#btnRequest {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-height: auto;
    padding: 0;
    border: none;
    border-top: none;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 6px 22px rgba(37, 99, 235, .38);
  }
  .side-tools > .side-btn#btnRequest:hover { background: #1d4ed8; }
  .side-tools > .side-btn#btnRequest.last-visible { border-radius: 50%; }
  .side-tools > .side-btn#btnRequest svg { width: 26px; height: 26px; }
}

/* ========== 搜索增强（清除按钮 / 热搜标签 / 命中高亮）========== */
/* 清除按钮：作为 .search 内的弹性子项，置于输入框右侧，默认隐藏 */
.search-clear {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.search-clear:hover { color: var(--text); background: rgba(148, 163, 184, .45); }

/* 热搜标签区：位于搜索行下方，独立成行，不干扰既有 .search-row 布局 */
.tags-wrap { margin-top: 10px; }
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: center;
  min-height: 0;
}
.tags-container.collapsed { overflow: hidden; }
.tags-container .tags-label {
  font-size: 11.5px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #ff9800, #ff6f00);
  padding: 4px 10px;
  border-radius: 10px;
  margin-right: 6px;
  align-self: center;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(255, 111, 0, .35);
}
.tags-container .tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 4px;
  font-size: 12.5px;
  line-height: 1.4;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-weight: 400;
  cursor: pointer;
  transition: color .15s;
  user-select: none;
}
.tags-container .tag::before { content: "#"; color: #c3c7d3; margin-right: 1px; }
.tags-container .tag:hover { color: var(--brand); }
.tags-container .tag.active { color: var(--brand); font-weight: 600; }
.tags-container .tag.tag-hidden { display: none; }
.tags-toggle {
  display: none;
  margin: 0;
  padding: 3px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  align-self: center;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
.tags-toggle:active { background: var(--brand-soft); }

/* 关键词命中高亮（红色加粗，呼应搜索结果） */
.search-match { color: var(--accent); font-weight: 700; }

/* 宽松匹配提示条 */
.loose-tip {
  display: none;
  margin: 14px 0 4px;
  padding: 8px 14px;
  background: #fff7ec;
  border: 1px solid #ffe2b8;
  border-radius: 10px;
  font-size: 12.5px;
  color: #b9770e;
  line-height: 1.4;
}

/* ========== 后台访问统计（竖向柱状图）========== */
.stats-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.stats-actions .btn-sm {
  padding: 4px 14px; border: 1px solid #d0d5e8; background: #fff;
  color: #667eea; border-radius: 16px; font-size: 12px; cursor: pointer; transition: all .15s;
}
.stats-actions .btn-sm:hover { border-color: #667eea; color: #667eea; }
.stats-actions .btn-sm.active { background: #667eea; color: #fff; border-color: #667eea; }

.stats-summary { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stats-summary .sum-card {
  flex: 1; min-width: 120px; background: #f8f9fb;
  border-radius: 10px; padding: 12px 16px; text-align: center;
}
.stats-summary .sum-card .num { font-size: 22px; font-weight: 700; color: #667eea; }
.stats-summary .sum-card .label { font-size: 12px; color: var(--muted); margin-top: 2px; }

.stats-legend { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.stats-legend .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin: 0 4px 0 12px; vertical-align: -1px;
}
.stats-legend .dot:first-child { margin-left: 0; }

/* 竖向柱状图：每列为一天，两根柱子（访问/搜索）并排，高度按最大值等比 */
.visit-chart {
  margin-bottom: 12px;
}
.visit-chart .empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.stats-bar-row {
  display: flex; align-items: center; margin-bottom: 6px; font-size: 12px;
}
.stats-bar-row .bdate { width: 92px; color: #666; flex-shrink: 0; }
.stats-bar-row .btrack { flex: 1; display: flex; gap: 4px; align-items: center; }
.stats-bar-row .bbar { height: 12px; border-radius: 6px; min-width: 2px; transition: width .3s ease; }
.stats-bar-row .bbar.visits { background: linear-gradient(90deg, #667eea, #764ba2); }
.stats-bar-row .bbar.searches { background: linear-gradient(90deg, #ffb347, #ff9800); }
.stats-bar-row .bval { width: 74px; text-align: right; color: #888; flex-shrink: 0; }

.stats-table-block { margin-top: 14px; }
.stats-table-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f8f9fb; border: 1px solid #e6e8ef; color: #555;
  border-radius: 9px; padding: 7px 12px; font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.stats-table-toggle:hover { background: #eef0f6; border-color: #d0d5e8; }
.stats-table-toggle .caret { display: inline-block; transition: transform .2s; color: #667eea; font-size: 12px; }
.stats-table-toggle.open .caret { transform: rotate(90deg); }
.stats-table-wrap { margin-top: 10px; overflow-x: auto; }
.stats-table th, .stats-table td { text-align: center; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
/* 对齐参考站预览表格样式 */
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-table th { background: #f0f2f5; padding: 8px 10px; font-weight: 500; color: #666; font-size: 12px; }
.preview-table td { padding: 8px 10px; border-top: 1px solid #eee; }
.preview-table .empty td { padding: 20px; text-align: center; color: #ccc; }

/* 顶部「留言」按钮的红点提醒 */
.msg-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px;
  background: #e23b3b; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle;
}

@media (max-width: 640px) {
  .stats-summary .sum-card { min-width: 100px; padding: 10px 12px; }
  .stats-bar-row .bdate { width: 74px; }
  .stats-bar-row .bval { width: 60px; }
}

/* ---------- 底部跟随广告位（完全搬运自 xwzj-aqc.pages.dev，样式与源站一致）---------- */
.fq-floating-ad { position: fixed; left: 0; bottom: 0; width: 100%; z-index: 9998; display: none; text-align: center; pointer-events: none; padding: 0 12px calc(14px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.fq-floating-ad.show { display: block; }
.fq-floating-ad .fq-ad-box { position: relative; pointer-events: auto; width: 100%; max-width: 380px; background: linear-gradient(135deg, #5b6cf5 0, #7c4dff 60%, #9a4dff 100%); border-radius: 15px; padding: 10px 12px; display: flex; margin: 0 auto; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(102, 90, 245, .32); overflow: visible; animation: fqAdUp .38s cubic-bezier(.22, 1, .36, 1); }
.fq-floating-ad .fq-ad-box:hover { box-shadow: 0 8px 26px rgba(102, 90, 245, .42); transform: translateY(-1px); }
.fq-floating-ad .fq-ad-logo { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; object-fit: cover; box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
.fq-floating-ad .fq-ad-body { flex: 1; min-width: 0; text-align: left; }
.fq-floating-ad .fq-ad-t1 { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; display: flex; align-items: center; gap: 5px; }
.fq-floating-ad .fq-ad-tag { font-size: 9px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #ff7a00, #ff4d00); border-radius: 7px; padding: 1px 5px; display: inline-block; line-height: 1.4; }
.fq-floating-ad .fq-ad-t2 { font-size: 11px; color: rgba(255, 255, 255, .88); margin-top: 2px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fq-floating-ad .fq-ad-dl { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; background: #fff; color: #6b46f6; text-decoration: none; font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 16px; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.fq-floating-ad .fq-ad-dl:hover { background: linear-gradient(135deg, #ff7a00 0, #ff4d00 100%); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 16px rgba(255, 77, 0, .5); }
.fq-floating-ad .fq-ad-dl:active { transform: scale(.94); }
.fq-floating-ad .fq-ad-box { cursor: pointer; transition: transform .14s ease, box-shadow .14s ease; }
.fq-ad-close { position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; line-height: 16px; text-align: center; background: rgba(0, 0, 0, .62); color: #fff; font-size: 17px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255, 255, 255, .92); z-index: 10; user-select: none; -webkit-tap-highlight-color: transparent; }
.in-app .fq-floating-ad { display: none; }
@keyframes fqAdUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .fq-floating-ad .fq-ad-box { max-width: 100%; gap: 8px; padding: 9px 10px; }
  .fq-floating-ad .fq-ad-logo { width: 34px; height: 34px; border-radius: 8px; }
  .fq-floating-ad .fq-ad-dl { padding: 7px 11px; font-size: 11.5px; }
  .fq-floating-ad .fq-ad-body { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .fq-floating-ad .fq-ad-body::-webkit-scrollbar { display: none; }
  .fq-floating-ad .fq-ad-t1, .fq-floating-ad .fq-ad-t2 { white-space: nowrap; }
}
