/* ============================================================
   吟知 · AI 专区样式 v4.0
   Apple Intelligence 视觉语言：紫蓝渐变 + 磨砂玻璃
   ============================================================ */

/* ============ AI 视觉令牌 ============ */
.ai-zone {
  --ai-50:  #F5F3FF;
  --ai-100: #EDE9FE;
  --ai-200: #DDD6FE;
  --ai-300: #C4B5FD;
  --ai-400: #A78BFA;
  --ai-500: #8B5CF6;
  --ai-600: #7C3AED;
  --ai-700: #6D28D9;
  --ai-800: #5B21B6;
  --ai-900: #4C1D95;
  --ai-pink: #EC4899;
  --ai-blue: #6366F1;

  --accent: var(--ai-blue);
  --accent-hover: var(--ai-700);
  --accent-soft: var(--ai-50);
  --accent-ring: rgba(139, 92, 246, 0.22);
  --accent-glow: rgba(139, 92, 246, 0.35);

  --gradient-brand: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --gradient-soft: linear-gradient(180deg, var(--ai-50) 0%, #fff 100%);
  --gradient-hero:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99,102,241,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(236,72,153,0.16) 0%, transparent 60%);
  --gradient-mesh:
    radial-gradient(60% 50% at 12% 18%, rgba(99,102,241,0.20) 0%, transparent 60%),
    radial-gradient(55% 60% at 88% 12%, rgba(236,72,153,0.16) 0%, transparent 62%),
    radial-gradient(70% 65% at 82% 88%, rgba(139,92,246,0.20) 0%, transparent 65%),
    radial-gradient(50% 50% at 18% 82%, rgba(99,102,241,0.16) 0%, transparent 62%);
}

[data-theme="dark"] .ai-zone {
  --accent-soft: rgba(139, 92, 246, 0.12);
  --gradient-soft: linear-gradient(180deg, rgba(99,102,241,0.06) 0%, #0A0A0C 100%);
}

/* ============ AI 专区独立 Header（替代主站 header，Apple Intelligence 风）============ */
.ai-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid transparent;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)),
    linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.22) 50%, rgba(236, 72, 153, 0.22) 100%);
  background-size: 100% 100%, 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 0, 0 100%;
  transition: background 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ai-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    linear-gradient(90deg, rgba(99, 102, 241, 0.32) 0%, rgba(139, 92, 246, 0.32) 50%, rgba(236, 72, 153, 0.32) 100%);
  box-shadow:
    0 1px 0 0 rgba(99, 102, 241, 0.06),
    0 12px 32px -8px rgba(99, 102, 241, 0.1);
}
[data-theme="dark"] .ai-header {
  background: rgba(10, 10, 14, 0.5);
  background-image:
    linear-gradient(180deg, rgba(10, 10, 14, 0.5), rgba(10, 10, 14, 0.5)),
    linear-gradient(90deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 50%, rgba(236, 72, 153, 0.4) 100%);
}
[data-theme="dark"] .ai-header.is-scrolled {
  background: rgba(10, 10, 14, 0.78);
  background-image:
    linear-gradient(180deg, rgba(10, 10, 14, 0.78), rgba(10, 10, 14, 0.78)),
    linear-gradient(90deg, rgba(99, 102, 241, 0.5) 0%, rgba(139, 92, 246, 0.5) 50%, rgba(236, 72, 153, 0.5) 100%);
  box-shadow:
    0 1px 0 0 rgba(139, 92, 246, 0.18),
    0 12px 32px -8px rgba(0, 0, 0, 0.5);
}
.ai-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
/* logo */
.ai-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
  transition: opacity 200ms;
}
.ai-header-logo:hover { opacity: 0.9; text-decoration: none; }
.ai-header-logo-mark {
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.18);
  filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.28));
  transition: transform 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ai-header-logo:hover .ai-header-logo-mark { transform: rotate(-6deg) scale(1.06); }
.ai-header-logo-img {
  width: 26px; height: 26px;
  display: block;
  transition: transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
[data-theme="dark"] .ai-header-logo-mark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.32);
}
.ai-header-logo:hover .ai-header-logo-img {
  transform: rotate(-8deg) scale(1.05);
}
.ai-header-logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.ai-header-logo-name { color: var(--text); }
.ai-header-logo-ai {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 5px;
  background-color: rgba(139, 92, 246, 0.08);
  position: relative;
  z-index: 0;
}
.ai-header-logo-ai::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(236,72,153,0.12));
  z-index: -1;
  -webkit-text-fill-color: initial;
}
/* nav */
.ai-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ai-header-nav::-webkit-scrollbar { display: none; }
.ai-header-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-tap-highlight-color: transparent;
}
.ai-header-link:hover {
  background: rgba(139, 92, 246, 0.08);
  color: var(--text);
  text-decoration: none;
}
.ai-header-link.is-active {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
}
/* right cluster */
.ai-header-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.ai-header-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ai-header-icon-btn:hover {
  background: rgba(139, 92, 246, 0.08);
  color: var(--text);
}
.ai-header-icon-btn svg { width: 18px; height: 18px; }
/* 返回主站按钮（精致两行版）*/
.ai-header-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.ai-header-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.06), rgba(255, 107, 53, 0.02));
  opacity: 0;
  transition: opacity 240ms;
  pointer-events: none;
}
.ai-header-back:hover::before { opacity: 1; }
.ai-header-back:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 107, 53, 0.3);
  color: #FF6B35;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.12);
}
.ai-header-back-mark {
  display: inline-flex;
  width: 22px; height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: #fff;
  flex: 0 0 auto;
  transition: transform 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ai-header-back-mark svg { width: 12px; height: 12px; }
.ai-header-back:hover .ai-header-back-mark { transform: translateX(-2px); }
.ai-header-back-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 1px;
  position: relative;
  z-index: 1;
}
.ai-header-back-text-row1 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  transition: color 240ms;
}
.ai-header-back-text-row2 {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.ai-header-back:hover .ai-header-back-text-row1 { color: #FF6B35; }
[data-theme="dark"] .ai-header-back {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(139, 92, 246, 0.18);
}
[data-theme="dark"] .ai-header-back:hover {
  background: rgba(255, 107, 53, 0.12);
  border-color: rgba(255, 107, 53, 0.4);
  color: #FF8A5C;
}
[data-theme="dark"] .ai-header-back:hover .ai-header-back-text-row1 { color: #FF8A5C; }
.ai-header-menu-toggle { display: none; }
@media (max-width: 1100px) {
  .ai-header-back-text-row2 { display: none; }
  .ai-header-back { padding: 6px 10px 6px 6px; }
  .ai-header-back-mark { width: 26px; height: 26px; }
  .ai-header-back-mark svg { width: 14px; height: 14px; }
}
@media (max-width: 980px) {
  .ai-header-link { padding: 0 10px; font-size: 13.5px; }
  .ai-header-inner { gap: 12px; }
}
@media (max-width: 860px) {
  .ai-header-nav { display: none; }
  .ai-header-menu-toggle { display: inline-flex; }
  .ai-header-back-text { display: none; }
  .ai-header-back { padding: 0 8px; }
  .ai-header-back-mark { width: 32px; height: 32px; border-radius: 9px; }
}
/* mobile menu */
.ai-header-mobile {
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  padding: 24px 20px 80px;
}
.ai-header-mobile.is-open { transform: translateX(0); }
.ai-header-mobile-section { margin-bottom: 24px; }
.ai-header-mobile-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}
.ai-header-mobile a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 160ms;
}
.ai-header-mobile a:hover { background: var(--bg-muted); text-decoration: none; }
.ai-header-mobile a.is-active {
  background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.1) 50%, rgba(236,72,153,0.1) 100%);
  color: #6366F1;
  font-weight: 600;
}
.ai-header-mobile-back {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(247, 147, 30, 0.04)) !important;
  color: #FF6B35 !important;
  justify-content: center;
  font-weight: 600;
}

/* ============ AI Hero ============ */
.ai-hero {
  position: relative;
  padding: clamp(60px, 10vw, 120px) 0 clamp(40px, 6vw, 80px);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.ai-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--gradient-hero);
}
.ai-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--gradient-mesh);
  opacity: 0.7;
}
.ai-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text-strong);
  max-width: 800px;
  margin: 0 auto;
}
.ai-hero h1 .grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.ai-hero .ai-sub {
  margin: var(--sp-5) auto 0;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 600px;
}
.ai-hero-search {
  margin: var(--sp-10) auto 0;
  max-width: 560px;
  position: relative;
}
.ai-hero-search .input {
  height: 56px;
  padding-left: 56px;
  padding-right: 56px;
  font-size: var(--t-body-lg);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
}
.ai-hero-search .input:focus {
  border-color: var(--ai-500);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--accent-ring);
}
.ai-hero-stats {
  margin: var(--sp-8) auto 0;
  display: flex;
  justify-content: center;
  gap: var(--sp-10);
  flex-wrap: wrap;
}
.ai-hero-stat {
  text-align: center;
}
.ai-hero-stat-num {
  font-size: var(--t-h2);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ai-hero-stat-label {
  margin-top: 4px;
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ AI 快捷入口 ============ */
.ai-entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 1024px) { .ai-entries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ai-entries { grid-template-columns: 1fr; } }
.ai-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
  overflow: hidden;
  isolation: isolate;
}
.ai-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.ai-entry:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.ai-entry-icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.ai-entry-name {
  font-size: var(--t-h6);
  font-weight: 600;
  color: var(--text-strong);
  margin-top: var(--sp-2);
}
.ai-entry-desc {
  font-size: var(--t-small);
  color: var(--text-tertiary);
  line-height: 1.5;
}
.ai-entry-num {
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}
.ai-entry-num strong { color: var(--text); font-weight: 600; }

/* 6 种渐变主题 */
.ai-entry.t-1 .ai-entry-icon { background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%); }
.ai-entry.t-2 .ai-entry-icon { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); }
.ai-entry.t-3 .ai-entry-icon { background: linear-gradient(135deg, #EC4899 0%, #F97316 100%); }
.ai-entry.t-4 .ai-entry-icon { background: linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%); }
.ai-entry.t-5 .ai-entry-icon { background: linear-gradient(135deg, #10B981 0%, #0EA5E9 100%); }
.ai-entry.t-6 .ai-entry-icon { background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%); }
.ai-entry.t-7 .ai-entry-icon { background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%); }
.ai-entry.t-8 .ai-entry-icon { background: linear-gradient(135deg, #8B5CF6 0%, #5B21B6 100%); }
.ai-entry.t-1:hover { box-shadow: 0 20px 48px rgba(99,102,241,0.20); }
.ai-entry.t-2:hover { box-shadow: 0 20px 48px rgba(139,92,246,0.20); }
.ai-entry.t-3:hover { box-shadow: 0 20px 48px rgba(236,72,153,0.20); }
.ai-entry.t-4:hover { box-shadow: 0 20px 48px rgba(14,165,233,0.20); }
.ai-entry.t-5:hover { box-shadow: 0 20px 48px rgba(16,185,129,0.20); }
.ai-entry.t-6:hover { box-shadow: 0 20px 48px rgba(245,158,11,0.20); }
.ai-entry.t-7:hover { box-shadow: 0 20px 48px rgba(99,102,241,0.20); }
.ai-entry.t-8:hover { box-shadow: 0 20px 48px rgba(139,92,246,0.20); }

/* ============ AI 模板卡 ============ */
.tpl-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.tpl-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.tpl-card-head {
  padding: var(--sp-4) var(--sp-5) var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.tpl-card-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  background: var(--ai-100);
  color: var(--ai-700);
}
.tpl-card.t-agent   .tpl-card-type { background: #DBEAFE; color: #1D4ED8; }
.tpl-card.t-prompt  .tpl-card-type { background: #FCE7F3; color: #BE185D; }
.tpl-card.t-workflow .tpl-card-type { background: #D1FAE5; color: #047857; }
.tpl-card.t-tool    .tpl-card-type { background: #FEF3C7; color: #B45309; }
.tpl-card.t-image   .tpl-card-type { background: #EDE9FE; color: #6D28D9; }
.tpl-card.t-dev     .tpl-card-type { background: #DBEAFE; color: #1D4ED8; }
[data-theme="dark"] .tpl-card.t-agent   .tpl-card-type { background: rgba(29,78,216,0.18); color: #93C5FD; }
[data-theme="dark"] .tpl-card.t-prompt  .tpl-card-type { background: rgba(190,24,93,0.18); color: #F9A8D4; }
[data-theme="dark"] .tpl-card.t-workflow .tpl-card-type { background: rgba(4,120,87,0.18); color: #6EE7B7; }
[data-theme="dark"] .tpl-card.t-tool    .tpl-card-type { background: rgba(180,83,9,0.18); color: #FCD34D; }
[data-theme="dark"] .tpl-card.t-image   .tpl-card-type { background: rgba(109,40,217,0.18); color: #C4B5FD; }
[data-theme="dark"] .tpl-card.t-dev     .tpl-card-type { background: rgba(29,78,216,0.18); color: #93C5FD; }

.tpl-card-fav {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-tertiary);
  transition: all var(--dur-fast) var(--ease-out);
}
.tpl-card-fav:hover { background: var(--bg-muted); color: var(--accent); }
.tpl-card-fav.is-fav { color: var(--accent); }
.tpl-card-fav svg { width: 14px; height: 14px; }

.tpl-card-body { padding: 0 var(--sp-5) var(--sp-4); }
.tpl-card-title {
  font-size: var(--t-h6);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.tpl-card:hover .tpl-card-title { color: var(--accent); }
.tpl-card-desc {
  font-size: var(--t-small);
  color: var(--text-tertiary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tpl-card-code {
  margin: 0 var(--sp-5);
  padding: var(--sp-3);
  background: var(--c-n950);
  color: #C4B5FD;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  white-space: pre;
  position: relative;
}
.tpl-card-code::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30px;
  background: linear-gradient(180deg, transparent, var(--c-n950));
}
.tpl-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.tpl-card-foot-stats {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.tpl-card-foot-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tpl-card-foot-stats svg { width: 12px; height: 12px; }
.tpl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 var(--sp-5) var(--sp-3);
}
.tpl-card-tag {
  font-size: 10px;
  color: var(--text-tertiary);
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: var(--r-sm);
}

/* ============ AI 模型卡 ============ */
.model-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.model-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.model-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: var(--sp-5);
  gap: var(--sp-3);
}
.model-card-avatar {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.model-card-id { font-size: var(--t-caption); color: var(--text-tertiary); font-family: var(--font-mono); }
.model-card-name {
  font-size: var(--t-h5);
  font-weight: 600;
  margin-top: 2px;
}
.model-card-body { padding: 0 var(--sp-5); }
.model-card-spec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: var(--sp-3) 0;
  font-size: var(--t-small);
  color: var(--text-secondary);
}
.model-card-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.model-card-spec-key { color: var(--text-tertiary); }
.model-card-spec-val { font-weight: 500; }
.model-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border-soft);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.model-card-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text);
}
.model-card-score svg { color: #F59E0B; width: 12px; height: 12px; }
.model-card-compatible {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
}

/* ============ AI 资讯/博客 ============ */
.blog-list { display: flex; flex-direction: column; gap: var(--sp-5); }
.blog-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.blog-item:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}
.blog-item-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.blog-item-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  background: var(--ai-100);
  color: var(--ai-700);
}
[data-theme="dark"] .blog-item-tag { background: rgba(139,92,246,0.18); color: #C4B5FD; }
.blog-item-new {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-item-title {
  font-size: var(--t-h4);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.blog-item:hover .blog-item-title { color: var(--accent); }
.blog-item-excerpt {
  font-size: var(--t-body);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-item-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--t-caption);
  color: var(--text-tertiary);
}
.blog-item-foot .read-more {
  margin-left: auto;
  color: var(--accent);
  font-weight: 500;
}

/* ============ AI 评测对比表 ============ */
.bench-table {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--t-small);
}
.bench-table thead th {
  position: sticky;
  top: var(--header-h);
  background: var(--bg-soft);
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--t-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.bench-table thead th:hover { color: var(--accent); }
.bench-table thead th .sort-ind { color: var(--accent); }
.bench-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur-fast) var(--ease-out);
}
.bench-table tbody tr:hover { background: var(--bg-soft); }
.bench-table tbody tr:last-child { border-bottom: none; }
.bench-table tbody td {
  padding: var(--sp-3) var(--sp-4);
  vertical-align: middle;
}
.bench-table .bench-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
}
.bench-table .bench-name:hover { color: var(--accent); }
.bench-table .bench-avatar {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.bench-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bench-score-cell { display: flex; flex-direction: column; gap: 4px; min-width: 80px; }
.bench-score-bar {
  height: 4px;
  background: var(--bg-muted);
  border-radius: 2px;
  overflow: hidden;
}
.bench-score-bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 2px;
}

/* ============ AI 雷达图 ============ */
.radar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
}
.radar-svg { width: 100%; max-width: 360px; height: auto; }

/* ============ AI 学习路线 ============ */
.learn-stage {
  margin-bottom: var(--sp-10);
}
.learn-stage-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.learn-stage-num {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--gradient-brand);
  color: #fff;
  font-size: var(--t-h5);
  font-weight: 700;
  flex-shrink: 0;
}
.learn-stage-title {
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.learn-stage-sub {
  font-size: var(--t-body);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.learn-steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-inline-start: 24px;
  border-inline-start: 2px dashed var(--border);
  margin-inline-start: 20px;
}
.learn-step {
  position: relative;
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: all var(--dur-fast) var(--ease-out);
}
.learn-step::before {
  content: "";
  position: absolute;
  inset-inline-start: -32px;
  top: 28px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.learn-step.is-done::before { background: var(--accent); }
.learn-step:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.learn-step-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.learn-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ai-100);
  color: var(--ai-700);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.learn-step-title {
  font-size: var(--t-h6);
  font-weight: 600;
  flex: 1;
}
.learn-step-desc {
  font-size: var(--t-body);
  color: var(--text-secondary);
  line-height: 1.6;
}
.learn-step-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--sp-3);
}
.learn-step-resource {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
}
.learn-step-resource:hover { background: var(--accent-soft); color: var(--accent); }
.learn-step-resource svg { width: 12px; height: 12px; }
.learn-step-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.learn-step-check.is-done {
  background: var(--success-soft);
  color: var(--success);
}
.learn-step-check:hover { transform: scale(1.05); }
.learn-step-check svg { width: 12px; height: 12px; }

/* ============ AI 代码预览 ============ */
.code-block {
  background: var(--c-n950);
  color: #E4E4E7;
  border-radius: var(--r-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  line-height: 1.6;
}
.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}
.code-block-dots {
  display: inline-flex;
  gap: 6px;
}
.code-block-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.code-block-tabs {
  display: inline-flex;
  gap: 4px;
}
.code-block-tab {
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
}
.code-block-tab.is-active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.code-block-actions {
  display: inline-flex;
  gap: 4px;
}
.code-block-action {
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--r-sm);
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  background: transparent;
  transition: all var(--dur-fast) var(--ease-out);
}
.code-block-action:hover { background: rgba(255,255,255,0.08); color: #fff; }
.code-block-action svg { width: 12px; height: 12px; }
.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
}
.code-block pre code { font-family: inherit; }

/* 简单的语法高亮 */
.tok-kw  { color: #C4B5FD; }
.tok-str { color: #86EFAC; }
.tok-num { color: #FCD34D; }
.tok-com { color: #6B7280; font-style: italic; }
.tok-fn  { color: #93C5FD; }

/* ============ AI 工具/模型筛选器 ============ */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  margin-bottom: var(--sp-6);
}
.filter-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.filter-group-head {
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ AI 通用 section ============ */
.ai-section { padding: var(--sp-8) 0; }
.ai-section + .ai-section { padding-top: var(--sp-12); }
.ai-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.ai-section-title {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}
.ai-section-meta {
  font-size: var(--t-caption);
  font-weight: 600;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
}
.ai-section-more {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.ai-section-more:hover { color: var(--accent); }

/* 6 大入口 */
.ai-entries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 900px) { .ai-entries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ai-entries { grid-template-columns: 1fr; } }

.ai-entry {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.ai-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(236,72,153,0.06) 100%);
  pointer-events: none;
}
.ai-entry:hover { transform: translateY(-2px); border-color: transparent; box-shadow: 0 12px 32px rgba(99,102,241,0.12); }
.ai-entry:hover::before { opacity: 1; }
.ai-entry-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, var(--ai-100) 0%, var(--ai-200) 100%);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ai-entry.t-1 .ai-entry-icon { background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%); color: #fff; }
.ai-entry.t-2 .ai-entry-icon { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); color: #fff; }
.ai-entry.t-3 .ai-entry-icon { background: linear-gradient(135deg, #EC4899 0%, #F97316 100%); color: #fff; }
.ai-entry.t-4 .ai-entry-icon { background: linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%); color: #fff; }
.ai-entry.t-5 .ai-entry-icon { background: linear-gradient(135deg, #10B981 0%, #0EA5E9 100%); color: #fff; }
.ai-entry.t-6 .ai-entry-icon { background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%); color: #fff; }
.ai-entry-body { min-width: 0; position: relative; z-index: 1; }
.ai-entry-name { font-size: var(--t-h5); font-weight: 700; margin-bottom: 2px; letter-spacing: -0.01em; }
.ai-entry-desc { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.4; }
.ai-entry-num { font-size: var(--t-h4); font-weight: 800; color: var(--text-tertiary); position: relative; z-index: 1; }
.ai-entry:hover .ai-entry-num { color: var(--accent); }

/* ============ AI 模板卡 ============ */
.tpl-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.tpl-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,0.10); border-color: transparent; }
.tpl-card:hover::before { transform: scaleX(1); }
.tpl-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.tpl-card-type {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em;
}
.tpl-card-type.t-prompt { background: rgba(99,102,241,0.10); color: var(--ai-blue); }
.tpl-card-type.t-agent { background: rgba(139,92,246,0.10); color: var(--ai-500); }
.tpl-card-type.t-workflow { background: rgba(236,72,153,0.10); color: #EC4899; }
.tpl-card-type.t-image { background: rgba(245,158,11,0.10); color: #F59E0B; }
.tpl-card-type.t-dev { background: rgba(16,185,129,0.10); color: #10B981; }
.tpl-card-type.t-tool { background: rgba(14,165,233,0.10); color: #0EA5E9; }
.tpl-card-official { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--ai-500), var(--ai-700)); color: #fff; letter-spacing: 0.05em; }
.tpl-card-name { font-size: var(--t-h5); font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; line-height: 1.35; }
.tpl-card-desc { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.5; margin-bottom: var(--sp-4); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.tpl-card-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--t-caption); color: var(--text-tertiary); padding-top: var(--sp-3); border-top: 1px solid var(--border-soft); }

/* ============ AI 资讯列表 ============ */
.ai-news-list, .ai-post-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.blog-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base) var(--ease-out);
}
.blog-item:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.08); border-color: transparent; }
.blog-item-tag {
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 12px;
  border-radius: var(--r-full);
  font-size: var(--t-caption); font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-secondary);
  align-self: start;
  letter-spacing: 0.03em;
}
.blog-item-tag.is-new {
  background: linear-gradient(135deg, var(--ai-500), var(--ai-pink));
  color: #fff;
  position: relative;
  padding-left: 24px;
}
.blog-item-tag.is-new::before { content: 'sparkles'; position: absolute; left: 10px; }
.blog-item-body { min-width: 0; }
.blog-item-title { font-size: var(--t-h5); font-weight: 700; line-height: 1.4; margin-bottom: 6px; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-item-excerpt { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.6; margin-bottom: var(--sp-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-item-meta { display: flex; gap: var(--sp-3); font-size: var(--t-caption); color: var(--text-tertiary); }
@media (max-width: 600px) { .blog-item { grid-template-columns: 1fr; gap: var(--sp-3); } }

/* ============ AI 评测卡 ============ */
.bench-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base) var(--ease-out);
}
.bench-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,0.10); border-color: transparent; }
.bench-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.bench-card-model { font-size: var(--t-caption); font-weight: 700; padding: 4px 10px; border-radius: var(--r-full); background: linear-gradient(135deg, var(--ai-100), var(--ai-200)); color: var(--ai-700); }
.bench-card-official { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--ai-500), var(--ai-700)); color: #fff; letter-spacing: 0.05em; }
.bench-card-title { font-size: var(--t-h6); font-weight: 600; line-height: 1.4; margin-bottom: var(--sp-4); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bench-card-scores { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: var(--sp-2); padding: var(--sp-3); background: var(--bg-soft); border-radius: var(--r-md); margin-bottom: var(--sp-3); }
.bench-card-score { text-align: center; }
.bench-card-score-num { font-size: var(--t-h5); font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.bench-card-score-num.bench-card-score-total { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bench-card-score-label { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.bench-card-meta { display: flex; flex-wrap: wrap; gap: var(--sp-3); font-size: var(--t-caption); color: var(--text-tertiary); }

/* ============ AI 论坛列表 ============ */
.ai-post-row {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.ai-post-row:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.08); border-color: transparent; }
.ai-post-row-board {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 600;
  background: color-mix(in srgb, var(--bc) 12%, transparent);
  color: var(--bc);
  white-space: nowrap;
}
.ai-post-row-body { min-width: 0; }
.ai-post-row-title { font-size: var(--t-body); font-weight: 600; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ai-post-row-meta { display: flex; gap: var(--sp-3); font-size: var(--t-caption); color: var(--text-tertiary); }
.ai-post-row-stat { text-align: right; font-size: var(--t-small); font-weight: 700; color: var(--text-tertiary); }
@media (max-width: 600px) { .ai-post-row { grid-template-columns: 1fr; } .ai-post-row-stat { text-align: left; } }

/* ============ AI 板块列表 (forum) ============ */
.ai-boards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 700px) { .ai-boards { grid-template-columns: 1fr; } }
/* 紧凑模式下 3 列横向排开 */
.ai-boards.is-compact-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}
.ai-board {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-fast) var(--ease-out);
}
.ai-board:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99,102,241,0.08); }
.ai-board-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bc, var(--ai-blue)) 12%, var(--bg-muted));
  color: var(--bc, var(--ai-blue));
}
.ai-board-icon svg { width: 22px; height: 22px; stroke-width: 2.2; }
.ai-board-body { min-width: 0; }
.ai-board-name { font-size: var(--t-body-lg); font-weight: 700; margin-bottom: 2px; }
.ai-board-desc { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.4; }

/* 紧凑纵向变体：用于右侧栏窄列（板块导航） */
.ai-board.is-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  gap: 8px;
}
.ai-board.is-compact .ai-board-icon {
  width: 40px; height: 40px;
}
.ai-board.is-compact .ai-board-icon svg { width: 20px; height: 20px; }
.ai-board.is-compact .ai-board-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.3;
}
.ai-board.is-compact .ai-board-desc { display: none; }

/* ============ AI 学习路线 ============ */
.learn-stage {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-2xl);
  padding: var(--sp-6) var(--sp-8);
  margin-bottom: var(--sp-4);
  position: relative;
}
.learn-stage-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.learn-stage-num {
  width: 56px; height: 56px;
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  background: var(--gradient-brand);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.learn-stage-title { font-size: var(--t-h4); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.learn-stage-desc { color: var(--text-tertiary); font-size: var(--t-body); }
.learn-step {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  transition: all var(--dur-fast) var(--ease-out);
}
.learn-step:hover { background: var(--bg-elevated); border-color: var(--border); }
.learn-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ai-100);
  color: var(--ai-700);
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.learn-step-body { min-width: 0; }
.learn-step-title { font-size: var(--t-body); font-weight: 600; line-height: 1.4; }
.learn-step-desc { font-size: var(--t-small); color: var(--text-tertiary); margin-top: 2px; }
.learn-step-check {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 12px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-tertiary);
  cursor: pointer;
  border: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.learn-step-check.is-done { background: rgba(16,185,129,0.10); color: #10B981; }
.learn-step-check:hover { transform: scale(1.05); }

/* ============ AI 工具/模型列表 ============ */
.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}
.ai-tool-card {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base) var(--ease-out);
}
.ai-tool-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,0.10); border-color: transparent; }
.ai-tool-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-tool-icon svg { width: 26px; height: 26px; stroke-width: 2.2; }
.ai-tool-icon.gradient-t-1 { background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%); color: #fff; }
.ai-tool-icon.gradient-t-2 { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); color: #fff; }
.ai-tool-icon.gradient-t-3 { background: linear-gradient(135deg, #EC4899 0%, #F97316 100%); color: #fff; }
.ai-tool-icon.gradient-t-4 { background: linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%); color: #fff; }
.ai-tool-icon.gradient-t-5 { background: linear-gradient(135deg, #10B981 0%, #0EA5E9 100%); color: #fff; }
.ai-tool-icon.gradient-t-6 { background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%); color: #fff; }
.ai-tool-icon.gradient-t-7 { background: linear-gradient(135deg, #6366F1 0%, #4338CA 100%); color: #fff; }
.ai-tool-icon.gradient-t-8 { background: linear-gradient(135deg, #8B5CF6 0%, #5B21B6 100%); color: #fff; }
.ai-tool-body { min-width: 0; flex: 1; }
.ai-tool-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: 4px; flex-wrap: wrap; }
.ai-tool-name { font-size: var(--t-h5); font-weight: 700; }
.ai-tool-pricing {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 6px;
  border-radius: var(--r-sm);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ai-tool-pricing.is-free { background: rgba(16,185,129,0.10); color: #10B981; }
.ai-tool-pricing.is-freemium { background: rgba(99,102,241,0.10); color: var(--ai-blue); }
.ai-tool-pricing.is-paid { background: rgba(245,158,11,0.10); color: #F59E0B; }
.ai-tool-desc { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.5; margin-bottom: var(--sp-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-tool-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--t-caption); color: var(--text-tertiary); }
.ai-tool-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ai-tool-meta svg { width: 13px; height: 13px; }
.ai-tool-meta .ai-tool-rating { color: var(--ai-500); font-weight: 700; }
.ai-tool-meta .ai-tool-rating svg { color: #F59E0B; }

/* 模型卡 */
.ai-model-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  transition: all var(--dur-base) var(--ease-out);
}
.ai-model-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,0.10); border-color: transparent; }
.ai-model-card-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.ai-model-card-name { font-size: var(--t-h5); font-weight: 800; letter-spacing: -0.01em; flex: 1; }
.ai-model-card-size { font-size: var(--t-caption); font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--ai-100), var(--ai-200)); color: var(--ai-700); }
.ai-model-card-desc { font-size: var(--t-small); color: var(--text-tertiary); line-height: 1.5; margin-bottom: var(--sp-4); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-model-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); padding: var(--sp-3); background: var(--bg-soft); border-radius: var(--r-md); margin-bottom: var(--sp-3); }
.ai-model-card-stat { text-align: center; }
.ai-model-card-stat-num { font-size: var(--t-h6); font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ai-model-card-stat-label { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.ai-model-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--sp-3); }
.ai-model-card-cmd { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--c-n950); border-radius: var(--r-sm); color: #C4B5FD; font-family: var(--font-mono); font-size: 11px; line-height: 1.4; margin-bottom: var(--sp-2); overflow-x: auto; white-space: nowrap; }
.ai-model-card-cmd::-webkit-scrollbar { display: none; }
.ai-model-card-actions { display: flex; gap: 6px; margin-top: var(--sp-2); }
.ai-model-card-actions button {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: var(--t-caption);
  font-weight: 600;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.ai-model-card-actions button:hover { background: var(--bg-muted); color: var(--text); }
.ai-model-card-actions button.is-primary { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.ai-model-card-actions button.is-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }

/* ============ AI 模板详情 ============ */
.tpl-detail-head { padding: var(--sp-10) 0 var(--sp-8); text-align: center; }
.tpl-detail-head h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: var(--sp-3); }
.tpl-detail-head p { color: var(--text-secondary); font-size: var(--t-body-lg); max-width: 600px; margin: 0 auto var(--sp-6); }
.tpl-detail-actions { display: inline-flex; gap: var(--sp-2); justify-content: center; }

.code-block {
  background: var(--c-n950);
  color: #E4E4E7;
  border-radius: var(--r-xl);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  line-height: 1.6;
  margin: var(--sp-4) 0;
}
.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: var(--t-caption);
  color: rgba(255,255,255,0.5);
}
.code-block-dots { display: inline-flex; gap: 6px; }
.code-block-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.code-block-actions { display: inline-flex; gap: 4px; }
.code-block-copy {
  height: 24px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: var(--r-sm);
  font-size: var(--t-caption);
  color: rgba(255,255,255,0.7);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.code-block-copy:hover { background: rgba(255,255,255,0.08); color: #fff; }
.code-block pre { margin: 0; padding: 20px; overflow-x: auto; white-space: pre; }
.code-block pre code { font-family: inherit; }
.tok-kw  { color: #C4B5FD; }
.tok-str { color: #86EFAC; }
.tok-num { color: #FCD34D; }
.tok-com { color: #6B7280; font-style: italic; }
.tok-fn  { color: #93C5FD; }

/* 帖子详情 */
.post-detail { display: grid; grid-template-columns: 1fr 320px; gap: var(--sp-8); padding: var(--sp-8) 0; align-items: start; }
@media (max-width: 900px) { .post-detail { grid-template-columns: 1fr; } }
.post-detail-main { background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--r-2xl); padding: var(--sp-8); }
.post-detail-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: var(--sp-4); }
.post-detail-meta { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.post-detail-meta-item { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-small); color: var(--text-tertiary); }
.post-detail-body { font-size: var(--t-body-lg); line-height: 1.8; color: var(--text); white-space: pre-wrap; }
.post-detail-aside { position: sticky; top: calc(var(--header-h) + var(--sp-6)); display: flex; flex-direction: column; gap: var(--sp-4); }

/* 通用：单页 hero */
.ai-page-hero { padding: var(--sp-12) 0 var(--sp-8); text-align: center; }
.ai-page-hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
}
.ai-page-hero p { color: var(--text-secondary); font-size: var(--t-body-lg); max-width: 560px; margin: 0 auto; }

/* 筛选条 */
.ai-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-6);
}
.ai-filters .ai-filter {
  height: 32px; padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.ai-filters .ai-filter:hover { background: var(--bg-muted); color: var(--text); }
.ai-filters .ai-filter.is-active { background: var(--gradient-brand); color: #fff; border-color: transparent; box-shadow: 0 4px 12px var(--accent-glow); }

/* 工具/模型 search */
.ai-search-box {
  max-width: 560px;
  margin: 0 auto var(--sp-8);
  position: relative;
}
.ai-search-box svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-tertiary); }
.ai-search-box .input { height: 52px; padding-left: 50px; padding-right: 50px; font-size: var(--t-body-lg); border-radius: var(--r-full); background: var(--bg-elevated); border: 1px solid var(--border); }
.ai-search-box .input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); outline: none; }

/* ============ AI 专区 footer 修正 ============ */
.ai-zone footer { background: var(--c-n950); }
.ai-zone footer::before { background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(139, 92, 246, 0.10) 0%, transparent 60%) !important; }
[data-theme="dark"] .ai-zone footer { background: #000; }

/* ============ AI Hero v2：双窗产品视觉 ============ */
.ai-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  text-align: left;
  position: relative;
  z-index: 1;
}
@media (max-width: 1100px) {
  .ai-hero-grid { grid-template-columns: 1fr; }
  .ai-hero-visual { display: none; }
}
.ai-hero-content { max-width: 640px; margin: 0 auto; text-align: center; }
.ai-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--bg-glass-strong); border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: var(--sp-6); box-shadow: var(--shadow-xs); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.ai-hero-eyebrow .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 0 var(--brand-500); animation: pulse 2s infinite; }
.ai-hero-title {
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
  color: var(--text-strong);
  margin: 0 0 var(--sp-5);
  word-break: keep-all;
}
.ai-hero-search {
  position: relative; max-width: 540px; margin: 0 auto var(--sp-7);
  display: flex; align-items: center; gap: 0;
  background: var(--bg-glass-strong); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 200ms var(--ease-out, cubic-bezier(0.25, 0.46, 0.45, 0.94));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.ai-hero-search:focus-within { border-color: var(--ai-blue); box-shadow: var(--shadow-md), 0 0 0 4px rgba(99,102,241,0.18); }
.ai-hero-search-icon { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; stroke-width: 1.7; opacity: .85; }
.ai-hero-search .input { flex: 1; border: none; background: transparent; padding: 12px 12px; font-size: 15px; outline: none; box-shadow: none; }
.ai-hero-search button,
.ai-hero-search .input { background: transparent; }

.ai-hero-stats { display: flex; justify-content: center; gap: var(--sp-8); flex-wrap: wrap; padding-top: var(--sp-6); border-top: 1px solid var(--border-soft); }
.ai-hero-stat { text-align: center; }
.ai-hero-stat-num {
  font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em;
  background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  line-height: 1; margin-bottom: 4px;
}
.ai-hero-stat-label { font-size: 13px; color: var(--text-tertiary); font-weight: 500; }

.ai-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ai-hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); animation: aiOrb 18s ease-in-out infinite alternate; }
.ai-hero-orb-1 { top: -8%; left: 12%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(99,102,241,0.45), transparent 65%); }
.ai-hero-orb-2 { top: 20%; right: 8%; width: 320px; height: 320px; background: radial-gradient(circle, rgba(236,72,153,0.35), transparent 65%); animation-delay: -6s; }
.ai-hero-orb-3 { bottom: -10%; left: 35%; width: 360px; height: 360px; background: radial-gradient(circle, rgba(139,92,246,0.40), transparent 65%); animation-delay: -12s; }
@keyframes aiOrb {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

.ai-hero-visual { position: relative; min-height: 440px; display: flex; align-items: center; justify-content: center; }
.ai-window {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 64px -16px rgba(99,102,241,0.25), 0 8px 24px -8px rgba(0,0,0,0.10);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.ai-window-back { width: 360px; top: 0; right: 20px; transform: rotate(-2deg); animation: floatBack 8s ease-in-out infinite; }
.ai-window-front { width: 320px; bottom: 0; left: 10px; transform: rotate(2deg); animation: floatFront 8s ease-in-out infinite reverse; }
@keyframes floatBack  { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-10px); } }
@keyframes floatFront { 0%, 100% { transform: rotate(2deg)  translateY(0); } 50% { transform: rotate(2deg)  translateY(-12px); } }
.ai-window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--c-n50); border-bottom: 1px solid var(--border-soft); }
[data-theme="dark"] .ai-window-bar { background: var(--c-n100); }
.ai-window-dot { width: 11px; height: 11px; border-radius: 50%; }
.ai-window-title { margin-left: 8px; font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.ai-window-body { padding: 16px; }

/* Chat 风格 */
.ai-chat { display: flex; flex-direction: column; gap: 12px; }
.ai-chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-chat-avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.ai-chat-bubble { flex: 1; min-width: 0; padding: 8px 12px; background: var(--c-n50); border-radius: 12px; font-size: 12.5px; line-height: 1.5; }
.ai-chat-ai .ai-chat-bubble { background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08)); }
.ai-chat-code { font-family: 'SF Mono', Menlo, monospace; font-size: 11.5px; color: var(--text); }
.ai-chat-cursor { display: inline-block; width: 2px; height: 12px; background: var(--ai-blue); margin-left: 2px; animation: blink 1s steps(2) infinite; vertical-align: middle; }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* 排名风格 */
.ai-ranks { display: flex; flex-direction: column; gap: 4px; }
.ai-rank { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; transition: background 150ms; }
.ai-rank:hover { background: var(--c-n50); }
.ai-rank-medal { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; font-weight: 700; flex-shrink: 0; }
.ai-rank-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text); }
.ai-rank-score { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ AI 模板模态 v2 ============ */
.tpl-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 12, 0.5);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  animation: tplFadeIn 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.tpl-modal.is-open { display: flex; }
@keyframes tplFadeIn { from { opacity: 0; } to { opacity: 1; } }
.tpl-modal-inner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 820px; width: 100%;
  max-height: 88vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 96px -24px rgba(99,102,241,0.35), 0 16px 32px -8px rgba(0,0,0,0.15);
  animation: tplSlideUp 320ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex; flex-direction: column;
}
@keyframes tplSlideUp { from { transform: translateY(20px) scale(0.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.tpl-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.tpl-modal-close:hover { background: var(--bg-muted); color: var(--text); transform: rotate(90deg) scale(1.05); }
#tplModalBody { padding: var(--sp-8); overflow-y: auto; max-height: 88vh; }
#tplModalBody h1, #tplModalBody h2, #tplModalBody h3 { letter-spacing: -0.02em; }
#tplModalBody h1 { font-size: 26px; font-weight: 800; line-height: 1.2; margin: 0 0 12px; }
#tplModalBody p { line-height: 1.7; color: var(--text-secondary); }

/* 代码块 */
.code-block {
  margin-top: var(--sp-4);
  background: linear-gradient(180deg, #0f0f14 0%, #18181f 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
}
.code-block-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.06); }
.code-block-dots { display: flex; gap: 6px; }
.code-block-dots span { width: 11px; height: 11px; border-radius: 50%; }
.code-block-dots span:nth-child(1) { background: #FF5F57; }
.code-block-dots span:nth-child(2) { background: #FEBC2E; }
.code-block-dots span:nth-child(3) { background: #28C840; }
.code-block-head > span { color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; flex: 1; }
.code-block-actions { display: flex; gap: 6px; }
.code-block-copy {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 12px;
  cursor: pointer; transition: all 200ms;
}
.code-block-copy:hover { background: rgba(255,255,255,0.15); }
.code-block pre { margin: 0; padding: 16px 20px; overflow-x: auto; font-family: 'SF Mono', Menlo, monospace; font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.92); }
.code-block code { white-space: pre; }
.tok-kw { color: #C4B5FD; font-weight: 600; }
.tok-str { color: #6EE7B7; }
.tok-num { color: #FCA5A5; }
.tok-com { color: #6B7280; font-style: italic; }

/* ============ v7.1 — 评测表表头对齐 + 列居中 ============ */
.bench-table thead th { vertical-align: middle; }
.bench-table thead th:not(:first-child) { text-align: center; }
.bench-table tbody td:not(:first-child) { text-align: center; }
.bench-table tbody td:not(:first-child) [style*="text-align"] { display: inline-block; }

/* ============ v7.1 — 评测表表头去掉 sticky（避免视觉重叠） ============ */
.bench-table thead th {
  position: static;
  top: auto;
  background: var(--bg-soft);
}


/* btn svg */
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }


/* ============ Bench medal ============ */
.bench-medal-cell { display: inline-flex; align-items: center; justify-content: center; width: 32px; }
.bench-medal { width: 22px; height: 22px; }
.bench-medal.is-gold { color: #F59E0B; }
.bench-medal.is-silver { color: #94A3B8; }
.bench-medal.is-bronze { color: #C77E4F; }
.bench-rank { font-size: 15px; font-weight: 700; color: var(--text-tertiary); }
.bench-official { display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: linear-gradient(135deg,var(--ai-500),var(--ai-700)); color: #fff; font-weight: 700; vertical-align: 1px; margin-left: 4px; }

/* ============ AI 子页丰富版 hero（带渐变光斑 + 数据） ============ */
.ai-page-hero-rich {
  position: relative;
  overflow: hidden;
  padding: var(--sp-14) 0 var(--sp-10);
  text-align: center;
  background: linear-gradient(180deg, var(--ai-50) 0%, transparent 100%);
}
[data-theme="dark"] .ai-page-hero-rich {
  background: linear-gradient(180deg, rgba(99,102,241,0.06) 0%, transparent 100%);
}
.ai-page-hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ai-page-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}
.ai-page-hero-orb-1 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #8B5CF6 0%, transparent 70%);
  top: -120px; left: -80px;
  animation: orbFloat1 18s ease-in-out infinite;
}
.ai-page-hero-orb-2 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #EC4899 0%, transparent 70%);
  top: 0; right: -60px;
  animation: orbFloat2 22s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(0.9); }
}
.ai-page-hero-rich > .container { position: relative; z-index: 1; }
.ai-page-hero-rich h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: var(--sp-4) 0 var(--sp-3);
}
.ai-page-hero-rich h1 .grad {
  background: linear-gradient(120deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.ai-page-hero-rich p {
  color: var(--text-secondary);
  font-size: var(--t-body-lg);
  max-width: 600px;
  margin: 0 auto var(--sp-8);
}
.ai-page-hero-rich .ai-hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
}
.ai-page-hero-rich .ai-hero-stat { text-align: center; }
.ai-page-hero-rich .ai-hero-stat-num {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  background: linear-gradient(120deg, #6366F1, #EC4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ai-page-hero-rich .ai-hero-stat-label {
  font-size: var(--t-caption);
  color: var(--text-tertiary);
  margin-top: 4px;
}

