/* 盈仓 ProfitVault - 暗调蓝紫玻璃拟态主题 */
:root {
  --primary: #8b5cf6;
  --primary-2: #6366f1;
  --primary-3: #3b82f6;
  --accent: #22d3ee;
  --accent-2: #f472b6;
  --bg-0: #0a0a14;
  --bg-1: #0f0e1f;
  --bg-2: #14122b;
  --card: rgba(255, 255, 255, .045);
  --card-hover: rgba(255, 255, 255, .075);
  --glass-border: rgba(255, 255, 255, .09);
  --glass-border-hi: rgba(139, 92, 246, .55);
  --text: #edeafd;
  --text-2: #c4bfe0;
  --muted: #8f8bb0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .35);
  --shadow-hi: 0 12px 40px rgba(99, 102, 241, .22);
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #3b82f6 100%);
  --grad-soft: linear-gradient(135deg, rgba(139,92,246,.18), rgba(59,130,246,.10));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(139,92,246,.20), transparent 60%),
    radial-gradient(760px 480px at 92% 8%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(700px 500px at 78% 92%, rgba(244,114,182,.09), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
}
/* 背景网格纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

/* 顶部细条 */
.topbar {
  position: relative;
  z-index: 50;
  background: rgba(10, 10, 20, .55);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--muted); font-size: 12px; padding: 7px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; }
.topbar span:first-child {
  background: linear-gradient(90deg, var(--accent), var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-weight: 600;
}

/* 主导航 - sticky 毛玻璃 */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 14, 31, .78);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: 13px 0;
}
.header .wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.logo {
  font-size: 24px; font-weight: 800; letter-spacing: 1px; line-height: 1.1;
  display: flex; flex-direction: column;
  background: linear-gradient(120deg, #fff 10%, #c4b5fd 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(139,92,246,.35));
}
.logo:hover { filter: drop-shadow(0 0 18px rgba(34,211,238,.5)); }
.logo small { font-size: 10px; font-weight: 600; letter-spacing: 3px; opacity: .72; -webkit-text-fill-color: #a78bfa; }
.nav { display: flex; gap: 3px; flex-wrap: wrap; flex: 1; }
.nav a {
  padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-size: 13px;
  border: 1px solid transparent;
}
.nav a:hover, .nav a.active {
  color: #fff;
  background: var(--grad-soft);
  border-color: var(--glass-border-hi);
  box-shadow: 0 0 18px rgba(139,92,246,.18);
}
.searchbar { display: flex; width: 260px; }
.searchbar input {
  flex: 1; min-width: 0; padding: 9px 13px; font-size: 13px; color: var(--text);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--glass-border); border-right: 0;
  border-radius: 9px 0 0 9px; outline: none; transition: border-color .15s, background .15s;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus { border-color: var(--glass-border-hi); background: rgba(255,255,255,.09); }
.searchbar button {
  padding: 9px 16px; border: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--grad); border-radius: 0 9px 9px 0;
  box-shadow: 0 4px 16px rgba(99,102,241,.35); transition: filter .15s;
}
.searchbar button:hover { filter: brightness(1.15); }

/* 首页 Hero */
.hero {
  text-align: center; padding: 48px 20px 40px; margin-bottom: 8px;
  position: relative;
}
.hero-badge {
  display: inline-block; font-size: 12px; letter-spacing: 1px; color: #c4b5fd;
  background: var(--grad-soft); border: 1px solid var(--glass-border-hi);
  padding: 5px 16px; border-radius: 20px; margin-bottom: 18px;
  box-shadow: 0 0 20px rgba(139,92,246,.15);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: 1px; line-height: 1.2;
  background: linear-gradient(120deg, #fff 15%, #c4b5fd 60%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(139,92,246,.25));
}
.hero h1 span { position: relative; }
.hero p { color: var(--text-2); font-size: 15px; margin-top: 12px; }
.hero-stats {
  display: flex; justify-content: center; gap: 0; margin-top: 30px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow); max-width: 620px; margin-left: auto; margin-right: auto;
  padding: 18px 0;
}
.hero-stats div {
  flex: 1; min-width: 120px; padding: 0 12px;
  display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid rgba(255,255,255,.07);
}
.hero-stats div:last-child { border-right: 0; }
.hero-stats strong {
  font-size: 24px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats span { font-size: 11px; color: var(--muted); }

/* 版块 */
.section { margin: 26px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title h2 {
  font-size: 17px; font-weight: 700; letter-spacing: .5px; padding-left: 13px;
  position: relative;
}
.section-title h2::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 3px; background: var(--grad); box-shadow: 0 0 10px rgba(139,92,246,.6);
}
.section-title a { color: var(--muted); font-size: 12px; }
.section-title a:hover { color: var(--accent); }

/* 玻璃卡片基类 */
.cat-card, .soft-card, .rank-list, .article-list, .panel, .detail-head,
.search-results, .cps-card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

/* 分类格子 */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card {
  padding: 16px 10px; text-align: center; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat-card:hover {
  transform: translateY(-4px); border-color: var(--glass-border-hi);
  box-shadow: var(--shadow-hi); background: var(--card-hover);
}
.cat-icon {
  width: 44px; height: 44px; margin: 0 auto 9px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(99,102,241,.35);
}
.cat-card h3 { font-size: 13px; margin-bottom: 3px; }
.cat-card p { font-size: 11px; color: var(--muted); }

/* 软件卡片 */
.soft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.soft-card {
  padding: 14px; display: flex; gap: 12px; align-items: flex-start;
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.soft-card:hover {
  transform: translateY(-3px); border-color: var(--glass-border-hi);
  box-shadow: var(--shadow-hi); background: var(--card-hover);
}
.soft-logo {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  background: var(--grad-soft); color: #c4b5fd;
  border: 1px solid var(--glass-border-hi);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.soft-logo.has-icon, .detail-logo.has-icon {
  background: rgba(255,255,255,.06); padding: 3px; overflow: hidden;
}
.soft-logo img, .detail-logo img {
  width: 100%; height: 100%; object-fit: contain; border-radius: inherit;
}
.soft-meta { min-width: 0; flex: 1; }
.soft-meta h3 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soft-meta .desc {
  font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0; height: 34px;
}
.soft-meta .info { font-size: 11px; color: #6f6b8f; }
.badge {
  display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 20px;
  background: rgba(34,211,238,.12); color: var(--accent);
  border: 1px solid rgba(34,211,238,.28); vertical-align: middle;
}

/* 榜单 */
.rank-list { padding: 8px 16px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.rank-item:last-child { border: 0; }
.rank-num {
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255,255,255,.07); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: none;
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #3a2500; box-shadow: 0 0 12px rgba(245,158,11,.4); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg,#e2e8f0,#94a3b8); color: #1f2937; }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg,#d8a878,#b45309); color: #fff; }
.rank-name { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-size { font-size: 11px; color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }

/* 文章列表 */
.article-list { padding: 8px 16px; }
.article-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.article-item:last-child { border: 0; }
.article-item h4 { font-size: 13px; font-weight: 600; }
.article-item p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 广告位 */
.ad-slot {
  border: 1px dashed rgba(139,92,246,.3); background: rgba(139,92,246,.05);
  border-radius: var(--radius-sm); text-align: center;
  padding: 14px; color: #6f6b8f; font-size: 12px; margin: 16px 0;
}
.ad-slot.live { border: 0; background: none; padding: 0; }

/* 面包屑 */
.crumb { font-size: 12px; color: var(--muted); margin: 18px 0; }
.crumb a:hover { color: var(--accent); }

/* 详情页 */
.detail-head { padding: 22px; display: flex; gap: 20px; align-items: center; }
.detail-logo {
  width: 86px; height: 86px; flex: none; border-radius: 20px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 800;
  box-shadow: 0 8px 28px rgba(99,102,241,.45);
}
.detail-logo.has-icon { box-shadow: 0 8px 28px rgba(99,102,241,.28); }
.detail-info h1 { font-size: 23px; margin-bottom: 6px; }
.detail-info .sub { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.tags span {
  display: inline-block; font-size: 11px;
  background: rgba(139,92,246,.12); color: #c4b5fd;
  border: 1px solid rgba(139,92,246,.25);
  padding: 2px 9px; border-radius: 20px; margin-right: 6px;
}
.btn-download {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 15px;
  background: var(--grad); color: #fff;
  padding: 12px 34px; border-radius: 10px; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 26px rgba(99,102,241,.45); transition: transform .15s, filter .15s;
}
.btn-download::before { content: "↓"; font-size: 18px; font-weight: 400; }
.btn-download:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.12); }
.download-note { font-size: 12px; color: var(--muted); margin-top: 9px; }
.detail-body { display: grid; grid-template-columns: 1fr 310px; gap: 16px; margin-top: 16px; }
.detail-body > div > .panel + .panel { margin-top: 16px; }
.panel { padding: 20px; }
.panel h2 { font-size: 16px; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.07); }
.panel h2::first-letter { color: #c4b5fd; }
.panel p { color: var(--text-2); margin-bottom: 10px; }
.panel ul { padding-left: 20px; color: var(--text-2); }
.panel li { margin: 5px 0; }
.panel li::marker { color: var(--accent); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table td { padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.06); }
.spec-table td:first-child { color: var(--muted); width: 78px; }
.cps-card {
  background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.28);
  border-radius: var(--radius-sm); padding: 13px; margin-top: 14px; font-size: 13px;
}
.cps-card strong { color: #c4b5fd; }
.cps-card a { color: var(--accent); font-weight: 600; }

/* 搜索页 */
.search-results { padding: 8px 16px; }
.search-result { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.search-result:last-child { border: 0; }
.result-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; object-fit: contain; background: rgba(255,255,255,.05); padding: 2px; }
.result-body { min-width: 0; flex: 1; }
.search-result h3 { font-size: 15px; }
.search-result p { font-size: 12px; color: var(--muted); margin: 4px 0; }

/* 页脚 */
.footer {
  position: relative; z-index: 1;
  background: rgba(10,10,20,.7); border-top: 1px solid var(--glass-border);
  color: var(--muted); padding: 30px 0; margin-top: 48px; font-size: 12px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--accent); }
.footer .links { margin-bottom: 14px; }
.footer .links a { margin-right: 15px; }

/* 响应式 */
@media (max-width: 980px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .soft-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body, .cols-2 { grid-template-columns: 1fr; }
  .searchbar { width: 100%; }
  .nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .soft-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .topbar .wrap span:last-child { display: none; }
}
