/* =====================================================================
   Animista — каталог анимаций в стиле test-design (тёмная luxury).
   Источники: animista.net (keyframes) + animate.css MIT.
   ===================================================================== */
:root {
  --bg: #0b0d10;
  --bg-elev: #11151a;
  --bg-card: #161b22;
  --border: #232a33;
  --border-strong: #2f3744;
  --text: #e6edf3;
  --text-muted: #8b95a3;
  --text-dim: #5f6b7c;
  --accent: #d4a574;
  --accent-soft: rgba(212, 165, 116, 0.12);
  --ok: #88ce02;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
* { scrollbar-width: thin; scrollbar-color: var(--border) var(--bg); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ─── header ─────────────────────────────────────────────────────── */
header.topbar {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
}
.brand-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #0b0d10;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.brand-name { font-weight: 600; font-size: 15px; }
.back-link {
  font-size: 13px; color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }

/* ─── intro ──────────────────────────────────────────────────────── */
.intro {
  padding: 48px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.intro h1 {
  margin: 0 0 12px;
  font-size: 42px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.intro h1 .accent { color: var(--accent); }
.intro p {
  margin: 0 auto;
  max-width: 600px;
  color: var(--text-muted);
  font-size: 15px;
}
.intro .meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-dim);
}
.intro .meta .chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* ─── category grid (главная) ───────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 32px 0 64px;
}
.cat-card {
  display: block;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.cat-card .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
.cat-card .cat-name {
  display: flex; align-items: center;
  font-size: 18px; font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.cat-card .cat-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 2px 8px;
  background: var(--bg-elev);
  border-radius: 999px;
}
.cat-card .cat-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.cat-card .cat-arrow {
  font-size: 18px;
  color: var(--accent);
  position: absolute;
  bottom: 18px;
  right: 18px;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}
.cat-card:hover .cat-arrow { opacity: 1; transform: translateX(4px); }

/* ─── effects grid (страница категории) ─────────────────────────── */
.fx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 32px 0 64px;
}
.fx-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.fx-card:hover { border-color: var(--accent); }
.fx-card:active { transform: scale(0.99); }
.fx-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.fx-preview .fx-target {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.fx-preview .fx-bg-target {
  width: 80%;
  height: 60px;
  border-radius: 8px;
  background: var(--accent);
}
.fx-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fx-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.fx-id {
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, 'SF Mono', monospace;
}
.fx-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.fx-actions button {
  flex: 1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.fx-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.fx-actions button.copied {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── footer ─────────────────────────────────────────────────────── */
footer.attribution {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
footer.attribution a { color: var(--text-muted); }
