@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg: #0d0d0f;
  --bg-card: #131316;
  --bg-nav: #0f0f12;
  --bg-hover: #1a1a20;
  --border: #232329;
  --accent: #8b5cf6;
  --accent-2: #6d28d9;
  --accent-glow: rgba(139, 92, 246, .18);
  --text: #e4e4f0;
  --text-muted: #8c8ca0;
  --text-dim: #575768;
  --code-bg: #17171c;
  --sidebar-w: 260px;
  --topbar-h: 56px;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: rgba(13, 13, 15, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  z-index: 100;
}

.topbar-logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.3px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-logo span {
  color: var(--accent);
}

.topbar-tag {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.topbar-spacer {
  flex: 1;
}

.topbar-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.topbar-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.topbar-link.active {
  color: var(--accent);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.hamburger:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.hamburger svg {
  display: block;
}

.layout {
  display: flex;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  background: var(--bg-nav);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px 12px;
  z-index: 90;
  transition: transform .25s ease;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 8px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  margin-bottom: 1px;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 500;
}

.sidebar-link svg {
  opacity: .6;
  flex-shrink: 0;
}

.sidebar-link.active svg {
  opacity: 1;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

.content {
  max-width: 800px;
  padding: 48px 48px 80px;
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}

h1 .accent {
  color: var(--accent);
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

p {
  margin-bottom: 14px;
  color: var(--text);
}

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

a:hover {
  text-decoration: underline;
}

ul,
ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

li {
  margin-bottom: 5px;
}

li::marker {
  color: var(--accent);
}

strong {
  color: var(--text);
  font-weight: 600;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .83em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: #c4b5fd;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  position: relative;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .875rem;
  color: #e4e4f0;
}

details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

details summary {
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

details p {
  margin-bottom: 0;
}

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13.5px;
}

.callout.note {
  background: rgba(99, 102, 241, .1);
}

.callout.tip {
  background: rgba(34, 197, 94, .08);
}

.callout.warn {
  background: rgba(245, 158, 11, .08);
}

.callout p {
  margin: 0;
  color: var(--text-muted);
}

.callout strong {
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero {
  padding: 64px 0 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 20px;
  letter-spacing: .3px;
}

.hero-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 7px;
  text-decoration: none;
  transition: all .15s;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-2);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.plugin-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-card);
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-hover);
}

td:first-child code {
  color: var(--accent);
}

.search-bar {
  width: 100%;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  transition: border-color .15s;
}

.search-bar:focus-within {
  border-color: var(--accent);
}

.search-bar svg {
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .2px;
}

.tag-privacy,
.tag-sigil,
.tag-utility,
.tag-developers,
.tag-chat,
.tag-appearance,
.tag-servers,
.tag-roles,
.tag-shortcuts,
.tag-activity,
.tag-commands,
.tag-emotes,
.tag-friends,
.tag-organisation,
.tag-customisation,
.tag-notifications,
.tag-cosmetic,
.tag-voice,
.tag-media {
  background: rgba(100, 100, 100, .2);
  color: #777777;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: steps;
}

.steps li {
  counter-increment: steps;
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.steps li:last-child {
  border-bottom: none;
}

.steps li::marker {
  content: none;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.step-body {
  flex: 1;
}

.step-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.devs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.dev-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.dev-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.dev-name {
  font-weight: 600;
  font-size: 14px;
}

.dev-handle {
  font-size: 12px;
  color: var(--text-muted);
}

.dev-focus {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

#no-results {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  display: none;
}

#no-results svg {
  margin: 0 auto 12px;
  display: block;
  opacity: .3;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 89;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .content {
    padding: 32px 24px 64px;
  }

  h1 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 520px) {
  .content {
    padding: 24px 16px 56px;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  td {
    font-size: 12px;
  }
}