html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #eef2f7;
}

body {
  background:
    radial-gradient(1200px 800px at 85% 10%, rgba(46,91,173,0.28), rgba(0,0,0,0) 60%),
    linear-gradient(125deg,#0c1424,#1b2f55,#0b1628,#1a2f52);
  background-size: auto, 300% 300%;
  animation: bgShift 30s ease-in-out infinite;
}

@keyframes bgShift {
  0%   { background-position: center, 0% 0%; }
  50%  { background-position: center, 100% 100%; }
  100% { background-position: center, 0% 0%; }
}

#starsCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Основная сетка layout */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Для страниц без sidebar */
.layout.no-sidebar {
  display: block;
}

/* Контентная зона */
.content {
  padding: 32px 36px;
  max-width: 980px;
  margin: 0 auto;
  z-index: 1; /* поверх canvas */
  position: relative;
}

/* Сайдбар */
.sidebar {
  padding: 18px;
  border-right: 1px solid rgba(255,255,255,.05);
  background: rgba(0,0,0,.15);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar a {
  display: block;
  padding: 8px 10px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
}

.sidebar a:hover {
  background: rgba(255,255,255,.08);
}

/* Топбар */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.topbar a { color: #9aa6b2; text-decoration: none; }

/* Текстовый контент */
.content p {
  line-height: 1.7;
  color: #dbe4f0;
}

.content pre {
  background: rgba(255,255,255,.06);
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
  font-size: 13px;
}

.content code {
  background: rgba(255,255,255,.08);
  padding: 2px 5px;
  border-radius: 5px;
}