/* BenchLLM — Styles */
:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2236;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --orange: #f97316;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
nav .logo span { color: var(--text-muted); }
nav a { color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; font-size: 0.9rem; }
nav a:hover { color: var(--accent); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent), #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero .stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .stat { text-align: center; }
.hero .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}
.hero .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Filters ── */
.filters {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 2rem 2rem;
}
.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

/* ── Model Cards ── */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}
.model-card:hover { border-color: var(--accent-dim); background: var(--bg-card-hover); transform: translateY(-2px); }
.model-card.hidden { display: none; }

.model-card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.model-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  padding-right: 5rem;
}
.model-card .model-link {
  color: var(--text);
  text-decoration: none;
}
.model-card .model-link:hover { color: var(--accent); }
.model-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.model-card .meta span { margin-right: 1rem; }

/* Score bar */
.model-card .score-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.model-card .score-bar .score {
  font-size: 2rem;
  font-weight: 800;
  min-width: 3rem;
}
.model-card .score-bar .bar-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.model-card .score-bar .bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease;
}

/* Category tags */
.model-card .cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.model-card .cat-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.model-card .cat-tag .cat-score { font-weight: 700; }

.model-card .pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.model-card .pros-cons ul {
  list-style: none;
  font-size: 0.85rem;
}
.model-card .pros-cons ul li::before { margin-right: 0.3rem; }
.model-card .pros-cons .pros li::before { content: "✓"; color: var(--green); }
.model-card .pros-cons .cons li::before { content: "✗"; color: var(--red); }
.model-card .pros-cons li { margin-bottom: 0.3rem; color: var(--text-muted); }

.model-card .best-for {
  font-size: 0.85rem;
  padding: 0.5rem;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.model-card .best-for strong { color: var(--accent); }

.model-card .speed {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.model-card .speed .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* ── Detail View ── */
.detail-hero {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.detail-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.detail-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.detail-badge:has(#detail-composite) {
  border-color: var(--accent-dim);
}

.detail-columns {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.detail-left, .detail-right { min-width: 0; }

/* Bar chart */
.detail-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.detail-bar-label {
  min-width: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.detail-bar-track {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.detail-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}
.detail-bar-score {
  min-width: 3rem;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Detail table */
.detail-table {
  width: 100%;
  border-collapse: collapse;
}
.detail-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.detail-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.detail-cat-name {
  text-transform: capitalize;
  color: var(--text);
}

/* Detail pros/cons */
.detail-pros, .detail-cons {
  list-style: none;
  font-size: 0.9rem;
}
.detail-pros li, .detail-cons li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

/* Games section */
.games-section {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 2rem;
  text-align: center;
}
.games-section h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  justify-items: center;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}
.game-card h4 {
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}
.game-card .game-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.game-card canvas {
  border-radius: 8px;
  border: 1px solid var(--border);
  max-width: 100%;
  height: auto;
}

/* ── Service Section ── */
.service {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem;
  text-align: center;
}
.service h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.service h2 span { color: var(--accent); }
.service p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}
.service .steps {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.service .step {
  text-align: center;
  max-width: 200px;
}
.service .step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.1rem;
}
.service .step h4 { margin-bottom: 0.3rem; font-size: 0.95rem; }
.service .step p { font-size: 0.85rem; margin: 0; }

.cta-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.cta-btn:hover { background: #06b6d4; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3); }

/* ── Modal / Form ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 1.5rem; }
.modal .form-group { margin-bottom: 1rem; }
.modal label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
}
.modal textarea { min-height: 80px; resize: vertical; }
.modal .submit-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.modal .submit-btn:hover { background: #06b6d4; }
.modal .close-btn {
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--accent); text-decoration: none; }

/* ── Back button ── */
#back-to-models {
  display: inline-block !important;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .models-grid { grid-template-columns: 1fr; }
  .model-card .pros-cons { grid-template-columns: 1fr; }
  .service .steps { flex-direction: column; align-items: center; }
  .detail-columns { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
}
