@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #041109;
  --bg-soft: #0a1d11;
  --panel: rgba(8, 28, 16, 0.82);
  --panel-strong: rgba(6, 22, 12, 0.94);
  --line: rgba(115, 255, 168, 0.2);
  --line-strong: rgba(115, 255, 168, 0.42);
  --text: #ecfff2;
  --muted: #9ec5aa;
  --accent: #72ff99;
  --accent-strong: #14d66b;
  --accent-dim: #12311e;
  --danger: #b7ffca;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(54, 255, 126, 0.16), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(27, 173, 87, 0.2), transparent 24%),
    radial-gradient(circle at 50% 120%, rgba(74, 255, 141, 0.08), transparent 30%),
    linear-gradient(180deg, #020805 0%, #041109 38%, #07170d 100%);
}

.noise,
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(
      90deg,
      rgba(114, 255, 153, 0.03) 0,
      rgba(114, 255, 153, 0.03) 1px,
      transparent 1px,
      transparent 5px
    );
}

.glow-a {
  background: radial-gradient(circle at 12% 18%, rgba(114, 255, 153, 0.15), transparent 0 32%);
}

.glow-b {
  background: radial-gradient(circle at 82% 14%, rgba(20, 214, 107, 0.16), transparent 0 28%);
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 32px));
  margin: 24px auto 40px;
  display: grid;
  gap: 18px;
}

.hero,
.doc-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(11, 31, 18, 0.92), rgba(4, 17, 9, 0.94)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  padding: 28px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(114, 255, 153, 0.12), transparent 62%);
  z-index: -1;
}

.hero-topbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand-mark,
.hero-badge,
h1,
.doc-header h2 {
  font-family: "Orbitron", sans-serif;
}

.brand-mark {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(114, 255, 153, 0.35);
}

.product-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-link,
.lang-btn,
.actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 42px;
  padding: 9px 16px;
  color: var(--text);
  background: rgba(7, 25, 14, 0.92);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.product-link:hover,
.lang-btn:hover,
.actions button:hover,
.product-link[data-active="true"],
.lang-btn[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(13, 48, 25, 0.98), rgba(8, 28, 16, 0.98));
  box-shadow: 0 0 0 1px rgba(114, 255, 153, 0.08), 0 0 28px rgba(20, 214, 107, 0.14);
}

.product-link:hover,
.lang-btn:hover,
.actions button:hover {
  transform: translateY(-1px);
}

.hero-copy {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.hero-badge {
  width: fit-content;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(114, 255, 153, 0.26);
  background: rgba(10, 40, 21, 0.78);
  color: var(--danger);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0.04em;
}

.subtitle,
.meta-note,
.doc-header p,
.search-wrap span,
#search-status {
  color: var(--muted);
}

.subtitle {
  max-width: 820px;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.6;
}

.toolbar {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: rgba(3, 13, 7, 0.9);
  color: var(--text);
  outline: none;
  font: inherit;
  box-shadow: inset 0 0 0 1px rgba(114, 255, 153, 0.03);
}

.search-wrap input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(114, 255, 153, 0.08);
}

.search-wrap input::placeholder {
  color: #7da18a;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#search-status,
.meta-note {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.docs-container {
  display: grid;
  gap: 16px;
}

.doc-panel {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  height: 0;
}

.doc-panel[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  height: auto;
  animation: rise-in 240ms ease-out;
}

.doc-header {
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 38, 22, 0.85), rgba(8, 24, 14, 0.62));
}

.doc-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: 0.04em;
}

.doc-header p {
  margin: 0;
  line-height: 1.5;
}

.doc-body {
  padding: 18px 24px 30px;
}

.doc-body h1,
.doc-body h2,
.doc-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.7em;
  scroll-margin-top: 20px;
}

.doc-body h1 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.doc-body h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: var(--accent);
}

.doc-body h3 {
  font-size: 1rem;
  color: var(--danger);
}

.doc-body p,
.doc-body li {
  line-height: 1.7;
}

.doc-body a {
  color: var(--accent);
}

.doc-body code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 7px;
  border: 1px solid rgba(114, 255, 153, 0.15);
  background: rgba(10, 34, 20, 0.9);
}

.doc-body pre {
  margin: 16px 0;
  padding: 14px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(114, 255, 153, 0.16);
  background: linear-gradient(180deg, rgba(3, 13, 7, 1), rgba(7, 23, 13, 1));
}

.doc-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.doc-body details {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(10, 30, 18, 0.96), rgba(6, 20, 11, 0.96));
  overflow: hidden;
}

.doc-body details[open] {
  border-color: var(--line-strong);
  box-shadow:
    0 0 0 1px rgba(114, 255, 153, 0.06),
    0 18px 34px rgba(0, 0, 0, 0.22);
}

.doc-body summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  background: linear-gradient(180deg, rgba(11, 35, 19, 0.98), rgba(8, 24, 14, 0.96));
  color: var(--text);
}

.doc-body summary::-webkit-details-marker {
  display: none;
}

.doc-body summary::before {
  content: "+";
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(114, 255, 153, 0.2);
  background: rgba(10, 33, 19, 0.92);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  line-height: 1;
}

.doc-body details[open] summary::before {
  content: "-";
}

.doc-body details > :not(summary) {
  margin-left: 18px;
  margin-right: 18px;
}

.doc-body .detail-content {
  padding-bottom: 2px;
}

.doc-body details > *:last-child {
  margin-bottom: 18px;
}

.doc-body details p,
.doc-body details ul,
.doc-body details ol {
  margin-top: 14px;
  margin-bottom: 14px;
}

.doc-body details ul,
.doc-body details ol {
  padding-left: 22px;
}

.doc-body details li + li {
  margin-top: 8px;
}

.doc-body details code {
  background: rgba(12, 39, 22, 0.96);
}

.doc-body details pre {
  margin-top: 16px;
  margin-bottom: 16px;
  border-color: rgba(114, 255, 153, 0.2);
}

.doc-body details pre code {
  background: transparent;
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  overflow: hidden;
}

.doc-body th,
.doc-body td {
  padding: 11px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc-body th {
  color: var(--accent);
  background: rgba(11, 35, 19, 0.92);
}

.doc-body tr:nth-child(even) td {
  background: rgba(7, 22, 12, 0.56);
}

.doc-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-strong);
  background: rgba(10, 31, 18, 0.82);
  color: #d8ffe3;
}

@media (min-width: 920px) {
  .toolbar {
    grid-template-columns: auto minmax(320px, 1fr);
    align-items: end;
  }
}

@media (max-width: 720px) {
  .layout {
    width: calc(100vw - 18px);
    margin-top: 10px;
    margin-bottom: 18px;
  }

  .hero,
  .doc-header,
  .doc-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
