/* ==========================================================
   监控软件下载站 · 全站样式
   适配 PC / 手机（响应式），基于 CSS 变量便于改主题
   ========================================================== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --violet: #7c3aed;
  --grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.08));
  --ok: #16a34a;
  --ok-bg: #f0fdf4;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12);
  --shadow-lg: 0 24px 48px -16px rgba(37,99,235,.28);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .88; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.hide-on-mobile { }
@media (max-width: 767px) { .hide-on-mobile { display: none !important; } }
@media (max-width: 767px) { .hide-on-pc { display: none; } }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.7);
}
.topbar .container {
  height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 10px -2px rgba(37,99,235,.5);
}
.brand-name {
  font-weight: 800; font-size: 17px; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.brand-name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar-links { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar-links a {
  color: var(--text-2); font-size: 14px; padding: 7px 12px; border-radius: 9px;
  transition: .18s;
}
.topbar-links a:hover { background: var(--grad-soft); color: var(--primary-dark); }

/* ---------- 首页 Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 420px at 15% -10%, rgba(124,58,237,.16), transparent 60%),
    radial-gradient(900px 380px at 90% -20%, rgba(37,99,235,.20), transparent 55%),
    linear-gradient(160deg, #0b1e4b 0%, #12296b 45%, #231a5e 100%);
  color: #fff;
  padding: 56px 0 66px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 70% at 50% 20%, #000, transparent);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 20%, #000, transparent);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900; letter-spacing: .5px; line-height: 1.3;
}
.hero h1 em { font-style: normal; background: linear-gradient(90deg,#60a5fa,#a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.sub {
  margin-top: 12px; color: rgba(255,255,255,.78); font-size: clamp(14px, 2.4vw, 16px);
  max-width: 640px;
}
.hero .search {
  margin-top: 26px; display: flex; max-width: 560px; gap: 8px;
  background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-lg);
}
.hero .search input {
  flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; color: var(--text); min-width: 0;
}
.hero .search button {
  border: 0; cursor: pointer; color: #fff; background: var(--grad);
  border-radius: 999px; padding: 10px 22px; font-size: 14px; font-weight: 600; flex: none;
}
.hero .stats { margin-top: 22px; display: flex; gap: 26px; color: rgba(255,255,255,.7); font-size: 13px; flex-wrap: wrap; }
.hero .stats b { color: #fff; font-size: 17px; margin-right: 4px; }

/* ---------- 分类标签 ---------- */
.cat-bar { margin: 22px 0 4px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cat-bar .chip {
  padding: 8px 16px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px;
  transition: .18s; box-shadow: var(--shadow);
}
.cat-bar .chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.cat-bar .chip.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 14px -4px rgba(37,99,235,.5);
}

/* ---------- 软件卡片网格 ---------- */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 30px 0 16px; gap: 12px;
}
.sec-head h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sec-head h2::before {
  content: ""; width: 4px; height: 20px; border-radius: 4px; background: var(--grad); display: block;
}
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }

.soft-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); transition: .22s ease; position: relative; overflow: hidden;
}
.soft-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,235,.35); }
.soft-card .sc-top { display: flex; align-items: center; gap: 12px; }
.soft-ico {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff; overflow: hidden;
  background: var(--grad);
  box-shadow: 0 6px 12px -3px rgba(37,99,235,.45);
}
.soft-ico img { width: 100%; height: 100%; object-fit: cover; }
.soft-cat {
  font-size: 11px; color: var(--primary); background: var(--grad-soft);
  border: 1px solid rgba(37,99,235,.2); padding: 2px 8px; border-radius: 999px;
  align-self: flex-start; font-weight: 600; max-width: 100%; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.soft-card h3 { font-size: 16.5px; font-weight: 700; color: var(--text); line-height: 1.4; }
.soft-card .desc {
  color: var(--text-2); font-size: 13px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 42px;
}
.soft-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.soft-meta span { background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.soft-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.soft-foot .views { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.soft-foot a.go {
  font-size: 13.5px; font-weight: 700; color: #fff; background: var(--grad);
  border-radius: 9px; padding: 7px 14px; transition: .18s;
  box-shadow: 0 4px 10px -3px rgba(37,99,235,.5);
}
.soft-foot a.go:hover { opacity: .92; transform: translateY(-1px); }
.card-link { position: absolute; inset: 0; z-index: 1; } /* 整卡可点，但按钮区需更高层级 */
.soft-card > *:not(.card-link) { position: relative; z-index: 2; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 60px 16px; color: var(--text-3);
  background: var(--card); border-radius: var(--radius); border: 1px dashed var(--line);
}
.empty .em { font-size: 46px; margin-bottom: 10px; }

/* ---------- 详情页 ---------- */
.crumb { padding: 16px 0 0; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumb a { color: var(--text-2); }
.detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px; margin: 18px 0 40px; align-items: start;
}
@media (max-width: 920px) { .detail { grid-template-columns: 1fr; } }

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.d-head { padding: 24px; }
.d-head .row { display: flex; gap: 20px; align-items: flex-start; }
.d-head .soft-ico { width: 74px; height: 74px; border-radius: 18px; font-size: 34px; }
.d-head h1 { font-size: clamp(19px, 3vw, 25px); font-weight: 800; line-height: 1.35; }
.d-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px; padding: 3px 11px; border-radius: 999px;
  background: #f8fafc; border: 1px solid var(--line); color: var(--text-2);
}
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(22,163,74,.25); }
.d-head .lead { margin-top: 12px; color: var(--text-2); font-size: 14px; }
.d-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px; background: var(--line); border-radius: var(--radius-s);
  border: 1px solid var(--line); overflow: hidden; margin-top: 20px;
}
.d-facts .fact { background: #f8fafc; padding: 12px 14px; text-align: center; }
.d-facts .fact b { display: block; font-size: 15px; color: var(--text); }
.d-facts .fact span { font-size: 12px; color: var(--text-3); }

/* 富文本说明区 */
.d-content { padding: 8px 24px 28px; }
.d-content h3.sec-title {
  font-size: 17px; font-weight: 800; margin: 18px 0 6px;
  display: flex; align-items: center; gap: 8px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.d-content h3.sec-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad); }

/* 富文本正文 */
.rich { font-size: 15px; line-height: 1.95; color: #334155; word-break: break-word; }
.rich h1,.rich h2,.rich h3,.rich h4 { color: var(--text); margin: 1.4em 0 .5em; line-height: 1.5; }
.rich h1 { font-size: 22px; } .rich h2 { font-size: 19px; }
.rich h3 { font-size: 17px; } .rich h4 { font-size: 15.5px; }
.rich p { margin: .7em 0; }
.rich ul, .rich ol { margin: .7em 0; padding-left: 1.6em; }
.rich li { margin: .3em 0; }
.rich blockquote {
  border-left: 4px solid var(--primary); background: var(--grad-soft);
  padding: 10px 16px; margin: 1em 0; border-radius: 0 10px 10px 0; color: var(--text-2);
}
.rich code {
  background: #f1f5f9; border: 1px solid var(--line); padding: 1px 7px;
  border-radius: 6px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.rich pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 12px; overflow-x: auto; margin: 1em 0; font-size: 13px; }
.rich pre code { background: transparent; border: 0; color: inherit; padding: 0; }
.rich a { color: var(--primary); text-decoration: underline; }
.rich table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.rich table th, .rich table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.rich table th { background: #f8fafc; }
.rich img { max-width: 100%; border-radius: 12px; margin: 8px 0; }
.rich img.w-e-img { border-radius: 12px; }
.rich video { max-width: 100%; border-radius: 12px; }
.rich iframe { max-width: 100%; }

/* 右侧下载栏（PC 侧边 / 移动置顶） */
.d-side { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 920px) { .d-side { position: static; order: -1; } }
.dl-box { padding: 22px; }
.dl-box h4 { font-size: 15px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.dl-box h4::before { content: "⬇"; }
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px; border-radius: 12px;
  background: var(--grad); color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: 0 10px 20px -6px rgba(37,99,235,.55);
  transition: .18s; border: 0; cursor: pointer;
}
.dl-btn:hover { opacity: .93; transform: translateY(-2px); color: #fff; }
.dl-btn:active { transform: translateY(0); }
.dl-btn svg { width: 20px; height: 20px; }
.dl-btn[disabled] { background: #cbd5e1; box-shadow: none; cursor: not-allowed; transform: none; }
.pan-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px;
  padding: 10px 14px; margin-top: 12px; font-size: 13px; color: var(--text-2);
}
.pan-row b { color: var(--text); }
.pwd-tip { margin-top: 12px; }
.pwd-tip .lb { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.pwd-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--warn-bg); border: 1px solid rgba(217,119,6,.35); border-radius: 10px; padding: 8px 10px;
}
.pwd-box code {
  font-size: 18px; font-weight: 800; letter-spacing: 2px; color: var(--warn);
  flex: 1; font-family: inherit; user-select: all; text-align: center;
}
.copy-btn {
  border: 0; cursor: pointer; background: var(--warn); color: #fff;
  border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; flex: none; transition: .15s;
}
.copy-btn:hover { filter: brightness(1.08); }
.copy-btn.done { background: var(--ok); }
.pwd-note { margin-top: 8px; font-size: 12px; color: var(--warn); }
.dl-tips { margin-top: 16px; font-size: 12.5px; color: var(--text-2); }
.dl-tips li { list-style: none; display: flex; gap: 8px; margin: 7px 0; }
.dl-tips li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.side-info { padding: 18px 20px; font-size: 13px; color: var(--text-2); }
.side-info h4 { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.side-info .kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.side-info .kv:last-child { border-bottom: 0; }
.side-info .kv span { color: var(--text-3); }

/* 说明弹窗（下载前提示） */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-mask.show { display: flex; animation: fade .18s ease; }
.modal {
  width: 100%; max-width: 460px; background: #fff; border-radius: 18px;
  padding: 24px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4);
  animation: pop .2s ease; position: relative;
}
.modal h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.modal h3 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.modal .m-body { margin: 16px 0; font-size: 14px; color: var(--text-2); }
.modal .m-body .pwd-l { margin: 10px 0 6px; font-size: 13px; color: var(--text); font-weight: 700; }
.modal .m-actions { display: flex; gap: 10px; }
.btn { border-radius: 10px; padding: 11px 16px; font-size: 14px; font-weight: 700; border: 0; cursor: pointer; transition: .16s; }
.btn-primary { background: var(--grad); color: #fff; flex: 1; box-shadow: 0 6px 14px -4px rgba(37,99,235,.5); }
.btn-primary:hover { opacity: .93; }
.btn-ghost { background: #f1f5f9; color: var(--text-2); flex: 1; }
.btn-ghost:hover { background: #e2e8f0; }
.modal .close-x {
  position: absolute; top: 14px; right: 14px; border: 0; background: #f1f5f9; color: var(--text-2);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 15px; line-height: 1;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fff; font-size: 13.5px; padding: 10px 20px;
  border-radius: 999px; z-index: 200; opacity: 0; pointer-events: none;
  transition: .25s ease; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: auto; background: #0f172a; color: #94a3b8;
  padding: 22px 0; font-size: 13px; text-align: center; line-height: 2;
}
.site-footer a { color: #cbd5e1; }

/* ---------- 二维码弹层等 ---------- */
.qr-tip { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 8px; }

/* ---------- 动画 ---------- */
.fadein { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 移动端细节 ---------- */
@media (max-width: 767px) {
  .hero { padding: 38px 0 46px; }
  .hero .search button { padding: 10px 16px; }
  .soft-card { padding: 14px; }
  .soft-ico { width: 46px; height: 46px; border-radius: 12px; font-size: 21px; }
  .soft-foot a.go { padding: 6px 11px; font-size: 12.5px; }
  .d-head { padding: 18px; }
  .d-content { padding: 4px 18px 20px; }
  .dl-box { padding: 18px; }
  .d-head .row { gap: 14px; }
  .d-head .soft-ico { width: 60px; height: 60px; border-radius: 15px; font-size: 28px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .soft-meta span:nth-child(n+4) { display: none; }
}
