/* ============ 基础变量 ============ */
:root {
  --primary: #4f6ef7;
  --primary-dark: #3a54d6;
  --accent: #22c3c6;
  --ink: #1f2740;
  --ink-2: #5a6480;
  --ink-3: #9aa3bb;
  --line: #e8ebf3;
  --bg: #f7f9fd;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(31, 39, 64, .07);
  --shadow-hover: 0 18px 44px rgba(79, 110, 247, .16);
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .3px; }
.brand-icon { font-size: 26px; }
.nav { display: flex; gap: 6px; }
.nav-link {
  padding: 8px 16px; border-radius: 10px; color: var(--ink-2);
  font-size: 14px; font-weight: 600; transition: .2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(79,110,247,.08); }
.nav-toggle { display: none; border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--ink); }

/* ============ 首屏 ============ */
.hero { position: relative; overflow: hidden; padding: 84px 0 68px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(600px 320px at 15% -10%, rgba(79,110,247,.16), transparent 70%),
    radial-gradient(500px 320px at 92% 10%, rgba(34,195,198,.16), transparent 70%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(79,110,247,.10) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: rgba(79,110,247,.09); color: var(--primary);
  font-size: 13px; font-weight: 700; margin-bottom: 22px;
}
.hero-title { font-size: clamp(34px, 6vw, 58px); line-height: 1.18; font-weight: 850; letter-spacing: -1px; }
.hero-title span {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 620px; margin: 20px auto 0; color: var(--ink-2); font-size: 16px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: 1px solid transparent; transition: .2s;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 22px rgba(79,110,247,.30); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.hero-stats { display: flex; gap: 54px; justify-content: center; margin-top: 46px; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 30px; font-weight: 850; color: var(--primary); }
.stat span { font-size: 13px; color: var(--ink-3); }

/* ============ 区块通用 ============ */
.section { padding: 72px 0; }
.section-alt { background: #eef2fa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-title { font-size: 30px; font-weight: 850; letter-spacing: -.5px; }
.section-desc { color: var(--ink-2); font-size: 14px; margin-top: 6px; }

/* ============ 工具箱 ============ */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: .2s;
}
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 6px 16px rgba(79,110,247,.25); }
.search-box {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; padding: 0 14px; height: 42px;
}
.search-box input { border: 0; outline: 0; background: none; width: 180px; color: var(--ink); }

.cat-block { margin-bottom: 38px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cat-icon { font-size: 26px; }
.cat-name { font-size: 19px; font-weight: 800; }
.cat-desc { color: var(--ink-3); font-size: 13px; margin-left: 4px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tool-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; cursor: pointer; transition: .22s;
  overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--tcolor, var(--primary)); opacity: 0; transition: .22s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.tool-card:hover::before { opacity: 1; }
.tool-card-top { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.tool-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 23px; background: var(--tbg, rgba(79,110,247,.10)); flex-shrink: 0;
}
.tool-name { font-size: 16px; font-weight: 800; }
.tool-badge {
  margin-left: auto; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(100deg, #ff7a59, #ff4d6d); padding: 2px 8px; border-radius: 999px;
}
.tool-desc { color: var(--ink-2); font-size: 13px; line-height: 1.65; min-height: 42px; }
.tool-go { margin-top: 14px; color: var(--primary); font-size: 13px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.empty-state { text-align: center; color: var(--ink-3); padding: 60px 0; font-size: 15px; }

/* ============ 下载站 ============ */
.sync-badge { font-size: 12px; color: var(--ink-3); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.download-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.loading-card { grid-column: 1/-1; text-align: center; padding: 60px; color: var(--ink-3); background: #fff; border-radius: var(--radius); }
.app-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.app-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.app-logo {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
}
.app-name { font-size: 18px; font-weight: 800; }
.app-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.tag { padding: 2px 9px; border-radius: 999px; background: rgba(79,110,247,.09); color: var(--primary); font-weight: 700; }
.tag.gitee { background: rgba(193,53,53,.09); color: #c13535; }
.app-desc { font-size: 14px; color: var(--ink-2); flex: 1; }
.app-desc h1,.app-desc h2,.app-desc h3 { font-size: 15px; margin: 8px 0 4px; color: var(--ink); }
.app-desc p { margin: 6px 0; }
.app-desc ul, .app-desc ol { padding-left: 20px; margin: 6px 0; }
.app-desc a { color: var(--primary); }
.app-desc code { background: #f1f3f9; padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.assets { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.asset {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  font-size: 13px; border-bottom: 1px solid #f4f5f9;
}
.asset:last-child { border-bottom: 0; }
.asset-icon { font-size: 18px; }
.asset-name { font-weight: 700; flex: 1; word-break: break-all; }
.asset-info { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.asset-btn {
  padding: 6px 13px; border-radius: 8px; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700; white-space: nowrap; transition: .2s;
}
.asset-btn:hover { background: var(--primary-dark); }

/* ============ 联系我们 ============ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; box-shadow: var(--shadow); transition: .2s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.qr-frame {
  width: 200px; height: 200px; margin: 0 auto 16px; border-radius: 14px;
  padding: 10px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-frame.is-douyin img { object-fit: cover; border-radius: 8px; }
.contact-title { font-size: 17px; font-weight: 800; }
.contact-sub { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.contact-link { display: inline-block; margin-top: 12px; color: var(--primary); font-size: 13px; font-weight: 700; }
.contact-link:hover { text-decoration: underline; }

/* ============ 页脚 ============ */
.site-footer { background: #1f2740; color: #c6cee0; padding: 40px 0 30px; text-align: center; }
.footer-brand { font-size: 18px; font-weight: 800; color: #fff; }
.footer-note { font-size: 13px; margin-top: 10px; color: #9aa3bb; }
.powered { font-size: 13px; margin-top: 14px; }
.powered strong { color: #7fa0ff; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,26,44,.55); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; width: min(860px, 100%); max-height: 90vh; background: #fff;
  border-radius: 20px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.96) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.modal-title-wrap { display: flex; align-items: center; gap: 13px; }
.modal-icon { font-size: 26px; }
.modal-title-wrap h3 { font-size: 18px; font-weight: 800; }
.modal-title-wrap p { font-size: 12px; color: var(--ink-3); }
.modal-close {
  border: 0; background: #f2f4f9; width: 34px; height: 34px; border-radius: 9px;
  cursor: pointer; color: var(--ink-2); font-size: 15px; transition: .2s; flex-shrink: 0;
}
.modal-close:hover { background: #ffe5e5; color: #e33; }
.modal-body { padding: 24px; overflow-y: auto; }

/* ============ 轻提示 ============ */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #1f2740; color: #fff; padding: 11px 22px; border-radius: 11px;
  font-size: 14px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  animation: pop .2s ease;
}

/* ============ 响应式 ============ */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px;
    gap: 2px; display: none; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .hero { padding: 56px 0 46px; }
  .hero-stats { gap: 28px; }
  .stat b { font-size: 24px; }
  .section { padding: 52px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box input { width: 100%; }
  .modal { padding: 0; }
  .modal-panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .modal-body { padding: 18px; }
}
