:root {
  --bg: #0b0f19;
  --bg-soft: #121829;
  --surface: #171f33;
  --surface-2: #1e2942;
  --line: #2a3450;
  --text: #eef2ff;
  --muted: #9aa6c4;
  --accent: #35e0c8;
  --accent-2: #7c5cff;
  --pink: #ff4d8d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --maxw: 960px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

/* Ensure the `hidden` attribute always wins over author `display` rules
   (e.g. .ad-gate/.card set display:grid, which would otherwise override it). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(53, 224, 200, 0.16), transparent 55%),
    var(--bg);
  line-height: 1.55;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- header ---- */
.site-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.brand strong { color: var(--accent); }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f19; border-radius: 10px; font-size: 0.9rem;
}
.site-head nav { display: flex; gap: 22px; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.site-head nav a:hover { color: var(--text); }

/* ---- hero ---- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 1rem + 5vw, 5rem) 24px 3rem;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem;
  color: var(--accent); margin: 0 0 1rem; font-weight: 600;
}
h1 {
  font-size: clamp(2.1rem, 1rem + 5.5vw, 4rem);
  line-height: 1.05; margin: 0 0 1rem; letter-spacing: -0.02em; font-weight: 800;
}
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem); max-width: 42ch; margin: 0 auto 2.2rem; }

/* ---- grab form ---- */
.grab { max-width: 620px; margin: 0 auto; }
.grab-row {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.grab-row:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18); }
.grab-row input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  font-size: 1rem; padding: 12px 14px; outline: none; min-width: 0;
}
.grab-row input::placeholder { color: #6b779a; }
.ghost {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 16px; cursor: pointer; font-size: 0.9rem;
  transition: background 0.2s, transform 0.1s;
}
.ghost:hover { background: #26324f; }
.ghost:active { transform: scale(0.97); }
.cta {
  margin-top: 12px; width: 100%; border: 0; cursor: pointer;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #08111f; font-weight: 700; font-size: 1.05rem;
  padding: 15px; border-radius: var(--radius); transition: transform 0.12s var(--ease), filter 0.2s;
}
.cta:hover { filter: brightness(1.07); }
.cta:active { transform: scale(0.985); }
.cta:disabled { opacity: 0.6; cursor: progress; }

.status { min-height: 1.4em; margin: 1rem auto 0; color: var(--muted); font-size: 0.92rem; }
.status.error { color: var(--pink); }

/* ---- result card ---- */
.card {
  max-width: 620px; margin: 1.6rem auto 0; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 168px 1fr; gap: 0;
  animation: rise 0.5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.thumb { width: 100%; height: 100%; object-fit: cover; background: var(--surface-2); aspect-ratio: 3 / 4; }
.card-body { padding: 18px; min-width: 0; }
.badge {
  display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 10px; border-radius: 999px; font-weight: 700; margin-bottom: 8px;
}
.badge.tiktok { background: rgba(255, 77, 141, 0.16); color: var(--pink); }
.badge.facebook { background: rgba(59, 130, 246, 0.18); color: #6ea8ff; }
.card-title { font-size: 1.05rem; margin: 0 0 4px; line-height: 1.35; word-break: break-word; }
.card-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 16px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.dl {
  display: block; text-align: center; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 11px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}
.dl:hover { background: #26324f; border-color: var(--accent-2); }
.dl:active { transform: scale(0.98); }
.dl.primary { background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: #08111f; border: 0; }
.hint { color: #6b779a; font-size: 0.78rem; margin: 12px 0 0; }

/* ---- bands ---- */
.band { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 24px; }
.band.alt {
  background: linear-gradient(180deg, transparent, rgba(18, 24, 41, 0.6));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  max-width: none;
}
.band.alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.band h2 { font-size: clamp(1.5rem, 1rem + 2vw, 2.1rem); margin: 0 0 1.6rem; letter-spacing: -0.01em; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); font-size: 1.02rem; }
.steps em { color: var(--text); font-style: normal; font-weight: 600; }
.num {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--accent); font-weight: 700;
}
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 18px; transition: border-color 0.2s;
}
.faq details[open] { border-color: var(--accent-2); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋"; color: var(--accent); margin-right: 10px; font-weight: 700; }
.faq details[open] summary::before { content: "－"; }
.faq p { margin: 0 0 14px; color: var(--muted); }
.disclaimer { margin-top: 1.6rem; color: #6b779a; font-size: 0.82rem; }

/* ---- footer ---- */
.site-foot { text-align: center; padding: 2.5rem 24px; color: #566083; font-size: 0.85rem; }

@media (max-width: 520px) {
  .card { grid-template-columns: 1fr; }
  .thumb { aspect-ratio: 16 / 9; max-height: 200px; }
  .site-head nav { gap: 14px; }
}

/* ---- prose + hub (SEO landing bands) ---- */
.prose { max-width: 720px; }
.prose p { color: var(--muted); font-size: 1.02rem; margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h1 { font-size: clamp(1.8rem, 1rem + 3vw, 2.6rem); margin: 0 0 1.2rem; letter-spacing: -0.01em; }
.prose h2 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; color: var(--text); }
.legal { max-width: 720px; }
.foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.foot-links a:hover { color: var(--text); }

/* ---- photo gallery (TikTok photo posts) ---- */
.gallery-wrap { max-width: 720px; margin: 1.4rem auto 0; }
.gallery-title { font-size: 0.95rem; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.gallery-title span { color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.gitem {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 3 / 4;
  transition: transform 0.12s var(--ease), border-color 0.2s;
}
.gitem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gitem:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.gdl {
  position: absolute; right: 6px; bottom: 6px; width: 27px; height: 27px;
  display: grid; place-items: center; border-radius: 7px; font-size: 0.95rem;
  background: rgba(8, 17, 31, 0.7); color: #fff; opacity: 0.9; transition: background 0.2s;
}
.gitem:hover .gdl { background: var(--accent-2); }

.hub-band h2 { font-size: clamp(1.3rem, 1rem + 1.4vw, 1.8rem); }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hub-link {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; font-weight: 600; font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.hub-link::before { content: "↓ "; color: var(--accent); }
.hub-link:hover { background: var(--surface-2); border-color: var(--accent-2); transform: translateY(-1px); }

/* ---- HD tag + ad gate ---- */
.hd-tag {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em;
  background: rgba(8, 17, 31, 0.28); color: #08111f;
  padding: 2px 6px; border-radius: 5px; margin-left: 6px; vertical-align: middle;
}
button.dl { font: inherit; cursor: pointer; width: 100%; }

.ad-gate {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 9, 16, 0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade 0.25s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.ad-box {
  position: relative; width: min(440px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px 24px; text-align: center;
  box-shadow: var(--shadow); animation: rise 0.3s var(--ease) both;
}
.ad-box h3 { margin: 0 0 6px; font-size: 1.2rem; }
.ad-count { color: var(--muted); margin: 0 0 16px; font-size: 0.92rem; }
.ad-count #ad-timer { color: var(--accent); font-weight: 700; }
.ad-close {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  border: 0; background: transparent; color: var(--muted); font-size: 1.4rem;
  cursor: pointer; border-radius: 8px; line-height: 1; transition: background 0.2s, color 0.2s;
}
.ad-close:hover { background: var(--surface-2); color: var(--text); }
.ad-slot {
  min-height: 180px; display: grid; place-items: center;
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  margin-bottom: 18px; overflow: hidden;
}
.ad-ph { color: #4d5875; font-size: 0.85rem; letter-spacing: 0.05em; }
.ad-cta { margin-top: 0; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .ad-gate, .ad-box { animation: none; }
  * { transition: none !important; }
}
