/* Social Video Downloader - dl-v1-1012 */
:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.6;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  background: var(--bg);
  color: #fff;
  padding: 14px 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; color: #fff; text-decoration: none; }
.logo span { color: #a5b4fc; }
nav a { color: #cbd5e1; text-decoration: none; margin-left: 18px; font-size: .95rem; }
nav a:hover { color: #fff; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--bg) 0%, #312e81 60%, #4c1d95 100%);
  color: #fff;
  text-align: center;
  padding: 56px 20px 64px;
}
.hero h1 { margin: 0 0 10px; font-size: 2rem; }
.hero p.sub { color: #c7d2fe; margin: 0 0 26px; }
.urlbox {
  display: flex; gap: 10px; max-width: 640px; margin: 0 auto;
  background: #fff; border-radius: var(--radius); padding: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.urlbox input {
  flex: 1; border: 0; outline: 0; font-size: 1rem; padding: 10px 12px; min-width: 0;
}
.urlbox button {
  border: 0; border-radius: 10px; padding: 12px 26px; font-size: 1rem; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2));
  cursor: pointer; white-space: nowrap;
}
.urlbox button:disabled { opacity: .6; cursor: wait; }
.badges { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.badge {
  font-size: .8rem; padding: 5px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #e0e7ff; border: 1px solid rgba(255,255,255,.25);
}
.badge.active { background: #fff; color: var(--ink); font-weight: 700; border-color: #fff; }

/* ---------- ad slots ---------- */
.ad-slot {
  border: 2px dashed #cbd5e1; border-radius: 10px;
  color: var(--muted); font-size: .85rem; text-align: center;
  padding: 26px 10px; margin: 24px auto; max-width: 960px;
  background: #f1f5f9;
}

/* ---------- result card ---------- */
#result { display: none; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(15,23,42,.12);
  padding: 22px; margin: 26px 0; display: flex; gap: 20px; flex-wrap: wrap;
}
.card img.thumb { width: 220px; max-width: 100%; border-radius: 10px; object-fit: cover; }
.card .meta { flex: 1; min-width: 240px; }
.card h2 { margin: 0 0 6px; font-size: 1.15rem; }
.card .pills { margin: 8px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: .78rem; background: #eef2ff; color: #4338ca; border-radius: 999px; padding: 3px 12px; }
.dlrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.dlrow select {
  font-size: 1rem; padding: 10px 12px; border-radius: 10px; border: 1px solid #cbd5e1;
}
.dlrow button {
  border: 0; border-radius: 10px; padding: 12px 30px; font-size: 1rem; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #16a34a, #059669); cursor: pointer;
}
.dlrow button:disabled { opacity: .6; cursor: wait; }
#status { margin-top: 10px; font-size: .92rem; min-height: 1.4em; }
#status.ok { color: var(--ok); }
#status.err { color: var(--err); }

/* ---------- sections ---------- */
section.block { padding: 34px 0; }
section.block h2 { text-align: center; margin-bottom: 6px; }
section.block p.lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 4px 14px rgba(15,23,42,.07); }
.step .n {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-bottom: 8px;
}
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feat { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 14px rgba(15,23,42,.07); }
.feat h3 { margin: 0 0 6px; font-size: 1.02rem; }
.feat p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- faq ---------- */
.faq details {
  background: #fff; border-radius: 10px; margin-bottom: 10px; padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* ---------- legal pages ---------- */
.legal { background: #fff; border-radius: var(--radius); padding: 30px; margin: 30px 0;
  box-shadow: 0 4px 14px rgba(15,23,42,.07); }
.legal h1 { margin-top: 0; }

/* ---------- footer ---------- */
footer.site { background: var(--bg); color: #94a3b8; padding: 30px 0; margin-top: 20px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.site a { color: #cbd5e1; text-decoration: none; margin-right: 16px; font-size: .9rem; }
footer.site a:hover { color: #fff; }
footer.site p { font-size: .85rem; margin: 6px 0 0; width: 100%; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .urlbox { flex-direction: column; }
  .urlbox button { width: 100%; }
}

/* ---------- playlist ---------- */
.pl-note { color: var(--muted); font-size: .9rem; margin: 8px 0 12px; }
.pl-list { background: #fff; border-radius: var(--radius); margin-top: 12px;
  box-shadow: 0 4px 14px rgba(15,23,42,.07); max-height: 420px; overflow-y: auto; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9; }
.pl-item:last-child { border-bottom: none; }
.pl-n { color: var(--muted); font-size: .85rem; min-width: 26px; text-align: right; }
.pl-item img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.pl-t { font-size: .92rem; font-weight: 600; line-height: 1.3; }
.pl-d { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.pl-more { padding: 12px 14px; color: var(--muted); font-size: .85rem; text-align: center; }
