:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-glow: rgba(124,58,237,.15);
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-hover: #242836;
  --border: #2a2d3a;
  --text: #e4e4e7;
  --text-muted: #8b8fa3;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 8px;
  --radius-lg: 14px;
  --max-width: 1100px;
}
[data-theme="light"] {
  --bg: #fafafa;
  --bg-card: #fff;
  --bg-hover: #f4f4f5;
  --border: #e4e4e7;
  --text: #18181b;
  --text-muted: #71717a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(15,17,23,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
[data-theme="light"] .nav { background: rgba(250,250,250,.85); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); min-height: 40px; }
.logo-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: #b0b5c0; font-size: .875rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.lang-select { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; font-size: .8rem; font-family: inherit; cursor: pointer; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }
.mobile-menu { display: none; }
.mobile-menu:not(.hidden) { position: fixed; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; z-index: 99; }
.mobile-menu a { font-size: .95rem; font-weight: 500; color: var(--text); }
.mobile-menu .btn-primary { display: inline-flex; width: fit-content; }
.mobile-menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.hidden { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius); font-weight: 600; font-size: .875rem; border: none; cursor: pointer; transition: all .15s; white-space: nowrap; font-family: inherit; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; box-shadow: 0 4px 20px var(--primary-glow); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.nav .btn-outline { border-color: rgba(255,255,255,.18); color: #d0d3db; }
.btn-lg { padding: 13px 30px; font-size: .95rem; border-radius: var(--radius-lg); }

.hero { padding: 140px 24px 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%); pointer-events: none; }
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-glow); color: var(--primary); padding: 6px 16px; border-radius: 24px; font-size: .8rem; font-weight: 600; margin-bottom: 24px; letter-spacing: .02em; }
.hero-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.hero h1 { font-size: clamp(2.2rem,5.5vw,3.4rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -.02em; }
.hero-sub { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 36px; line-height: 1.65; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.hero-code { text-align: left; max-width: 600px; margin: 0 auto; }
.hero-code pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 26px; overflow-x: auto; font-size: .78rem; line-height: 1.75; }
.hero-code code { color: var(--text); font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; }
.hero-code code .hl { color: var(--primary); }

section { padding: 90px 24px; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-header h2 { font-size: 1.85rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -.01em; }
.section-header p { color: var(--text-muted); font-size: 1rem; }

.products { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: var(--max-width); margin: 0 auto; }
.product-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; transition: border-color .2s, box-shadow .2s; }
.product-card:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-glow); }
.product-card .prod-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-glow); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }
.product-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.product-card p { color: var(--text-muted); font-size: .88rem; margin-bottom: 14px; line-height: 1.55; }
.product-card .prod-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.product-card .prod-tag { background: var(--bg-hover); color: var(--text-muted); padding: 3px 12px; border-radius: 14px; font-size: .72rem; font-weight: 500; letter-spacing: .01em; }

.pricing { max-width: var(--max-width); margin: 0 auto; }
.pricing-table { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pricing-row { display: grid; grid-template-columns: 2fr 1fr 1fr; padding: 15px 26px; align-items: center; border-bottom: 1px solid var(--border); font-size: .9rem; }
.pricing-row:last-child { border-bottom: none; }
.pricing-row.header { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; background: var(--bg-hover); padding: 12px 26px; }
.pricing-row .model-name { font-weight: 600; font-size: .92rem; }
.pricing-row .price { text-align: right; font-variant-numeric: tabular-nums; font-family: 'SF Mono', 'Fira Code', monospace; font-size: .85rem; }

.integrate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; max-width: var(--max-width); margin: 0 auto; }
.integrate-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.integrate-card .lang-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; margin-bottom: 12px; color: var(--primary); }
.integrate-card .lang-label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }
.integrate-card pre { background: var(--bg); border-radius: var(--radius); padding: 16px; overflow-x: auto; font-size: .75rem; line-height: 1.65; }
.integrate-card code { font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; color: var(--text); }
.integrate-card p { color: var(--text-muted); font-size: .88rem; line-height: 1.55; }
.api-host-span { color: var(--primary); font-weight: 500; }

.trust { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; max-width: var(--max-width); margin: 0 auto; }
.trust-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.trust-card .trust-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--primary-glow); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.trust-card .trust-icon svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 2; }
.trust-card strong { display: block; font-size: .95rem; margin-bottom: 6px; }
.trust-card p { color: var(--text-muted); font-size: .84rem; line-height: 1.55; }

.cta-bottom { text-align: center; }
.cta-bottom::before { content: ""; display: block; width: 1px; height: 40px; background: var(--border); margin: 0 auto 32px; }
.cta-inner { max-width: 480px; margin: 0 auto; }
.cta-bottom h2 { font-size: 1.7rem; margin-bottom: 8px; }
.cta-bottom p { color: var(--text-muted); margin-bottom: 28px; font-size: 1rem; }

.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 48px 24px 24px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-col strong { display: block; font-size: .88rem; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: var(--text-muted); font-size: .84rem; margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { max-width: var(--max-width); margin: 36px auto 0; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: .78rem; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .hero { padding: 110px 16px 60px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-code pre { padding: 16px; font-size: .7rem; }
  section { padding: 60px 16px; }
  .pricing-row { grid-template-columns: 1fr 1fr 1fr; padding: 12px 16px; }
  .pricing-row .model-name { font-size: .8rem; }
  .pricing-row .price { font-size: .75rem; }
  .section-header h2 { font-size: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
