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

:root {
  --bg:         #060d1a;
  --bg2:        #0a1325;
  --bg3:        #0f1c34;
  --bg4:        #132240;
  --cyan:       #56b4cf;
  --cyan2:      #3a8fb0;
  --cyan-dim:   rgba(86, 180, 207, 0.08);
  --cyan-dim2:  rgba(86, 180, 207, 0.14);
  --cyan-glow:  rgba(86, 180, 207, 0.24);
  --green:      #4dc48a;
  --green2:     #2e9e60;
  --green-dim:  rgba(77, 196, 138, 0.09);
  --violet:     #8b75e8;
  --violet2:    #6444c8;
  --violet-dim: rgba(139, 117, 232, 0.1);
  --amber:      #d4903a;
  --amber-dim:  rgba(212, 144, 58, 0.09);
  --red:        #d95060;
  --red-dim:    rgba(217, 80, 96, 0.09);
  --text:       #ddeaf6;
  --muted:      #7aaabf;
  --faint:      #4e7490;
  --border:     rgba(255, 255, 255, 0.07);
  --border2:    rgba(255, 255, 255, 0.11);
  --card:       rgba(255, 255, 255, 0.03);
  --card2:      rgba(255, 255, 255, 0.055);
  --mono:       'JetBrains Mono', monospace;
  --sans:       'Inter', system-ui, sans-serif;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --r-sm:       6px;
  --r-md:       10px;
  --r-lg:       14px;
  --r-xl:       18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Background grid ─────────────────────────────── */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 5%, transparent 100%);
}

/* ── Blobs ───────────────────────────────────────── */
.blob { position: fixed; border-radius: 9999px; filter: blur(100px); pointer-events: none; z-index: 0; }
.blob-1 { width: 600px; height: 600px; background: rgba(86, 180, 207, 0.05); top: -200px; left: -150px; }
.blob-2 { width: 500px; height: 500px; background: rgba(77, 196, 138, 0.04); top: 40%; right: -200px; }
.blob-3 { width: 350px; height: 350px; background: rgba(139, 117, 232, 0.05); bottom: 0; left: 30%; }

/* ── Canvas (binary rain) ────────────────────────── */
#net-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 1;
}

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 0 28px;
  height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.3s, backdrop-filter 0.35s;
}
.nav.scrolled {
  background: rgba(4, 9, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-brand-name {
  font-family: var(--mono);
  font-size: 17px; font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.02em;
}
.nav-brand-name::before { content: '['; color: var(--faint); }
.nav-brand-name::after  { content: ']'; color: var(--faint); }
.nav-brand-by {
  font-size: 11px; font-family: var(--mono);
  color: var(--faint);
}

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  display: block; padding: 6px 12px;
  font-size: 13px; font-family: var(--mono);
  color: var(--muted); text-decoration: none;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--cyan); background: var(--cyan-dim); }
.nav-links a.active { color: var(--cyan); background: var(--cyan-dim); }

/* ── Footer ──────────────────────────────────────── */
.footer {
  position: relative; z-index: 10;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 28px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.2));
}
.footer p {
  font-size: 12px; font-family: var(--mono);
  color: var(--faint); line-height: 2;
}
.footer a { color: var(--cyan); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Main content wrapper ────────────────────────── */
.main {
  position: relative; z-index: 10;
  flex: 1;
  padding: 88px 40px 56px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.main-wide {
  max-width: 1100px;
}

/* ── Section ─────────────────────────────────────── */
.section { margin-bottom: 44px; }
.section-label {
  font-size: 13px; font-family: var(--mono); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::before {
  content: ''; display: inline-block;
  width: 20px; height: 1px;
  background: var(--cyan); opacity: 0.6;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.card-glow {
  box-shadow: 0 0 30px rgba(86, 180, 207, 0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── Metric cards ────────────────────────────────── */
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
}

.metric-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color 0.2s;
}
.metric-card:hover { border-color: var(--cyan-glow); }
.metric-card .m-label {
  font-size: 12px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #6a9ab8; margin-bottom: 10px; display: block;
}
.metric-card .m-value {
  font-family: var(--mono); font-size: 20px; font-weight: 700;
  color: var(--cyan);
}

/* ── Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-family: var(--mono); font-weight: 700;
  letter-spacing: 0.04em; border: 1px solid;
}
.badge-cyan   { background: var(--cyan-dim2);  border-color: rgba(86,180,207,0.3);   color: var(--cyan);   }
.badge-green  { background: var(--green-dim);  border-color: rgba(77,196,138,0.3);   color: var(--green);  }
.badge-violet { background: var(--violet-dim); border-color: rgba(139,117,232,0.3); color: var(--violet); }
.badge-amber  { background: var(--amber-dim);  border-color: rgba(212,144,58,0.3);  color: var(--amber);  }
.badge-red    { background: var(--red-dim);    border-color: rgba(217,80,96,0.3);   color: var(--red);    }

.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50%       { box-shadow: 0 0 0 5px transparent; opacity: 0.8; }
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px;
  font-size: 14px; font-weight: 600; font-family: var(--sans);
  border-radius: var(--r-md); border: none; cursor: pointer;
  text-decoration: none; transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--cyan);
  color: #07111f;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(86, 180, 207, 0.35);
}
.btn-primary:hover {
  background: #72c8e0;
  box-shadow: 0 6px 24px rgba(86, 180, 207, 0.5);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  color: var(--muted);
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.18); color: var(--text); }

/* ── Tabs ────────────────────────────────────────── */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 12px 22px;
  font-size: 15px; font-family: var(--mono); font-weight: 500;
  color: #6a9ab8;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover { color: var(--muted); }
.tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Form inputs ─────────────────────────────────── */
.input {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 11px 15px;
  font-size: 16px; font-family: var(--mono);
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.input:focus {
  border-color: rgba(86, 180, 207, 0.45);
  box-shadow: 0 0 0 3px rgba(86, 180, 207, 0.09);
}
.input::placeholder { color: var(--faint); }

.select {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 11px 15px;
  font-size: 16px; font-family: var(--mono);
  color: var(--text); outline: none; cursor: pointer;
  transition: border-color 0.2s;
}
.select:focus { border-color: rgba(86,180,207,0.45); }

.field-label {
  font-size: 13px; font-family: var(--mono); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #6a9ab8; display: block; margin-bottom: 6px;
}

/* ── Info boxes ──────────────────────────────────── */
.info-box {
  border-radius: var(--r-lg); padding: 20px;
  font-size: 15px; font-family: var(--mono);
  border: 1px solid; line-height: 1.75;
}
.info-box-green  { background: var(--green-dim);  border-color: rgba(77,196,138,0.2);   color: #9fffd4; }
.info-box-amber  { background: var(--amber-dim);  border-color: rgba(212,144,58,0.2);  color: #ffd580; }
.info-box-cyan   { background: var(--cyan-dim);   border-color: rgba(86,180,207,0.2);   color: #8ae8ff; }

/* ── Progress bar ────────────────────────────────── */
.progress-bar {
  height: 6px; border-radius: 99px;
  background: var(--bg3); overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.35s var(--ease);
}

/* ── Table ───────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 12px 16px;
  font-size: 12px; font-family: var(--mono); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #6a9ab8; border-bottom: 1px solid var(--border);
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 15px; color: var(--text);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--cyan-dim); }

/* ── Tool grid (home) ────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
@media (max-width: 540px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.22s, transform 0.22s var(--ease), box-shadow 0.22s;
  cursor: pointer;
  min-height: 220px;
  text-decoration: none; color: inherit;
}
.tool-card:hover {
  border-color: var(--tc-color, var(--cyan));
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--tc-color, var(--cyan));
  background: var(--bg3);
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--tc-color, var(--cyan));
  opacity: 0;
  transition: opacity 0.22s;
}
.tool-card:hover::before { opacity: 1; }
.tool-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.012), transparent);
  pointer-events: none;
}

/* decorative data fragment in card bg */
.tool-card-bg {
  position: absolute; bottom: 10px; right: 14px;
  font-family: var(--mono); font-size: 10px;
  color: var(--faint); opacity: 0.6;
  line-height: 1.6; text-align: right;
  pointer-events: none; user-select: none;
}

.tool-card-icon {
  font-size: 28px; line-height: 1;
}
.tool-card-name {
  font-size: 18px; font-weight: 700; font-family: var(--mono);
  color: var(--text);
}
.tool-card-desc {
  font-size: 15px; color: var(--muted); flex: 1; line-height: 1.6;
}
.tool-card-link {
  font-size: 13px; font-family: var(--mono); font-weight: 700;
  color: var(--tc-color, var(--cyan));
  text-decoration: none; margin-top: auto; padding-top: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.tool-card:hover .tool-card-link { opacity: 1; }

/* ── Coming soon ─────────────────────────────────── */
.coming-soon {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px; gap: 18px;
}
.coming-soon h1 {
  font-size: 32px; font-weight: 800; font-family: var(--mono);
  color: var(--cyan);
}
.coming-soon p {
  max-width: 500px; color: var(--muted);
  font-size: 15px; line-height: 1.7;
}

/* ── Verdict boxes ───────────────────────────────── */
.verdict {
  border-radius: var(--r-lg); padding: 14px 18px;
  font-size: 13px; font-family: var(--mono);
  border: 1px solid; margin-bottom: 20px; line-height: 1.6;
}
.verdict-ok  { background: var(--green-dim);  border-color: rgba(77,196,138,0.25);  color: #9fffd4; }
.verdict-warn { background: var(--amber-dim); border-color: rgba(212,144,58,0.25); color: #ffd580; }
.verdict-err  { background: var(--red-dim);   border-color: rgba(217,80,96,0.25);  color: #ff9aa3; }

/* ── Animations ──────────────────────────────────── */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.anim-up   { animation: fadeUp   0.7s var(--ease) both; }
.anim-up-2 { animation: fadeUp   0.7s var(--ease) 0.1s both; }
.anim-up-3 { animation: fadeUp   0.7s var(--ease) 0.2s both; }
.anim-up-4 { animation: fadeUp   0.7s var(--ease) 0.3s both; }

/* ── Utility ─────────────────────────────────────── */
.mono { font-family: var(--mono); }
.row  { display: flex; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ── Grad text ───────────────────────────────────── */
.grad-cyan {
  background: linear-gradient(135deg, #00e5ff 0%, #00ff88 60%, #00e5ff 100%);
  background-size: 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: grad-shift 5s ease infinite;
}
@keyframes grad-shift { 0%,100%{background-position:0%} 50%{background-position:100%} }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .main { padding: 72px 16px 40px; }
}
