/* ===== Ai ZaxBot · Help Center shared stylesheet (dark theme) ===== */
:root {
  --bg: #0a0e1a;
  --bg2: #0d1322;
  --card: #131a2b;
  --card2: #19223a;
  --line: #232d46;
  --line2: #2c3650;
  --ink: #e7ebf5;
  --muted: #8b95ad;
  --faint: #5d6b8a;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #f43f5e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", "Noto Sans Thai", sans-serif;
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(99, 102, 241, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(139, 92, 246, .08), transparent 55%),
    var(--bg);
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2a3450; border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== sticky top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(10, 14, 26, .72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .02);
}
.topbar .back:hover { color: var(--ink); text-decoration: none; border-color: var(--accent); }
.topbar .brand { display: flex; align-items: center; gap: 9px; margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; }
.topbar .brand .mark { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 14px; box-shadow: 0 4px 14px rgba(99, 102, 241, .4); }
.topbar .brand small { color: var(--muted); font-weight: 400; }

/* ===== language switcher (injected by i18n.js) ===== */
.langsw { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; background: var(--card2); border: 1px solid var(--line); border-radius: 999px; }
.langbtn { border: none; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s; }
.langbtn:hover { color: var(--ink); }
.langbtn.on { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(99, 102, 241, .35); }
.topbar .brand { margin-left: 12px; }

/* ===== page wrap ===== */
.wrap { max-width: 860px; margin: 0 auto; padding: 30px 20px 90px; position: relative; }

/* ===== back-to-all link ===== */
.backlink { color: var(--muted); font-size: 14px; font-weight: 600; }
.backlink:hover { color: var(--ink); }

/* ===== hero ===== */
.hero { margin-bottom: 22px; }
.hero h1 { font-size: 32px; line-height: 1.3; margin: 14px 0 14px; font-weight: 800; }
.hero p, .hero .intro { color: var(--muted); font-size: 16px; margin: 14px 0 0; max-width: 680px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== badges row (difficulty + time + updated) ===== */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 6px 0 4px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.diff { font-weight: 700; }
.badge.diff.easy { color: var(--green); background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); }
.badge.diff.med  { color: var(--amber); background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
.badge.diff.hard { color: var(--red); background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .35); }

/* legacy inline difficulty pill (kept for compatibility) */
.diff { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; vertical-align: middle; }
.diff.easy { color: var(--green); background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .35); }
.diff.med  { color: var(--amber); background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35); }
.diff.hard { color: var(--red); background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .35); }

/* ===== video banner CTA ===== */
.video-banner {
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .38);
  margin: 22px 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: filter .15s, transform .15s;
}
.video-banner:hover { filter: brightness(1.07); transform: translateY(-1px); text-decoration: none; }
.video-banner .play {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.video-banner .vb-sub { display: block; font-weight: 400; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.video-note {
  display: none;
  margin: -2px 0 14px;
  padding: 11px 15px;
  border-radius: 11px;
  font-size: 14px;
  background: rgba(99, 102, 241, .10);
  border: 1px solid rgba(99, 102, 241, .35);
  color: var(--ink);
}
.video-note.show { display: block; }

/* ===== headings ===== */
h1 { font-size: 28px; font-weight: 800; line-height: 1.3; }
h2 { font-size: 21px; font-weight: 700; margin: 38px 0 14px; padding-top: 8px; }
h3 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
hr { border: none; border-top: 1px solid var(--line); margin: 34px 0; }

/* ===== cards ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); margin-bottom: 18px; }
.card h2 { margin-top: 4px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* ===== prerequisites box ===== */
.prereq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0;
}
.prereq h3 { margin: 0 0 10px; font-size: 15px; }
.prereq ul { list-style: none; padding: 0; margin: 0; }
.prereq li { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; color: var(--ink); }
.prereq li::before { content: "✅"; flex: none; }
.prereq li b { color: var(--ink); }

/* ===== numbered steps (two-column: text left, mock-window thumb right) ===== */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; }
.step {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 18px;
  align-items: center;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 16px 58px;
  margin-bottom: 12px;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 15px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
}
.step .step-body > :first-child { margin-top: 0; }
.step .step-body > :last-child { margin-bottom: 0; }
.step .step-title { display: block; font-weight: 700; color: var(--ink); margin-bottom: 4px; font-size: 16px; }
.step b, .step strong { color: var(--ink); }

/* faux browser "screenshot" placeholder */
.shot {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #0e1525;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.shot .bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  background: #141d31;
  border-bottom: 1px solid var(--line2);
}
.shot .bar i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.shot .bar i:nth-child(1) { background: #f43f5e; }
.shot .bar i:nth-child(2) { background: #f59e0b; }
.shot .bar i:nth-child(3) { background: #22c55e; }
.shot .body { padding: 12px; display: flex; flex-direction: column; gap: 7px; min-height: 84px; }
.shot .ln { height: 8px; border-radius: 5px; background: linear-gradient(90deg, rgba(99, 102, 241, .22), rgba(139, 92, 246, .10)); }
.shot .ln.w1 { width: 80%; } .shot .ln.w2 { width: 55%; } .shot .ln.w3 { width: 68%; }
.shot .ln.accent { background: var(--grad); opacity: .55; }

/* ===== accordion sections (native <details>) ===== */
.accordion { margin: 16px 0; }
.acc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 12px;
  overflow: hidden;
}
.acc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  user-select: none;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform .2s;
}
.acc[open] > summary::after { content: "−"; }
.acc > summary:hover { background: rgba(99, 102, 241, .05); }
.acc .acc-body { padding: 0 18px 16px; border-top: 1px solid var(--line); }
.acc .acc-body > :first-child { margin-top: 14px; }
.acc .acc-body > :last-child { margin-bottom: 0; }
.qa { margin: 0 0 14px; }
.qa:last-child { margin-bottom: 0; }
.qa .q { font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.qa .a { color: var(--muted); margin: 0; }

/* ===== callouts ===== */
.callout { border-radius: 12px; padding: 13px 15px; margin: 16px 0; font-size: 15px; border: 1px solid; }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout.warn { background: rgba(245, 158, 11, .10); border-color: rgba(245, 158, 11, .45); }
.callout.warn b { color: var(--amber); }
.callout.ok { background: rgba(34, 197, 94, .10); border-color: rgba(34, 197, 94, .42); }
.callout.ok b { color: var(--green); }
.callout.info { background: rgba(99, 102, 241, .09); border-color: rgba(99, 102, 241, .35); }
.callout.info b { color: var(--accent); }

/* ===== inline credential / key chip ===== */
.kbd {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  background: #0e1525;
  border: 1px solid var(--line2);
  border-radius: 7px;
  padding: 2px 7px;
  color: #c7d0e6;
  white-space: nowrap;
}

/* ===== "where to paste in ZaxBot" box ===== */
.paste {
  background: rgba(99, 102, 241, .07);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 13px;
  padding: 16px 18px;
  margin: 22px 0;
}
.paste h3 { margin-top: 0; color: var(--accent); }
.paste ul { margin-bottom: 0; }

/* ===== CTA buttons ===== */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, .4);
}
.cta:hover { text-decoration: none; filter: brightness(1.07); }
.cta.secondary {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line2);
  box-shadow: none;
}
.cta.secondary:hover { border-color: var(--accent); filter: none; background: rgba(99, 102, 241, .06); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 6px; }

/* ===== app cards grid (index) ===== */
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
.app-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  transition: .15s;
}
.app-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.app-card .top { display: flex; align-items: center; gap: 11px; }
.app-card .ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; color: #fff; }
.app-card img.ic { object-fit: cover; background: #fff; }
.app-card .nm { font-weight: 700; font-size: 16px; color: var(--ink); }
.app-card .desc { font-size: 13px; color: var(--muted); line-height: 1.55; }
.ic-tg { background: #229ed9; } .ic-tt { background: #010101; } .ic-line { background: #00b900; }
.ic-fb { background: #1877f2; } .ic-wa { background: #25d366; } .ic-dc { background: #5865f2; }
.ic-mk { background: linear-gradient(135deg, #ee4d2d, #0f146d); }

/* ===== quick-start list ===== */
.qs { counter-reset: qs; list-style: none; padding: 0; margin: 16px 0; }
.qs li { counter-increment: qs; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px dashed var(--line); }
.qs li:last-child { border-bottom: none; }
.qs li::before { content: counter(qs); position: absolute; left: 0; top: 9px; width: 28px; height: 28px; border-radius: 8px; background: rgba(99, 102, 241, .15); border: 1px solid rgba(99, 102, 241, .35); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.qs li b { color: var(--ink); }

/* ===== footer ===== */
.foot { margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; text-align: center; }
.foot a { color: var(--muted); }

/* ===== sparkle decoration ===== */
.sparkle {
  position: fixed;
  right: 22px;
  bottom: 18px;
  font-size: 26px;
  color: var(--accent2);
  opacity: .5;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, .5));
  animation: twinkle 3.2s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .35; transform: scale(.92) rotate(0deg); }
  50% { opacity: .7; transform: scale(1.08) rotate(15deg); }
}

/* ===== mobile ===== */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { padding: 22px 14px 70px; }
  .hero h1 { font-size: 25px; }
  h2 { font-size: 19px; }
  .app-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; }
  .topbar .brand small { display: none; }
  .step { grid-template-columns: 1fr; padding: 14px 14px 14px 52px; }
  .step .shot { max-width: 240px; }
  .cta-row .cta { flex: 1 1 100%; justify-content: center; }
  .sparkle { right: 12px; bottom: 10px; font-size: 22px; }
}
