:root {
  --bg: #0b0a14;
  --surface: #15132a;
  --surface-2: #1d1a38;
  --border: #2c2850;
  --text: #f4f2ff;
  --muted: #a9a3c9;
  --purple: #7c3aed;
  --orange: #f97316;
  --yellow: #fde047;
  --green: #22c55e;
  --grad: linear-gradient(135deg, var(--purple), var(--orange));
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 10, 20, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
header.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { width: 42px; height: 42px; }
.brand span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav.links { display: flex; gap: 28px; align-items: center; }
nav.links a { text-decoration: none; color: var(--muted); font-weight: 500; }
nav.links a:hover { color: var(--text); }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn:hover { filter: brightness(1.1); }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 10% auto; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,.35), transparent 60%);
  z-index: -1;
}
.hero img.logo-big { width: 120px; height: 120px; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.2rem; max-width: 640px; margin: 0 auto 32px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stats { display: flex; justify-content: center; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.stats div b { display: block; font-size: 2rem; }
.stats div span { color: var(--muted); font-size: .9rem; }

/* Sections */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head .eyebrow { color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 8px 0 12px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 1.5rem; margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }

/* Steps */
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 56px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 20px; left: 28px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--grad);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
}

/* Packages */
.packages { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.pkg { display: flex; flex-direction: column; position: relative; }
.pkg.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; }
.pkg .badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); padding: 4px 14px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap;
}
.pkg .price { font-size: 2.6rem; font-weight: 800; margin: 12px 0 0; }
.pkg .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.pkg .tagline { color: var(--muted); margin: 0 0 18px; }
.pkg ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pkg li { padding: 7px 0 7px 28px; position: relative; border-bottom: 1px solid var(--border); }
.pkg li:last-child { border-bottom: 0; }
.pkg li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.pkg .paypal { min-height: 50px; background: #fff; border-radius: 10px; padding: 10px 10px 2px; }
.pkg .paid { display: none; text-align: center; padding: 14px; border-radius: 10px; background: rgba(34,197,94,.12); color: var(--green); font-weight: 700; }

.custom-note { text-align: center; color: var(--muted); margin-top: 28px; }

/* Forms */
.form { display: grid; gap: 14px; max-width: 560px; margin: 0 auto; }
.form label { font-weight: 600; font-size: .9rem; display: grid; gap: 6px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit;
}
.form textarea { min-height: 110px; resize: vertical; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Dashboard */
.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi b { display: block; font-size: 1.9rem; margin-top: 4px; }
.kpi .delta { color: var(--green); font-size: .85rem; font-weight: 600; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress div { height: 100%; background: var(--grad); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chart-wrap { position: relative; height: 300px; }
.demo-banner { background: rgba(253,224,71,.1); border: 1px solid rgba(253,224,71,.35); color: var(--yellow); padding: 10px 16px; border-radius: 10px; font-size: .9rem; margin-bottom: 24px; }

@media (max-width: 760px) {
  nav.links .hide-sm { display: none; }
  nav.links { gap: 14px; font-size: .9rem; }
  .brand span { display: none; }
  section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
  .stats { gap: 28px; }
  .table-scroll { overflow-x: auto; }
}

/* PHP version additions */
.notice { max-width: 760px; margin: 0 auto 24px; padding: 14px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.notice.ok { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); color: var(--green); }
.notice.err { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.form.lookup { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 40px; }
.order-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.order-meta span { color: var(--muted); }
.admin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; align-items: end; max-width: none; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
td form { display: inline; }
@media (max-width: 560px) { .form.lookup { grid-template-columns: 1fr; } }

/* Client & admin areas */
.wrap.narrow { max-width: 620px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.break { word-break: break-all; }
.big { font-size: 1.4rem; }
.block { display: block; text-align: center; }
.tag { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; vertical-align: middle; }
tr.dim td { opacity: .5; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { margin: 4px 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.01em; }
.page-head p { margin: 0; }
.eyebrow { color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.card-title { margin: 0 0 14px; font-size: 1.05rem; }
.two-col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.span-2 { grid-column: span 2; min-width: 0; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 900px) { .span-2 { grid-column: auto; } }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.campaign-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.campaign-card { text-decoration: none; transition: border-color .15s; }
.campaign-card:hover { border-color: var(--purple); }
.campaign-card h3 { margin: 0; }
.status { font-weight: 600; font-size: .85rem; white-space: nowrap; }

.subnav { border-bottom: 1px solid var(--border); background: var(--surface); }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { padding: 14px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--text); }
.subnav a.active { color: var(--text); border-bottom-color: var(--orange); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pills a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--muted); font-size: .85rem; }
.pills a.active { background: var(--grad); color: #fff; border-color: transparent; }

form.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.linklike:hover { color: var(--text); }
.search { display: flex; gap: 8px; }
.search input { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; min-width: 240px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.form label.check, label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: auto; }
.code { display: flex; gap: 10px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.code code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: .85rem; color: var(--yellow); }
code.small { font-size: .8rem; color: var(--yellow); word-break: break-all; }

/* Package picker on the order page */
.packages.pick .pkg { cursor: pointer; }
.packages.pick input[type=radio] { position: absolute; opacity: 0; }
.packages.pick .pick-label { display: none; text-align: center; font-weight: 700; color: var(--green); }
.packages.pick .pkg:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.packages.pick .pkg:has(input:checked) .pick-label { display: block; }
.card.form { max-width: none; margin: 0; }
.eyebrow .code-id { text-transform: none; letter-spacing: 0; font-family: ui-monospace, monospace; }
nav.links a, nav.links .linklike { white-space: nowrap; }

/* Language selector */
.lang-menu { position: relative; }
.lang-menu summary { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--purple); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; min-width: 150px; box-shadow: 0 12px 30px rgba(0,0,0,.45); z-index: 20; }
nav.links .lang-list a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); }
nav.links .lang-list a:hover { background: var(--surface-2); }
nav.links .lang-list a.active { background: var(--surface-2); color: var(--orange); }
.brand img { flex-shrink: 0; }
@media (max-width: 480px) {
  header.nav .wrap { gap: 10px; }
  nav.links { gap: 10px; font-size: .82rem; }
  .lang-menu summary { padding: 5px 9px; font-size: .8rem; }
}

/* Buy now dialog */
.buy-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.buy-dialog::backdrop { background: rgba(5, 4, 12, .75); backdrop-filter: blur(3px); }
.buy-dialog .form { max-width: none; }
.buy-dialog .paypal { background: #fff; border-radius: 10px; padding: 10px 10px 2px; min-height: 50px; }

/* Target audience fields */
.tg { display: grid; gap: 14px; }
.tg fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px 16px; margin: 0; min-width: 0; }
.tg legend { padding: 0 6px; font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.tg .tg-num { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); display: inline-grid; place-items: center; font-size: .75rem; }
.tg label { font-weight: 600; font-size: .88rem; display: grid; gap: 6px; align-content: start; }
.tg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tg-grid .tg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg input, .tg select, .tg textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.tg [hidden] { display: none; }
.buy-dialog { width: min(640px, calc(100vw - 32px)); }
@media (max-width: 560px) { .tg-grid { grid-template-columns: 1fr; } }
.targeting-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.targeting-list dt { color: var(--muted); }
.targeting-list dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.tg .tg-label { display: block; }

/* PayPal's buttons and card form are made for a light background: give them a white panel everywhere. */
.paypal { background: #fff; color: #111; border-radius: 12px; padding: 14px 14px 6px; min-height: 60px; }
