:root {
  --bg: #090b10;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --text: #f3f6ff;
  --text-muted: #b9c0d4;
  --brand: #de373b;
  --brand-2: #f07467;
  --border: rgba(240, 116, 103, 0.22);
  --max-width: 1180px;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 18%, rgba(229, 78, 72, 0.2), transparent 40%),
    radial-gradient(circle at 92% 12%, rgba(240, 116, 103, 0.14), transparent 36%),
    linear-gradient(160deg, #06070c 0%, #0d1119 52%, #080b12 100%);
}

.docs-container {
  width: min(var(--max-width), 92vw);
  margin: 0 auto;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 10, 15, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.docs-nav {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.docs-nav nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.docs-nav nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.docs-nav nav a:hover,
.docs-nav nav a[aria-current="page"] {
  color: var(--text);
}

.docs-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 2rem;
  padding: 3rem 0 4rem;
}

.docs-sidebar {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brand-2);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.docs-sidebar h1 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.1;
}

.sidebar-copy {
  margin: 1rem 0 1.4rem;
  color: var(--text-muted);
}

.doc-list {
  display: grid;
  gap: 0.75rem;
}

.doc-link {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.doc-link:hover,
.doc-link.is-active {
  border-color: rgba(240, 116, 103, 0.58);
  background: linear-gradient(160deg, rgba(240, 116, 103, 0.14), rgba(255, 255, 255, 0.04));
}

.doc-link span {
  font-weight: 700;
}

.doc-link small {
  color: var(--text-muted);
  line-height: 1.45;
}

.docs-article {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: rgba(8, 11, 17, 0.76);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.docs-article h1,
.docs-article h2,
.docs-article h3,
.docs-article p {
  margin-top: 0;
}

.docs-article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.docs-article h2 {
  margin: 2.4rem 0 0.8rem;
  padding-top: 0.4rem;
  font-size: 1.45rem;
}

.docs-article h3 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.12rem;
}

.docs-article p,
.docs-article li,
.docs-article td {
  color: var(--text-muted);
}

.docs-article a {
  color: #ff9a8f;
  text-decoration: none;
}

.docs-article a:hover {
  text-decoration: underline;
}

.docs-article ul,
.docs-article ol {
  padding-left: 1.3rem;
}

.docs-article li + li {
  margin-top: 0.35rem;
}

.docs-article code {
  color: #ffd1cc;
  background: rgba(240, 116, 103, 0.12);
  border: 1px solid rgba(240, 116, 103, 0.22);
  border-radius: 6px;
  padding: 0.08rem 0.3rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.docs-article pre {
  overflow-x: auto;
  margin: 1rem 0 1.35rem;
  padding: 1rem;
  background: #05070b;
  border: 1px solid rgba(240, 116, 103, 0.24);
  border-radius: 12px;
}

.docs-article pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  color: #f7e7e5;
  background: transparent;
  border: 0;
  white-space: pre;
}

.docs-article blockquote {
  margin: 1.25rem 0;
  padding: 0.9rem 1rem;
  color: var(--text-muted);
  background: rgba(240, 116, 103, 0.09);
  border-left: 3px solid var(--brand-2);
  border-radius: 10px;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.35rem;
  border: 1px solid rgba(240, 116, 103, 0.22);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

th,
td {
  padding: 0.8rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--text);
  background: rgba(240, 116, 103, 0.1);
}

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

.loading {
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-sidebar h1 {
    font-size: 2rem;
  }
}

@media (max-width: 560px) {
  .docs-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0;
  }

  .docs-article {
    padding: 1rem;
    border-radius: 16px;
  }

  table {
    min-width: 480px;
  }
}
