/* Base styles */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #10b981;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --bg-color: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --rating-excellent: #10b981;
  --rating-good: #3b82f6;
  --rating-average: #f59e0b;
  --rating-poor: #ef4444;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
}

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

/* Header */
.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-size: 1.25rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.site-nav a { margin-left: 1.5rem; color: var(--text-muted); text-decoration: none; }
.site-nav a:hover { color: var(--primary-color); }

/* Hero */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero-subtitle { color: var(--text-muted); font-size: 1.125rem; margin-bottom: 1.5rem; }

/* Search */
.search-box { max-width: 500px; margin: 0 auto; }
#skill-search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}
#skill-search:focus { outline: none; border-color: var(--primary-color); }

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
}
.filter-group { display: flex; align-items: center; gap: 0.5rem; }
.filter-group select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Stats */
.stats { display: flex; justify-content: center; gap: 3rem; padding: 1rem 0 2rem; }
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary-color); }
.stat-label { color: var(--text-muted); font-size: 0.875rem; }

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 3rem;
}

/* Skill Card */
.skill-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.skill-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.skill-name { font-size: 1.125rem; margin: 0; }
.skill-name a { color: var(--text-color); text-decoration: none; }
.skill-name a:hover { color: var(--primary-color); }
.category-tag {
  font-size: 0.75rem;
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
}
.skill-description { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }
.card-ratings { display: flex; gap: 1rem; margin-bottom: 1rem; }
.rating-item { flex: 1; }
.rating-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.github-stars { display: flex; align-items: center; gap: 0.25rem; color: var(--text-muted); font-size: 0.875rem; }

/* Rating Badge */
.rating-badge {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.rating-small { font-size: 0.875rem; }
.rating-medium { font-size: 1rem; }
.rating-large { font-size: 1.5rem; padding: 0.5rem 1rem; }
.rating-max { font-size: 0.75em; opacity: 0.7; margin-left: 0.125rem; }
.rating-excellent { background: rgba(16, 185, 129, 0.1); color: var(--rating-excellent); }
.rating-good { background: rgba(59, 130, 246, 0.1); color: var(--rating-good); }
.rating-average { background: rgba(245, 158, 11, 0.1); color: var(--rating-average); }
.rating-poor { background: rgba(239, 68, 68, 0.1); color: var(--rating-poor); }

/* Skill Detail Page */
.skill-detail { padding: 2rem 0; }
.breadcrumb { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-muted); }
.skill-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.skill-meta { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.category-badge { background: var(--primary-color); color: white; padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.875rem; }
.source-link { color: var(--primary-color); text-decoration: none; }
.skill-content { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; margin-top: 2rem; }
.evaluation-section, .prompt-section, .tools-section { margin-bottom: 2rem; }
.evaluation-section h2, .prompt-section h2, .tools-section h2 { font-size: 1.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.rating-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.rating-card { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; }
.rating-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.rating-reasoning { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.5rem; }
.overall-rating { text-align: center; padding: 1.5rem; background: var(--bg-secondary); border-radius: 8px; }
.prompt-preview { background: #1f2937; color: #e5e7eb; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.prompt-preview code { font-family: 'Fira Code', monospace; font-size: 0.875rem; }
.tools-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.tool-tag { background: var(--bg-secondary); padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.875rem; }

/* Sidebar */
.sidebar { position: sticky; top: 80px; }
.sidebar section { background: var(--bg-secondary); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.sidebar h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.github-metrics { display: flex; flex-direction: column; gap: 0.75rem; }
.metric { display: flex; align-items: center; gap: 0.5rem; }
.metric .icon { color: var(--text-muted); }
.metric-value { font-weight: 600; }
.metric-label { color: var(--text-muted); font-size: 0.875rem; }
.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 4px; text-decoration: none; text-align: center; }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

/* Footer */
.site-footer { background: var(--bg-secondary); padding: 2rem 0; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

/* Responsive */
@media (max-width: 768px) {
  .skill-content { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .rating-cards { grid-template-columns: 1fr; }
  .stats { gap: 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
}
