/* ===== CSS Variables ===== */
:root {
  --primary: #165dff;
  --primary-light: #4e8fff;
  --primary-dark: #0e42b2;
  --bg: #f7f9fa;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e5e7eb;
  --footer-bg: #22292d;
  --radius: 10px;
}

[data-theme="dark"] {
  --bg: #16161a;
  --bg-card: #2a2a2a;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #6b6b6b;
  --border: #3a3a3a;
  --primary-light: #4e8fff;
}

/* ===== Global Reset & Base ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 62px; display: flex; align-items: center;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border .3s;
}
[data-theme="dark"] .nav {
  background: rgba(22,22,26,0.85);
}
.nav-logo span { color: var(--primary); }
.nav-links a { color: var(--text-secondary); transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-links-desktop {
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.mobile-menu-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: 260px; padding: 72px 24px 24px;
  background: var(--bg-card);
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a {
  display: block; padding: 12px 16px; border-radius: 8px;
  color: var(--text-secondary); font-size: 15px; transition: all .2s;
}
.mobile-menu a:hover { background: rgba(22,93,255,0.08); color: var(--primary); }

/* Hamburger */
.hamburger {
  display: none; width: 36px; height: 36px;
  border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all .3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links-desktop { display: none !important; }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all .2s; color: var(--text-primary);
}
.theme-toggle:hover { border-color: var(--primary); }

/* ===== Hero ===== */
.hero-badge {
  background: rgba(79, 70, 229, 0.1); color: var(--primary);
}
[data-theme="dark"] .hero-badge {
  background: rgba(129, 140, 248, 0.15); color: var(--primary-light);
}

.hero h1 span { color: var(--primary); }
[data-theme="dark"] .hero h1 span { color: var(--primary-light); }

/* Hero Browser Preview */
.hero-browser {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  background: var(--bg-card);
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg);
  transition: transform .3s, box-shadow .3s;
}
.hero-browser:hover {
  transform: perspective(800px) rotateY(0deg) rotateX(0deg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.1);
}
.hero-browser-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-browser-dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-browser-url {
  flex: 1; margin-left: 8px; padding: 4px 12px;
  border-radius: 6px; background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
}
.hero-browser-body { padding: 0; }

/* 模拟导航 */
.hb-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.hb-logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.hb-nav-links { display: flex; gap: 8px; margin-left: auto; }
.hb-nav-links span {
  width: 28px; height: 6px; border-radius: 3px;
  background: var(--border);
}

/* 模拟Banner */
.hb-banner {
  padding: 24px 18px 20px;
  background: linear-gradient(135deg, rgba(22,93,255,0.06) 0%, rgba(139,92,246,0.04) 100%);
}
[data-theme="dark"] .hb-banner {
  background: linear-gradient(135deg, rgba(22,93,255,0.1) 0%, rgba(139,92,246,0.06) 100%);
}
.hb-banner-text { max-width: 60%; }
.hb-title-bar {
  height: 10px; width: 80%; border-radius: 4px;
  background: var(--text-primary); opacity: 0.15; margin-bottom: 8px;
}
.hb-subtitle-bar {
  height: 6px; width: 55%; border-radius: 3px;
  background: var(--text-primary); opacity: 0.08; margin-bottom: 12px;
}
.hb-btn-bar {
  height: 20px; width: 60px; border-radius: 5px;
  background: var(--primary); opacity: 0.8;
}

/* 模拟卡片 */
.hb-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 14px;
}
.hb-card {
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
}
.hb-card-img {
  height: 48px;
  background: linear-gradient(135deg, rgba(22,93,255,0.08), rgba(139,92,246,0.05));
}
[data-theme="dark"] .hb-card-img {
  background: linear-gradient(135deg, rgba(22,93,255,0.15), rgba(139,92,246,0.08));
}
.hb-card-line {
  height: 5px; border-radius: 2px; margin: 8px 8px 0;
  background: var(--text-primary); opacity: 0.08;
}
.hb-card-line.short { width: 55%; margin-bottom: 8px; }

@media (max-width: 1024px) {
  .hero-browser {
    transform: none;
  }
  .hero-browser:hover { transform: none; }
}

/* Hero badge shimmer */
.hero-badge-shimmer {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s ease-in-out infinite;
}
[data-theme="dark"] .hero-badge-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}

/* Hero tech tags */
.hero-tech-tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; color: var(--text-muted);
  border: 1px solid var(--border); background: var(--bg-card);
  transition: all .2s;
}
.hero-tech-tag:hover { border-color: var(--primary); color: var(--primary); }

/* Hero Grid Decoration */
.hero-grid {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background-image:
    linear-gradient(rgba(22,93,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,93,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
[data-theme="dark"] .hero-grid {
  background-image:
    linear-gradient(rgba(78,143,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78,143,255,0.05) 1px, transparent 1px);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-size: 15px; font-weight: 500;
  transition: all .2s; border: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Stats ===== */
.stat-number {
  color: var(--primary); font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .stat-number { color: var(--primary-light); }

/* ===== Highlight (Visual Customization Demo) ===== */
.highlight-text h2 span { color: var(--primary); }
[data-theme="dark"] .highlight-text h2 span { color: var(--primary-light); }
.highlight-tag {
  padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: rgba(79, 70, 229, 0.08); color: var(--primary);
}
[data-theme="dark"] .highlight-tag {
  background: rgba(129, 140, 248, 0.12); color: var(--primary-light);
}

/* Demo Window */
.highlight-demo {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
  position: relative;
}
.demo-titlebar {
  height: 36px; display: flex; align-items: center; padding: 0 14px; gap: 7px;
  background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dot:nth-child(1) { background: #ef4444; }
.demo-dot:nth-child(2) { background: #f59e0b; }
.demo-dot:nth-child(3) { background: #22c55e; }
.demo-titlebar span { margin-left: auto; }
.demo-body { display: flex; min-height: 320px; position: relative; overflow: hidden; }
.demo-canvas {
  flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  position: relative; border: 2px dashed transparent; margin: 4px;
  border-radius: 8px; transition: border-color .3s, background .3s;
}
.demo-canvas.drop-ready { border-color: var(--primary); background: rgba(22,93,255,0.02); }
.demo-canvas-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px; gap: 6px;
}
.demo-canvas-empty svg { width: 28px; height: 28px; opacity: 0.4; }

/* Demo Blocks */
.demo-block {
  border-radius: 8px; padding: 10px 12px; border: 1px solid var(--border);
  background: var(--bg-card); font-size: 12px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  position: relative; transition: border-color .2s, box-shadow .2s, opacity .3s;
}
.demo-block.hover { border-color: rgba(22,93,255,0.4); box-shadow: 0 1px 4px rgba(22,93,255,0.08); }
.demo-block-handle { display: flex; color: var(--text-muted); cursor: move; flex-shrink: 0; }
.demo-block-handle svg { width: 14px; height: 14px; }
.demo-block-handle.hover { color: var(--primary); }
.demo-block-icon { display: flex; color: var(--primary); flex-shrink: 0; }
.demo-block-icon svg { width: 14px; height: 14px; }
[data-theme="dark"] .demo-block-icon { color: var(--primary-light); }
.demo-block-label { flex: 1; font-size: 12px; color: var(--text-secondary); }
.demo-block-edit {
  width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s, color .15s; color: var(--text-muted); flex-shrink: 0;
}
.demo-block-edit svg { width: 12px; height: 12px; }
.demo-block-edit.show { opacity: 1; }
.demo-block-edit.active { opacity: 1; color: var(--primary); }
.demo-block-del {
  width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s; color: #ef4444; flex-shrink: 0;
}
.demo-block-del svg { width: 12px; height: 12px; }
.demo-block-del.show { opacity: 1; }

/* Ghost & Flying */
.demo-ghost {
  border-radius: 8px; padding: 10px 12px; font-size: 12px;
  opacity: 0.4; background: #e0edff; border: 1px dashed #4080ff;
  display: flex; align-items: center; gap: 8px; color: var(--text-secondary);
}
[data-theme="dark"] .demo-ghost { background: rgba(64,128,255,0.15); }
.demo-block.dragging { opacity: 0.4; }

.demo-flying {
  position: absolute; z-index: 18; pointer-events: none;
  border-radius: 8px; padding: 8px 12px; font-size: 11px;
  background: var(--bg-card); border: 1px solid var(--primary);
  box-shadow: 0 4px 12px rgba(22,93,255,0.15);
  display: flex; align-items: center; gap: 6px; color: var(--text-secondary);
  transition: left .55s cubic-bezier(.4,0,.2,1), top .55s cubic-bezier(.4,0,.2,1), opacity .3s;
  white-space: nowrap;
}
.demo-flying svg { width: 12px; height: 12px; color: var(--primary); }

@keyframes dropIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
.demo-block.anim-drop { animation: dropIn .25s ease-out both; }

.demo-drop-line {
  height: 2px; background: var(--primary); border-radius: 1px; margin: -1px 0;
  animation: fadeIn .2s ease both;
}

/* Demo Sidebar */
.demo-sidebar {
  width: 140px; border-left: 1px solid var(--border); padding: 10px;
  display: flex; flex-direction: column; gap: 5px;
}
.demo-sidebar-title { font-size: 10px; color: var(--text-muted); margin-bottom: 2px; font-weight: 600; }
.demo-sidebar-item {
  padding: 7px 9px; border-radius: 6px; font-size: 11px;
  background: var(--bg-card); color: var(--text-secondary); cursor: grab;
  border: 1px solid var(--border); transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.demo-sidebar-item svg { width: 13px; height: 13px; color: var(--primary); flex-shrink: 0; }
[data-theme="dark"] .demo-sidebar-item svg { color: var(--primary-light); }
.demo-sidebar-item:hover, .demo-sidebar-item.active {
  border-color: rgba(22,93,255,0.4); box-shadow: 0 1px 4px rgba(22,93,255,0.08);
}

/* Demo Cursor */
.demo-cursor {
  position: absolute; z-index: 25; pointer-events: none;
  transition: left .5s cubic-bezier(.4,0,.2,1), top .5s cubic-bezier(.4,0,.2,1);
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.18));
  opacity: 0;
}
.demo-cursor.visible { opacity: 1; }
.demo-cursor.fast { transition-duration: .3s; }
.demo-cursor.slow { transition-duration: .65s; }
.demo-cursor.clicking { transform: scale(0.85); }
.demo-cursor .cur-default,
.demo-cursor .cur-grab,
.demo-cursor .cur-grabbing,
.demo-cursor .cur-move { display: none; }
.demo-cursor[data-mode="default"] .cur-default { display: block; }
.demo-cursor[data-mode="grab"] .cur-grab { display: block; }
.demo-cursor[data-mode="grabbing"] .cur-grabbing { display: block; }
.demo-cursor[data-mode="move"] .cur-move { display: block; }

/* Demo Modal */
.demo-modal-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 20;
  border-radius: 0 0 var(--radius) var(--radius);
}
.demo-modal-overlay.visible { opacity: 1; pointer-events: auto; }
.demo-modal {
  width: 280px; background: var(--bg-card); border-radius: 8px;
  border: 1px solid var(--border); overflow: hidden;
  transform: scale(0.92) translateY(8px); transition: transform .25s;
}
.demo-modal-overlay.visible .demo-modal { transform: scale(1) translateY(0); }
.demo-modal-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between;
}
.demo-modal-close {
  width: 20px; height: 20px; border: none; background: none; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: color .2s;
}
.demo-modal-close.hover { color: var(--primary); }
.demo-modal-body { padding: 14px 16px; }
.demo-modal-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 11px; color: var(--text-secondary);
}
.demo-modal-input {
  width: 100px; height: 24px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--bg); padding: 0 8px; font-size: 11px; color: var(--text-primary);
}
.demo-modal-bar {
  height: 6px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden;
}
.demo-modal-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 60%; border-radius: 3px;
  background: var(--primary);
}

/* Download Modal */
.download-modal-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.download-modal-overlay.visible { opacity: 1; pointer-events: auto; }
.download-modal {
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.2);
  transform: translateY(10px) scale(0.98);
  transition: transform .2s;
}
.download-modal-overlay.visible .download-modal { transform: translateY(0) scale(1); }
.download-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.download-modal-title {
  margin: 0;
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
}
.download-modal-close {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.download-modal-close:hover { border-color: var(--primary); color: var(--primary); }
.download-modal-body { padding: 18px 16px 16px; }
.download-modal-text {
  margin: 0;
  font-size: 15px; line-height: 1.7;
  color: var(--text-secondary);
}
.download-modal-confirm {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

/* ===== 免费版下载弹窗：双选项 ===== */
.download-modal--wide { width: min(560px, 100%); }

.dl-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .dl-options { grid-template-columns: 1fr; }
}

.dl-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 14px 14px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
  font-family: inherit;
  color: inherit;
}

.dl-option:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(22, 93, 255, 0.10);
  transform: translateY(-1px);
}

.dl-option:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.dl-option-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: #fff;
}

.dl-option-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.dl-option-icon--qq {
  background: rgba(22, 93, 255, 0.1);
  color: var(--primary);
}

.dl-option-icon--direct {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.dl-option-content { width: 100%; }

.dl-option-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.dl-option-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.dl-qq-num {
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dl-option-action {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.dl-option-action.is-error { color: #ef4444; }
.dl-option-action.is-success { color: #10b981; }

/* ===== Feature Cards ===== */
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .25s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.feature-icon {
  background: rgba(79, 70, 229, 0.1); color: var(--primary);
}
[data-theme="dark"] .feature-icon { background: rgba(129, 140, 248, 0.12); color: var(--primary-light); }

/* ===== Showcase ===== */
.showcase-item.reverse { direction: rtl; }
.showcase-item.reverse > * { direction: ltr; }
.showcase-sub { color: var(--primary); }
[data-theme="dark"] .showcase-sub { color: var(--primary-light); }
.showcase-img {
  background: var(--bg-card); border: 1px solid var(--border);
}
.showcase-mock {
  background: var(--bg-card);
}

/* ===== Pricing ===== */
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border); transition: all .25s;
}
.pricing-card.featured { border-color: var(--primary); }
.pricing-badge { background: var(--primary); }
.pricing-list li .icon-check { color: #16a34a; }
.pricing-list li .icon-dash { color: var(--text-muted); }

/* ===== Tech Cards ===== */
.tech-card {
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .25s;
}
.tech-card:hover { transform: translateY(-3px); border-color: var(--primary); }

/* ===== Build Flow ===== */
.build-flow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 340px;
}
.build-flow-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.bf-col { position: relative; z-index: 1; }

.bf-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bf-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--fc);
  border-radius: 8px;
  min-width: 190px;
  transition: all 0.25s;
  cursor: default;
}
.bf-file:hover {
  transform: translateX(-4px);
  border-color: var(--fc);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.bf-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fc);
  flex-shrink: 0;
}
.bf-ext {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--fc);
  min-width: 40px;
}
.bf-name {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Vite 中心节点 */
.bf-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.bf-vite {
  width: 110px; height: 110px;
  border-radius: 22px;
  background: var(--bg-card);
  border: 2px solid #646CFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 30px rgba(100,108,255,0.15);
  transition: all 0.3s;
}
.bf-vite:hover {
  box-shadow: 0 0 50px rgba(100,108,255,0.3);
  transform: scale(1.06);
}
.bf-vite-label {
  font-size: 15px;
  font-weight: 700;
  color: #646CFF;
}

/* 输出节点 */
.bf-output-col {
  display: flex;
  align-items: center;
}
.bf-output-card {
  padding: 28px 28px 22px;
  background: var(--bg-card);
  border: 2px solid #21759B;
  border-radius: 14px;
  text-align: center;
  min-width: 180px;
  box-shadow: 0 0 30px rgba(33,117,155,0.1);
  transition: all 0.3s;
}
.bf-output-card:hover {
  box-shadow: 0 0 50px rgba(33,117,155,0.2);
  transform: scale(1.03);
}
.bf-zip-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.bf-zip-wp {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.bf-output-title {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.bf-output-size {
  font-size: 13px;
  color: #21759B;
  margin-top: 6px;
  font-weight: 500;
}

/* 连接线动画 */
.bf-line {
  fill: none;
  stroke-width: 2;
  opacity: 0.25;
}
.animate-on-scroll.visible .bf-line {
  opacity: 0.5;
  stroke-dashoffset: 0 !important;
  transition: stroke-dashoffset 2s ease var(--delay, 0s), opacity 0.5s ease var(--delay, 0s);
}
.bf-particle { opacity: 0; }
.animate-on-scroll.visible .bf-particle {
  opacity: 0.7;
  transition: opacity 0.3s ease 1s;
}

/* Vite / Output 动画延迟 */
.bf-center .stagger-child { animation-delay: 0.6s !important; }
.bf-output-col .stagger-child { animation-delay: 0.8s !important; }

/* 移动端箭头 */
.bf-arrow-mobile {
  display: none;
  text-align: center;
  color: var(--text-muted);
  padding: 10px 0;
}

@media (max-width: 768px) {
  .build-flow {
    flex-direction: column;
    gap: 0;
    min-height: auto;
  }
  .bf-sources {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .bf-file { min-width: auto; padding: 8px 12px; }
  .bf-name { display: none; }
  .build-flow-svg { display: none; }
  .bf-arrow-mobile { display: block; }
  .bf-vite { width: 90px; height: 90px; border-radius: 18px; }
  .bf-output-card { min-width: 160px; }
  .bf-center .stagger-child { animation-delay: 0.3s !important; }
  .bf-output-col .stagger-child { animation-delay: 0.5s !important; }
}

/* ===== Changelog Timeline ===== */
.changelog-tabs {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 16px;
}
.changelog-tab {
  padding: 6px 20px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); font-size: 14px;
  font-weight: 500; cursor: pointer; transition: all .2s;
}
.changelog-tab:hover { border-color: var(--primary); color: var(--primary); }
.changelog-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

.changelog-wrap {
  max-width: 680px; margin: 0 auto;
  max-height: 600px; overflow-y: auto;
  padding: 24px 28px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
}
.changelog-wrap::-webkit-scrollbar { width: 6px; }
.changelog-wrap::-webkit-scrollbar-track { background: transparent; }
.changelog-wrap::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 3px;
}
.changelog-wrap::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.changelog-timeline {
  position: relative; padding-left: 28px;
}
.changelog-timeline::before {
  content: ''; position: absolute; left: 5px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.changelog-entry { position: relative; margin-bottom: 32px; }
.changelog-entry:last-child { margin-bottom: 0; }
.changelog-entry::before {
  content: ''; position: absolute; left: -28px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--bg);
}
.changelog-channel {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 1px 6px; border-radius: 4px; margin-left: 6px;
  background: var(--border); color: var(--text-muted); vertical-align: middle;
}
.changelog-content ul { margin: 0; padding-left: 18px; }
.changelog-content li { margin-bottom: 2px; }

/* ===== FAQ ===== */
.faq-card {
  background: var(--bg-card); border: 1px solid var(--border);
}
.faq-card li::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 8px;
}

/* ===== Extension System Section ===== */
.ext-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 40%, rgba(22, 93, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
}
[data-theme="dark"] .ext-section {
  background:
    radial-gradient(ellipse 80% 50% at 50% 40%, rgba(22, 93, 255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
}

/* 浮动粒子 */
.ext-particles { position: absolute; inset: 0; pointer-events: none; }
.ext-particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.18;
  animation: extFloat var(--d, 6s) ease-in-out infinite;
}
@keyframes extFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.18; }
  50% { transform: translateY(-20px) scale(1.3); opacity: 0.35; }
}

/* 徽章 */
.ext-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.1), rgba(139, 92, 246, 0.1));
  color: var(--primary);
  margin-bottom: 18px;
  border: 1px solid rgba(22, 93, 255, 0.15);
}
.ext-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: extPulse 2s ease-in-out infinite;
}
@keyframes extPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 93, 255, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(22, 93, 255, 0); }
}

/* 面板卡片 */
.ext-panel {
  border-radius: 14px;
}
.ext-panel-inner {
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* 面板头部 */
.ext-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 0;
}
.ext-panel-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 93, 255, 0.08);
  color: var(--accent, var(--primary));
  flex-shrink: 0;
}

/* Demo 区域 */
.ext-demo {
  padding: 16px 22px;
}

/* 布局编辑器模拟 */
.ext-editor {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #f9fafb;
}
[data-theme="dark"] .ext-editor {
  border-color: #3a3a3a;
  background: #1e1e1e;
}
.ext-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
[data-theme="dark"] .ext-editor-bar {
  background: #2a2a2a;
  border-color: #3a3a3a;
}
[data-theme="dark"] .ext-editor-bar span { color: var(--text-secondary); }
.ext-editor-canvas {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ext-comp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 10px;
  color: #6b7280;
  transition: all 0.2s;
}
[data-theme="dark"] .ext-comp {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: var(--text-muted);
}
[data-theme="dark"] .ext-comp svg { color: var(--text-muted) !important; }
.ext-comp--custom {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.04), rgba(139, 92, 246, 0.04));
  color: var(--primary);
  font-weight: 500;
  position: relative;
  animation: extCompGlow 3s ease-in-out infinite;
}
[data-theme="dark"] .ext-comp--custom {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.12), rgba(139, 92, 246, 0.08));
  border-color: var(--primary-light);
  color: var(--primary-light);
}
[data-theme="dark"] .ext-comp--custom svg { color: var(--primary-light) !important; }
@keyframes extCompGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 93, 255, 0); }
  50% { box-shadow: 0 0 12px rgba(22, 93, 255, 0.1); }
}
.ext-comp-badge {
  margin-left: auto;
  font-size: 8px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  letter-spacing: 0.3px;
}

/* 页面模板网格 */
.ext-pages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ext-page-card {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 10px 12px;
  cursor: default;
}
[data-theme="dark"] .ext-page-card {
  background: #2a2a2a;
  border-color: #3a3a3a;
}
.ext-page-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ext-page-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}
.ext-page-ver {
  font-size: 9px;
  color: var(--text-muted);
}
.ext-page-desc {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}
.ext-page-card-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ext-page-mode {
  font-size: 8px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 6px;
}
.ext-page-mode--theme {
  background: rgba(22, 93, 255, 0.08);
  color: var(--primary);
  border: 1px solid rgba(22, 93, 255, 0.15);
}
.ext-page-mode--blank {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.15);
}
.ext-page-author {
  font-size: 8px;
  color: var(--text-muted);
}

/* 底部标签 */
.ext-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 22px 18px;
}
.ext-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
/* 三步流程 */
.ext-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.ext-steps-line {
  position: absolute;
  top: 24px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--border-primary);
  opacity: 0.5;
}
.ext-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.ext-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: var(--theme-color, #1890ff);
  margin-bottom: 12px;
  position: relative;
}
.ext-step-num::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(22, 93, 255, 0.2);
  animation: extSpin 12s linear infinite;
}
@keyframes extSpin {
  to { transform: rotate(360deg); }
}
.ext-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ext-step-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .ext-pages-grid {
    grid-template-columns: 1fr;
  }
  .ext-steps {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 260px;
  }
  .ext-steps-line {
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 2px;
    height: auto;
    background: var(--border-primary);
  }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
}
[data-theme="dark"] .site-footer { background: #111111; }
.footer-logo span { color: var(--primary-light); }

/* ===== Scroll Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1; transform: translateY(0);
}

/* Staggered children */
.animate-on-scroll.visible .stagger-child {
  animation: fadeInUp 0.5s ease forwards;
}
.stagger-child:nth-child(1) { animation-delay: 0s; }
.stagger-child:nth-child(2) { animation-delay: 0.1s; }
.stagger-child:nth-child(3) { animation-delay: 0.2s; }
.stagger-child:nth-child(4) { animation-delay: 0.3s; }
.stagger-child:nth-child(5) { animation-delay: 0.4s; }
.stagger-child:nth-child(6) { animation-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .demo-sidebar { display: none; }
}

/* ===== Code Highlighting ===== */
.code-keyword { color: #cf222e; font-weight: 600; }
.code-func { color: #8250df; }
.code-var { color: #7928c7; }
.code-string { color: #0a3069; }
.code-comment { color: #6e7781; font-style: italic; }
.code-number { color: #0550ae; }
.code-operator { color: #cf222e; }
.code-punctuation { color: #24292f; }

[data-theme="dark"] .code-keyword { color: #ff7b72; }
[data-theme="dark"] .code-func { color: #d2a8ff; }
[data-theme="dark"] .code-var { color: #ffa657; }
[data-theme="dark"] .code-string { color: #a5d6ff; }
[data-theme="dark"] .code-comment { color: #8b949e; }
[data-theme="dark"] .code-number { color: #79c0ff; }
[data-theme="dark"] .code-operator { color: #ff7b72; }
[data-theme="dark"] .code-punctuation { color: #c9d1d9; }

.code-block pre {
  margin: 0;
  font-family: 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
}

/* ===== Benchmark ===== */
.benchmark-item { text-align: center; }
.benchmark-ring-wrap {
  position: relative; width: 100px; height: 100px; margin: 0 auto;
}
.benchmark-ring { display: block; }
.benchmark-progress {
  transition: stroke-dashoffset 1.5s ease-out;
}
.benchmark-score {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px; font-weight: 800; line-height: 1;
}

/* ===== Marketplace Section ===== */
.market-section {
  position: relative;
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 93, 255, 0.06), transparent 50%),
    radial-gradient(circle at 88% 100%, rgba(139, 92, 246, 0.05), transparent 55%);
}

[data-theme="dark"] .market-section {
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 93, 255, 0.10), transparent 50%),
    radial-gradient(circle at 88% 100%, rgba(139, 92, 246, 0.08), transparent 55%);
}

.market-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(22, 93, 255, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

[data-theme="dark"] .market-badge {
  background: rgba(78, 143, 255, 0.16);
}

.market-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  animation: market-blink 1.6s ease-in-out infinite;
}

@keyframes market-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Tabs */
.market-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  width: max-content;
  max-width: 100%;
}

.market-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.market-tab:hover {
  color: var(--primary);
}

.market-tab.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.25);
}

.market-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  height: 18px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-muted);
}

.market-tab.is-active .market-tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

[data-theme="dark"] .market-tab-count {
  background: rgba(255, 255, 255, 0.06);
}

/* Grid */
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* 数据网格最多两行高度，超出滚动 */
[data-market-grid]:not([hidden]) {
  max-height: var(--grid-max-h, none);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 93, 255, 0.35) transparent;
}

[data-market-grid]::-webkit-scrollbar {
  width: 6px;
}

[data-market-grid]::-webkit-scrollbar-thumb {
  background: rgba(22, 93, 255, 0.35);
  border-radius: 3px;
}

[data-market-grid]::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1024px) {
  .market-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .market-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 480px) {
  .market-grid { grid-template-columns: 1fr; }
}

/* Card */
.market-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.market-card:not(.is-skeleton):hover {
  transform: translateY(-3px);
  border-color: rgba(22, 93, 255, 0.4);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .market-card:not(.is-skeleton):hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.market-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.08), rgba(139, 92, 246, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

[data-theme="dark"] .market-card-thumb {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.15), rgba(139, 92, 246, 0.10));
}

.market-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.market-card-thumb-fallback {
  color: rgba(22, 93, 255, 0.45);
}

.market-card-type {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  backdrop-filter: blur(4px);
}

.market-card-type--component { background: rgba(22, 93, 255, 0.85); }
.market-card-type--page { background: rgba(139, 92, 246, 0.85); }

.market-card-price {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.market-card-price--free {
  background: rgba(16, 185, 129, 0.92);
  color: #fff;
}

.market-card-price--paid {
  background: rgba(249, 115, 22, 0.92);
  color: #fff;
}

.market-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
  gap: 4px;
}

.market-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-card-desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}

.market-card-meta {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.market-card-version {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.market-card-downloads {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.market-card-downloads svg {
  width: 12px;
  height: 12px;
}

/* Skeleton */
.market-card.is-skeleton {
  pointer-events: none;
}

.skeleton-block,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 6px;
}

.skeleton-line {
  height: 10px;
  margin-bottom: 8px;
}

.skeleton-line.w-3\/4 { width: 75%; }
.skeleton-line.w-full { width: 100%; }
.skeleton-line.w-1\/2 { width: 50%; }

[data-theme="dark"] .skeleton-block,
[data-theme="dark"] .skeleton-line {
  background: rgba(255, 255, 255, 0.05);
}

.skeleton-block::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  transform: translateX(-100%);
  animation: market-shimmer 1.4s ease-in-out infinite;
}

[data-theme="dark"] .skeleton-block::after,
[data-theme="dark"] .skeleton-line::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
}

@keyframes market-shimmer {
  100% { transform: translateX(100%); }
}

.is-skeleton .market-card-body {
  padding-top: 14px;
}

/* States */
.market-state {
  text-align: center;
  padding: 56px 24px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.market-state svg {
  margin: 0 auto 12px;
  display: block;
}

.market-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.market-state-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.market-state--error svg {
  color: #f97316;
}

.market-retry-btn {
  margin-top: 16px;
  padding: 8px 18px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.market-retry-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Foot */
.market-foot {
  margin-top: 24px;
  text-align: center;
}

.market-foot-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Card 入场动画 */
@keyframes market-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.market-card.is-loaded {
  animation: market-fade-up 0.45s ease-out backwards;
}

@media (prefers-reduced-motion: reduce) {
  .market-card.is-loaded { animation: none; }
  .skeleton-block::after, .skeleton-line::after { animation: none; }
  .market-badge-dot { animation: none; }
}
