:root {
  --bg: #0b0f19;
  --surface: #131a2a;
  --surface-hover: #1a2338;
  --border: #232f48;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --green: #10b981;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Navigation */
header { border-bottom: 1px solid var(--border); background: rgba(11, 15, 25, 0.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-box { width: 28px; height: 28px; background: linear-gradient(135deg, var(--accent), #6366f1); border-radius: 6px; display: grid; place-items: center; font-size: 0.9rem; color: #fff; }
.nav-links { display: flex; gap: 28px; font-size: 0.95rem; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.btn { background: var(--accent); color: #0b0f19; font-weight: 600; padding: 9px 18px; border-radius: 8px; font-size: 0.9rem; border: none; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface); }

/* Hero & Sections */
.hero { padding: 90px 0 70px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }
.dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); }
h1 { font-size: 3.1rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; max-width: 820px; margin: 0 auto 20px; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 36px; }
.hero-actions { display: flex; justify-content: center; gap: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 36px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 70px; }
.stat-item { text-align: center; }
.stat-val { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.85rem; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 80px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: 0.2s; }
.card:hover { border-color: #334155; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* Catalog Table */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 40px 0 24px; gap: 16px; flex-wrap: wrap; }
.search-input { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 10px 16px; border-radius: 8px; width: 330px; max-width: 100%; font-size: 0.95rem; outline: none; }
.search-input:focus { border-color: var(--accent); }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 80px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; background: rgba(15, 23, 42, 0.5); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-hover); }
.tag { background: #1e293b; color: var(--accent); padding: 3px 8px; border-radius: 4px; font-size: 0.78rem; font-family: monospace; }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 50px 0 80px; }
.sidebar { border-right: 1px solid var(--border); padding-right: 20px; }
.sidebar li { list-style: none; margin-bottom: 12px; color: var(--muted); font-size: 0.92rem; }
pre { background: #070a12; border: 1px solid var(--border); padding: 18px; border-radius: 8px; overflow-x: auto; font-size: 0.88rem; color: #e2e8f0; margin: 16px 0 28px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); display: none; place-items: center; z-index: 100; }
.modal { background: var(--surface); border: 1px solid var(--border); padding: 32px; border-radius: 12px; width: 100%; max-width: 420px; }
.modal h3 { margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.modal input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; }
.error-msg { color: #f87171; font-size: 0.85rem; margin-bottom: 12px; display: none; }

footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 0.88rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 768px) {
  h1 { font-size: 2.1rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .docs-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
