:root {
  --bg: #080c10;
  --bg2: #05080b;
  --surface: #0d1318;
  --surface-2: #111923;
  --border: #1a2332;
  --border-bright: #27384d;
  --text: #c8d8e8;
  --text-dim: #6f88a5;
  --text-muted: #3d536c;
  --white: #ffffff;
  --accent: #00d4ff;
  --accent-2: #7c5cff;
  --accent-dim: #006680;
  --accent-glow: rgba(0, 212, 255, 0.12);
  --green: #00ff88;
  --green-dim: rgba(0, 255, 136, 0.1);
  --amber: #ffaa00;
  --red: #ff4f68;
  --shadow: 0 24px 80px rgba(0,0,0,.38);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .38;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: -30%;
  right: -20%;
  width: 75vw;
  height: 75vw;
  background: radial-gradient(circle, rgba(0,212,255,.07), rgba(124,92,255,.03) 35%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

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

.site-shell { position: relative; z-index: 1; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,12,16,.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0,212,255,.42);
  background: linear-gradient(135deg, rgba(0,212,255,.18), rgba(124,92,255,.12));
  display: grid;
  place-items: center;
  box-shadow: 0 0 32px rgba(0,212,255,.09);
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  font-size: 1.1rem;
}
.logo-text span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a {
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: color .18s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  padding: 3px;
  background: rgba(13,19,24,.8);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button.active { background: var(--accent); color: #001015; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #001015; border-color: var(--accent); }
.btn-primary:hover { background: #35ddff; }
.btn-ghost { background: rgba(13,19,24,.45); color: var(--text-dim); border-color: var(--border-bright); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent-dim); }
.btn-large { min-height: 50px; padding: 14px 24px; font-size: .9rem; }
.mobile-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 118px 48px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  background: var(--accent-glow);
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px rgba(0,255,136,.5); }
h1 {
  font-family: 'Syne', sans-serif;
  color: #fff;
  font-weight: 800;
  font-size: clamp(3rem, 5.3vw, 5.35rem);
  line-height: .98;
  letter-spacing: -.055em;
  max-width: 850px;
}
h1 em { font-style: normal; color: var(--accent); }
.lead {
  max-width: 700px;
  margin-top: 26px;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.85;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 44px;
  max-width: 760px;
}
.trust-item {
  border: 1px solid var(--border);
  background: rgba(13,19,24,.58);
  border-radius: 14px;
  padding: 18px;
}
.trust-value {
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 1.15rem;
  margin-bottom: 5px;
}
.trust-label { color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.gateway-card {
  border: 1px solid var(--border-bright);
  background: linear-gradient(180deg, rgba(17,25,35,.92), rgba(8,12,16,.94));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,12,16,.56);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); }
.dot.red { background: #ff5f57; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #28c840; }
.card-url { margin-left: auto; font-family: 'DM Mono', monospace; color: var(--text-muted); font-size: .72rem; }
.gateway-body { padding: 22px; }
.console-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.console-tile {
  border: 1px solid var(--border);
  background: rgba(8,12,16,.5);
  border-radius: 14px;
  padding: 18px;
}
.console-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; margin-bottom: 9px; }
.console-value { color: #fff; font-family: 'DM Mono', monospace; font-size: 1.25rem; }
.traffic {
  margin-top: 16px;
  min-height: 230px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(5,8,11,.64);
  padding: 18px;
  display: flex;
  align-items: end;
  gap: 8px;
}
.bar { flex: 1; min-width: 6px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--accent), rgba(0,212,255,.18)); }
.log-line {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,255,136,.06);
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
}
.log-line strong { color: var(--green); }

section { position: relative; z-index: 1; }
.section { max-width: 1240px; margin: 0 auto; padding: 82px 48px; }
.section-kicker { font-family: 'DM Mono', monospace; color: var(--accent); text-transform: uppercase; font-size: .72rem; letter-spacing: .14em; margin-bottom: 14px; }
.section-title { font-family: 'Syne', sans-serif; font-size: clamp(2rem, 3vw, 3rem); color: #fff; letter-spacing: -.035em; line-height: 1.08; max-width: 790px; }
.section-sub { color: var(--text-dim); line-height: 1.78; max-width: 760px; margin-top: 16px; }
.cards { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  border: 1px solid var(--border);
  background: rgba(13,19,24,.62);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 240px;
}
.card-icon { width: 42px; height: 42px; border: 1px solid var(--accent-dim); border-radius: 12px; display: grid; place-items: center; background: var(--accent-glow); color: var(--accent); margin-bottom: 24px; }
.card h3 { color: #fff; font-family: 'Syne', sans-serif; margin-bottom: 12px; font-size: 1.15rem; }
.card p { color: var(--text-dim); line-height: 1.72; font-size: .92rem; }

.split { display: grid; grid-template-columns: .95fr 1.05fr; gap: 42px; align-items: start; }
.table-card {
  border: 1px solid var(--border-bright);
  background: rgba(13,19,24,.7);
  border-radius: 20px;
  overflow: hidden;
}
.table-row { display: grid; grid-template-columns: 1.1fr .8fr .8fr .7fr; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); align-items: center; }
.table-row:last-child { border-bottom: 0; }
.table-head { color: var(--text-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: .78rem; font-weight: 700; }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 14px currentColor; }
.code-panel { border: 1px solid var(--border); background: #05080b; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.code-head { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-family: 'DM Mono', monospace; font-size: .72rem; }
pre { margin: 0; padding: 22px; overflow-x: auto; color: #a8c7dc; font-family: 'DM Mono', monospace; line-height: 1.72; font-size: .82rem; }
.kw { color: #cc99ff; } .str { color: #99ff88; } .key { color: var(--accent); } .num { color: #ffcc66; } .cm { color: var(--text-muted); }

.cta {
  max-width: 1140px;
  margin: 40px auto 90px;
  padding: 48px;
  border: 1px solid var(--accent-dim);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(0,212,255,.13), rgba(124,92,255,.09), rgba(13,19,24,.8));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta h2 { color: #fff; font-family: 'Syne', sans-serif; font-size: clamp(1.7rem, 3vw, 2.6rem); letter-spacing: -.035em; }
.cta p { color: var(--text-dim); margin-top: 10px; max-width: 620px; line-height: 1.65; }

.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: rgba(5,8,11,.5); padding: 38px 48px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; color: var(--text-muted); font-size: .82rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { text-decoration: none; color: var(--text-dim); }
.footer a:hover { color: var(--accent); }

.form-page { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 64px 24px; position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 440px; border: 1px solid var(--border-bright); background: rgba(13,19,24,.88); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); }
.auth-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-glow); border: 1px solid var(--accent-dim); color: var(--accent); margin-bottom: 22px; }
.auth-card h1 { font-size: 2rem; line-height: 1.1; margin-bottom: 10px; }
.auth-card p { color: var(--text-dim); line-height: 1.6; margin-bottom: 24px; }
.form { display: grid; gap: 16px; }
.field label { display: block; color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--border-bright);
  background: rgba(5,8,11,.62);
  color: #fff;
  border-radius: 10px;
  padding: 13px 14px;
  outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.alert { display: none; border-radius: 10px; padding: 12px 14px; font-size: .85rem; line-height: 1.5; }
.alert.show { display: block; }
.alert.error { background: rgba(255,79,104,.09); border: 1px solid rgba(255,79,104,.35); color: #ffb3bf; }
.alert.success { background: rgba(0,255,136,.08); border: 1px solid rgba(0,255,136,.28); color: #baffdc; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.66); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 200; }
.modal-backdrop.open { display: flex; }
.modal { width: min(620px, 100%); border: 1px solid var(--border-bright); border-radius: 24px; background: #0b1016; box-shadow: var(--shadow); padding: 28px; position: relative; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-dim); border-radius: 10px; cursor: pointer; }
.modal h2 { font-family: 'Syne', sans-serif; color: #fff; font-size: 1.8rem; margin-bottom: 8px; }
.modal p { color: var(--text-dim); line-height: 1.6; margin-bottom: 22px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 300; display: grid; gap: 10px; }
.toast-item { border: 1px solid var(--border-bright); background: #0b1016; color: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 280px; }
.toast-item.success { border-color: rgba(0,255,136,.35); }
.toast-item.error { border-color: rgba(255,79,104,.45); }

.console-page { position: relative; z-index: 1; padding: 42px 48px 82px; max-width: 1240px; margin: 0 auto; }
.console-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.console-header h1 { font-size: clamp(2.2rem, 4vw, 4rem); }
.dashboard-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin: 28px 0; }
.dashboard-card { border: 1px solid var(--border); background: rgba(13,19,24,.7); border-radius: 18px; padding: 20px; }
.dashboard-card .label { color: var(--text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.dashboard-card .value { margin-top: 9px; color: #fff; font-family: 'DM Mono', monospace; font-size: 1.55rem; }

.docs-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 280px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; padding: 42px 48px 82px; gap: 42px; }
.docs-sidebar { border: 1px solid var(--border); background: rgba(13,19,24,.55); border-radius: 18px; padding: 22px; height: fit-content; position: sticky; top: 92px; }
.docs-sidebar a { display: block; padding: 9px 0; color: var(--text-dim); text-decoration: none; font-size: .85rem; }
.docs-sidebar a:hover { color: var(--accent); }
.docs-content h1 { font-size: clamp(2.2rem, 4vw, 4rem); }
.docs-content h2 { font-family: 'Syne', sans-serif; color: #fff; margin-top: 42px; padding-top: 36px; border-top: 1px solid var(--border); }
.docs-content p, .docs-content li { color: var(--text-dim); line-height: 1.78; margin-top: 13px; }
.docs-content code { color: var(--accent); font-family: 'DM Mono', monospace; background: rgba(13,19,24,.82); border: 1px solid var(--border); padding: 2px 6px; border-radius: 5px; }
.endpoint { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); background: rgba(13,19,24,.7); border-radius: 12px; padding: 14px 16px; margin-top: 12px; font-family: 'DM Mono', monospace; color: var(--text-dim); }
.method { color: #001015; background: var(--accent); border-radius: 5px; padding: 3px 8px; font-size: .72rem; font-weight: 800; }

@media (max-width: 980px) {
  .nav { padding: 0 20px; }
  .mobile-toggle { display: block; }
  .nav-links { position: fixed; left: 18px; right: 18px; top: 78px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 18px; border: 1px solid var(--border); background: #0b1016; border-radius: 18px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-actions .btn-ghost { display: none; }
  .hero, .split { grid-template-columns: 1fr; }
  .hero { padding: 86px 24px 54px; }
  .section { padding: 64px 24px; }
  .cards, .trust-strip, .dashboard-grid { grid-template-columns: 1fr; }
  .console-grid { grid-template-columns: 1fr; }
  .table-row { grid-template-columns: 1fr; }
  .cta { margin: 28px 24px 70px; padding: 30px; display: block; }
  .cta .btn { margin-top: 22px; }
  .footer { padding: 30px 24px; }
  .footer-inner { flex-direction: column; }
  .docs-layout { grid-template-columns: 1fr; padding: 32px 24px 64px; }
  .docs-sidebar { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .console-page { padding: 32px 24px 64px; }
}
