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

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-alt);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  font-size: 1.125rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-card .count {
  color: var(--text-light);
  font-size: 0.875rem;
}

.back-button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.back-button:hover {
  background: var(--bg);
  border-color: var(--border-hover);
}

.sites-view h2 {
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
}

.sites-list {
  display: grid;
  gap: 1rem;
}

.site-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.site-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
}

.site-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.site-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.site-card h3 a:hover {
  color: var(--primary);
}

.site-card .url {
  color: var(--primary);
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.site-card .url:hover {
  text-decoration: underline;
}

.site-card .description {
  color: var(--text-light);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.site-card .meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}

.site-card .lenses {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lens-tag {
  background: var(--bg-alt);
  color: var(--text-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.quality-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quality-exceptional {
  background: #dbeafe;
  color: #1e40af;
}

.quality-solid {
  background: #f0fdf4;
  color: #166534;
}

.quality-niche {
  background: #fef3c7;
  color: #92400e;
}

.loading, .error {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.error {
  color: #dc2626;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}


