/* ============================================
   Fidox Intelligence - Complete Styles
   Modern, clean, professional design
   ============================================ */

:root {
  --primary: #3a83f7;
  --primary-dark: #2d6cdf;
  --primary-light: #5a9fff;
  --primary-bg: rgba(58, 131, 247, 0.1);
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --card-hover-shadow: 0 12px 40px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="dark"] {
  --primary-bg: rgba(58, 131, 247, 0.15);
  --bg: #0b1120;
  --bg-alt: #111827;
  --bg-card: #111827;
  --bg-elevated: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-strong: #334155;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
  --card-hover-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
[data-theme="dark"] .header { background: rgba(11,17,32,0.95); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem;
  text-decoration: none; color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--primary); }

.logo-img { width: 32px; height: 32px; object-fit: contain; }

.nav { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 16px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-secondary);
  font-weight: 500; font-size: 0.9rem;
  transition: all 0.2s ease;
  position: relative;
}
.nav-link:hover { color: var(--primary); background: var(--primary-bg); }
.nav-link.active {
  color: var(--primary);
  background: var(--primary-bg);
  font-weight: 600;
}

.theme-toggle {
  background: none; border: 1px solid var(--border);
  cursor: pointer; padding: 8px 10px;
  border-radius: var(--radius-sm); color: var(--text-secondary);
  transition: all 0.2s ease; display: flex; align-items: center;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.2s ease; font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(58,131,247,0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(58,131,247,0.4); }
.btn-secondary { background: var(--bg-alt); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-text { background: none; color: var(--primary); padding: 8px 0; font-weight: 600; }
.btn-text:hover { text-decoration: underline; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.tag {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 0.7rem; font-weight: 600;
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag-api { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }
.tag-open { background: rgba(16,185,129,0.1); color: var(--success); border-color: var(--success); }

.score-badge {
  display: inline-block; padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 700;
}
.score-badge.high { background: rgba(16,185,129,0.15); color: var(--success); }
.score-badge.medium { background: rgba(245,158,11,0.15); color: var(--warning); }
.score-badge.low { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 50%, var(--primary-bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--primary-bg) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.hero-content { max-width: 580px; }

.hero h1 {
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  font-weight: 800; line-height: 1.08;
  margin-bottom: 24px; color: var(--text-primary);
  letter-spacing: -0.03em;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.2rem; color: var(--text-secondary);
  margin-bottom: 36px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.stat-divider { width: 1px; background: var(--border); align-self: stretch; margin: 4px 0; }

/* HERO CHART CARD */
.hero-chart-card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  padding: 28px; box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}
.chart-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.chart-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.chart-card-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.chart-card-badge {
  background: var(--primary); color: white;
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
}
.hero-chart-card canvas { max-height: 260px; width: 100%; }
.chart-card-footer {
  display: flex; gap: 32px; margin-top: 24px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.chart-stat { display: flex; flex-direction: column; }
.chart-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.chart-stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800; color: var(--text-primary); margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section-header p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.section-footer {
  display: flex; justify-content: center; align-items: center;
  gap: 32px; margin-top: 48px;
}

/* ============================================
   MODELS GRID
   ============================================ */
.models-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.model-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 24px; border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.model-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0; transition: opacity 0.3s;
}
.model-card:hover {
  transform: translateY(-6px); box-shadow: var(--card-hover-shadow);
  border-color: var(--primary);
}
.model-card:hover::before { opacity: 1; }

.model-card-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.model-logo {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: white; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.model-logo.openai { background: linear-gradient(135deg, #10a37f, #0d8a6b); }
.model-logo.anthropic { background: linear-gradient(135deg, #d97706, #b45309); }
.model-logo.google { background: linear-gradient(135deg, #4285f4, #34a853); }
.model-logo.meta { background: linear-gradient(135deg, #0668E1, #055ecb); }
.model-logo.nvidia { background: linear-gradient(135deg, #76b900, #5a8f00); }
.model-logo.xai { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.model-logo.deepseek { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.model-logo.moonshot { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.model-logo.alibaba { background: linear-gradient(135deg, #ff6b00, #e65100); }
.model-logo.zhipu { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.model-logo.mistral { background: linear-gradient(135deg, #f59e0b, #d97706); }
.model-logo.lg { background: linear-gradient(135deg, #ac1c2e, #8b1522); }
.model-logo.muse { background: linear-gradient(135deg, #ec4899, #db2777); }
.model-logo.minimax { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.model-logo.conjecture { background: linear-gradient(135deg, #a855f7, #9333ea); }
.model-logo.generic { background: linear-gradient(135deg, #64748b, #475569); }

.model-card-info h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.model-provider { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.model-score {
  margin-left: auto; font-size: 1.75rem; font-weight: 800;
  padding: 6px 14px; border-radius: var(--radius-md);
  background: var(--bg-elevated); color: var(--text-primary);
}
.model-score.high { background: rgba(16,185,129,0.15); color: var(--success); }
.model-score.medium { background: rgba(245,158,11,0.15); color: var(--warning); }
.model-score.low { background: rgba(239,68,68,0.15); color: var(--danger); }

.model-card-meta { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.model-card-meta span {
  font-size: 0.72rem; color: var(--text-muted);
  padding: 4px 10px; background: var(--bg-elevated); border-radius: 20px;
  border: 1px solid var(--border);
}
.model-card-desc { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; flex-grow: 1; }
.model-card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ============================================
   BENCHMARKS
   ============================================ */
.benchmark-chart-container {
  background: var(--bg-card); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--card-shadow);
  border: 1px solid var(--border); max-width: 750px; margin: 0 auto 48px;
}
.benchmark-chart-container canvas { max-height: 420px; width: 100%; }
.benchmark-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  max-width: 750px; margin: 0 auto;
}
.benchmark-stat {
  text-align: center; padding: 28px 20px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
  transition: all 0.2s;
}
.benchmark-stat:hover { transform: translateY(-2px); box-shadow: var(--card-hover-shadow); }
.benchmark-stat-value { font-size: 2.25rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.benchmark-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* ============================================
   CATEGORIES
   ============================================ */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.category-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 36px 28px; border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block; position: relative; overflow: hidden;
}
.category-card::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0); transition: transform 0.3s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover-shadow); border-color: var(--primary); }
.category-card:hover::after { transform: scaleX(1); }
.category-icon { font-size: 2.75rem; margin-bottom: 20px; }
.category-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.category-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.category-count { font-size: 0.8rem; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================
   ARTICLES
   ============================================ */
.articles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.article-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  text-decoration: none; color: inherit; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--card-hover-shadow); border-color: var(--primary); }
.article-card-image {
  height: 220px; background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.article-card-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 60%);
}
.article-card-content { padding: 28px; flex-grow: 1; display: flex; flex-direction: column; }
.article-card-meta { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.article-category {
  padding: 4px 12px; border-radius: 20px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.article-date, .article-read-time { font-size: 0.8rem; color: var(--text-muted); }
.article-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; line-height: 1.4; color: var(--text-primary); }
.article-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.7; flex-grow: 1; }

/* ============================================
   MODEL DETAIL PAGE
   ============================================ */
.model-hero-section {
  padding: 48px 0 56px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-bg) 100%);
  border-bottom: 1px solid var(--border);
}
.breadcrumb {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 32px;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

.model-hero-content {
  display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: start;
}
.model-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.model-hero-left h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  color: var(--text-primary); margin-bottom: 12px; letter-spacing: -0.03em;
  line-height: 1.1;
}
.model-developer { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; margin-bottom: 20px; }
.model-description { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; max-width: 600px; }

.model-meta-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px;
}
.model-meta-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.model-meta-icon { font-size: 1.5rem; }
.model-meta-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.model-meta-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.model-tags { display: flex; gap: 10px; flex-wrap: wrap; }

.model-score-container { text-align: center; padding: 32px 40px; background: var(--bg-card); border-radius: var(--radius-xl); border: 1px solid var(--border); box-shadow: var(--card-shadow); min-width: 180px; }
.model-score-circle { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: 0 8px 32px rgba(58,131,247,0.3); }
.score-value { font-size: 2.75rem; font-weight: 800; color: white; line-height: 1; }
.score-label { font-size: 0.65rem; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
.model-score-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.model-elo { font-size: 0.9rem; color: var(--primary); font-weight: 700; }

/* Benchmarks Section */
.two-column-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.benchmarks-section h2, .sidebar h3 { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); margin-bottom: 24px; letter-spacing: -0.02em; }

.benchmark-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.benchmark-card {
  padding: 20px 24px; background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.benchmark-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.benchmark-card-title { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.benchmark-card-score { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.benchmark-card-context { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.benchmark-bar { height: 8px; background: var(--bg-elevated); border-radius: 10px; overflow: hidden; }
.benchmark-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 10px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }

.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  padding: 24px; background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.strength-item, .best-for-item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-secondary); }
.strength-item:last-child, .best-for-item:last-child { border-bottom: none; }
.info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.info-row span:first-child { color: var(--text-muted); }
.info-row span:last-child { color: var(--text-primary); font-weight: 600; }
.info-row:last-child { border-bottom: none; }

.comparison-table-container { margin-top: 48px; overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.comparison-table th, .comparison-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table th { background: var(--bg-elevated); font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr.highlight td { background: var(--primary-bg); font-weight: 600; }
.comparison-table a { color: inherit; text-decoration: none; }
.comparison-table a:hover { color: var(--primary); }

/* ============================================
   LEADERBOARD
   ============================================ */
.leaderboard-tabs { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.leaderboard-tab {
  padding: 10px 20px; border-radius: var(--radius-sm); background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
}
.leaderboard-tab:hover { border-color: var(--primary); color: var(--primary); }
.leaderboard-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

.leaderboard-table-container { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); box-shadow: var(--card-shadow); }
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th, .leaderboard-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.leaderboard-table th { background: var(--bg-elevated); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tr:hover td { background: var(--bg-alt); }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); font-weight: 800; font-size: 0.85rem; }
.rank-badge.top-1 { background: linear-gradient(135deg, #ffd700, #ffb700); color: #78350f; }
.rank-badge.top-2 { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #374151; }
.rank-badge.top-3 { background: linear-gradient(135deg, #cd7f32, #b8860b); color: #78350f; }
.model-link { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.model-link:hover { color: var(--primary); }
.developer { color: var(--text-muted); }
.elo { font-weight: 700; color: var(--text-primary); }

.leaderboard-chart-container { margin-top: 48px; background: var(--bg-card); border-radius: var(--radius-xl); padding: 32px; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.leaderboard-chart-container canvas { max-height: 400px; }

.leaderboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.leaderboard-stat { text-align: center; padding: 24px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.leaderboard-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.leaderboard-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================
   MODELS FILTER
   ============================================ */
.filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 18px; border-radius: 20px; background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.filter-sort select {
  padding: 10px 16px; border-radius: var(--radius-sm); background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-primary); font-size: 0.9rem;
  cursor: pointer; font-family: inherit;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page { padding: 48px 0; }
.article-header { margin-bottom: 40px; }
.article-meta { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.article-date { color: var(--text-muted); font-size: 0.9rem; }
.article-read-time { color: var(--text-muted); font-size: 0.9rem; }
.article-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--text-primary); line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.03em; }
.article-author { color: var(--text-muted); font-size: 0.95rem; }

.article-content { max-width: 800px; }
.article-content .article-image { width: 100%; border-radius: var(--radius-lg); margin-bottom: 32px; box-shadow: var(--card-shadow); }
.article-content .lead { font-size: 1.2rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 32px; padding-left: 20px; border-left: 3px solid var(--primary); }
.article-content h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin: 40px 0 20px; letter-spacing: -0.02em; }
.article-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin: 32px 0 16px; }
.article-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.article-content ul { margin-bottom: 24px; padding-left: 24px; }
.article-content li { color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.article-table { width: 100%; border-collapse: collapse; margin: 24px 0; background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.article-table th, .article-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.article-table th { background: var(--bg-elevated); font-weight: 700; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }
.article-table td { color: var(--text-primary); }
.article-tags { display: flex; gap: 10px; flex-wrap: wrap; margin: 40px 0; padding-top: 32px; border-top: 1px solid var(--border); }
.article-navigation { display: flex; gap: 16px; margin-top: 48px; }
.article-cta { background: var(--bg-elevated); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin: 48px 0; border: 1px solid var(--border); }
.article-cta h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.article-cta p { color: var(--text-secondary); margin-bottom: 24px; }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--bg-alt); padding: 80px 0 40px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; max-width: 280px; }
.footer-links h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 20px; color: var(--text-muted); }
.footer-links a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; padding: 7px 0; transition: all 0.2s; }
.footer-links a:hover { color: var(--primary); transform: translateX(4px); }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================
   PAGE HERO (common for inner pages)
   ============================================ */
.page-hero {
  padding: 48px 0 56px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-bg) 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero-sm { padding: 32px 0 40px; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  color: var(--text-primary); margin-bottom: 12px; letter-spacing: -0.03em;
}
.page-hero p { font-size: 1.1rem; color: var(--text-secondary); }

/* ============================================
   MODEL HERO (detail page compact)
   ============================================ */
.model-hero {
  display: flex; align-items: center; gap: 32px;
}
.model-hero-logo {
  width: 80px; height: 80px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: white; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.model-hero h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.model-hero-sub { font-size: 1rem; color: var(--text-muted); }
.model-hero-score { margin-left: auto; text-align: center; }

/* ============================================
   STATS ROW (shared across pages)
   ============================================ */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px;
}
.stat-card {
  text-align: center; padding: 28px 20px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
  background: var(--bg-card); border-radius: var(--radius-xl);
  padding: 32px; border: 1px solid var(--border); box-shadow: var(--card-shadow);
  max-width: 800px; margin: 0 auto;
}
.chart-tall { max-width: 900px; }
.chart-container canvas { max-height: 400px; width: 100%; }
.chart-tall canvas { max-height: 500px; }

/* ============================================
   DATA TABLE (leaderboard)
   ============================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); box-shadow: var(--card-shadow); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--bg-elevated); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; position: sticky; top: 0; }
.data-table td { font-size: 0.9rem; color: var(--text-secondary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-alt); }

/* ============================================
   FILTERS (models page)
   ============================================ */
.filters {
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
}
.search-input {
  flex: 1; min-width: 200px; max-width: 360px; padding: 10px 16px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-primary); font-size: 0.9rem;
  font-family: inherit; transition: border-color 0.2s;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-input::placeholder { color: var(--text-muted); }
.filter-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.results-count { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }

/* ============================================
   MODEL DETAIL GRID
   ============================================ */
.model-details-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-bottom: 32px;
}
.model-detail-section {
  padding: 28px; background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.model-detail-section h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.feature-list { list-style: none; padding: 0; }
.feature-list li {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text-secondary);
}
.feature-list li:last-child { border-bottom: none; }
.tag-cloud { display: flex; gap: 8px; flex-wrap: wrap; }

.model-description {
  padding: 28px; background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
  font-size: 1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px;
}
.model-meta-row {
  display: flex; flex-wrap: wrap; gap: 32px; padding: 24px 28px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.meta-item { font-size: 0.9rem; color: var(--text-secondary); }
.meta-item strong { color: var(--text-primary); }

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-body { max-width: 800px; }
.article-body p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.article-body h2 { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin: 40px 0 20px; letter-spacing: -0.02em; }
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin: 32px 0 16px; }
.article-body ul { margin-bottom: 24px; padding-left: 24px; }
.article-body li { color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.article-body a { color: var(--primary); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-hero-image {
  width: 100%; height: 320px; object-fit: cover;
  border-radius: var(--radius-lg); margin-bottom: 32px;
}
.lead { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 32px; padding-left: 20px; border-left: 3px solid var(--primary); }
.article-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ============================================
   MODEL HERO V2 (detail page)
   ============================================ */
.model-hero-v2 {
  display: flex; align-items: center; gap: 48px; padding: 24px 0;
}
.model-hero-v2-left {
  display: flex; align-items: center; gap: 28px; flex: 1;
}
.model-logo-xl {
  width: 96px; height: 96px; border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; font-weight: 800; color: white; flex-shrink: 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.model-developer-full { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 12px; }
.model-price-badge { display: flex; gap: 8px; flex-wrap: wrap; }
.price-tag {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-sm);
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.85rem; font-weight: 700;
}
.price-open { background: rgba(16,185,129,0.1); color: var(--success); }
.model-hero-v2-right { flex-shrink: 0; }
.score-display {
  text-align: center; padding: 28px 36px;
  background: var(--bg-card); border-radius: var(--radius-xl);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.score-circle {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 14px; box-shadow: 0 8px 24px rgba(58,131,247,0.3);
}
.score-num { font-size: 2rem; font-weight: 800; color: white; line-height: 1; }
.score-lbl { font-size: 0.6rem; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 1px; }
.score-detail { font-size: 0.85rem; color: var(--text-muted); }
.score-row { display: flex; justify-content: space-between; gap: 24px; padding: 4px 0; }
.score-row strong { color: var(--text-primary); }

/* ============================================
   META CARD (prominent info)
   ============================================ */
.meta-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
  padding: 28px; margin-top: 24px;
}
.meta-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; }
.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
}
.meta-cell {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; background: var(--bg-elevated); border-radius: var(--radius-sm);
}
.meta-cell-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.meta-cell-value { font-size: 0.95rem; color: var(--text-primary); font-weight: 600; }

/* ============================================
   SORT CONTROLS (models page)
   ============================================ */
.filters-v2 {
  display: flex; align-items: center; gap: 20px; margin-bottom: 32px; flex-wrap: wrap;
}
.sort-controls {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-secondary);
}
.sort-controls label { font-weight: 600; }
.sort-controls select {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-primary); font-size: 0.9rem; cursor: pointer; font-family: inherit;
}
.price-mini {
  font-size: 0.75rem; color: var(--primary); font-weight: 600;
  padding: 4px 10px; background: var(--primary-bg); border-radius: 12px;
}

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.section-desc { color: var(--text-secondary); font-size: 1rem; margin-top: 8px; margin-bottom: 32px; }

/* ============================================
   HERO PAGE ELEMENTS
   ============================================ */
.hero-chart { max-width: 520px; }
.hero-chart canvas { max-height: 320px; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-column-layout { grid-template-columns: 1fr; }
  .model-hero-content { grid-template-columns: 1fr; }
  .model-score-container { margin-top: 32px; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; gap: 2px; }
  .nav-link { white-space: nowrap; font-size: 0.85rem; padding: 6px 12px; }
  .hero { padding: 48px 0; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .benchmark-stats { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-stats { grid-template-columns: repeat(2, 1fr); }
  .model-meta-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 60px 0; }
  .articles-grid { grid-template-columns: 1fr; }
  .model-hero { flex-direction: column; text-align: center; }
  .model-hero-score { margin-left: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: column; align-items: stretch; }
  .search-input { max-width: none; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 10px 12px; }
}