/* ═══════════════════════════════════════════════════════════
   CZ-UPSCALER — Website
   Theme: "Halloween Cyberpunk Premium" (เหมือนโปรแกรมแม่)
   ปรับสีหลักทั้งเว็บได้ที่บล็อก :root นี้ไฟล์เดียวจบ
   ═══════════════════════════════════════════════════════════ */

/* ---------- Fonts (bundled LINE Seed Sans TH — เหมือนในโปรแกรม) ---------- */
@font-face { font-family: "LINE Seed Sans TH"; src: url("../assets/fonts/LINESeedSansTH_Th.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../assets/fonts/LINESeedSansTH_Rg.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../assets/fonts/LINESeedSansTH_Bd.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../assets/fonts/LINESeedSansTH_XBd.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("../assets/fonts/LINESeedSansTH_He.ttf") format("truetype"); font-weight: 900; font-display: swap; }

/* ---------- Design tokens (จาก app/core/constants.py) ---------- */
:root {
  --bg-main: #090B0A;
  --bg-sec: #141A17;
  --bg-card: #1C221E;
  --neon: #A3FF65;
  --neon-soft: rgba(163, 255, 101, 0.12);
  --purple: #6C3DBF;
  --lpurple: #B79AFF;
  --orange: #FF8A32;
  --danger: #FF5A5A;
  --text: #F6F7F6;
  --muted: #A8B2AA;
  --line: #263029;
  --line-2: #2C372F;
  --grad-brand: linear-gradient(90deg, #6C3DBF, #A3FF65);
  --grad-neon: linear-gradient(90deg, #A3FF65, #D9FFB3);
  --grad-purple: linear-gradient(90deg, #B79AFF, #6C3DBF);
  --radius: 16px;
  --shadow-neon: 0 0 24px rgba(163, 255, 101, 0.28), 0 0 64px rgba(163, 255, 101, 0.10);
  --shadow-purple: 0 0 24px rgba(108, 61, 191, 0.45), 0 0 72px rgba(108, 61, 191, 0.18);
  --font: "LINE Seed Sans TH", "Segoe UI", "Noto Sans Thai", "Leelawadee UI", sans-serif;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--purple); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #2E3A32; border-radius: 6px; border: 2px solid var(--bg-main); }
::-webkit-scrollbar-thumb:hover { background: var(--neon); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.section { padding: 110px 0; position: relative; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .12s; }
.d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; }
.d4 { transition-delay: .48s; }

/* ═══════════ PRELOADER ═══════════ */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 50% 42%, #10160f 0%, var(--bg-main) 62%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pre-inner { text-align: center; }
.pre-icon { width: 92px; margin: 0 auto 18px; filter: drop-shadow(0 0 26px rgba(255, 138, 50, 0.55)); animation: preFloat 1.8s ease-in-out infinite; }
@keyframes preFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.pre-name { font-weight: 900; font-size: 26px; letter-spacing: 3px; color: var(--neon); text-shadow: 0 0 18px rgba(163, 255, 101, 0.5); }
.pre-name span { color: var(--lpurple); }
.pre-bar { width: 220px; height: 6px; margin: 18px auto 10px; border-radius: 4px; background: #1A211C; overflow: hidden; border: 1px solid var(--line); }
.pre-fill { height: 100%; width: 0%; background: var(--grad-brand); border-radius: 4px; transition: width .18s ease; box-shadow: 0 0 12px rgba(163, 255, 101, 0.6); }
.pre-pct { font-size: 12px; color: var(--muted); letter-spacing: 2px; }

/* ═══════════ SCROLL PROGRESS ═══════════ */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad-brand); z-index: 1001;
  box-shadow: 0 0 10px rgba(163, 255, 101, 0.7);
}

/* ═══════════ NAVBAR ═══════════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(9, 11, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.nav-inner { width: min(1280px, 94%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { width: 42px; height: 42px; filter: drop-shadow(0 0 14px rgba(255, 138, 50, 0.45)); transition: transform .4s ease; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }
.brand-text { font-weight: 900; font-size: 18px; letter-spacing: 1px; color: var(--neon); line-height: 1.05; display: block; white-space: nowrap; }
.brand-text small { display: block; }
.brand-text small { font-size: 9px; letter-spacing: 3.5px; color: var(--lpurple); font-weight: 700; }
.brand-dash { color: var(--lpurple); }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14.5px;
  color: var(--muted); position: relative; transition: color .25s ease, background .25s ease;
}
.nav-link:hover { color: var(--text); background: rgba(163, 255, 101, 0.07); }
.nav-link.active { color: var(--neon); }
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--neon); border-radius: 2px; box-shadow: 0 0 8px rgba(163, 255, 101, 0.8);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 10px; width: 42px; height: 40px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--neon); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════ BUTTONS ═══════════ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px; font-family: var(--font);
  font-weight: 800; font-size: 15px; cursor: pointer; border: none;
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 15px 32px; font-size: 16.5px; border-radius: 14px; }

.btn-primary { background: var(--neon); color: #0B120C; box-shadow: 0 4px 22px rgba(163, 255, 101, 0.35); }
.btn-primary:hover { background: #B6FF7C; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(163, 255, 101, 0.5); }
.btn-glow {
  position: absolute; top: 0; left: -80%; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); animation: btnSweep 3.2s ease-in-out infinite;
}
@keyframes btnSweep { 0%, 55% { left: -80%; } 100% { left: 160%; } }

.btn-ghost { background: rgba(163, 255, 101, 0.06); border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--neon); color: var(--neon); background: var(--neon-soft); transform: translateY(-2px); }

/* ═══════════ HERO ═══════════ */
.hero {
  min-height: 100svh; display: flex; align-items: center; position: relative;
  padding: 130px 0 90px; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 78% 18%, rgba(108, 61, 191, 0.20), transparent 65%),
    radial-gradient(ellipse 55% 40% at 12% 85%, rgba(163, 255, 101, 0.08), transparent 60%),
    var(--bg-main);
}
#particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* cyberpunk grid floor */
.grid-floor {
  position: absolute; left: -25%; right: -25%; bottom: -14%; height: 46%; z-index: 0;
  background:
    linear-gradient(rgba(163, 255, 101, 0.13) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(163, 255, 101, 0.13) 1.5px, transparent 1.5px);
  background-size: 46px 46px;
  transform: perspective(620px) rotateX(58deg);
  transform-origin: center top;
  mask-image: linear-gradient(to top, rgba(0,0,0,.75), transparent 85%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.75), transparent 85%);
  animation: gridMove 7s linear infinite;
}
@keyframes gridMove { from { background-position: 0 0, 0 0; } to { background-position: 0 46px, 0 46px; } }

/* floating glow orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; opacity: .55; pointer-events: none; }
.orb-1 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(108,61,191,.55), transparent 70%); top: -120px; right: -90px; animation: orbFloat 11s ease-in-out infinite; }
.orb-2 { width: 340px; height: 340px; background: radial-gradient(circle, rgba(163,255,101,.20), transparent 70%); bottom: -100px; left: -70px; animation: orbFloat 13s ease-in-out infinite reverse; }
.orb-3 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(255,138,50,.28), transparent 70%); top: 38%; left: 42%; animation: orbFloat 9s ease-in-out infinite 1.2s; }
@keyframes orbFloat { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(28px,-34px) scale(1.08); } 66% { transform: translate(-24px,22px) scale(.94); } }

.scanline {
  position: absolute; left: 0; right: 0; height: 140px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(163, 255, 101, 0.045), transparent);
  animation: scan 9s linear infinite;
}
@keyframes scan { 0% { top: -160px; } 100% { top: 110%; } }

.hero-inner { position: relative; z-index: 2; width: min(1280px, 94%); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: rgba(163, 255, 101, 0.07); border: 1px solid rgba(163, 255, 101, 0.35); color: var(--neon);
  box-shadow: inset 0 0 18px rgba(163, 255, 101, 0.06);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: dotPulse 1.6s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

.hero-title { font-size: clamp(38px, 5.2vw, 66px); font-weight: 900; line-height: 1.14; letter-spacing: -.5px; margin: 22px 0 20px; }
.grad-neon { background: var(--grad-neon); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 22px rgba(163,255,101,.35)); }
.grad-purple { background: var(--grad-purple); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(183,154,255,.3)); }

.hero-sub { color: var(--muted); font-size: 17px; max-width: 560px; }
.hl-green { color: var(--neon); font-weight: 800; }
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero-stats { display: flex; align-items: center; gap: 22px; margin-top: 44px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 32px; font-weight: 900; color: var(--neon);
  text-shadow: 0 0 18px rgba(163, 255, 101, 0.45); letter-spacing: 1px;
}
.stat span { font-size: 12.5px; color: var(--muted); letter-spacing: .5px; }
.stat-div { width: 1px; height: 40px; background: var(--line-2); }

/* hero screenshot frame */
.hero-visual { position: relative; }
.hero-frame {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--bg-sec); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(108, 61, 191, 0.22);
  transform-style: preserve-3d; transition: transform .18s ease-out;
}
.frame-top { display: flex; align-items: center; gap: 7px; padding: 11px 15px; background: #101512; border-bottom: 1px solid var(--line); }
.fdot { width: 11px; height: 11px; border-radius: 50%; }
.fdot.r { background: #FF5F57; } .fdot.y { background: #FEBC2E; } .fdot.g { background: #28C840; }
.frame-title { margin-left: 8px; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; font-weight: 700; }
.hero-frame img { width: 100%; }
.frame-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.06) 50%, transparent 58%);
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine { 0%, 70%, 100% { transform: translateX(-120%); } 35% { transform: translateX(120%); } }

.float-chip {
  position: absolute; z-index: 3; padding: 10px 17px; border-radius: 12px;
  background: rgba(20, 26, 23, 0.92); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 800; color: var(--text);
  box-shadow: 0 12px 34px rgba(0,0,0,.5); backdrop-filter: blur(6px);
  animation: chipFloat 5s ease-in-out infinite;
}
.chip-a { top: 14%; left: -34px; border-color: rgba(163,255,101,.5); color: var(--neon); }
.chip-b { bottom: 26%; right: -30px; border-color: rgba(183,154,255,.5); color: var(--lpurple); animation-delay: .8s; }
.chip-c { bottom: -22px; left: 12%; border-color: rgba(255,138,50,.5); color: var(--orange); animation-delay: 1.6s; }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-13px); } }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(163,255,101,.45); border-radius: 14px; }
.scroll-hint span { position: absolute; top: 7px; left: 50%; width: 4px; height: 9px; margin-left: -2px; background: var(--neon); border-radius: 3px; animation: scrollDown 1.7s ease-in-out infinite; }
@keyframes scrollDown { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ═══════════ MARQUEE ═══════════ */
.marquee { background: var(--bg-sec); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 15px 0; }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: marquee 26s linear infinite; }
.marquee-track span { color: var(--muted); font-weight: 800; font-size: 14.5px; letter-spacing: 1px; white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ═══════════ SECTION HEAD ═══════════ */
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 58px; }
.sec-kicker { display: block; color: var(--lpurple); font-weight: 800; letter-spacing: 4px; font-size: 13px; margin-bottom: 12px; }
.sec-title { font-size: clamp(30px, 4vw, 44px); font-weight: 900; line-height: 1.2; }
.sec-desc { color: var(--muted); margin-top: 14px; font-size: 16px; }

/* ═══════════ FEATURES ═══════════ */
#features { background: linear-gradient(180deg, var(--bg-main), #0C100D 55%, var(--bg-main)); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat-card {
  position: relative; padding: 30px 26px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
  overflow: hidden;
}
.feat-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(163,255,101,.09), transparent 45%);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.feat-card:hover { border-color: rgba(163, 255, 101, 0.5); transform: translateY(-6px); box-shadow: 0 18px 44px rgba(0,0,0,.4), 0 0 26px rgba(163,255,101,.10); background: #1E2620; }
.feat-card:hover::before { opacity: 1; }
.feat-icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 27px;
  border-radius: 15px; margin-bottom: 18px;
  background: linear-gradient(145deg, rgba(108,61,191,.35), rgba(163,255,101,.10));
  border: 1px solid var(--line-2);
  transition: transform .35s ease, box-shadow .35s ease;
}
.feat-card:hover .feat-icon { transform: scale(1.1) rotate(-6deg); box-shadow: 0 0 22px rgba(163,255,101,.25); }
.feat-card h3 { font-size: 18.5px; font-weight: 800; margin-bottom: 9px; }
.feat-card p { color: var(--muted); font-size: 14.5px; }

/* ═══════════ DEMO — BEFORE/AFTER ═══════════ */
.demo-sec { background: var(--bg-sec); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ba-wrap { max-width: 900px; margin: 0 auto; }
.ba-frame {
  position: relative; border-radius: 18px; overflow: hidden; cursor: ew-resize;
  border: 1px solid var(--line-2); box-shadow: 0 26px 70px rgba(0,0,0,.55), 0 0 46px rgba(108,61,191,.18);
  user-select: none; touch-action: pan-y; aspect-ratio: 14 / 9; background: #000;
}
.ba-before, .ba-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after-clip { position: absolute; inset: 0; overflow: hidden; width: 55%; }
.ba-after { width: 100%; height: 100%; }
.ba-after-clip .ba-after { width: calc(100% / .55); max-width: none; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 55%; width: 3px; z-index: 5;
  background: var(--neon); box-shadow: 0 0 16px rgba(163,255,101,.9); cursor: ew-resize;
}
.ba-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-main); border: 2px solid var(--neon); color: var(--neon);
  font-size: 19px; font-weight: 900; box-shadow: 0 0 22px rgba(163,255,101,.55);
}
.ba-tag {
  position: absolute; bottom: 16px; z-index: 4; padding: 7px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .5px; backdrop-filter: blur(6px);
}
.tag-before { left: 16px; background: rgba(255, 90, 90, .16); border: 1px solid rgba(255,90,90,.55); color: #FFB4B4; }
.tag-after { right: 16px; background: rgba(163, 255, 101, .13); border: 1px solid rgba(163,255,101,.55); color: var(--neon); }
.ba-note { text-align: center; color: #6C7670; font-size: 12.5px; margin-top: 16px; }

/* ═══════════ HOW TO ═══════════ */
.howto { display: grid; grid-template-columns: 360px 1fr; gap: 30px; align-items: start; }
.step-list { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 100px; }
.step-item {
  display: flex; align-items: center; gap: 15px; text-align: left;
  padding: 15px 17px; border-radius: 14px; cursor: pointer; font-family: var(--font);
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
  transition: border-color .3s, background .3s, transform .3s, box-shadow .3s;
}
.step-item:hover { border-color: var(--line-2); background: #212923; transform: translateX(4px); }
.step-item.active {
  border-color: var(--neon); background: linear-gradient(90deg, rgba(36,51,31,.95), var(--bg-card));
  box-shadow: 0 0 24px rgba(163,255,101,.12);
}
.step-num {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #171D19; border: 1px solid var(--line-2); color: var(--muted);
  font-weight: 900; font-size: 17px; transition: all .3s;
}
.step-item.active .step-num { background: var(--neon); color: #0B120C; border-color: var(--neon); box-shadow: 0 0 16px rgba(163,255,101,.5); }
.step-txt b { display: block; font-size: 15.5px; font-weight: 800; }
.step-txt i { font-style: normal; color: var(--muted); font-size: 13px; }
.step-item.active .step-txt b { color: var(--neon); }

.step-frame {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2);
  background: var(--bg-sec); box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 40px rgba(163,255,101,.07);
  position: relative;
}
.step-frame img { width: 100%; transition: opacity .3s ease; }
.step-frame.switching img { opacity: 0; transform: scale(1.015); }
.step-frame img { transform: scale(1); transition: opacity .35s ease, transform .5s ease; }

.step-detail { margin-top: 22px; padding: 0 6px; }
.step-detail h3 { font-size: 23px; font-weight: 900; color: var(--neon); margin-bottom: 8px; }
.step-detail p { color: var(--muted); font-size: 15.5px; max-width: 640px; }
.step-tips { margin-top: 14px; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.step-tips li { color: var(--muted); font-size: 14px; padding-left: 24px; position: relative; }
.step-tips li::before { content: "▸"; position: absolute; left: 4px; color: var(--neon); font-weight: 900; }

/* ═══════════ VERSIONS TIMELINE ═══════════ */
.versions-sec { background: linear-gradient(180deg, var(--bg-main), #0D1210 50%, var(--bg-main)); }
.timeline { position: relative; max-width: 780px; margin: 0 auto; padding-left: 40px; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line); border-radius: 2px;
}
.tl-progress { position: absolute; left: 11px; top: 6px; width: 2px; height: 0%; background: var(--grad-brand); border-radius: 2px; box-shadow: 0 0 12px rgba(163,255,101,.6); }
.ver-item { position: relative; padding-bottom: 44px; }
.ver-item:last-child { padding-bottom: 0; }
.ver-dot {
  position: absolute; left: -40px; top: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-main); border: 2px solid var(--line-2);
  display: grid; place-items: center; transition: border-color .4s, box-shadow .4s;
}
.ver-dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #3A463E; transition: background .4s, box-shadow .4s; }
.ver-item.in .ver-dot { border-color: var(--neon); box-shadow: 0 0 18px rgba(163,255,101,.45); }
.ver-item.in .ver-dot::after { background: var(--neon); box-shadow: 0 0 10px var(--neon); }

.ver-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; transition: border-color .3s, transform .3s, box-shadow .3s;
}
.ver-card:hover { border-color: rgba(163,255,101,.4); transform: translateX(5px); }
.ver-head { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-bottom: 14px; }
.ver-badge {
  font-size: 17px; font-weight: 900; padding: 6px 16px; border-radius: 10px; letter-spacing: 1px;
  background: rgba(163,255,101,.10); border: 1px solid rgba(163,255,101,.5); color: var(--neon);
  text-shadow: 0 0 14px rgba(163,255,101,.4);
}
.ver-badge.latest { background: rgba(163,255,101,.16); box-shadow: 0 0 18px rgba(163,255,101,.18); }
.ver-tag { font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(183,154,255,.45); color: var(--lpurple); background: rgba(108,61,191,.14); }
.ver-date { margin-left: auto; color: #6C7670; font-size: 12.5px; font-weight: 700; letter-spacing: 1px; }
.ver-card h4 { font-size: 16.5px; font-weight: 800; color: var(--lpurple); margin-bottom: 10px; }
.ver-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; }
.ver-changes { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ver-changes li { position: relative; padding-left: 26px; color: var(--muted); font-size: 14.5px; }
.ver-changes li::before {
  content: "▲"; position: absolute; left: 0; top: 1px; font-size: 11px; color: var(--neon);
}
.ver-changes li.fix::before { content: "●"; color: var(--orange); font-size: 9px; top: 4px; }
.ver-changes li b { color: var(--text); }

/* ═══════════ DOWNLOAD ═══════════ */
.download-sec { background: var(--bg-sec); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.dl-card {
  position: relative; border-radius: 26px; overflow: hidden;
  background: linear-gradient(150deg, #18201A, #12160F 60%, #171022);
  border: 1px solid var(--line-2); padding: 54px 52px 40px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.dl-glow {
  position: absolute; top: -170px; right: -130px; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(163,255,101,.14), transparent 65%); pointer-events: none;
}
.dl-main { display: flex; gap: 40px; align-items: center; position: relative; }
.dl-icon { width: 128px; filter: drop-shadow(0 0 34px rgba(255,138,50,.5)); }
.float-y { animation: floatY 4.5s ease-in-out infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.dl-meta { flex: 1; }
.dl-sub { color: var(--muted); margin: 12px 0 26px; font-size: 15.5px; }
.dl-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.dl-note { margin-top: 16px; color: #6C7670; font-size: 12.5px; }
.dl-helper { display: inline-flex; margin-top: 10px; color: var(--lpurple); font-weight: 800; font-size: 14px; border-bottom: 1px dashed rgba(183, 154, 255, 0.5); transition: color .25s; }
.dl-helper:hover { color: var(--neon); border-bottom-color: var(--neon); }

/* ═══════════ GITHUB DOWNLOAD GUIDE ═══════════ */
.gh-guide { margin-top: 72px; }
.gh-title { text-align: center; font-size: 25px; font-weight: 900; }
.gh-sub { text-align: center; color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.gh-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.gh-step {
  margin: 0; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; position: relative; cursor: zoom-in;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.gh-step:hover { border-color: rgba(163, 255, 101, 0.4); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.gh-step img { width: 100%; display: block; transition: opacity .3s; }
.gh-step:hover img { opacity: .88; }
.gh-zoom {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 800;
  background: rgba(9, 11, 10, 0.88); border: 1px solid rgba(163, 255, 101, 0.45);
  color: var(--neon); opacity: 0; transform: translateY(-4px);
  transition: opacity .25s, transform .25s; pointer-events: none;
  backdrop-filter: blur(4px);
}
.gh-step:hover .gh-zoom { opacity: 1; transform: none; }
.gh-step figcaption { padding: 16px 18px 19px; display: flex; flex-direction: column; gap: 4px; }
.gh-step b { font-size: 15.5px; font-weight: 800; color: var(--neon); }
.gh-step span { color: var(--muted); font-size: 13.5px; }
.gh-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 26px; }
.gh-note b { color: var(--orange); }

/* ═══════════ LIGHTBOX (กดขยายรูปคู่มือ) ═══════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(5, 7, 6, 0.93);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(1320px, 94vw); max-height: 82vh;
  border-radius: 14px; border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75), 0 0 60px rgba(163, 255, 101, 0.06);
  transform: scale(.95); transition: transform .3s cubic-bezier(.2,.8,.3,1);
  user-select: none;
}
.lightbox.open img { transform: scale(1); }
.lb-cap { color: var(--muted); font-weight: 800; font-size: 14.5px; text-align: center; }
.lb-cap b { color: var(--neon); }
.lb-close {
  position: absolute; top: 20px; right: 22px; z-index: 2;
  width: 48px; height: 48px; border-radius: 13px; cursor: pointer;
  background: rgba(20, 26, 23, 0.92); border: 1px solid var(--line-2);
  color: var(--neon); font-size: 19px; font-family: var(--font); font-weight: 800;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.lb-close:hover { border-color: var(--neon); transform: rotate(90deg); box-shadow: 0 0 18px rgba(163, 255, 101, 0.3); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 68px; border-radius: 14px; cursor: pointer;
  background: rgba(20, 26, 23, 0.85); border: 1px solid var(--line-2);
  color: var(--neon); font-size: 30px; line-height: 1; font-family: var(--font);
  transition: border-color .25s, background .25s, transform .25s;
}
.lb-nav:hover { border-color: var(--neon); background: var(--neon-soft); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }
@media (max-width: 620px) {
  .lightbox { padding: 12px; }
  .lightbox img { max-width: 96vw; max-height: 72vh; }
  .lb-nav { top: auto; bottom: 26px; transform: none; width: 64px; height: 46px; font-size: 22px; }
  .lb-prev:hover, .lb-next:hover { transform: none; }
  .lb-prev { left: 50%; margin-left: -78px; }
  .lb-next { right: 50%; margin-right: -78px; }
  .lb-cap { position: absolute; bottom: 84px; left: 12px; right: 12px; }
}

.dl-reqs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; position: relative; }
.req {
  background: rgba(9, 11, 10, .55); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 3px; transition: border-color .3s;
}
.req:hover { border-color: rgba(163,255,101,.35); }
.req b { font-size: 13.5px; color: var(--lpurple); font-weight: 800; }
.req span { font-size: 13px; color: var(--muted); }

/* FAQ */
.faq { max-width: 780px; margin: 64px auto 0; }
.faq-title { text-align: center; font-size: 24px; font-weight: 900; margin-bottom: 26px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; transition: border-color .3s;
}
.faq-item:hover { border-color: rgba(163,255,101,.35); }
.faq-item[open] { border-color: rgba(163,255,101,.5); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 800; font-size: 15.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-arrow { color: var(--neon); transition: transform .3s; flex-shrink: 0; }
.faq-item[open] .faq-arrow { transform: rotate(180deg); }
.faq-item p { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; }

/* ═══════════ SUPPORT ═══════════ */
.sup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sup-card {
  text-align: center; padding: 40px 28px 34px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.sup-card:hover { transform: translateY(-6px); border-color: rgba(163,255,101,.4); box-shadow: 0 18px 44px rgba(0,0,0,.4); }
.sup-icon { font-size: 44px; margin-bottom: 10px; filter: drop-shadow(0 0 18px rgba(163,255,101,.25)); }
.sup-card h3 { font-size: 19px; font-weight: 900; }
.sup-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; flex: 1; }
.sup-main { border-color: rgba(163,255,101,.45); background: linear-gradient(170deg, #1E2A1C, var(--bg-card) 65%); box-shadow: 0 0 34px rgba(163,255,101,.09); }
.sup-hint { color: #5C6660; font-size: 11.5px; margin-top: 12px; }
.sup-contact { text-align: center; margin-top: 40px; color: var(--muted); font-size: 15px; }
.sup-contact a { color: var(--neon); font-weight: 800; border-bottom: 1px dashed rgba(163,255,101,.5); }
.sup-contact a:hover { text-shadow: 0 0 14px rgba(163,255,101,.6); }

/* ═══════════ FOOTER ═══════════ */
.footer { position: relative; background: #070908; border-top: 1px solid var(--line); padding: 64px 0 0; overflow: hidden; }
.footer-glow {
  position: absolute; bottom: -190px; left: 50%; transform: translateX(-50%);
  width: 620px; height: 300px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(163,255,101,.09), transparent 70%); pointer-events: none;
}
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; position: relative; }
.footer-brand { display: flex; gap: 18px; max-width: 460px; align-items: flex-start; }
.footer-logo { width: 62px; height: auto; flex-shrink: 0; align-self: flex-start; filter: drop-shadow(0 0 16px rgba(255,138,50,.4)); }
.footer-name { font-size: 19px; font-weight: 900; color: var(--neon); letter-spacing: 1px; }
.footer-name em { font-style: normal; color: var(--lpurple); font-size: 11px; letter-spacing: 3px; display: block; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.footer-links { display: flex; gap: 64px; }
.f-col { display: flex; flex-direction: column; gap: 9px; }
.f-col b { color: var(--lpurple); font-size: 13px; letter-spacing: 2px; margin-bottom: 5px; }
.f-col a { color: var(--muted); font-size: 14px; transition: color .25s, transform .25s; }
.f-col a:hover { color: var(--neon); transform: translateX(3px); }
.footer-bar {
  margin-top: 48px; padding: 20px 0; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  width: min(1180px, 92%); margin-left: auto; margin-right: auto;
  color: #6C7670; font-size: 13px;
}
.footer-bar b { color: var(--neon); font-weight: 800; }

/* ═══════════ BACK TO TOP ═══════════ */
#to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 900;
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(163,255,101,.5);
  background: rgba(20, 26, 23, .92); color: var(--neon); font-size: 15px; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, transform .3s, visibility .3s, box-shadow .3s;
  backdrop-filter: blur(8px);
}
#to-top.show { opacity: 1; visibility: visible; transform: none; }
#to-top:hover { box-shadow: var(--shadow-neon); transform: translateY(-3px); }

/* toast */
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 80px); z-index: 2000;
  background: rgba(20, 26, 23, .96); border: 1px solid var(--neon); color: var(--neon);
  padding: 13px 24px; border-radius: 12px; font-weight: 800; font-size: 14px;
  opacity: 0; transition: transform .4s cubic-bezier(.2,.9,.3,1.2), opacity .4s;
  box-shadow: 0 0 24px rgba(163,255,101,.25);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { max-width: 720px; margin: 0 auto; }
  .howto { grid-template-columns: 1fr; }
  .step-list { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .step-item { min-width: 215px; }
  .step-item:hover { transform: none; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-reqs { grid-template-columns: repeat(2, 1fr); }
  .dl-main { flex-direction: column; text-align: center; }
  .dl-buttons { justify-content: center; }
}
@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 66px; right: 3%; left: 3%; z-index: 999;
    flex-direction: column; gap: 4px; padding: 14px;
    background: rgba(12, 15, 13, .97); border: 1px solid var(--line-2); border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0,0,0,.65);
    opacity: 0; visibility: hidden; transform: translateY(-14px);
    transition: opacity .3s, transform .3s, visibility .3s;
    backdrop-filter: blur(16px);
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .sup-grid { grid-template-columns: 1fr; }
  .gh-steps { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
  .ver-date { margin-left: 0; width: 100%; }
}
@media (max-width: 620px) {
  .feat-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 26px; }
  .stat-div { display: none; }
  .dl-card { padding: 40px 24px 30px; }
  .dl-reqs { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-links { gap: 40px; }
  .chip-a { left: -6px; } .chip-b { right: -6px; }
  .hero { padding-top: 110px; }
  .timeline { padding-left: 32px; }
  .ver-dot { left: -32px; }
}

/* ลด animation เมื่อผู้ใช้ตั้งค่า reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
