:root {
  --base: #090d12;
  --canvas: #0d131a;
  --surface: #121a24;
  --raised: #182330;
  --border: #1f2e3f;
  --border-light: rgba(255, 255, 255, 0.08);
  --text: #f0f4f8;
  --text-muted: #9ab0c5;
  --dim: #6c8299;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --teal: #2dd4bf;
  --brand-gradient: linear-gradient(135deg, #2dd4bf 0%, #0ea5e9 55%, #6366f1 100%);
  --on-brand: #02121b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--base);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(45, 212, 191, 0.06), transparent);
  color: var(--text);
  font: 16px/1.65 "Plus Jakarta Sans", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 20px 80px; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 18px;
  padding: 10px 16px; margin-bottom: 56px;
  background: rgba(18, 26, 36, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light); border-radius: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav-links { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; font-size: 14px; }
.nav-links a { color: var(--text-muted); font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-links a.cta {
  color: var(--on-brand); background: var(--brand-gradient);
  padding: 7px 14px; border-radius: 9px;
}

.hero { text-align: center; max-width: 860px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); background: rgba(45, 212, 191, 0.09);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 18px; font-size: clamp(34px, 6vw, 58px); line-height: 1.08;
  letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 span {
  background: var(--brand-gradient); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero p.lead {
  margin: 0 auto 30px; max-width: 720px; font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-muted);
}
.providers {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
  margin: 0 0 30px; color: var(--dim); font-size: 13px; font-weight: 600;
}
.providers span {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 11px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--border); color: var(--text); background: var(--raised);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #2f465f; color: var(--text); }
.btn.primary { background: var(--brand-gradient); color: var(--on-brand); border-color: transparent; }
.btn.primary:hover { color: var(--on-brand); filter: brightness(1.06); }
.btn small { font-weight: 600; opacity: 0.75; }

.meta-line { margin-top: 16px; font-size: 13px; color: var(--dim); }
.meta-line code { color: var(--text-muted); }

.shot {
  margin: 44px 0 0; border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; background: var(--canvas);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.shot img { display: block; width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.grid-2 .shot { margin: 0; }

.trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 48px 0 0;
}
.trust div {
  padding: 16px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(18, 26, 36, 0.6); text-align: center;
}
.trust b { display: block; font-size: 14px; margin-bottom: 2px; }
.trust span { font-size: 12px; color: var(--dim); }

section { margin-top: 84px; scroll-margin-top: 24px; }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 34px);
  letter-spacing: -0.02em; font-weight: 800;
}
.section-head p { margin: 0; color: var(--text-muted); max-width: 680px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  padding: 22px; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, rgba(24, 35, 48, 0.55), rgba(13, 19, 26, 0.4));
}
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--text-muted); }

.download-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.download-table th, .download-table td {
  text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border);
}
.download-table th { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.download-table td:first-child { font-weight: 600; }
.download-table tr:last-child td { border-bottom: 0; }
.download-table .table-wrap { overflow-x: auto; }

.note {
  margin-top: 16px; padding: 14px 16px; border-radius: 11px;
  border: 1px solid rgba(56, 189, 248, 0.22); background: rgba(56, 189, 248, 0.06);
  color: var(--text-muted); font-size: 13px;
}

pre {
  margin: 0; padding: 18px; overflow-x: auto;
  background: #070b10; border: 1px solid var(--border); border-radius: 12px;
  font: 13px/1.7 "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #c9d7e4;
}
pre .c { color: var(--dim); }

.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(18, 26, 36, 0.55); padding: 0 18px;
}
.faq summary {
  cursor: pointer; padding: 15px 0; font-weight: 600; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--dim); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }

.footer {
  margin-top: 90px; padding-top: 28px; border-top: 1px solid var(--border);
  color: var(--dim); font-size: 13px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.footer-links a { color: var(--text-muted); }
.footer p { margin: 6px 0; }

@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding-top: 22px; }
  .nav { margin-bottom: 38px; }
  .cards { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero .buttons .btn { width: 100%; }
  section { margin-top: 62px; }
  .download-table th:nth-child(3),
  .download-table td:nth-child(3) { display: none; }
}

/* Live numbers under the download buttons (filled by stats.js). */
.stats { display: grid; gap: 12px; max-width: 620px; margin: 22px auto 0; text-align: left; }
.stats[hidden], .live[hidden] { display: none; }
.stats-downloads, .live { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.stats-total { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; }
.stats-total strong { color: var(--text); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 4px; }
.stats-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats-split > div { display: grid; gap: 4px; min-width: 0; }
.stats-split span { color: var(--dim); font-size: 12px; overflow-wrap: anywhere; }
.stats-split b { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.stats-split .bar { height: 4px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.stats-split .bar i { display: block; height: 100%; width: 0; background: var(--brand-gradient); border-radius: inherit; transition: width .6s ease; }
.stats-note { margin: 10px 0 0; color: var(--dim); font-size: 12px; line-height: 1.5; }
.live-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.live-top strong { font-size: 32px; line-height: 1; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.live-top span { color: var(--text-muted); font-size: 14px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.live-sub { margin: 10px 0 0; color: var(--dim); font-size: 13px; }
.live-countries { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.live-countries:empty { display: none; }
.live-countries li { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text-muted); }
.live-countries li b { color: var(--text); font-weight: 600; margin-left: 4px; }
@media (max-width: 520px) { .stats-split { gap: 8px; } .stats-split b { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } .stats-split .bar i { transition: none; } }
