/* BPUI docs — #/ui sayfası. Her kural .bd altında, sitenin geri kalanına dokunmaz. */
.bd {
  --bd-code: #121317;
  --bd-code-line: #24262c;
  --bd-kw: #c792ea;
  --bd-str: #a5e07a;
  --bd-num: #f6a565;
  --bd-com: #6b7080;
  --bd-fn: #6cb6ff;
  --bd-glob: #ffcb6b;
  --bd-prop: #e8e9ec;
  --bd-grad: linear-gradient(135deg, #12b4f4 0%, #7b6cff 55%, #d65cc4 100%);
  padding-top: 18px;
}
.bd *, .bd *::before, .bd *::after { box-sizing: border-box; }
.bd a:not(.btn) { color: var(--blue2); text-decoration: none; }
.bd a:not(.btn):hover { text-decoration: underline; }
.bd a.btn { text-decoration: none; }

/* ---------- hero ---------- */
.bd-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 36px; align-items: center;
  padding: 34px 34px 30px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(18, 180, 244, .10), transparent 70%),
    radial-gradient(520px 300px at 100% 100%, rgba(214, 92, 196, .10), transparent 70%),
    var(--panel);
}
.bd-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 65%);
}
.bd-hero > * { position: relative; z-index: 1; min-width: 0; }
.bd-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 12px; font-weight: 600; }
.bd-kicker b { padding: 2px 8px; border-radius: 999px; background: var(--bd-grad); color: #fff; font-size: 11px; letter-spacing: .03em; }
.bd-hero h1 { margin: 16px 0 10px; font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.bd-hero h1 span { background: var(--bd-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bd-lede { max-width: 54ch; margin: 0 0 20px; color: var(--soft); font-size: 15.5px; line-height: 1.6; }
.bd-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.bd-cta .btn svg { width: 16px; height: 16px; fill: currentColor; }
.bd-load { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bd-code); font: 12.5px/1.5 var(--mono); }
.bd-load code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.bd-load code::-webkit-scrollbar { display: none; }
.bd-load .bd-copy { flex-shrink: 0; }
.bd-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bd-stats span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.02); color: var(--muted); font-size: 12.5px; }
.bd-stats b { color: var(--text); font-weight: 700; }

/* ---------- live preview (BPUI penceresinin HTML kopyası) ---------- */
.bp {
  --w: #0f0f13; --s: #0b0b0e; --sf: #15151a; --sfh: #19191f; --el: #212128; --st: #2c2c37; --sts: #1e1e25;
  --tx: #f4f4f8; --sb: #9ea0ae; --mu: #7a7c8c; --ac: #d65cc4; --at: #fff; --tr: #32323e; --kon: #fff; --koff: #aaacbe;
  position: relative; user-select: none; -webkit-user-select: none;
}
.bp-win {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); height: 330px; overflow: hidden;
  border: 1px solid var(--st); border-radius: 12px; background: var(--w); color: var(--tx);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.02);
  font: 12px/1.35 var(--font); transition: background .3s, border-color .3s, color .3s;
}
.bp-side { display: flex; flex-direction: column; padding: 12px 8px 8px; background: var(--s); border-right: 1px solid var(--st); transition: background .3s, border-color .3s; }
.bp-brand { display: flex; align-items: center; gap: 8px; padding: 0 4px 10px; }
.bp-brand i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--ac); color: var(--at); transition: background .3s; }
.bp-brand i svg { width: 13px; height: 13px; fill: currentColor; }
.bp-brand b { display: block; font-size: 12.5px; }
.bp-brand small { display: block; color: var(--mu); font-size: 10px; }
.bp-search { display: flex; align-items: center; gap: 6px; height: 24px; margin: 0 2px 8px; padding: 0 8px; border-radius: 6px; background: var(--el); color: var(--mu); font-size: 10.5px; transition: background .3s; }
.bp-search svg, .bp-tab svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.bp-tab { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 8px; border-radius: 6px; color: var(--sb); cursor: pointer; transition: background .15s, color .15s; }
.bp-tab:hover { color: var(--tx); }
.bp-tab.on { background: var(--el); color: var(--tx); }
.bp-tab.on svg { color: var(--ac); }
.bp-group { margin-top: 2px; }
.bp-group .bp-tab.sub { position: relative; margin-left: 12px; padding-left: 12px; }
.bp-group .bp-tab.sub::before { content: ""; position: absolute; left: 0; top: -4px; bottom: 50%; width: 7px; border-left: 1px solid var(--st); border-bottom: 1px solid var(--st); border-bottom-left-radius: 5px; }
.bp-foot { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 8px 4px 0; border-top: 1px solid var(--sts); }
.bp-foot i { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--ac), var(--el)); }
.bp-foot b { display: block; font-size: 10.5px; }
.bp-foot small { display: block; color: var(--mu); font-size: 9px; }
.bp-main { display: flex; flex-direction: column; min-width: 0; }
.bp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.bp-top b { display: block; font-size: 14px; }
.bp-top small { display: block; color: var(--mu); font-size: 10.5px; }
.bp-ctl { display: flex; gap: 6px; }
.bp-ctl i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; color: var(--mu); }
.bp-ctl svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bp-page { flex: 1; overflow: hidden; padding: 0 14px 12px; }
.bp-sec { display: flex; align-items: center; gap: 6px; margin: 6px 0 6px; color: var(--mu); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; }
.bp-sec::before { content: ""; width: 3px; height: 10px; border-radius: 2px; background: var(--ac); transition: background .3s; }
.bp-row { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 5px; padding: 6px 10px; border: 1px solid var(--sts); border-radius: 8px; background: var(--sf); transition: background .2s, border-color .3s; }
.bp-row:hover { background: var(--sfh); }
.bp-row .n { flex: 1; min-width: 0; }
.bp-row .n b { display: block; font-weight: 500; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-row .n small { display: block; color: var(--mu); font-size: 9.5px; }
.bp-tg { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--tr); cursor: pointer; transition: background .2s; flex-shrink: 0; }
.bp-tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--koff); transition: transform .2s cubic-bezier(.3,.7,.3,1.2), background .2s; }
.bp-tg.on { background: var(--ac); }
.bp-tg.on::after { transform: translateX(14px); background: var(--kon); }
.bp-sl { width: 46%; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bp-sl .tr { position: relative; flex: 1; height: 5px; border-radius: 999px; background: var(--tr); cursor: pointer; touch-action: none; }
.bp-sl .fi { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--ac); transition: background .3s; }
.bp-sl .kn { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--kon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 35%, transparent); }
.bp-sl .v { min-width: 30px; padding: 2px 5px; border-radius: 4px; background: var(--el); font: 10px var(--mono); text-align: center; }
.bp-dd { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--el); font-size: 10.5px; cursor: pointer; flex-shrink: 0; }
.bp-dd svg { width: 10px; height: 10px; fill: none; stroke: var(--mu); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bp-kb { height: 22px; padding: 0 9px; border-radius: 6px; background: var(--el); font: 600 10px/22px var(--mono); flex-shrink: 0; }
.bp-btn { cursor: pointer; }
.bp-btn .chev { width: 12px; height: 12px; fill: none; stroke: var(--mu); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bp-toast {
  position: absolute; right: -12px; bottom: -14px; z-index: 3; display: flex; gap: 10px; width: 230px; padding: 11px 12px;
  border: 1px solid var(--st); border-radius: 10px; background: var(--sf); color: var(--tx); font-size: 11.5px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.7); opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.bp-toast.show { opacity: 1; transform: none; }
.bp-toast i { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; background: #54d696; }
.bp-toast b { display: block; }
.bp-toast span { color: var(--sb); font-size: 10.5px; }
.bd-themes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.bd-themes > span { margin-right: 4px; color: var(--dim); font-size: 12px; }
.bd-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 6px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(255,255,255,.02); color: var(--muted); font: 600 12px var(--font); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.bd-chip:hover { color: var(--text); border-color: #4a4d55; }
.bd-chip.on { color: var(--text); border-color: var(--blue); background: rgba(18,180,244,.08); }
.bd-chip i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.bd-hint { margin: 8px 0 0; color: var(--dim); font-size: 12px; }

/* ---------- layout ---------- */
.bd-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; margin-top: 28px; align-items: start; }
.bd-toc { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.bd-find { position: relative; margin-bottom: 14px; }
.bd-find input { width: 100%; height: 36px; padding: 0 30px 0 32px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: var(--text); font: 13px var(--font); outline: none; }
.bd-find input:focus { border-color: var(--blue); }
.bd-find svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; }
.bd-find kbd { position: absolute; right: 8px; top: 8px; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line2); border-radius: 4px; color: var(--dim); font: 11px/18px var(--mono); text-align: center; }
.bd-toc h4 { margin: 18px 0 6px; padding-left: 10px; color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bd-toc h4:first-of-type { margin-top: 4px; }
.bd-toc a { position: relative; display: block; padding: 6px 10px; border-radius: 6px; color: var(--muted); font-size: 13.5px; text-decoration: none; transition: background .12s, color .12s; }
.bd-toc a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.bd-toc a.on { background: var(--panel2); color: var(--text); }
.bd-toc a.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--blue); }
.bd-toc .bd-none { padding: 8px 10px; color: var(--dim); font-size: 13px; }
.bd-mtoc { display: none; }

/* ---------- content ---------- */
.bd-body { max-width: 800px; min-width: 0; }
.bd-sec { padding: 6px 0 34px; scroll-margin-top: 18px; }
.bd-sec + .bd-sec { border-top: 1px solid var(--line); padding-top: 30px; }
.bd-group-label { margin: 0 0 4px; color: var(--blue2); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bd-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 25px; font-weight: 750; letter-spacing: -.01em; }
.bd-sec h2 .bd-anchor { opacity: 0; color: var(--dim); font-size: 18px; transition: opacity .15s; }
.bd-sec h2:hover .bd-anchor { opacity: 1; }
.bd-sec h3 { margin: 26px 0 10px; font-size: 16.5px; font-weight: 700; }
.bd-sec p, .bd-sec li { color: var(--soft); font-size: 14.5px; line-height: 1.7; }
.bd-sec p { margin: 0 0 14px; }
.bd-sec ul, .bd-sec ol { margin: 0 0 16px; padding-left: 20px; }
.bd-sec li { margin: 4px 0; }
.bd-sec li::marker { color: var(--dim); }
.bd-sec strong { color: var(--text); }
.bd :not(pre):not(.bd-load) > code { padding: 1px 6px; border: 1px solid var(--line2); border-radius: 5px; background: var(--panel2); color: var(--text); font: 12.5px var(--mono); white-space: nowrap; }

.bd-code { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bd-code); overflow: hidden; }
.bd-code-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--bd-code-line); color: var(--dim); font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase; }
.bd-code-h span { display: inline-flex; align-items: center; gap: 8px; }
.bd-code-h span i { width: 8px; height: 8px; border-radius: 50%; background: #2d6be4; box-shadow: 0 0 0 3px rgba(45,107,228,.15); }
.bd-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/1.7 var(--mono); color: var(--bd-prop); tab-size: 4; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.bd-copy { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 6px; background: transparent; color: var(--muted); font: 600 12px var(--font); cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
.bd-copy:hover { color: var(--text); border-color: #4a4d55; background: rgba(255,255,255,.03); }
.bd-copy.ok { color: var(--green); border-color: rgba(63,185,107,.5); }
.bd-copy svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tk-k { color: var(--bd-kw); }
.tk-s { color: var(--bd-str); }
.tk-n { color: var(--bd-num); }
.tk-c { color: var(--bd-com); font-style: italic; }
.tk-f { color: var(--bd-fn); }
.tk-g { color: var(--bd-glob); }
.tk-b { color: #ff9cac; }

.bd-table { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.bd-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bd-table th { padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.bd-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--soft); vertical-align: top; line-height: 1.55; }
.bd-table tr:last-child td { border-bottom: 0; }
.bd-table tr:hover td { background: rgba(255,255,255,.015); }
.bd-table td:first-child { white-space: nowrap; }
.bd-table .dim { color: var(--dim); }

.bd-note { display: flex; gap: 12px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: 14px; line-height: 1.6; }
.bd-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bd-note div { color: var(--soft); }
.bd-note.tip { border-color: rgba(18,180,244,.35); background: rgba(18,180,244,.06); color: var(--blue2); }
.bd-note.warn { border-color: rgba(233,162,59,.35); background: rgba(233,162,59,.06); color: var(--yellow); }
.bd-note.ok { border-color: rgba(63,185,107,.35); background: rgba(63,185,107,.06); color: var(--green); }

.bd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0 0 18px; }
.bd-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); transition: border-color .15s, transform .15s; }
.bd-card:hover { border-color: var(--line2); transform: translateY(-1px); }
.bd-card i { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 8px; background: rgba(18,180,244,.1); color: var(--blue2); }
.bd-card i svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bd-card b { display: block; margin-bottom: 3px; font-size: 14px; }
.bd-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }

.bd-tree { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bd-code); font: 13px/1.9 var(--mono); overflow-x: auto; white-space: pre; color: var(--soft); }
.bd-tree b { color: var(--text); font-weight: 600; }
.bd-tree em { color: var(--bd-fn); font-style: normal; }
.bd-tree span { color: var(--bd-com); }

.bd-steps { counter-reset: s; list-style: none; padding: 0 !important; }
.bd-steps li { position: relative; padding-left: 38px; margin: 0 0 12px; }
.bd-steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line2); color: var(--text); font: 700 12px/24px var(--font); text-align: center; }

.bd-faq details { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.bd-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.bd-faq summary::-webkit-details-marker { display: none; }
.bd-faq summary::after { content: "+"; color: var(--dim); font-size: 18px; font-weight: 400; transition: transform .2s; }
.bd-faq details[open] summary::after { transform: rotate(45deg); }
.bd-faq details > div { padding: 0 14px 4px; }

.bd-icons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.bd-icons code { cursor: pointer; }
.bd-icons code:hover { border-color: var(--blue); }

.bd-end { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.bd-end p { margin: 0; color: var(--muted); }
.bd-hl { animation: bd-flash 1.4s ease; }
@keyframes bd-flash { 0%, 30% { background: rgba(18,180,244,.08); } 100% { background: transparent; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .bd-hero { grid-template-columns: 1fr; }
  .bd-hero .bp { max-width: 520px; }
}
@media (max-width: 920px) {
  .bd-layout { grid-template-columns: 1fr; gap: 0; }
  .bd-toc { display: none; }
  .bd-mtoc { display: block; margin: 0 0 18px; }
  .bd-mtoc select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: var(--text); font: 14px var(--font); }
}
@media (max-width: 820px) {
  .bd-sec { scroll-margin-top: 112px; }
}
@media (max-width: 600px) {
  .bd-hero { padding: 22px 16px; border-radius: 12px; }
  .bd-hero h1 { font-size: 40px; }
  .bp-win { grid-template-columns: 1fr; height: auto; }
  .bp-side { display: none; }
  .bp-toast { right: 6px; bottom: -10px; }
  .bd-sec h2 { font-size: 21px; }
  .bd-code pre { font-size: 12px; }
}
