/* ============================================================
   大模型分享 - Shared Stylesheet
   Color: Primary #1E3A8A | Secondary #06B6D4 | Accent #F97316
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --primary: #1E3A8A;
  --primary-light: #2563EB;
  --primary-dark: #1E40AF;
  --secondary: #06B6D4;
  --secondary-light: #22D3EE;
  --accent: #F97316;
  --accent-light: #FB923C;
  --accent-dark: #EA580C;
  --success: #10B981;
  --success-light: #34D399;
  --error: #EF4444;
  --warning: #F59E0B;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 80px 0; }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.section-header p {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s var(--ease);
}
.nav.scrolled { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
  font-size: 18px; font-weight: 700; color: var(--primary);
  transition: opacity 0.2s var(--ease);
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo-img {
  width: 30px; height: 30px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-logo:hover .nav-logo-img { transform: scale(1.1) rotate(-5deg); }
.nav-logo-text {
  white-space: nowrap;
}
.nav-links {
  display: flex; align-items: center; gap: 2px; list-style: none;
  flex: 1; justify-content: center;
}
.nav-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  color: var(--gray-500); font-size: 14px; font-weight: 500;
  transition: all 0.2s var(--ease); white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); background: rgba(30,58,138,0.05); }
.nav-links a.active { color: var(--primary); background: rgba(30,58,138,0.08); font-weight: 600; }
.nav-links a svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-search {
  position: relative;
}
.nav-search input {
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 13px;
  width: 180px; outline: none;
  transition: all 0.25s var(--ease);
  background: var(--gray-50);
}
.nav-search input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
  width: 220px; background: #fff;
}
.nav-search svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--gray-400);
  pointer-events: none;
}
.nav-icon-btn {
  position: relative; background: none; border: none;
  padding: 8px; color: var(--gray-500); border-radius: 8px;
  transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.nav-icon-btn:hover { color: var(--accent); background: rgba(249,115,22,0.06); }
.nav-icon-btn svg { width: 20px; height: 20px; }
.fav-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; padding: 0 4px;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none; background: none; border: none;
  padding: 8px; color: var(--primary); cursor: pointer;
}
.mobile-menu-btn svg { width: 24px; height: 24px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  transition: all 0.2s var(--ease); text-decoration: none;
  white-space: nowrap; line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(249,115,22,0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.4);
}
.btn-secondary {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--gray-500);
}
.btn-ghost:hover { color: var(--primary); background: rgba(30,58,138,0.05); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-xs { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 50%, var(--gray-900) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(6,182,212,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(249,115,22,0.08) 0%, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 100px 24px 90px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 16px; border-radius: 100px;
  font-size: 13px; color: rgba(255,255,255,0.8);
  margin-bottom: 24px; backdrop-filter: blur(8px);
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); animation: pulse-dot 2s infinite;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 900; color: #fff;
  line-height: 1.15; margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 span {
  background: linear-gradient(135deg, #60A5FA, #22D3EE);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,0.7);
  max-width: 620px; margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Hero Stats */
.hero-stats {
  display: flex; gap: 48px; justify-content: center;
  margin-top: 56px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 32px; font-weight: 800; color: #fff;
  line-height: 1.2;
}
.hero-stat .num span { color: var(--secondary-light); }
.hero-stat .label {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 24px; transition: all 0.3s var(--ease);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
}
.card-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* Model Card */
.model-card { cursor: pointer; }
.model-card .card-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px;
}
.model-card .model-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 22px; font-weight: 800; color: #fff;
}
.model-card .model-icon.blue { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.model-card .model-icon.purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.model-card .model-icon.green { background: linear-gradient(135deg, #10B981, #059669); }
.model-card .model-icon.orange { background: linear-gradient(135deg, #F97316, #EA580C); }
.model-card .model-icon.pink { background: linear-gradient(135deg, #EC4899, #DB2777); }
.model-card .model-icon.teal { background: linear-gradient(135deg, #06B6D4, #0E7490); }
.model-card .model-icon.red { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.model-card .model-icon.indigo { background: linear-gradient(135deg, #6366F1, #4338CA); }

.model-card .model-name {
  font-size: 17px; font-weight: 700; color: var(--gray-900);
  line-height: 1.3;
}
.model-card .model-company {
  font-size: 13px; color: var(--gray-400); margin-top: 2px;
}
.model-card .card-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0;
}
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}
.tag-blue { background: #EFF6FF; color: #3B82F6; }
.tag-cyan { background: #ECFEFF; color: #0891B2; }
.tag-green { background: #ECFDF5; color: #059669; }
.tag-orange { background: #FFF7ED; color: #EA580C; }
.tag-purple { background: #F5F3FF; color: #7C3AED; }
.tag-pink { background: #FDF2F8; color: #DB2777; }
.tag-red { background: #FEF2F2; color: #DC2626; }

.card-desc { font-size: 13px; color: var(--gray-500); line-height: 1.6; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

/* Model Score Badge */
.score-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--accent);
}
.score-badge svg { width: 16px; height: 16px; }

/* Rank Badge */
.rank-badge {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #FCD34D, #F59E0B); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #CBD5E1, #94A3B8); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #FED7AA, #F97316); color: #fff; }
.rank-normal { background: var(--gray-100); color: var(--gray-500); }

/* ============================================================
   SKILL RANKING LIST
   ============================================================ */
.skill-list { display: flex; flex-direction: column; gap: 10px; }
.skill-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--gray-100);
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.skill-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-200);
}
.skill-item.top-rank {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(249,115,22,0.03), transparent);
}
.skill-item .skill-info { flex: 1; min-width: 0; }
.skill-item .skill-name {
  font-size: 15px; font-weight: 600; color: var(--gray-900);
  margin-bottom: 2px;
}
.skill-item .skill-desc {
  font-size: 12px; color: var(--gray-400);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.skill-item .skill-stats { text-align: right; flex-shrink: 0; }
.skill-item .skill-usage {
  font-size: 18px; font-weight: 700; color: var(--gray-800);
}
.skill-item .skill-trend {
  font-size: 12px; font-weight: 600;
}
.skill-item .skill-trend.up { color: var(--success); }
.skill-item .skill-trend.down { color: var(--error); }

/* ============================================================
   FILTERS
   ============================================================ */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  margin-bottom: 32px; flex-wrap: wrap;
}
.filter-group { display: flex; gap: 4px; }
.filter-btn {
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500; border: none; background: none;
  color: var(--gray-500); cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.filter-btn:hover { color: var(--primary); background: rgba(30,58,138,0.04); }
.filter-btn.active { color: var(--primary); background: rgba(30,58,138,0.08); font-weight: 600; }
.filter-divider { width: 1px; height: 24px; background: var(--gray-200); margin: 0 4px; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-bottom: 32px;
}
.stat-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 24px; border: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 16px;
}
.stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card .stat-icon svg { width: 22px; height: 22px; }
.stat-card .stat-info .stat-value {
  font-size: 28px; font-weight: 800; color: var(--gray-900);
  line-height: 1.2;
}
.stat-card .stat-info .stat-label {
  font-size: 13px; color: var(--gray-400); margin-top: 2px;
}

/* ============================================================
   MODEL DETAIL
   ============================================================ */
.model-hero {
  background: linear-gradient(160deg, var(--primary) 0%, #1E3A8A 60%, #0F172A 100%);
  padding: 64px 0; position: relative; overflow: hidden;
}
.model-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(6,182,212,0.08), transparent);
}
.model-hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.detail-header {
  display: flex; align-items: flex-start; gap: 24px;
  color: #fff;
}
.detail-icon {
  width: 80px; height: 80px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.detail-info h1 { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.detail-info .company { font-size: 16px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.detail-tags-row { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-tags-row .tag { font-size: 12px; padding: 5px 12px; border-radius: 100px; }
.detail-tags-row .tag-light {
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
}

.detail-content {
  max-width: 1200px; margin: 0 auto; padding: 48px 24px;
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
}
.detail-main h3 {
  font-size: 20px; font-weight: 700; color: var(--gray-900);
  margin: 32px 0 16px; display: flex; align-items: center; gap: 8px;
}
.detail-main h3:first-child { margin-top: 0; }
.detail-main h3 svg { width: 20px; height: 20px; color: var(--primary); }

.benchmark-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.benchmark-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.benchmark-item .bench-name { font-size: 13px; color: var(--gray-500); }
.benchmark-item .bench-score {
  font-size: 15px; font-weight: 700; color: var(--gray-900);
}

.pro-con-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.pro-con-box {
  padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}
.pro-con-box h4 {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.pro-con-box.pros { background: #F0FDF4; border-color: #BBF7D0; }
.pro-con-box.pros h4 { color: var(--success); }
.pro-con-box.cons { background: #FEF2F2; border-color: #FECACA; }
.pro-con-box.cons h4 { color: var(--error); }
.pro-con-box ul { list-style: none; }
.pro-con-box li {
  font-size: 13px; color: var(--gray-600); padding: 4px 0;
  padding-left: 16px; position: relative;
}
.pro-con-box li::before { content: ''; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; }
.pro-con-box.pros li::before { background: var(--success); }
.pro-con-box.cons li::before { background: var(--error); }

.detail-sidebar { position: sticky; top: 88px; align-self: start; }
.side-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; border: 1px solid var(--gray-100);
  margin-bottom: 16px;
}
.side-card h4 {
  font-size: 15px; font-weight: 700; color: var(--gray-900);
  margin-bottom: 14px;
}
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  transition: all 0.2s; margin-bottom: 4px;
}
.side-link:hover { background: var(--gray-50); }
.side-link .sl-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.side-link .sl-name { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.side-link .sl-tag { font-size: 11px; color: var(--gray-400); }

/* ============================================================
   TUTORIALS
   ============================================================ */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.tutorial-card { cursor: pointer; }
.tutorial-card .tut-cover {
  height: 180px; border-radius: var(--radius) var(--radius) 0 0;
  margin: -24px -24px 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.tutorial-card .tut-cover-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 900; color: rgba(255,255,255,0.25);
}
.tutorial-card .tut-title {
  font-size: 17px; font-weight: 700; color: var(--gray-900);
  margin-bottom: 8px; line-height: 1.4;
}
.tutorial-card .tut-meta {
  display: flex; gap: 16px; font-size: 12px; color: var(--gray-400);
}

/* Tutorial Detail */
.tutorial-content {
  max-width: 800px; margin: 0 auto; padding: 0 24px;
}
.tutorial-content h2 {
  font-size: 28px; font-weight: 800; color: var(--gray-900);
  margin: 40px 0 16px;
}
.tutorial-content h3 {
  font-size: 20px; font-weight: 700; color: var(--gray-800);
  margin: 32px 0 12px;
}
.tutorial-content p {
  font-size: 16px; color: var(--gray-600); line-height: 1.8;
  margin-bottom: 16px;
}
.tutorial-content ul, .tutorial-content ol {
  margin-bottom: 16px; padding-left: 24px;
}
.tutorial-content li { font-size: 16px; color: var(--gray-600); line-height: 1.8; margin-bottom: 6px; }

/* ============================================================
   CODE BLOCK
   ============================================================ */
.code-block {
  background: #1E293B; border-radius: var(--radius);
  overflow: hidden; margin: 20px 0;
  border: 1px solid #334155;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #0F172A;
  border-bottom: 1px solid #334155;
}
.code-lang {
  font-size: 12px; font-weight: 600;
  color: var(--gray-400); text-transform: uppercase;
  letter-spacing: 0.05em;
}
.code-copy-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid #334155; background: transparent;
  color: var(--gray-400); font-size: 12px; cursor: pointer;
  transition: all 0.2s;
}
.code-copy-btn:hover { color: #fff; border-color: var(--gray-500); }
.code-copy-btn.copied { color: var(--success); border-color: var(--success); }
.code-copy-btn svg { width: 14px; height: 14px; }
.code-body {
  padding: 20px; overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px; line-height: 1.7;
  color: #E2E8F0;
}
.code-body .keyword { color: #C084FC; }
.code-body .string { color: #86EFAC; }
.code-body .func { color: #60A5FA; }
.code-body .comment { color: #64748B; font-style: italic; }
.code-body .number { color: #FB923C; }

/* ============================================================
   MODAL / TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--gray-900); color: #fff;
  padding: 12px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 2000; transition: transform 0.3s var(--ease);
  display: flex; align-items: center; gap: 8px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #059669; }
.toast.error { background: #DC2626; }

/* ============================================================
   PAGE HERO (Sub Pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 56px 0; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(6,182,212,0.06), transparent);
  pointer-events: none;
}
.page-hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.page-hero h1 { font-size: clamp(24px, 4vw, 40px); font-weight: 800; color: #fff; margin-bottom: 8px; }
.page-hero p { font-size: 16px; color: rgba(255,255,255,0.65); max-width: 560px; }
.page-hero .breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 12px;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,0.6); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb svg { width: 14px; height: 14px; }

.model-hero .breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 12px;
}
.model-hero .breadcrumb a { color: rgba(255,255,255,0.6); }
.model-hero .breadcrumb a:hover { color: #fff; }
.model-hero .breadcrumb svg { width: 14px; height: 14px; color: rgba(255,255,255,0.5); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 80px 24px;
}
.empty-state svg { width: 80px; height: 80px; color: var(--gray-300); margin-bottom: 20px; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; }
.empty-state p { font-size: 15px; color: var(--gray-400); margin-bottom: 24px; }

/* ============================================================
   SCROLL REVEAL & ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: all 0.6s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0; transform: translateY(24px);
  transition: all 0.5s var(--ease-out);
}
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 420ms; }
.reveal-stagger.visible > *:nth-child(9) { transition-delay: 480ms; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 540ms; }
.reveal-stagger.visible > *:nth-child(11) { transition-delay: 600ms; }
.reveal-stagger.visible > *:nth-child(12) { transition-delay: 660ms; }
.reveal-stagger.visible > *:nth-child(13) { transition-delay: 720ms; }
.reveal-stagger.visible > *:nth-child(14) { transition-delay: 780ms; }
.reveal-stagger.visible > *:nth-child(15) { transition-delay: 840ms; }
.reveal-stagger.visible > *:nth-child(16) { transition-delay: 900ms; }

/* Heart animation */
.heart-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--gray-300);
  transition: all 0.2s;
  display: flex; align-items: center; gap: 4px;
  font-size: 13px;
}
.heart-btn svg { width: 18px; height: 18px; transition: all 0.2s; }
.heart-btn:hover svg { color: var(--accent); }
.heart-btn.favorited svg { color: var(--accent); fill: var(--accent); }
.heart-btn.favorited { color: var(--accent); }

@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.heart-btn.just-favorited svg { animation: heartPop 0.3s ease-out; }

/* Like Button (Thumbs Up) */
.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 100px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  color: var(--gray-500); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s var(--ease);
  user-select: none;
}
.like-btn:hover { background: rgba(249,115,22,0.06); border-color: var(--accent-light); color: var(--accent); }
.like-btn svg { width: 18px; height: 18px; transition: all 0.2s; flex-shrink: 0; }
.like-btn.liked { background: rgba(249,115,22,0.1); border-color: var(--accent); color: var(--accent); }
.like-btn.liked svg { fill: var(--accent); color: var(--accent); }
.like-btn .like-count { min-width: 18px; text-align: center; }
.like-btn.just-liked svg { animation: heartPop 0.3s ease-out; }

/* Number counting */
.count-up { display: inline-block; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-2 { grid-template-columns: repeat(2, 1fr); }

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}
.bento-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 28px; border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm); transition: all 0.3s var(--ease);
}
.bento-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-row-2 { grid-row: span 2; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.65);
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

/* Top gradient bar */
.footer-top-bar {
  height: 3px;
  background: linear-gradient(90deg,
    var(--primary) 0%, var(--secondary) 25%,
    var(--accent) 50%, var(--secondary) 75%, var(--primary) 100%);
  background-size: 200% 100%;
  animation: footerBarShimmer 6s ease-in-out infinite;
}
@keyframes footerBarShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Subtle glow overlay */
.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 1px;
  background: radial-gradient(ellipse at center, rgba(6,182,212,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.footer-main {
  max-width: 1200px; margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col { min-width: 0; }

.footer-brand-col {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.footer-brand-col .footer-logo-icon {
  margin-bottom: 14px;
}
.footer-brand-col .footer-logo-icon img {
  width: 80px; height: 80px;
}
.footer-brand {
  font-size: 18px; font-weight: 800; color: #fff;
  margin-bottom: 12px;
}
.footer-desc {
  font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.45);
  max-width: 320px;
}

.footer-col-title {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.7);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-nav { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-nav li a {
  color: rgba(255,255,255,0.45); font-size: 13px;
  transition: color 0.2s, transform 0.2s; display: inline-block;
  text-decoration: none;
}
.footer-nav li a:hover {
  color: var(--secondary-light);
  transform: translateX(3px);
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
}
.footer-bottom-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copyright {
  font-size: 12px; color: rgba(255,255,255,0.3);
}
.footer-beian {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: rgba(255,255,255,0.35);
  text-decoration: none; transition: color 0.2s;
}
.footer-beian:hover { color: var(--secondary-light); }
.footer-beian svg { width: 13px; height: 13px; opacity: 0.5; flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-content { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-card.span-2 { grid-column: span 1; }
  .tutorial-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  .nav-search input { width: 140px; }
  .nav-search input:focus { width: 160px; }
}

@media (max-width: 767px) {
  .section { padding: 40px 0; }
  .section-lg { padding: 56px 0; }
  .hero-inner { padding: 72px 20px 64px; }
  .hero-stats { gap: 28px; }
  .hero-stats .num { font-size: 26px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; justify-content: center; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(24px);
    padding: 12px; gap: 2px;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open a { width: 100%; justify-content: flex-start; padding: 12px 16px; }
  .mobile-menu-btn { display: flex; }
  .nav-search input { width: 100px; font-size: 12px; }
  .nav-search input:focus { width: 120px; }

  .model-grid { grid-template-columns: 1fr; }
  .row-3, .row-2 { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .benchmark-grid { grid-template-columns: 1fr; }
  .pro-con-grid { grid-template-columns: 1fr; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-group { flex-wrap: wrap; }
  .filter-divider { width: 100%; height: 1px; margin: 4px 0; }

  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 16px; }

  .detail-header { flex-direction: column; align-items: flex-start; }
  .detail-icon { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; }
  .detail-info h1 { font-size: 28px; }

  .skill-item { flex-wrap: wrap; }
  .skill-item .skill-stats { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; margin-top: 8px; }

  .code-body { font-size: 12px; padding: 16px; }

  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 767px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .footer-desc { max-width: 100%; }
}