*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0f14;
  --surface: #161a23;
  --border: #252a36;
  --accent: #5b8dee;
  --accent2: #3ecf8e;
  --text: #e8ecf4;
  --muted: #7a8499;
  --code-bg: #0a0c10;
  --radius: 10px;
  color-scheme: dark;
}
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 2rem; border-bottom: 1px solid var(--border); gap: 1rem; flex-wrap: wrap; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -.5px; color: var(--text); }
.logo span { color: var(--accent); }
a.logo:hover { text-decoration: none; }
nav .nav-links { display: flex; gap: 1.5rem; font-size: .9rem; flex-wrap: wrap; }
nav .cta { background: var(--accent); color: #fff; padding: .45rem 1rem; border-radius: 6px; font-size: .875rem; font-weight: 600; }
nav .cta:hover { background: #4a7de0; text-decoration: none; }

/* HERO */
.hero { text-align: center; padding: 6rem 2rem 4rem; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 1.25rem auto 0; max-width: 560px; color: var(--muted); font-size: 1.1rem; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 2.25rem; flex-wrap: wrap; }
.badge { display: inline-block; background: rgba(62,207,142,.12); color: var(--accent2); font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 20px; margin-bottom: 1rem; letter-spacing: .5px; text-transform: uppercase; }

/* BUTTONS */
.btn-primary, .btn-secondary, button {
  font: inherit;
  cursor: pointer;
  border-radius: 7px;
  font-weight: 600;
  font-size: .95rem;
}
.btn-primary, button.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: .65rem 1.5rem;
  border: none;
  display: inline-block;
}
.btn-primary:hover, button.btn-primary:hover { background: #4a7de0; text-decoration: none; }
button.btn-primary:disabled {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  opacity: 1;
}
.btn-secondary, button.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .65rem 1.5rem;
  display: inline-block;
}
.btn-secondary:hover, button.btn-secondary:hover { border-color: var(--muted); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* STATS ROW */
.stats { display: flex; justify-content: center; gap: 3rem; padding: 2.5rem 2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: .2rem; }

/* SECTION */
section { padding: 4.5rem 2rem; max-width: 1100px; margin: 0 auto; }
section h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; text-align: center; }

/* CARDS / GRIDS */
.categories, .sdk-grid, .pricing-grid, .account-grid {
  display: grid;
  gap: 1rem;
}
.categories, .sdk-grid, .account-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.category-card, .sdk-card, .plan, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.cat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.cat-name { font-weight: 700; font-size: 1rem; }
.cat-count { font-size: .75rem; background: rgba(91,141,238,.15); color: var(--accent); padding: .15rem .5rem; border-radius: 4px; font-weight: 700; }
.cat-endpoints { font-size: .8rem; color: var(--muted); line-height: 1.8; font-family: "SF Mono", Menlo, monospace; }
.cat-price { margin-top: .75rem; font-size: .75rem; color: var(--accent2); font-weight: 700; }
.sdk-card h3, .card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; text-align: left; }
.sdk-card .install { font-family: "SF Mono", Menlo, monospace; font-size: .8rem; background: var(--code-bg); padding: .4rem .75rem; border-radius: 6px; color: var(--accent2); margin: .75rem 0; display: block; }
.sdk-card .install a { color: inherit; text-decoration: none; }
.sdk-card p, .card p { font-size: .85rem; color: var(--muted); }

/* CODE BLOCK */
.code-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
pre { background: var(--code-bg); padding: 1.5rem; overflow-x: auto; font-size: .85rem; line-height: 1.7; }
code { font-family: "SF Mono", Menlo, monospace; color: #c9d1d9; }
.hl-k { color: #ff7b72; }
.hl-s { color: #a5d6ff; }
.hl-c { color: var(--muted); }
.hl-n { color: var(--accent2); }

/* PRICING */
.plan { padding: 1.75rem; }
.plan.featured { border-color: var(--accent); }
.plan-name { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.plan-price { font-size: 2.25rem; font-weight: 800; margin: .5rem 0; }
.plan-price sub { font-size: .85rem; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.plan li { font-size: .9rem; color: var(--muted); }
.plan li::before { content: "✓ "; color: var(--accent2); font-weight: 700; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
td code { font-family: "SF Mono", Menlo, monospace; font-size: .8rem; color: var(--accent); }

/* FORMS */
label { display: block; font-weight: 600; font-size: .85rem; margin: 1rem 0 .4rem; }
label:first-child { margin-top: 0; }
input, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: .7rem .85rem;
}
input:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
input[type="file"] { padding: .45rem .55rem; color: var(--muted); }
input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  font-size: .85rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .4rem .75rem;
  margin-right: .75rem;
  cursor: pointer;
}
input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--accent); padding: 0; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
small { display: block; color: var(--muted); margin-top: .75rem; font-size: .8rem; line-height: 1.5; }
.status { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); margin-top: 1.25rem; }
#balance { color: var(--accent2); font-weight: 700; margin-top: 1rem; }
#table td, #table th { max-width: 260px; overflow-wrap: anywhere; }
#summary { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
#results { margin-top: 1rem; }

/* FOOTER */
footer { border-top: 1px solid var(--border); text-align: center; padding: 2.5rem 2rem; color: var(--muted); font-size: .85rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  nav { padding: 1rem; flex-direction: column; align-items: flex-start; }
  nav .nav-links { gap: .85rem; }
  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  section { padding: 3rem 1.25rem; }
  .stats { gap: 1.5rem; padding: 1.75rem 1.25rem; }
  .actions { flex-direction: column; }
  .actions .btn-primary, .actions .btn-secondary { width: 100%; text-align: center; }
}
