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

:root {
  --jet: hsl(0 0% 3%);
  --bg: var(--jet);
  --surface-a: hsl(0 0% 8%);
  --surface-b: hsl(0 0% 7%);
  --surface-hover: hsl(0 0% 12%);
  --line: hsl(0 0% 18%);
  --line-soft: hsl(0 0% 13%);
  --text: #ffffff;
  --text-dim: hsl(0 0% 66%);
  --text-faint: hsl(0 0% 46%);
  --accent: #cc0000;
  --accent-bright: #ff2400;
  --accent-rgb: 204, 0, 0;
  --green: #5e9e69;
  --red: #cc6b6b;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.25); border-radius: 10px; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  opacity: 0;
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 85% -5%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(circle at 50% 0%, transparent 40%, rgba(0,0,0,0.5) 100%);
}

main { position: relative; z-index: 10; min-height: 100vh; }
.content-wrap { max-width: 1200px; margin: 0 auto; padding: 50px 30px 80px; }

.bots-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 24px; margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 16px;
}
.bots-brand { display: flex; align-items: center; gap: 10px; user-select: none; }
.bots-back {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-a); border: 1px solid var(--line); color: var(--text-dim);
  text-decoration: none; transition: all 0.25s var(--ease); font-size: 13px;
}
.bots-back:hover { border-color: var(--text); color: var(--text); }
.bots-title { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.bots-sub { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--accent-bright); background: rgba(var(--accent-rgb),0.12); border: 1px solid rgba(var(--accent-rgb),0.3); padding: 2px 8px; border-radius: 4px; letter-spacing: 0.04em; margin-left: 4px; }
.count-pill { padding: 4px 10px; background: var(--surface-a); border: 1px solid var(--line); border-radius: 20px; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-faint); user-select: none; }
.bots-report {
  color: var(--text-faint); font-size: 12px; text-decoration: none;
  display: flex; align-items: center; gap: 5px; margin-left: 12px; white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.bots-report:hover { color: var(--text-dim); }

.search-wrap { position: relative; width: 280px; max-width: 100%; }
.search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 12px; }
.inp { width: 100%; background: var(--surface-a); border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px 10px 36px; color: var(--text); font-family: 'Inter', sans-serif; font-size: 13px; transition: all 0.25s var(--ease); }
.inp:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1); background: var(--surface-hover); }
.inp::placeholder { color: var(--text-faint); }

.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.cat-pill {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  color: var(--text-dim); background: var(--surface-a); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 20px; cursor: pointer; transition: all 0.25s var(--ease);
  user-select: none;
}
.cat-pill:hover { border-color: var(--line-soft); color: var(--text); }
.cat-pill.active { background: rgba(255, 255, 255, 0.1); color: var(--text); border-color: var(--text); }

#botsGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.bot-card {
  background: var(--surface-a); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: all 0.3s var(--ease); position: relative;
}
.bot-card:hover { border-color: var(--text); background: var(--surface-hover); transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,0.3); }

.bot-card-img { width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-b); position: relative; }
.bot-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bot-status-dot { position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,0.4); }
.status-online  { background: var(--green); }
.status-offline { background: var(--red); }

.bot-card-body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.bot-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bot-name { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: none; }
.bot-version { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--text-faint); background: var(--surface-b); border: 1px solid var(--line); padding: 2px 8px; border-radius: 4px; flex-shrink: 0; user-select: none; }
.bot-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; flex: 1; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; user-select: none; }

.bot-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
.bot-cat-tag { font-size: 11px; color: var(--text-faint); font-weight: 500; user-select: none; }
.bot-downloads { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-faint); display: flex; align-items: center; gap: 5px; user-select: none; }

.btn-download {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 11px; margin-top: 14px;
  background: var(--text); color: var(--bg); border: none; border-radius: 100px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.25s var(--ease); text-decoration: none;
  user-select: none;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2); }

.blankslate { grid-column: 1 / -1; padding: 80px 24px; text-align: center; color: var(--text-faint); user-select: none; }
.blankslate i { font-size: 32px; margin-bottom: 20px; display: block; opacity: 0.5; }
.blankslate h3 { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -0.01em; }
.blankslate p { font-size: 14px; color: var(--text-dim); }

.docs-footer { padding: 30px 0; margin-top: 50px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--text-faint); user-select: none; }
.docs-footer a { color: var(--text-dim); text-decoration: none; }
.docs-footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  .content-wrap { padding: 30px 16px 60px; }
  .bots-topbar { flex-direction: column; align-items: flex-start; }
  .search-wrap { width: 100%; }
  .bot-card:hover { transform: none; }
}
