:root {
  --bg: #07111f;
  --bg2: #0b1730;
  --panel: rgba(13, 24, 45, 0.78);
  --panel2: rgba(16, 31, 57, 0.92);
  --text: #e5f3ff;
  --muted: #8ea7c6;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #67e8f9;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(96, 165, 250, 0.24), transparent 32rem),
    radial-gradient(circle at 82% 10%, rgba(167, 139, 250, 0.18), transparent 34rem),
    linear-gradient(140deg, var(--bg), var(--bg2) 55%, #050914);
  color: var(--text);
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.bg-orbit {
  position: fixed;
  border: 1px solid rgba(103, 232, 249, .12);
  border-radius: 999px;
  pointer-events: none;
  filter: blur(.2px);
}

.bg-orbit-one {
  width: 520px;
  height: 520px;
  left: -130px;
  top: 140px;
}

.bg-orbit-two {
  width: 680px;
  height: 680px;
  right: -220px;
  top: 70px;
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(103, 232, 249, .18), rgba(167, 139, 250, .18));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 34px rgba(96, 165, 250, .18);
}

.brand svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: .2px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(15, 23, 42, .45);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  backdrop-filter: blur(16px);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 9px 13px;
  border-radius: 999px;
  transition: .2s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .72fr);
  gap: 34px;
  align-items: center;
  min-height: 650px;
  padding: 56px 0 42px;
}

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(52, 211, 153, .26);
  background: rgba(6, 95, 70, .12);
  color: #b7ffe4;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 22px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  letter-spacing: -2.4px;
  margin: 0;
  max-width: 850px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 670px;
  margin: 24px 0 0;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 18px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--line);
  transition: .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 18px 44px rgba(96, 165, 250, .24);
  border-color: transparent;
}

.btn-soft {
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(12px);
}

.btn:hover { transform: translateY(-2px); }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
  max-width: 720px;
}

.hero-metrics div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(14px);
}

.metric-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}

.hero-metrics strong {
  font-size: 17px;
}

.ok { color: #bbf7d0; }

.gateway-card {
  border: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(180deg, var(--panel), rgba(7, 17, 31, .86));
  border-radius: 30px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.gateway-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 50% 0%, rgba(103, 232, 249, .22), transparent 38%);
  pointer-events: none;
}

.terminal-head {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  position: relative;
  z-index: 1;
}

.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
}

.terminal-head span:first-child { background: var(--red); }
.terminal-head span:nth-child(2) { background: var(--amber); }
.terminal-head span:nth-child(3) { background: var(--green); }

.terminal-head p {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.link-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 28px 0 22px;
  position: relative;
  z-index: 1;
}

.file-icon {
  width: 66px;
  height: 76px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(103, 232, 249, .18), rgba(167, 139, 250, .32));
  border: 1px solid rgba(255,255,255,.16);
  color: #e0f2fe;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.link-preview h2 {
  margin: 4px 0 6px;
  font-size: 25px;
  letter-spacing: -.6px;
}

.link-preview p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 10px;
  position: relative;
  z-index: 1;
}

.progress-row strong { color: var(--text); }

.progress {
  height: 10px;
  background: rgba(148, 163, 184, .14);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.request-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, .52);
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.request-box code {
  color: #bfdbfe;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-box span {
  color: #bbf7d0;
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 30px 0;
}

.cards article {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  margin-bottom: 18px;
}

.cards h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.cards p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.api-section {
  padding: 56px 0 70px;
}

.section-title p {
  margin: 0 0 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 12px;
  font-weight: 800;
}

.section-title h2 {
  margin: 0 0 22px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -1.4px;
}

.api-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 16px;
}

.endpoint-list,
.code-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}

.endpoint-list { padding: 10px; }

.endpoint {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 16px;
  border-radius: 17px;
  color: var(--text);
  transition: .2s ease;
}

.endpoint:hover,
.endpoint.active {
  background: rgba(255,255,255,.07);
}

.endpoint span {
  color: #bbf7d0;
  font-weight: 900;
  font-size: 12px;
}

.endpoint code {
  color: #dbeafe;
  font-size: 14px;
}

.code-panel {
  margin: 0;
  padding: 24px;
  overflow: auto;
  min-height: 260px;
}

.code-panel code {
  color: #c4b5fd;
  font-size: 14px;
  line-height: 1.7;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

footer p { margin: 0; }
footer span { font-size: 13px; }

.simple-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.message-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, .68);
  padding: 34px;
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(18px);
}

.message-card h1 {
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -1.8px;
  margin: 18px 0 12px;
}

.message-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 auto 24px;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.status-badge.danger {
  color: #fecdd3;
  background: rgba(190, 18, 60, .22);
}

.status-badge.warning {
  color: #fde68a;
  background: rgba(180, 83, 9, .22);
}

@media (max-width: 900px) {
  .topbar,
  footer { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .cards { grid-template-columns: 1fr; }
  .api-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding-top: 28px; }
  .hero-metrics { grid-template-columns: 1fr; }
  h1 { letter-spacing: -1.3px; }
  .gateway-card { border-radius: 22px; }
  .endpoint { grid-template-columns: 1fr; }
}
