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

:root {
  --bg: #0f1320;
  --panel: rgba(23, 28, 44, 0.55);
  --panel-solid: #171c2c;
  --muted: #9ba6c4;
  --text: #e8edff;
  --accent: #ffcc4d;
  --line: rgba(40, 48, 74, 0.6);
  --glow: rgba(255, 204, 77, 0.08);
  --glass-blur: 18px;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 50%, rgba(255,255,255,0.03) 100%);
}

* {
  box-sizing: border-box, content-box;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(100, 120, 200, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 204, 77, 0.04) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
}

a {
  color: #ffe28f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.row {
  display: flex;
}

.between {
  justify-content: space-between;
}

.center {
  align-items: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 19, 32, 0.65);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.brand {
  color: var(--accent);
  font-weight: 700;
  padding: 14px 0;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  color: var(--text);
  opacity: 0.85;
  padding: 6px 10px;
  border-radius: 10px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.nav a.active,
.nav a:hover {
  opacity: 1;
  background: rgba(34, 43, 65, 0.6);
  border-color: var(--glass-border);
  backdrop-filter: blur(8px);
  text-decoration: none;
  box-shadow: 0 0 12px rgba(255, 204, 77, 0.06);
}

.content {
  padding: 24px 0 40px;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.docs-main {
  min-width: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-highlight);
  pointer-events: none;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 6px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.hero h1 {
  margin-top: 0;
  margin-bottom: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chips span {
  font-size: 13px;
  color: #f6d57c;
  border: 1px solid rgba(85, 68, 25, 0.5);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(85, 68, 25, 0.15);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.chips span:hover {
  background: rgba(85, 68, 25, 0.3);
  border-color: rgba(246, 213, 124, 0.4);
  box-shadow: 0 0 10px rgba(255, 204, 77, 0.1);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.link-card {
  aspect-ratio: 4 / 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 226, 143, 0.2);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(255, 204, 77, 0.06);
  text-decoration: none;
}

.link-card h3 {
  margin-top: 0;
}

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

.quick-index {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-index a {
  display: block;
  border: 1px solid rgba(40, 48, 74, 0.4);
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(20, 26, 42, 0.5);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: all 0.25s ease;
}

.quick-index a:hover {
  background: rgba(34, 43, 65, 0.6);
  border-color: var(--glass-border);
  box-shadow: 0 0 12px rgba(255, 204, 77, 0.06);
  text-decoration: none;
}

@media (min-width: 1080px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .docs-sidebar {
    position: sticky;
    top: 84px;
  }

  .docs-sidebar .card {
    margin-bottom: 0;
  }
}

pre {
  margin: 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(42, 51, 81, 0.5);
  background: rgba(16, 21, 35, 0.7);
  backdrop-filter: blur(10px);
  padding: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2) inset;
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.tok-comment {
  color: #7f8fb3;
}

.tok-string {
  color: #9ee493;
}

.tok-kw {
  color: #ff8dc7;
  font-weight: 600;
}

.tok-num {
  color: #7fd8ff;
}

.tok-fn {
  color: #ffd37a;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

th {
  color: #f4db97;
  background: rgba(255, 204, 77, 0.04);
}

.field-table tbody td:first-child {
  font-weight: 700;
}

.field-table tbody td:nth-child(2) {
  color: #7fd8ff;
  font-weight: 600;
}

ul {
  margin-top: 8px;
}

.footer {
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 14px;
  padding: 14px 0 26px;
  background: rgba(15, 19, 32, 0.4);
  backdrop-filter: blur(12px);
}

.badge {
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-block;
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.ok {
  color: #66db8f;
  border: 1px solid rgba(40, 88, 58, 0.6);
  background: rgba(21, 41, 29, 0.5);
}

.todo {
  color: #ffd987;
  border: 1px solid rgba(91, 74, 28, 0.6);
  background: rgba(42, 36, 21, 0.5);
}

@media (max-width: 720px) {
  .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 10px;
  }
}
