@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #05070e;
  --bg-soft: #090e1c;
  --surface: rgba(12, 18, 34, 0.84);
  --surface-solid: #0c1222;
  --surface-2: #131c33;
  --surface-hover: #192440;
  --border: rgba(148, 163, 184, 0.14);
  --border-highlight: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(99, 102, 241, 0.48);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-bright: #818cf8;
  --primary-2: #22d3ee;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.62);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(960px 520px at 10% -8%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(760px 440px at 90% -4%, rgba(34, 211, 238, 0.13), transparent 55%),
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.58;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
code, pre { font-family: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace; }
code {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.88em;
}
pre code { background: none; border: none; padding: 0; color: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.42); }

.container { max-width: 1220px; margin: 0 auto; padding: 0 22px; }

.announce-bar {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.11), rgba(99, 102, 241, 0.16));
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: #dbeafe;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(5, 7, 14, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.025em;
  text-transform: lowercase;
}
.brand-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.24);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 52%, #22d3ee 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.36), inset 0 1px 0 rgba(255,255,255,0.35);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
}
.nav-links a {
  padding: 7px 12px;
  border-radius: 9px;
  transition: all 0.16s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.nav-links a.active {
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.16);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.32);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.32), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #7477ff 0%, #5b52f0 100%);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.42), inset 0 1px 0 rgba(255,255,255,0.28);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  background: rgba(19, 28, 51, 0.9);
  border-color: var(--border);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--border-highlight);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.35);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.38);
  color: #fecaca;
  box-shadow: none;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.6); box-shadow: none; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn-lg { padding: 13px 24px; font-size: 14.5px; border-radius: 12px; font-weight: 700; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.32);
  color: #c7d2fe;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text-soft);
}
.badge.ok, .badge.ready { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.32); color: #4ade80; }
.badge.warn, .badge.processing, .badge.queued { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.32); color: #fbbf24; }
.badge.err, .badge.failed { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.34); color: #f87171; }
.badge.cyan { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.3); color: #67e8f9; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
  background: var(--green); box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

.card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--border-highlight);
}
.feature-card {
  position: relative;
  overflow: hidden;
  background: rgba(12, 18, 34, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.7), rgba(34, 211, 238, 0.6));
  opacity: 0.6;
}
.feature-card:hover { transform: translateY(-2px); border-color: var(--border-strong); background: rgba(16, 24, 46, 0.92); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.stat-card {
  background: rgba(12, 18, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 var(--border-highlight);
}
.stat-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.grad-text {
  background: linear-gradient(125deg, #ffffff 10%, #a5b4fc 52%, #22d3ee 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.field textarea { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 12px; min-height: 90px; resize: vertical; }

.tabs {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 12px;
  background: rgba(9, 14, 28, 0.85);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(34, 211, 238, 0.14));
  border-color: rgba(129, 140, 248, 0.42);
  color: #f1f5f9;
}

.code-box {
  background: #03050c;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.code-head-left { display: flex; align-items: center; gap: 9px; }
.win-dots { display: inline-flex; gap: 5px; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.win-dots i:nth-child(1) { background: rgba(239, 68, 68, 0.72); }
.win-dots i:nth-child(2) { background: rgba(245, 158, 11, 0.72); }
.win-dots i:nth-child(3) { background: rgba(34, 197, 94, 0.72); }
.code-box pre { padding: 15px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.65; color: #d1d5db; }

.alert {
  padding: 12px 15px;
  border-radius: 11px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.alert.show { display: block; }
.alert.ok { border-color: rgba(34, 197, 94, 0.42); background: rgba(34, 197, 94, 0.1); color: #bbf7d0; }
.alert.err { border-color: rgba(239, 68, 68, 0.42); background: rgba(239, 68, 68, 0.1); color: #fecaca; }

.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 10px; }
.section-head p { color: var(--text-muted); font-size: 15px; }

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 70px;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(4, 6, 12, 0.65);
}

@media (max-width: 920px) {
  .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
