:root {
  --bg: #0f1115; --surface: #171a21; --surface-2: #1f232c; --border: #2a2f3a;
  --text: #e8eaf0; --text-2: #a3a9b7; --text-3: #6f7686;
  --accent: #7c9cff; --accent-soft: rgba(124,156,255,.14); --ok: #4ade80;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb; --surface: #fff; --surface-2: #f0f2f7; --border: #e1e4ec;
    --text: #151821; --text-2: #4b5263; --text-3: #8a91a1;
    --accent: #3d63e8; --accent-soft: rgba(61,99,232,.1); --ok: #16a34a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.top { padding: 40px 0 20px; }
h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.sub { margin: 4px 0 20px; color: var(--text-2); }
.controles { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
#q {
  flex: 1 1 260px; min-width: 0; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
}
#q:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer;
}
.chips button.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 32px; }
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card-head { display: flex; gap: 12px; align-items: center; }
.emoji {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  font-size: 22px; border-radius: 12px; background: var(--surface-2);
}
.card h2 { margin: 0; font-size: 17px; line-height: 1.25; }
.meta { font-size: 12.5px; color: var(--text-3); }
.desc { margin: 0; color: var(--text-2); font-size: 14px; flex: 1; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.badge.nuevo { background: rgba(74,222,128,.15); color: var(--ok); font-weight: 600; }
.links { display: flex; gap: 8px; }
.links a, .links span {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.links .web { background: var(--accent); color: #fff; }
.links .repo { background: var(--surface-2); color: var(--text); }
.links .sin { background: transparent; color: var(--text-3); border: 1px dashed var(--border); font-weight: 400; }
.links a:hover { filter: brightness(1.1); }
.vacio { color: var(--text-3); text-align: center; padding: 40px 0; }
.pie { color: var(--text-3); font-size: 13px; padding-bottom: 40px; }
