:root {
  --primary: #000000;      /* black */
  --surface: #FFFFFF;      /* white */
  --text: #000000;         /* black text */
  --muted: #6B7280;        /* gray text */
  --border: #E5E7EB;       /* light gray border */
  --outline: #D1D5DB;      /* outline gray */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
}

/* Header */
.header {
  background: var(--primary);
  color: var(--surface);
  padding: 20px;
  text-align: center;
}
.header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.subtitle {
  margin: 6px 0 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

/* Container */
.container {
  max-width: 1080px;
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Filters */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  max-width: 800px;
}
.filter-group { margin-bottom: 16px; }
.filter-group h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--muted);
  font-weight: 600;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  font-weight: 600;
}
.btn:hover { background: #F3F4F6; }
.btn:active { transform: scale(0.98); }
.btn.active {
  background: var(--primary);
  color: var(--surface);
}
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--outline);
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.search {
  flex: 1 1 280px;
  padding: 10px 12px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: #fff;
}

/* Results grid */
.results {
  width: 100%;
  max-width: 1000px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  justify-content: center;
  align-content: center;
  justify-items: center;
}

/* Cards */
.card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h3 {
  margin: 0;
  font-size: 16px;
}
.card .meta {
  font-size: 12px;
  color: var(--muted);
}
.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  color: var(--text);
  background: #F3F4F6;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.card .actions {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}
.card .download {
  background: var(--primary);
  color: var(--surface);
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.card .download:hover { background: #111111; }

/* Footer */
.footer {
  margin: 24px auto;
  max-width: 1080px;
  padding: 0 16px;
  color: var(--muted);
  text-align: center;
}
