/* ============================================================
   XiaoGet 晓盖工软 · 明朗科技风主题 V2
   白底 + 翠绿点缀 + 卡片阴影 + 无框架
   ============================================================ */
:root {
  /* 品牌色 */
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --primary-glow: rgba(16, 185, 129, 0.12);
  /* 文字 */
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  /* 背景 */
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  /* 边框 & 阴影 */
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-hover: 0 20px 40px -8px rgba(0,0,0,.1);
  /* 排版 */
  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
code, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}
a { color: var(--primary-dark); transition: color .2s; }
a:hover { color: var(--primary); }
img, video { max-width: 100%; display: block; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-weight: 700; font-size: 1.15rem; color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo .bang {
  color: var(--primary); font-weight: 800; margin-right: 2px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-size: .93rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary-dark); }
.nav-back {
  font-size: .88rem; color: var(--text-muted); margin-right: 16px;
}
.nav-back::before { content: "← "; }

/* ============ 容器 ============ */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 1.75rem; font-weight: 700; color: var(--text);
  margin-bottom: 8px; letter-spacing: -0.5px;
}
.section-title::before { content: ""; display: inline-block; width: 4px; height: 22px; background: var(--primary); border-radius: 2px; margin-right: 12px; vertical-align: middle; }
.section-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin-bottom: 40px; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 120px 24px 80px; text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 50%, var(--bg) 100%);
}
.hero-company {
  position: absolute; right: 28px; bottom: 18px;
  font-size: .75rem; color: var(--text-muted);
  letter-spacing: 1px; margin: 0;
}
.hero-badge {
  display: inline-block; font-size: .8rem; font-weight: 600;
  color: var(--primary-dark); background: var(--primary-light);
  padding: 4px 14px; border-radius: 20px; margin-bottom: 20px;
  letter-spacing: 1px;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800; color: var(--text); letter-spacing: -1px;
  margin-bottom: 12px;
}
.hero-title .bang { color: var(--primary); }
.hero-slogan {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary); font-weight: 400; margin-bottom: 8px;
}
.hero-sub { color: var(--text-muted); font-size: .95rem; margin-bottom: 36px; }
.hero-sub code { color: var(--primary-dark); border: none; background: none; padding: 0; font-weight: 600; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; font-size: .95rem; font-weight: 600;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(16,185,129,.3); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text-secondary); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); box-shadow: var(--shadow); }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ============ 插件网格 ============ */
.plugin-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.plugin-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s;
  display: flex; flex-direction: column;
}
.plugin-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.plugin-card.featured {
  grid-column: 1 / -1;
  flex-direction: row; flex-wrap: wrap;
}
.plugin-card.featured .plugin-body { flex: 1; min-width: 300px; }
.plugin-card.featured .plugin-demo { flex: 1; min-width: 280px; min-height: 240px; border-top: none; border-left: 1px solid var(--border); }

.plugin-body { padding: 28px 28px 20px; flex: 1; }
.plugin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.plugin-name { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.plugin-tagline { color: var(--text-secondary); margin-bottom: 16px; font-size: .95rem; }
.plugin-feats { list-style: none; margin-bottom: 20px; }
.plugin-feats li { padding: 6px 0 6px 26px; position: relative; color: var(--text-secondary); font-size: .92rem; }
.plugin-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.plugin-cmdline { margin-bottom: 16px; }
.plugin-cmdline code { color: var(--primary-dark); font-size: .82rem; padding: 3px 8px; }

.plugin-demo { background: var(--bg-alt); border-top: 1px solid var(--border); min-height: 180px; display: flex; align-items: center; justify-content: center; }
.plugin-demo video { width: 100%; max-height: 360px; object-fit: cover; }
.demo-placeholder { color: var(--text-muted); font-size: .88rem; text-align: center; padding: 30px; }
.demo-placeholder .ph-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; opacity: .5; }

.plugin-foot { padding: 16px 28px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.plugin-stat { color: var(--text-muted); font-size: .8rem; }
.plugin-card a.plugin-link { display: block; }

/* ============ 状态徽章 ============ */
.badge { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.badge-stable { background: var(--primary-light); color: var(--primary-dark); }
.badge-wip { background: #fef3c7; color: #92400e; }
.badge-beta { background: #dbeafe; color: #1e40af; }

/* ============ 痛点区 ============ */
.pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.pain-item { padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.pain-item .pain-icon { font-size: 1.6rem; margin-bottom: 10px; }
.pain-item .pain-text { color: var(--text-secondary); font-size: .92rem; margin-bottom: 10px; }
.pain-item .pain-cure { color: var(--primary-dark); font-weight: 600; font-size: .88rem; }
.pain-item .pain-cure::before { content: "→ "; }

/* ============ 质量承诺 ============ */
.quality-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.quality-list li {
  padding: 20px 24px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; align-items: flex-start; gap: 14px;
  font-size: .93rem; color: var(--text-secondary);
}
.quality-list li strong { color: var(--text); }
.q-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; }

/* ============ 路线图 ============ */
.timeline { list-style: none; max-width: 640px; padding-left: 20px; border-left: 2px solid var(--border); }
.tl-item { position: relative; padding: 0 0 36px 28px; }
.tl-item::before {
  content: ""; position: absolute; left: -9px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--border);
}
.tl-item.done::before { background: var(--primary); border-color: var(--primary); }
.tl-item.next::before { border-color: var(--primary); animation: tl-pulse 2s infinite; }
@keyframes tl-pulse { 50% { box-shadow: 0 0 0 6px var(--primary-glow); } }
.tl-item b { color: var(--text); }
.tl-item.done b::after { content: " ✓"; color: var(--primary); }
.tl-item p { color: var(--text-muted); font-size: .88rem; margin-top: 4px; }

/* ============ 联系区 ============ */
.contact-wrap { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.qr-group { display: flex; gap: 20px; flex-wrap: wrap; }
.qr-box { text-align: center; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.qr-box img { width: 170px; height: 170px; border-radius: 6px; }
.qr-title { margin-bottom: 12px; }
.qr-badge { display: inline-block; padding: 3px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; letter-spacing: 1px; }
.qr-badge-tech { background: var(--primary-light); color: var(--primary-dark); }
.qr-badge-biz { background: #dbeafe; color: #1d4ed8; }
.qr-tip b { color: var(--text-secondary); }
.qr-box.qr-missing::before {
  content: "二维码占位"; display: flex; align-items: center; justify-content: center;
  width: 170px; height: 170px; color: var(--text-muted);
  border: 2px dashed var(--border); border-radius: 8px; font-size: .85rem;
}
.qr-tip { margin-top: 12px; color: var(--text-muted); font-size: .82rem; line-height: 1.6; }
.contact-entries { flex: 1; min-width: 280px; }
.contact-entry { margin-bottom: 20px; padding: 16px 20px; background: var(--bg-alt); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.contact-entry b { display: block; color: var(--text); margin-bottom: 4px; font-size: .92rem; }
.contact-entry p { color: var(--text-muted); font-size: .85rem; }

/* ============ Footer ============ */
.footer {
  background: var(--bg-dark); color: #94a3b8;
  padding: 50px 24px 40px; margin-top: 0;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-brand { color: #e2e8f0; font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.footer-brand .bang { color: var(--primary); }
.footer-legal { font-size: .78rem; line-height: 1.8; max-width: 700px; margin-bottom: 10px; color: #64748b; }
.footer-icp { font-size: .78rem; color: #64748b; }
.footer-icp a { color: #94a3b8; }
.footer-icp a:hover { color: var(--primary); }

/* ============ 详情页通用 ============ */
.detail-hero { padding: 120px 24px 60px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.detail-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; }
.detail-badge { margin-bottom: 16px; }
.detail-cmd { color: var(--text-muted); font-size: .9rem; }
.detail-cmd code { color: var(--primary-dark); font-size: .88rem; }
.detail-tagline { font-size: 1.1rem; color: var(--text-secondary); margin-top: 10px; max-width: 640px; }
.detail-body { padding: 60px 24px; }
.detail-section { margin-bottom: 48px; }
.detail-section h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.detail-section h2::before { content: "//"; color: var(--primary); margin-right: 8px; font-family: var(--font-mono); font-weight: 400; }
.detail-section ul { list-style: none; }
.detail-section ul li { padding: 8px 0 8px 24px; position: relative; color: var(--text-secondary); font-size: .94rem; }
.detail-section ul li::before { content: "•"; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }
.detail-section p { color: var(--text-secondary); margin-bottom: 12px; font-size: .94rem; line-height: 1.85; }
.detail-demo { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 32px 0; }
.detail-demo video { width: 100%; display: block; }
.detail-demo .demo-placeholder { padding: 60px 20px; text-align: center; color: var(--text-muted); }
.detail-cta { padding: 40px 24px; text-align: center; background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg) 100%); border-radius: var(--radius); }
.detail-cta h3 { font-size: 1.3rem; margin-bottom: 8px; }
.detail-cta p { color: var(--text-muted); margin-bottom: 20px; }
.related-plugins { padding: 40px 24px 60px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.related-card { padding: 16px 20px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: box-shadow .2s; text-decoration: none; }
.related-card:hover { box-shadow: var(--shadow); color: var(--text); }
.related-card b { display: block; font-size: .95rem; }
.related-card span { color: var(--text-muted); font-size: .82rem; }

/* ============ 滚动渐入 ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .nav { padding: 14px 16px; }
  .nav-links { gap: 16px; }
  .hero { padding: 80px 16px 50px; }
  .hero-company { right: 16px; bottom: 12px; font-size: .68rem; }
  .section { padding: 50px 0; }
  .container { padding: 0 16px; }
  .plugin-card.featured { flex-direction: column; }
  .plugin-card.featured .plugin-demo { border-left: none; border-top: 1px solid var(--border); }
  .contact-wrap { gap: 20px; }
  .detail-title { font-size: 1.6rem; }
}

/* ============ 无障碍 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .plugin-card:hover { transform: none; }
  .tl-item.next::before { animation: none; }
}

/* ============================================================
   鼠标互动（js/mouse.js）
   光标光晕 / 卡片倾斜高光 / 磁吸按钮 / 点击涟漪 / 点击火花
   以上元素均由 JS 创建，触屏与"减弱动态"环境不会出现。
   ============================================================ */

/* ---------- 光标跟随光晕 ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 9999;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle,
    rgba(16,185,129,.11) 0%, rgba(16,185,129,.055) 38%, transparent 70%);
  opacity: 0; transition: opacity .5s ease;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

/* ---------- 插件卡片：随光标高光（倾斜由 JS 行内 transform 驱动） ---------- */
.plugin-card { position: relative; }
.plugin-card::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255,255,255,.28), transparent 46%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.plugin-card:hover::after { opacity: 1; }

/* ---------- 按钮点击涟漪 ---------- */
.btn { position: relative; overflow: hidden; }
.btn-primary { --ripple: rgba(255,255,255,.45); }
.btn-ghost { --ripple: rgba(16,185,129,.22); }
.ripple {
  position: absolute; border-radius: 50%;
  background: var(--ripple, rgba(16,185,129,.22));
  transform: scale(0); opacity: .9;
  animation: ripple-grow .55s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-grow { to { transform: scale(1); opacity: 0; } }

/* ---------- 全站点击火花 ---------- */
.spark {
  position: fixed; left: 0; top: 0; z-index: 10000;
  border-radius: 50%; pointer-events: none;
  will-change: transform, opacity;
}

/* ---------- Hero 视差：子元素位移的跟随过渡 ---------- */
.hero > * { transition: transform .3s ease-out; }

/* ---------- 品牌感小细节：悬停时 "!" 弹一下 ---------- */
.bang { display: inline-block; }
.nav-logo .bang, .hero-title .bang, .footer-brand .bang {
  transition: transform .45s cubic-bezier(.3, 1.6, .4, 1);
}
.nav-logo:hover .bang, .hero-title:hover .bang, .footer-brand:hover .bang {
  transform: rotate(-12deg) scale(1.25);
}

/* ---------- 悬停细节打磨 ---------- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -5px;
  height: 2px; border-radius: 1px; background: var(--primary);
  transition: right .25s ease;
}
.nav-links a:hover::after { right: 0; }

.pain-item { transition: transform .25s ease, box-shadow .25s ease; }
.pain-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pain-item .pain-icon { display: inline-block; transition: transform .25s ease; }
.pain-item:hover .pain-icon { transform: scale(1.18) rotate(-8deg); }

.quality-list li { transition: transform .25s ease, box-shadow .25s ease; }
.quality-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.tl-item b { transition: color .2s ease; }
.tl-item:hover::before { border-color: var(--primary); box-shadow: 0 0 0 6px var(--primary-glow); }
.tl-item:hover b { color: var(--primary-dark); }

.contact-entry { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.contact-entry:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-light); }

.qr-box { transition: transform .25s ease, box-shadow .25s ease; }
.qr-box:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.related-card { transition: box-shadow .2s ease, transform .2s ease; }
.related-card:hover { transform: translateY(-3px); }

/* ---------- 互动元素的无障碍兜底 ---------- */
@media (prefers-reduced-motion: reduce) {
  .cursor-glow, .spark, .ripple, .plugin-card::after { display: none; }
  .hero > *, .pain-item, .quality-list li, .contact-entry, .qr-box, .related-card { transition: none; }
  .pain-item:hover, .quality-list li:hover, .contact-entry:hover, .qr-box:hover, .related-card:hover { transform: none; }
}
