:root{
  --bg:#0b0b10;
  --panel: rgba(18,18,34,.88);
  --stroke: rgba(255,255,255,.12);
  --text:#f7f2ff;
  --muted:#d7c7ff;
  --link:#ff7ad9;
  --link2:#8b5bff;
  --code: rgba(0,0,0,.25);
  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(circle at 20% 12%, rgba(255,122,217,.22), transparent 38%),
    radial-gradient(circle at 70% 40%, rgba(139,91,255,.18), transparent 45%),
    radial-gradient(circle at 40% 90%, rgba(95,225,255,.10), transparent 40%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a{ color: var(--link); text-decoration:none; }
a:hover{ text-decoration:underline; filter:brightness(1.06); }

.wrap{ max-width: 1120px; margin: 22px auto; padding: 0 14px; }

.topbar{
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  padding: 14px;
  border:1px solid var(--stroke);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.brand{ font-weight:900; letter-spacing:.5px; font-size:20px; }
.brand span{ color: var(--link); }

.search{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}
.search input{
  width: min(520px, 72vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);
  color:#fff;
  outline:none;
}
.search input:focus{
  border-color: rgba(255,122,217,.45);
  box-shadow: 0 0 0 3px rgba(255,122,217,.12);
}
.badge{
  display:inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 12px;
}

.grid{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 920px){
  .grid{ grid-template-columns: 1fr; }
}

.panel{
  border:1px solid var(--stroke);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  backdrop-filter: blur(8px);
}

.nav a{
  display:block;
  padding: 10px 10px;
  border-radius: 12px;
  margin: 6px 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}
.nav a:hover{
  background: rgba(255,122,217,.12);
  border-color: rgba(255,122,217,.35);
  text-decoration:none;
}

.h1{ margin:0; font-size: 28px; letter-spacing:.2px; }
.subtitle{ color: rgba(215,199,255,.92); margin: 6px 0 0; }

.toc{
  margin-top:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px;
}
.toc b{ color: rgba(215,199,255,.92); }
.toc ol{ margin:8px 0 0; padding-left: 18px; }

.infobox{
  float:right;
  width: min(320px, 100%);
  margin: 0 0 12px 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px;
}
@media (max-width: 860px){
  .infobox{ float:none; width:100%; margin: 12px 0; }
}
.infobox h3{ margin:0 0 8px; font-size:14px; color: rgba(215,199,255,.92); letter-spacing:.3px; }
.infobox table{ width:100%; border-collapse:collapse; font-size: 13px; }
.infobox td{
  border-top:1px solid rgba(255,255,255,.10);
  padding: 8px 6px;
  vertical-align: top;
}
.infobox td:first-child{ color: rgba(215,199,255,.9); width: 40%; }

.note{
  border-left: 3px solid rgba(255,122,217,.55);
  padding: 10px 12px;
  background: rgba(255,122,217,.08);
  border-radius: 12px;
}

.footer{
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

code{
  background: var(--code);
  border: 1px solid rgba(255,255,255,.10);
  padding: 2px 6px;
  border-radius: 10px;
}

.search-results{
  margin-top: 10px;
  display: none;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  border-radius: 14px;
  overflow:hidden;
}
.search-results.active{ display:block; }
.search-results a{
  display:block;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.search-results a:first-child{ border-top:none; }
.search-results small{ color: rgba(215,199,255,.85); display:block; margin-top:4px; }
