@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}

:root {
  --bg: #05070a;
  --surface: #090e14;
  --surface-2: #0d151e;
  --line: rgba(0, 255, 156, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --ink: #e7f6ef;
  --ink-2: #9db6ab;
  --muted: #688277;
  --neon: #00ff9c;
  --cyan: #00e5ff;
  --amber: #ffb800;
  --danger: #ff4d6d;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(0, 255, 156, 0.25);
  color: #fff;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--cyan);
}

code,
pre {
  font-family: var(--mono);
}

/* Cyber Grid + Scanline Background ----------------------------------------- */
.cyber-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(800px 420px at 15% -5%, rgba(0, 255, 156, 0.12), transparent 65%),
    radial-gradient(700px 380px at 85% 5%, rgba(0, 229, 255, 0.1), transparent 65%),
    linear-gradient(rgba(0, 255, 156, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 38px 38px, 38px 38px;
}

.container {
  width: min(1220px, 100% - 32px);
  margin-inline: auto;
}

.neon-text {
  color: var(--neon);
  text-shadow: 0 0 18px rgba(0, 255, 156, 0.35);
}

.cyan-text {
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
}

.prompt {
  color: var(--neon);
  font-family: var(--mono);
}

/* Navbar ------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 7, 10, 0.86);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-bracket {
  color: var(--neon);
}

.brand-tag {
  color: var(--cyan);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 7px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--neon);
  background: rgba(0, 255, 156, 0.08);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 255, 156, 0.07);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--neon);
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.nav-toggle {
  display: none;
  padding: 7px 11px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--neon);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Terminal Window Component ------------------------------------------------ */
.terminal-window {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(9, 14, 20, 0.92);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55), 0 0 28px rgba(0, 255, 156, 0.06);
  overflow: hidden;
  min-width: 0;
}

.term-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line-soft);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.r { background: #ff5f56; }
.dot.y { background: #ffbd2e; }
.dot.g { background: #27c93f; }

.term-title {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chrome-action {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(0, 255, 156, 0.08);
  color: var(--neon);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.chrome-action:hover {
  background: rgba(0, 255, 156, 0.18);
}

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border: 1px solid var(--neon);
  background: rgba(0, 255, 156, 0.14);
  color: var(--neon);
  box-shadow: 0 0 20px rgba(0, 255, 156, 0.14);
}

.btn-primary:hover {
  background: rgba(0, 255, 156, 0.24);
  box-shadow: 0 0 26px rgba(0, 255, 156, 0.25);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Hero --------------------------------------------------------------------- */
.hero {
  padding: 46px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-desc {
  margin: 0 0 22px;
  color: var(--ink-2);
  max-width: 60ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.term-code {
  margin: 0;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
  color: var(--ink);
}

.c-dim { color: var(--muted); }
.c-neon { color: var(--neon); }
.c-cyan { color: var(--cyan); }
.c-amber { color: var(--amber); }

.stats-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(9, 14, 20, 0.78);
}

.stat-k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--neon);
  letter-spacing: 0.05em;
}

.stat-v {
  font-size: 17px;
  font-weight: 600;
}

.stat-d {
  font-size: 12.5px;
  color: var(--ink-2);
}

/* Sections ----------------------------------------------------------------- */
.section {
  padding: 46px 0;
  border-top: 1px solid var(--line-soft);
}

.section-head {
  margin-bottom: 24px;
}

.section-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--neon);
  letter-spacing: 0.06em;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
}

.section-head code,
.doc-card p code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
  font-size: 0.9em;
}

/* Generator & Live Preview ------------------------------------------------- */
.gen-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: start;
}

.gen-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.preset-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.chip {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip:hover,
.chip.active {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(0, 255, 156, 0.1);
}

.form-row {
  display: grid;
  gap: 12px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #060a0f;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(0, 255, 156, 0.12);
}

.gen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.output-stack {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.output-box {
  border-radius: 7px;
  border: 1px solid var(--line-soft);
  background: #05080c;
  overflow: hidden;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.output-box pre {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--neon);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-btn {
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(0, 255, 156, 0.08);
  color: var(--neon);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(0, 255, 156, 0.2);
}

.iframe-wrap {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.preview-foot strong {
  color: var(--cyan);
}

/* Docs Layout -------------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(9, 14, 20, 0.85);
}

.docs-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.docs-nav a:hover {
  color: var(--neon);
  background: rgba(0, 255, 156, 0.08);
}

.docs-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.doc-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(9, 14, 20, 0.88);
  scroll-margin-top: 82px;
  min-width: 0;
}

.doc-card h3 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--ink);
}

.doc-card p {
  margin: 0 0 14px;
  color: var(--ink-2);
}

.code-block {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #04070b;
  overflow: hidden;
  max-width: 100%;
}

.code-block.compact {
  margin-top: 8px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: rgba(0, 255, 156, 0.05);
  border-bottom: 1px solid rgba(0, 255, 156, 0.14);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.code-block pre {
  margin: 0;
  padding: 13px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #d6f5e6;
  overflow-x: auto;
}

.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.endpoint-item {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
}

.endpoint-item p {
  margin: 8px 0 0;
  font-size: 13.5px;
}

.ep-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ep-head code {
  font-size: 13.5px;
  color: var(--neon);
  word-break: break-all;
}

.method {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 255, 156, 0.15);
  border: 1px solid var(--line);
  color: var(--neon);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.method.alt {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--cyan);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
}

.cyber-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 13px;
}

.cyber-table th,
.cyber-table td {
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.cyber-table th {
  background: rgba(0, 255, 156, 0.06);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cyber-table tr:last-child td {
  border-bottom: 0;
}

.cyber-table td code {
  color: var(--cyan);
}

.tester-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

#tester-output {
  max-height: 320px;
}

/* Footer & Toast ----------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 24px 0 36px;
  background: rgba(5, 7, 10, 0.9);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 80;
  transform: translate(-50%, 16px);
  padding: 9px 16px;
  border-radius: 7px;
  border: 1px solid var(--neon);
  background: rgba(6, 11, 16, 0.96);
  color: var(--neon);
  font-family: var(--mono);
  font-size: 12.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive Breakpoints (Tablet & Mobile) --------------------------------- */
@media (max-width: 1024px) {
  .hero-grid,
  .gen-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .status-pill {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 7, 10, 0.98);
  }

  .nav-links.open {
    display: flex;
  }

  .three-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 22px);
  }

  .hero {
    padding-top: 28px;
  }

  .stats-grid,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .doc-card {
    padding: 16px;
  }

  .gen-actions .btn,
  .hero-cta .btn,
  .tester-controls .btn {
    width: 100%;
  }
}
