:root {
  --bg: #0b1020;
  --bg-2: #121a33;
  --card: #161f3d;
  --card-2: #1d2950;
  --text: #eef2ff;
  --muted: #9aa6c7;
  --accent: #1877f2;     /* Facebook blue */
  --accent-2: #4f9bff;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

.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;
}

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(24, 119, 242, 0.25), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(79, 155, 255, 0.18), transparent 55%),
    var(--bg);
  display: flex;
  justify-content: center;
  padding: 32px 18px 60px;
}

.wrap {
  width: 100%;
  max-width: 640px;
}

.hero {
  text-align: center;
  margin: 22px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin: 0 0 16px;
  padding: 6px 8px;
  border-radius: var(--radius);
  transition: transform .18s ease, filter .18s ease;
}
.brand:hover { transform: translateY(-1px); }
.brand:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 4px;
}

.brand-badge {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.brand:hover .brand-badge { transform: rotate(-3deg) scale(1.04); }

.brand-word {
  font-size: clamp(1.55rem, 4.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.brand-tld {
  color: var(--accent-2);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  font-weight: 600;
  margin: 4px 0 8px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero .sub {
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
  line-height: 1.55;
}

/* Live "Downloaded" counter — gradient text in the brand color, on one line */
.dl-counter {
  text-align: center;
  margin: 0 0 18px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.dl-counter .dl-num,
.dl-counter .dl-word {
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  background: linear-gradient(90deg, #4f9bff, #a9d2ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.dl-counter .dl-num {
  font-variant-numeric: tabular-nums;
  margin-right: 0.35em;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form {
  display: flex;
  gap: 10px;
  padding: 14px;
}

.input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

#url {
  flex: 1;
  min-width: 0;
  padding: 14px 50px 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Paste-from-clipboard icon inside the URL field */
.paste-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.08s;
}
.paste-btn:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  background: rgba(79, 155, 255, 0.14);
}
.paste-btn:active { transform: translateY(-50%) scale(0.92); }
.paste-btn svg { width: 18px; height: 18px; display: block; }
.paste-btn.pasted {
  color: #5ad27e;
  border-color: rgba(90, 210, 126, 0.6);
  background: rgba(90, 210, 126, 0.14);
}

#url::placeholder { color: #67729a; }

#url:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(79, 155, 255, 0.25);
}

#submit {
  position: relative;
  padding: 0 22px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
  white-space: nowrap;
}

#submit:hover { filter: brightness(1.08); }
#submit:active { transform: translateY(1px); }
#submit:disabled { opacity: 0.7; cursor: progress; }

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -3px;
  animation: spin 0.7s linear infinite;
}

#submit.loading .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

#turnstile-group {
  justify-content: center;
  margin: 16px 0 0;
  min-height: 65px;
}

#turnstile-group:not([hidden]) {
  display: flex;
}

.tip {
  margin: 14px 2px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.tip code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
  color: #c7d2ff;
}

.error {
  margin: 16px 2px 0;
  padding: 12px 14px;
  color: #ffd9d9;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 12px;
}

.working {
  margin: 16px 2px 0;
  padding: 12px 14px;
  color: #cdd7ff;
  background: rgba(79, 155, 255, 0.1);
  border: 1px solid rgba(79, 155, 255, 0.35);
  border-radius: 12px;
  text-align: center;
  font-size: 0.9rem;
}

.result {
  margin-top: 18px;
  padding: 16px;
  animation: rise 0.25s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.thumb {
  width: 140px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #0a0f1f;
  flex-shrink: 0;
}

.thumb[src=""], .thumb:not([src]) { visibility: hidden; }

.meta { min-width: 0; }

.meta h2 {
  margin: 2px 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.byline { margin: 0; color: var(--muted); font-size: 0.9rem; }

.qualities h3 {
  margin: 18px 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.formats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fmt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}

.fmt:hover {
  border-color: var(--accent-2);
  background: rgba(79, 155, 255, 0.12);
}

.fmt:active { transform: translateY(1px); }

.fmt.busy {
  pointer-events: none;
  opacity: 0.6;
}

.fmt .q { font-weight: 600; }
.fmt .size { color: var(--muted); font-size: 0.85rem; }
.fmt .go { color: var(--accent-2); font-weight: 600; }

/* ---- Content sections: tutorial, FAQ, SEO copy ---- */
.section {
  margin-top: 40px;
}

.section > h2 {
  font-size: clamp(1.2rem, 3.2vw, 1.5rem);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.section-lead {
  margin: 0 0 20px;
  color: var(--muted);
}

/* Tutorial steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-art {
  flex-shrink: 0;
  width: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.step-art svg { display: block; width: 100%; height: auto; }

.step-body { position: relative; }

.step-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.step-body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step-body p { margin: 0; color: var(--muted); line-height: 1.55; }
.step-body strong { color: var(--text); font-weight: 600; }

/* FAQ accordion */
.faq-item {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 46px 16px 16px;
  position: relative;
  font-weight: 600;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--accent-2);
  transition: transform 0.2s;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item summary:hover { color: var(--accent-2); }

.faq-item > p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.faq-item > p strong { color: var(--text); font-weight: 600; }

/* SEO prose */
.prose p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.prose strong { color: var(--text); font-weight: 600; }

.prose code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
  color: #c7d2ff;
}

.prose h2 { font-size: 1.15rem; margin: 28px 0 8px; color: var(--text); }
.prose ul { color: var(--muted); line-height: 1.7; padding-left: 20px; margin: 0 0 14px; }
.prose a { color: var(--accent-2); }

/* Legal pages (privacy, terms) */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 4px; }
.back { margin: 8px 0 18px; }
.back a { color: var(--accent-2); text-decoration: none; }
.back a:hover { text-decoration: underline; }
.updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 22px; }

.foot a { color: var(--accent-2); text-decoration: none; margin: 0 8px; }
.foot a:hover { text-decoration: underline; }

.foot {
  margin-top: 40px;
  text-align: center;
  color: #6f7aa0;
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .step { flex-direction: column; align-items: stretch; gap: 12px; }
  .step-art { width: 100%; max-width: 280px; margin: 0 auto; }
  .step-body { text-align: center; }
  .step-num { margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .form { flex-direction: column; }
  #submit { padding: 13px; }
  .thumb { width: 110px; }
}
