/* ==========================================================================
   Universal Video Downloader — main stylesheet
   Colors live in the tokens below. Dark is the default; light is set by
   [data-theme="light"] on <html> (toggled in js/main.js).
   ========================================================================== */

:root {
  --bg: #07070f;
  --bg-2: #0d0d19;
  --surface: #12121f;
  --surface-2: #1a1a2c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ecebf6;
  --muted: #a3a2bb;
  --heading: #ffffff;

  --primary: #7c5cff;
  --primary-2: #a78bfa;
  --pink: #ff4ecd;
  --orange: #ffa94d;
  --cyan: #22d3ee;
  --green: #34d399;

  --grad: linear-gradient(135deg, #7c5cff 0%, #c04bff 40%, #ff4ecd 72%, #ffa94d 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(255, 78, 205, .12) 60%, rgba(255, 169, 77, .12));
  --glow: 0 10px 40px -10px rgba(124, 92, 255, .65);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1180px;
  --header-h: 72px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f7fc;
  --bg-2: #eeeef8;
  --surface: #ffffff;
  --surface-2: #f3f2fb;
  --border: rgba(20, 20, 60, 0.09);
  --border-strong: rgba(20, 20, 60, 0.18);
  --text: #2a2a40;
  --muted: #5d5d78;
  --heading: #12122a;
  --glow: 0 10px 40px -12px rgba(124, 92, 255, .45);
  --shadow: 0 20px 50px -24px rgba(30, 20, 80, .25);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 10s ease infinite;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.topbar .container { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 40px; flex-wrap: wrap; text-align: center; padding-top: 6px; padding-bottom: 6px; }
.topbar a { text-decoration: underline; text-underline-offset: 3px; }
.topbar .topbar-mail { opacity: .9; display: none; }
@media (min-width: 860px) {
  .topbar .container { justify-content: space-between; }
  .topbar .topbar-mail { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
}
.topbar svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 8px 30px -18px rgba(0,0,0,.5); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--heading); letter-spacing: -0.01em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand span small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.1; }
.brand span { line-height: 1.15; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--heading); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: transform .2s, border-color .2s; }
.icon-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px 20px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: all .25s ease;
  }
  .nav-links a { display: block; padding: 12px 16px; font-size: 16px; }
  .nav-open .nav-links { transform: none; opacity: 1; visibility: visible; }
  .nav-actions .btn-sm { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px; line-height: 1.2;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); background-size: 160% 160%; color: #fff; box-shadow: var(--glow); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); animation: shine 4s ease-in-out infinite;
}
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); color: var(--heading); }
.btn-ghost:hover { border-color: var(--primary-2); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 18px 32px; font-size: 17px; }

.store-btn { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 14px; background: #0b0b14; color: #fff; border: 1px solid rgba(255,255,255,.18); transition: transform .2s, border-color .2s; }
.store-btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.4); }
.store-btn svg { width: 28px; height: 28px; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; font-size: 17px; text-align: left; }
.store-btn small { font-size: 11px; font-weight: 500; opacity: .75; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Generic section ---------- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary-2); background: var(--grad-soft); border: 1px solid var(--border);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulse 2s infinite; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 60px; overflow: hidden; isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 580px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.hero-trust { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-trust .stars { color: #fbbf24; letter-spacing: 2px; font-size: 16px; }
.hero-trust .sep { width: 1px; height: 20px; background: var(--border-strong); }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }

.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; z-index: -1; animation: float 14s ease-in-out infinite; }
.blob-1 { width: 460px; height: 460px; background: #7c5cff; top: -120px; right: -80px; }
.blob-2 { width: 380px; height: 380px; background: #ff4ecd; bottom: -140px; left: -120px; animation-delay: -5s; opacity: .35; }
.blob-3 { width: 260px; height: 260px; background: #ffa94d; top: 40%; right: 30%; animation-delay: -9s; opacity: .25; }
[data-theme="light"] .blob { opacity: .25; }
.grid-bg {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}

.phone {
  position: relative; width: 270px; aspect-ratio: 1080 / 2412;
  border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #2b2b3d, #0c0c14);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 80px -20px rgba(0,0,0,.7), var(--glow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 80px; height: 22px; border-radius: 20px; background: #05050a; z-index: 2; }
.hero-visual .phone-main { z-index: 2; animation: floatY 6s ease-in-out infinite; }
.hero-visual .phone-back { position: absolute; width: 220px; opacity: .85; z-index: 1; }
.hero-visual .phone-back.left { transform: translateX(-150px) rotate(-10deg); animation: floatY 7s ease-in-out infinite -2s; }
.hero-visual .phone-back.right { transform: translateX(150px) rotate(10deg); animation: floatY 7s ease-in-out infinite -4s; }

.chip-float {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 16px; font-size: 14px; font-weight: 700; color: var(--heading);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border: 1px solid var(--border-strong); backdrop-filter: blur(12px); box-shadow: var(--shadow);
  animation: floatY 5s ease-in-out infinite;
}
.chip-float .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.chip-float .ic svg { width: 18px; height: 18px; }
.chip-float small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.chip-1 { top: 12%; left: -2%; }
.chip-2 { bottom: 14%; right: -4%; animation-delay: -2.5s; }

@media (max-width: 960px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .hero-visual { min-height: 500px; }
  .chip-1 { left: 2%; } .chip-2 { right: 2%; }
}
@media (max-width: 520px) {
  .hero-trust .sep { display: none; }
  .hero-visual .phone-back { display: none; }
  .phone { width: 240px; }
  .chip-float { font-size: 12px; padding: 8px 12px; }
}

/* ---------- Marquee ---------- */
.marquee { padding: 34px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.marquee p { text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 20px; }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-wrap { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; color: var(--heading); white-space: nowrap; }
.pill i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 28px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-weight: 600; font-size: 15px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards / features ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; padding: 30px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.feature-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); opacity: 0; transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.feature-card:hover::before { opacity: 1; }
.f-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.f-icon svg { width: 26px; height: 26px; }
.f-icon.c2 { background: linear-gradient(135deg, #22d3ee, #6366f1); }
.f-icon.c3 { background: linear-gradient(135deg, #34d399, #0ea5e9); }
.f-icon.c4 { background: linear-gradient(135deg, #ffa94d, #ff4e7a); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; position: relative; }
.step { position: relative; text-align: center; padding: 40px 26px 30px; }
.step-num { width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 20px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.step img { border-radius: var(--radius); margin: 22px auto 0; max-height: 360px; width: auto; border: 1px solid var(--border); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Screenshot gallery ---------- */
.gallery { display: flex; gap: 26px; overflow-x: auto; padding: 20px 20px 36px; scroll-snap-type: x mandatory; scrollbar-width: thin; justify-content: safe center; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 230px; transition: transform .35s ease; }
.gallery figure:hover .phone { transform: translateY(-10px) rotate(-1deg); }
.gallery figcaption { margin-top: 16px; font-weight: 700; color: var(--heading); font-size: 15px; }

/* ---------- Platforms ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.platform { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 15px; color: var(--heading); transition: transform .25s, border-color .25s; text-align: center; }
.platform:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.platform i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; font-size: 16px; }
@media (max-width: 900px) { .platform-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .platform-grid { grid-template-columns: repeat(2, 1fr); } }

.bg-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.bg-fb { background: #1877f2; }
.bg-tt { background: linear-gradient(135deg, #25f4ee, #000 45%, #fe2c55); }
.bg-x { background: #111; border: 1px solid rgba(255,255,255,.2); }
.bg-yt { background: #ff0033; }
.bg-pin { background: #e60023; }
.bg-rd { background: #ff4500; }
.bg-vm { background: #1ab7ea; }
.bg-li { background: #0a66c2; }
.bg-dm { background: #0066dc; }
.bg-tw { background: #9146ff; }
.bg-sc { background: #ff7700; }
.bg-more { background: var(--grad); }

/* ---------- Blog cards ---------- */
.post-card { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform .3s, box-shadow .3s, border-color .3s; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.post-card .thumb .cover-art { height: 100%; transition: transform .6s ease; }
.post-card:hover .thumb .cover-art { transform: scale(1.05); }
.post-card .body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.post-card h3 a:hover { color: var(--primary-2); }
.post-card p { color: var(--muted); font-size: 15px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--primary-2); background: var(--grad-soft); border: 1px solid var(--border); }
.read-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary-2); font-size: 15px; }
.read-more svg { width: 16px; height: 16px; transition: transform .2s; }
.post-card:hover .read-more svg { transform: translateX(4px); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .25s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 700; color: var(--heading); display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 500; background: var(--surface-2); transition: transform .3s, background .3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq .answer { padding: 0 24px 22px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: 32px; padding: 64px 48px; text-align: center;
  background: var(--grad); background-size: 200% 200%; animation: gradShift 12s ease infinite; color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); font-size: 1.15rem; max-width: 620px; margin: 0 auto 30px; }
.cta-band .cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); }
.cta-band::before { width: 300px; height: 300px; top: -120px; left: -80px; }
.cta-band::after { width: 220px; height: 220px; bottom: -100px; right: -40px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band .btn-white { background: #fff; color: #1a1033; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
@media (max-width: 600px) { .cta-band { padding: 48px 22px; border-radius: 24px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 28px; background: var(--bg-2); border-top: 1px solid var(--border); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.footer-grid h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--heading); margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); transition: color .2s; }
.footer-grid a:hover { color: var(--heading); }
.footer-about p { color: var(--muted); margin: 18px 0; max-width: 340px; }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--heading) !important; }
.footer-mail svg { width: 18px; height: 18px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); transition: transform .2s, background .2s; }
.socials a:hover { transform: translateY(-3px); background: var(--primary); color: #fff; }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer-bottom p { margin: 0; max-width: 720px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Floating support + back to top ---------- */
.support-fab { position: fixed; right: 20px; bottom: 20px; z-index: 200; }
.support-btn { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; color: #fff; font-weight: 700; background: var(--grad); box-shadow: var(--glow), 0 10px 30px -10px rgba(0,0,0,.5); transition: transform .2s; }
.support-btn:hover { transform: translateY(-3px) scale(1.02); }
.support-btn svg { width: 22px; height: 22px; }
.support-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px); width: min(340px, calc(100vw - 40px));
  padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  transform: translateY(10px) scale(.97); transform-origin: bottom right; opacity: 0; visibility: hidden; transition: all .25s ease;
}
.support-fab.open .support-panel { transform: none; opacity: 1; visibility: visible; }
.support-panel h3 { font-size: 1.15rem; margin-bottom: 6px; }
.support-panel p { color: var(--muted); font-size: 15px; }
.support-panel .btn { width: 100%; margin-top: 8px; }
.support-panel .links { display: grid; gap: 4px; margin-top: 14px; font-size: 14px; }
.support-panel .links a { color: var(--muted); padding: 6px 0; }
.support-panel .links a:hover { color: var(--heading); }
.support-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.support-close:hover { background: var(--surface-2); }
.to-top { position: fixed; left: 20px; bottom: 20px; z-index: 150; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 520px) { .support-btn span { display: none; } .support-btn { padding: 15px; } }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding: 72px 0 48px; text-align: center; overflow: hidden; isolation: isolate; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 900px; margin-left: auto; margin-right: auto; }
.page-hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 680px; margin: 0 auto; }
.breadcrumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; font-size: 14px; color: var(--muted); font-weight: 600; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.breadcrumbs a:hover { color: var(--heading); }

/* ---------- Blog article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300; background: var(--grad); }
.post-header { max-width: 860px; margin: 0 auto; }
.post-header .post-meta { justify-content: center; font-size: 14px; }
.post-cover { max-width: 1040px; margin: 0 auto 56px; padding: 0 20px; }
.post-cover .cover-art { border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.post-layout aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
@media (max-width: 1000px) { .post-layout { grid-template-columns: minmax(0, 1fr); } .post-layout aside { display: none; } }

.toc-card, .side-cta { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.toc-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.toc-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.toc-card a { display: block; padding: 6px 12px; border-left: 2px solid var(--border); color: var(--muted); transition: all .2s; line-height: 1.4; }
.toc-card a:hover, .toc-card a.active { color: var(--heading); border-left-color: var(--primary); background: var(--grad-soft); }
.side-cta { text-align: center; background: var(--grad-soft); }
.side-cta img { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 12px; }
.side-cta h3 { font-size: 1.05rem; }
.side-cta p { font-size: 14px; color: var(--muted); }
.side-cta .btn { width: 100%; }

.prose { font-size: 18px; line-height: 1.8; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.2em 0 .7em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { font-size: 1.3rem; margin: 1.8em 0 .6em; }
.prose p, .prose li { color: var(--text); }
.prose a { color: var(--primary-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--primary-2); font-weight: 700; }
.prose strong { color: var(--heading); }
.prose figure { margin: 2em 0; text-align: center; }
.prose figure img { margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.prose figure.shot img { max-width: 320px; width: 100%; border-radius: 28px; }
.prose figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--primary); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 12px 16px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); color: var(--heading); }
.prose code { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: .9em; }

.how-step { display: grid; grid-template-columns: 52px 1fr; gap: 18px; margin: 2.2em 0 0; }
.how-step .n { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.how-step h3 { margin: 6px 0 .5em; }
.how-step figure { margin: 1.4em 0 0; }
@media (max-width: 600px) { .how-step { grid-template-columns: 1fr; } }

.callout { display: flex; gap: 14px; padding: 18px 22px; border-radius: var(--radius); margin: 1.8em 0; border: 1px solid var(--border); background: var(--surface); font-size: 16px; }
.callout svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 3px; }
.callout p { margin: 0; }
.callout.tip { border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.07); }
.callout.tip svg { color: var(--green); }
.callout.warn { border-color: rgba(255,169,77,.4); background: rgba(255,169,77,.08); }
.callout.warn svg { color: var(--orange); }

.inline-cta { display: flex; align-items: center; gap: 22px; padding: 26px; margin: 2.4em 0; border-radius: var(--radius-lg); background: var(--grad-soft); border: 1px solid var(--border-strong); }
.inline-cta img { width: 72px; height: 72px; border-radius: 20px; flex-shrink: 0; }
.inline-cta h3 { margin: 0 0 4px; font-size: 1.15rem; }
.inline-cta p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
@media (max-width: 600px) { .inline-cta { flex-direction: column; text-align: center; } }

.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); font-weight: 700; color: var(--heading); }
.share a, .share button { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); transition: transform .2s, background .2s; }
.share a:hover, .share button:hover { transform: translateY(-3px); background: var(--primary); color: #fff; }
.share svg { width: 18px; height: 18px; }
.author-box { display: flex; gap: 18px; align-items: center; margin-top: 28px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.author-box img { width: 60px; height: 60px; border-radius: 16px; }
.author-box p { margin: 0; color: var(--muted); font-size: 15px; }
.author-box strong { color: var(--heading); display: block; }

/* ---------- Legal / text pages ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 0 20px 100px; }
.legal .updated { display: inline-block; margin-bottom: 28px; font-size: 14px; color: var(--muted); font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1040px; margin: 0 auto; }
.contact-card { text-align: center; }
.contact-card .f-icon { margin-left: auto; margin-right: auto; }
.contact-card a.mail { font-weight: 700; color: var(--primary-2); word-break: break-all; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.nf .big { font-size: clamp(6rem, 20vw, 11rem); font-weight: 800; line-height: 1; margin-bottom: 10px; }

/* ---------- Keyframes ---------- */
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes shine { 0% { left: -120%; } 40%, 100% { left: 160%; } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -40px) scale(1.06); } 66% { transform: translate(-30px, 20px) scale(.96); } }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.7); } 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Blog covers built from app screenshots ---------- */
.cover-art {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start; gap: 5%; padding-top: 5%;
}
.cover-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.35), transparent 60%); pointer-events: none; }
.cover-art img {
  width: 24%; flex-shrink: 0; border-radius: 9% / 4%;
  border: 3px solid rgba(10, 10, 20, .85); box-shadow: 0 20px 40px -10px rgba(0,0,0,.6);
}
.cover-art img:nth-child(1) { transform: translateY(14%) rotate(-7deg); }
.cover-art img:nth-child(2) { z-index: 1; }
.cover-art img:nth-child(3) { transform: translateY(14%) rotate(7deg); }
.cover-ig { background: linear-gradient(135deg, #f09433, #dc2743 50%, #bc1888); }
.cover-fb { background: linear-gradient(135deg, #4c9bff, #1877f2 45%, #0a3d91); }
.cover-tt { background: linear-gradient(135deg, #25f4ee, #161622 48%, #fe2c55); }

/* App Store button while the iOS app is not live yet */
.store-btn.is-soon { opacity: .7; cursor: default; }
.store-btn.is-soon:hover { transform: none; border-color: rgba(255,255,255,.18); }

/* Extra blog cover colours */
.cover-violet { background: linear-gradient(135deg, #7c5cff, #c04bff 55%, #ff4ecd); }
.cover-blue { background: linear-gradient(135deg, #22d3ee, #3b82f6 50%, #4338ca); }
.cover-lock { background: linear-gradient(135deg, #10b981, #0f766e 50%, #0b2e3a); }
.cover-browser { background: linear-gradient(135deg, #ffa94d, #ff4e7a 55%, #b5179e); }
.cover-dark { background: linear-gradient(135deg, #3b2f6b, #161622 55%, #0b0b14); }

/* Blog category filter */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 36px; }
.chip { padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: all .2s; }
.chip:hover { color: var(--heading); border-color: var(--border-strong); }
.chip.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.post-card.is-hidden { display: none; }

/* In-article related guides */
.keep-reading { margin-top: 2.4em; padding: 22px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.keep-reading h3 { margin: 0 0 .6em; font-size: 1.1rem; }
.keep-reading ul { margin: 0; }
.keep-reading li { margin-bottom: .4em; font-size: 16px; }

/* ---------- "Get the app" toast (phones only, added by js/main.js) ---------- */
.app-toast {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 400;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.55), var(--glow);
  transform: translateY(140%); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
  touch-action: pan-y; user-select: none;
}
.app-toast.show { transform: none; opacity: 1; }
.app-toast.out-left { transform: translateX(-120%) !important; opacity: 0 !important; }
.app-toast.out-right { transform: translateX(120%) !important; opacity: 0 !important; }
.app-toast.out-down { transform: translateY(140%) !important; opacity: 0 !important; }
.app-toast img { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.app-toast-text { flex: 1; min-width: 0; line-height: 1.25; }
.app-toast-text strong { display: block; font-size: 14px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-toast-text span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.app-toast-btn {
  flex-shrink: 0; padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 800; color: #fff; background: var(--grad); box-shadow: var(--glow);
}
.app-toast-close { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.app-toast-close svg { width: 16px; height: 16px; }
.app-toast-handle { position: absolute; top: 5px; left: 50%; width: 32px; height: 4px; margin-left: -16px; border-radius: 4px; background: var(--border-strong); }
/* lift the floating buttons above the toast while it is visible */
.support-fab, .to-top { transition: bottom .4s ease, opacity .3s, visibility .3s, transform .3s; }
.has-app-toast .support-fab, .has-app-toast .to-top { bottom: 96px; }
@media (min-width: 769px) { .app-toast { display: none; } }
