:root {
  --docs-bg-start: #111522;
  --docs-bg-mid: #14192a;
  --docs-bg-end: #171c2d;
  --docs-sidebar-width: 280px;
  --docs-content-width: 820px;
  --docs-layout-gap: 40px;
  --docs-surface: rgba(14, 18, 29, 0.78);
  --docs-surface-soft: rgba(255, 255, 255, 0.03);
  --docs-border: rgba(255, 255, 255, 0.06);
  --docs-text: rgba(232, 237, 245, 0.88);
  --docs-text-soft: rgba(209, 218, 230, 0.6);
  --docs-accent: #c27aa7;
  --docs-accent-strong: #d196ba;
  --docs-shadow: 0 8px 24px rgba(3, 5, 12, 0.12);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--docs-bg-start);
  background-image: linear-gradient(
    90deg,
    #121725 0%,
    #14192a 24%,
    #161b2d 50%,
    #14192a 76%,
    #121725 100%
  );
  color: var(--docs-text);
}

body::before {
  content: none;
}

#app,
.sidebar,
.content,
.sidebar-toggle {
  position: relative;
  z-index: 1;
}

@media (min-width: 1200px) {
  main {
    display: grid;
    grid-template-columns: var(--docs-sidebar-width) minmax(0, var(--docs-content-width));
    justify-content: center;
    align-items: start;
    column-gap: var(--docs-layout-gap);
    width: min(100%, calc(var(--docs-sidebar-width) + var(--docs-content-width) + var(--docs-layout-gap) + 64px));
    margin: 0 auto;
    padding: 0 32px;
  }

  body.sticky main > .sidebar,
  main > .sidebar {
    position: relative !important;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
    width: var(--docs-sidebar-width) !important;
    height: auto;
    transform: none;
    transition: transform 220ms ease, opacity 220ms ease, width 220ms ease;
  }

  main > .content {
    position: relative !important;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto !important;
    min-width: 0;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    transition: width 220ms ease;
  }

  main > .content > .markdown-section {
    max-width: none;
    width: 100%;
    margin: 0 0 48px;
  }

  body.sticky main > .sidebar-toggle,
  main > .sidebar-toggle {
    display: block;
    position: fixed;
    left: 22px;
    bottom: 20px;
    top: auto;
    width: auto;
    padding: 12px 14px;
    border: 1px solid var(--docs-border);
    border-radius: 14px;
    background: rgba(14, 18, 29, 0.92);
    box-shadow: var(--docs-shadow);
    z-index: 40;
  }

  body.close main {
    grid-template-columns: 0 minmax(0, var(--docs-content-width));
    column-gap: 0;
    width: min(100%, calc(var(--docs-content-width) + 64px));
  }

  body.close main > .sidebar {
    width: 0 !important;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-18px);
    overflow: hidden;
  }

  body.close main > .content {
    left: auto !important;
    width: 100%;
  }
}

.sidebar {
  background: var(--docs-surface);
  border-right: 1px solid var(--docs-border);
  box-shadow: var(--docs-shadow);
}

.sidebar::-webkit-scrollbar {
  width: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.app-name {
  padding-top: 24px;
}

.app-name-link,
.app-name-link:hover {
  color: rgba(245, 247, 252, 0.96);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.search {
  margin: 16px;
  padding: 0;
  border: 0;
}

.search input {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--docs-border);
  border-radius: 14px;
  color: rgba(243, 246, 251, 0.92);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  padding: 14px 16px;
}

.search input::placeholder {
  color: var(--docs-text-soft);
}

.search input:focus {
  border-color: rgba(194, 122, 167, 0.52);
  box-shadow: 0 0 0 3px rgba(194, 122, 167, 0.08);
}

.sidebar-nav {
  margin: 0 12px 24px;
}

.sidebar-nav p,
.sidebar ul li a,
.sidebar-nav li > a {
  color: var(--docs-text-soft);
}

.sidebar ul li.active > a,
.sidebar ul li a:hover {
  color: rgba(245, 247, 252, 0.96);
}

.sidebar ul li.active > a {
  border-right-color: var(--docs-accent);
  font-weight: 700;
}

.content {
  padding-top: 28px;
  padding-left: 32px;
  padding-right: 32px;
}

.markdown-section {
  max-width: 820px;
  width: 100%;
  margin: 0 auto 48px;
  padding: 40px 0 56px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--docs-text);
}

.markdown-section > :first-child {
  margin-top: 0;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: var(--docs-accent);
  font-weight: 700;
}

.markdown-section h1 {
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.markdown-section h2 {
  margin-top: 2.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-section p,
.markdown-section li,
.markdown-section blockquote {
  color: var(--docs-text);
  line-height: 1.82;
}

.markdown-section strong {
  color: rgba(244, 247, 252, 0.94);
}

.markdown-section a {
  color: var(--docs-accent-strong);
  font-weight: 600;
}

.markdown-section a:hover {
  color: #fff;
}

.markdown-section ul,
.markdown-section ol {
  padding-left: 1.4rem;
}

.markdown-section blockquote {
  background: var(--docs-surface-soft);
  border-left: 3px solid var(--docs-accent);
  border-radius: 0 14px 14px 0;
  padding: 14px 18px;
}

.markdown-section code,
.markdown-section pre {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.markdown-section pre {
  background: rgba(9, 10, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
}

.sidebar-toggle {
  background: rgba(14, 18, 29, 0.88);
  border-top: 1px solid var(--docs-border);
  width: 300px;
}

.sidebar-toggle span {
  background-color: var(--docs-accent);
}

.anchor span {
  color: var(--docs-accent);
}

@media (max-width: 768px) {
  .content {
    padding-top: 12px;
    padding-left: 0;
    padding-right: 0;
  }

  .markdown-section {
    margin: 0 16px 32px;
    padding: 28px 22px 38px;
  }

  .markdown-section h1 {
    font-size: 1.8rem;
  }

  .sidebar-toggle {
    width: auto;
  }
}
