:root {
  --bg: #07100d;
  --panel: #0c1814;
  --panel-2: #11211b;
  --line: rgba(168, 255, 214, .13);
  --text: #effcf6;
  --muted: #89a79a;
  --accent: #28e58c;
  --accent-2: #9bffca;
  --code: #050a08;
  --header: rgba(7, 16, 13, .88);
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

html[data-theme="light"] {
  --bg: #f2f8f5;
  --panel: #fff;
  --panel-2: #e8f4ee;
  --line: rgba(12, 80, 51, .14);
  --text: #10241b;
  --muted: #587064;
  --accent: #06995a;
  --accent-2: #0b784b;
  --code: #0b1712;
  --header: rgba(242, 248, 245, .9);
  --shadow: 0 24px 70px rgba(15, 71, 46, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Manrope", sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code, pre, kbd { font-family: "Roboto Mono", monospace; }

.topbar { position: fixed; inset: 0 0 auto; z-index: 20; height: 72px; display: flex; align-items: center; gap: 28px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--header); backdrop-filter: blur(18px); }
.brand { width: 250px; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #04120b; background: var(--accent); border-radius: 11px 11px 18px 11px; font-weight: 900; box-shadow: 0 0 34px rgba(40, 229, 140, .25); }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; }
.search-trigger { min-width: 280px; max-width: 520px; flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
kbd { padding: 2px 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.top-actions a:hover { color: var(--accent); }
.icon-button { width: 36px; height: 36px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
.mobile-only { display: none; }

.layout { display: grid; grid-template-columns: 278px minmax(0, 1fr); padding-top: 72px; }
.sidebar { position: fixed; top: 72px; bottom: 0; width: 278px; display: flex; flex-direction: column; padding: 28px 20px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); }
.sidebar-intro { margin: 0 12px 18px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.nav-group { margin-bottom: 24px; }
.nav-group-title { margin: 0 12px 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.nav-link { display: flex; align-items: center; gap: 9px; padding: 7px 12px; color: var(--muted); border-radius: 8px; font-size: 12px; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--panel-2); }
.nav-method { width: 34px; font-family: "Roboto Mono", monospace; font-size: 8px; font-weight: 700; color: var(--accent); }
.sidebar-footer { margin-top: auto; padding: 16px 12px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }

.content { grid-column: 2; width: min(1120px, calc(100vw - 278px)); margin: 0 auto; padding: 70px clamp(30px, 6vw, 90px) 120px; }
.hero { position: relative; min-height: 540px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::after { content: "API"; position: absolute; right: -25px; top: 15px; color: transparent; -webkit-text-stroke: 1px var(--line); font-size: clamp(140px, 24vw, 290px); font-weight: 800; line-height: 1; letter-spacing: -.08em; pointer-events: none; }
.hero-glow { position: absolute; width: 520px; height: 380px; left: -180px; top: 70px; background: radial-gradient(circle, rgba(40,229,140,.18), transparent 68%); filter: blur(12px); }
.eyebrow { position: relative; z-index: 1; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; }
h1 { position: relative; z-index: 1; max-width: 820px; margin: 14px 0 24px; font-size: clamp(48px, 7vw, 86px); line-height: .98; letter-spacing: -.065em; }
h1 span { color: var(--accent); }
.hero-copy { position: relative; z-index: 1; max-width: 690px; color: var(--muted); font-size: 17px; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 12px; margin-top: 24px; }
.primary-button, .secondary-button { padding: 12px 18px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.primary-button { color: #04120b; background: var(--accent); }
.secondary-button { color: var(--text); border: 1px solid var(--line); background: var(--panel); }
.base-url { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; width: fit-content; margin-top: 25px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.base-url span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.base-url code { color: var(--accent-2); font-size: 12px; }

.section { padding: 76px 0 10px; }
.section-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 34px; }
.section-number { color: var(--accent); font-family: "Roboto Mono", monospace; font-size: 12px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h2 { margin: 3px 0 0; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.04em; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.guide-card { min-height: 230px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, var(--panel), transparent); }
.guide-card > span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--accent); border: 1px solid var(--line); border-radius: 50%; font-family: "Roboto Mono", monospace; font-size: 11px; }
.guide-card h3 { margin: 28px 0 8px; font-size: 16px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 13px; }
.guide-card code { color: var(--accent-2); font-size: 11px; }
.callout { display: flex; gap: 20px; margin-top: 16px; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--panel-2); }
.callout strong { color: var(--accent); }
.callout p { margin: 0; color: var(--muted); }

.tag-section { margin: 0 0 58px; }
.tag-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 21px; }
.tag-heading span { color: var(--accent); font-family: "Roboto Mono", monospace; font-size: 10px; text-transform: uppercase; }
.endpoint { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.endpoint summary { display: grid; grid-template-columns: 64px minmax(180px, 1fr) minmax(180px, .8fr) 24px; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; list-style: none; }
.endpoint summary::-webkit-details-marker { display: none; }
.method { width: fit-content; padding: 4px 8px; color: #04120b; border-radius: 6px; background: var(--accent); font-family: "Roboto Mono", monospace; font-size: 9px; font-weight: 800; }
.method.get { color: #06131c; background: #52b7ff; }
.method.delete { color: #1c0808; background: #ff6868; }
.method.patch, .method.put { color: #1b1202; background: #ffc65b; }
.endpoint-path { overflow-wrap: anywhere; font-family: "Roboto Mono", monospace; font-size: 12px; }
.endpoint-title { color: var(--muted); font-size: 12px; }
.chevron { color: var(--muted); transition: transform .2s ease; }
.endpoint[open] .chevron { transform: rotate(90deg); }
.endpoint-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .86fr); border-top: 1px solid var(--line); }
.endpoint-info { padding: 26px; }
.endpoint-info > p { color: var(--muted); font-size: 13px; }
.endpoint-info h4 { margin: 28px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.parameter { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.parameter code { color: var(--accent-2); }
.parameter p { margin: 2px 0 0; color: var(--muted); }
.required { margin-left: 6px; color: #ff7b7b; font-size: 9px; }
.code-panel { min-width: 0; padding: 18px; background: var(--code); }
.code-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.code-tab { padding: 5px 9px; color: #8fa69b; border: 0; border-radius: 6px; background: transparent; font-size: 10px; cursor: pointer; }
.code-tab.active { color: #c7ffe1; background: rgba(40, 229, 140, .12); }
.code-wrap { position: relative; }
.code-wrap pre { min-height: 160px; margin: 0; padding: 16px; overflow: auto; color: #bdeed3; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; font-size: 10px; line-height: 1.7; white-space: pre-wrap; }
.copy-code { position: absolute; right: 9px; top: 9px; padding: 4px 7px; color: #a6b8af; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: #101a16; font-size: 9px; cursor: pointer; }
.schema-block { margin-top: 18px; }
.schema-block pre { max-height: 280px; margin: 8px 0 0; padding: 14px; overflow: auto; color: #93caaa; border-radius: 9px; background: var(--code); font-size: 10px; }
.loading { display: grid; place-items: center; min-height: 220px; color: var(--muted); }
.loading span { width: 30px; height: 30px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.search-dialog { width: min(680px, calc(100vw - 30px)); margin-top: 105px; padding: 0; color: var(--text); border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow); }
.search-dialog::backdrop { background: rgba(0,0,0,.66); backdrop-filter: blur(5px); }
.search-input-wrap { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-input-wrap input { flex: 1; color: var(--text); border: 0; outline: 0; background: transparent; }
.search-results { max-height: 430px; padding: 8px; overflow-y: auto; }
.search-result { display: block; padding: 12px; border-radius: 9px; }
.search-result:hover { background: var(--panel-2); }
.search-result code { display: block; color: var(--accent); font-size: 11px; }
.search-result span { color: var(--muted); font-size: 12px; }
.search-empty { padding: 40px; color: var(--muted); text-align: center; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; padding: 10px 15px; color: #04120b; border-radius: 9px; background: var(--accent); font-size: 12px; font-weight: 800; opacity: 0; transform: translateY(10px); transition: .2s; }
.toast.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .topbar { padding: 0 14px; }
  .brand { width: auto; }
  .brand span:last-child, .search-trigger, .top-actions > a { display: none; }
  .mobile-only { display: inline-block; }
  .layout { display: block; }
  .sidebar { z-index: 15; width: min(310px, 86vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .content { width: 100%; padding: 40px 20px 90px; }
  .hero { min-height: 500px; }
  .hero::after { right: -60px; top: 80px; }
  .guide-grid, .endpoint-body { grid-template-columns: 1fr; }
  .endpoint summary { grid-template-columns: 58px 1fr 20px; }
  .endpoint-title { display: none; }
  .parameter { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  h1 { font-size: 48px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .base-url { width: 100%; align-items: flex-start; flex-direction: column; }
  .base-url code { max-width: 100%; overflow-wrap: anywhere; }
  .section { padding-top: 58px; }
  .endpoint summary { padding: 15px 13px; }
  .endpoint-info, .code-panel { padding: 16px; }
}
