/* FBDownloaderPro.com — SaaS blue/white design system */
:root {
  --fb-blue: #1877f2;
  --fb-blue-dark: #166fe5;
  --fb-blue-deep: #0d65d9;
  --fb-blue-soft: #e7f3ff;
  --fb-ink: #1c1e21;
  --fb-muted: #65676b;
  --fb-line: #e4e6eb;
  --fb-bg: #f0f2f5;
  --fb-card: #ffffff;
  --fb-radius: 14px;
  --fb-radius-sm: 10px;
  --fb-radius-pill: 999px;
  --fb-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(24, 119, 242, 0.06);
  --fb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --fb-max: 1040px;
  --fb-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--fb-font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fb-ink);
  background:
    radial-gradient(900px 320px at 50% -80px, rgba(24, 119, 242, 0.12), transparent 70%),
    var(--fb-bg);
  -webkit-font-smoothing: antialiased;
}
img, video, svg, iframe { max-width: 100%; height: auto; }
a { color: var(--fb-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--fb-blue-deep); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus {
  left: 12px; top: 12px; width: auto; height: auto; z-index: 1000;
  background: #fff; color: var(--fb-blue); padding: 10px 14px;
  border-radius: var(--fb-radius-sm); font-weight: 700; box-shadow: var(--fb-shadow);
}

/* Header — SaaS white bar */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--fb-line);
  color: var(--fb-ink);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}
.site-header .bar {
  width: 100%;
  max-width: var(--fb-max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  min-width: 0;
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: var(--fb-ink);
  background: transparent;
  border-radius: var(--fb-radius-sm);
  padding: 2px;
}
.site-header .logo img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--fb-shadow-sm);
}
.site-header .logo .brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.site-header .logo .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0866ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header .logo .brand-name span { color: var(--fb-ink); }
.site-header .logo .brand-tag {
  display: none;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--fb-muted);
  font-style: normal;
}
@media (min-width: 640px) {
  .site-header .logo .brand-tag { display: block; }
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}
.site-nav a {
  color: var(--fb-muted);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--fb-radius-pill);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fb-blue);
  background: var(--fb-blue-soft);
}

/* Page */
.page {
  width: 100%;
  max-width: var(--fb-max);
  margin: 0 auto;
  padding: 28px 16px 20px;
  min-width: 0;
}
.page.narrow { max-width: 680px; }

/* Typography */
h1, h2, h3 {
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--fb-ink);
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.55rem, 3.4vw, 2.05rem); margin: 0 0 12px; font-weight: 800; }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); margin: 1.35rem 0 0.45rem; font-weight: 750; }
h3 { font-size: 1.05rem; margin: 10px 0 8px; font-weight: 700; }
p, li { overflow-wrap: anywhere; }
.note, .section-lead, .home-block .fine, .under-search { color: var(--fb-muted); }

/* Home lead / search card */
.home-lead {
  max-width: 680px;
  margin: 0 auto;
  background: var(--fb-card);
  border: 1px solid var(--fb-line);
  border-radius: 20px;
  padding: 28px 22px 22px;
  box-shadow: var(--fb-shadow);
  text-align: center;
}
.home-lead > p { max-width: 36rem; margin: 0 auto 18px; color: var(--fb-muted); }
.home-lead form { text-align: left; }
.home-lead label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--fb-muted);
}

/* Forms */
form { display: block; max-width: 100%; }
.row { display: flex; gap: 10px; margin-top: 0; }
label { display: block; margin-top: 14px; font-weight: 650; color: var(--fb-muted); font-size: 0.92rem; }
input, textarea, select {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius);
  background: #fff;
  color: var(--fb-ink);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--fb-blue);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.18);
}
.row input { flex: 1; min-width: 0; width: auto; }

/* Buttons */
button, .actions a, .button {
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  background: var(--fb-blue);
  color: #fff;
  border: 0;
  border-radius: var(--fb-radius);
  padding: 12px 18px;
  min-height: 48px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
button:hover, .actions a:hover, .button:hover {
  background: var(--fb-blue-dark);
  color: #fff;
}
button.secondary, a.button.secondary {
  background: #e7f0ff;
  color: var(--fb-blue-deep);
  box-shadow: none;
}
button.secondary:hover, a.button.secondary:hover { background: #d6e7ff; }
button.danger { background: #fde8e8; color: #c62828; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.error, .ok {
  padding: 12px 14px;
  border-radius: var(--fb-radius-sm);
  margin: 16px 0;
  text-align: left;
}
.error { background: #fff4f4; border: 1px solid #f5c2c2; color: #8a1f1f; }
.ok { background: #f0fff4; border: 1px solid #b7ebc6; color: #146c2e; }

/* Result */
video {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: #000;
  border-radius: var(--fb-radius);
}
.result-preview {
  width: min(100%, 440px);
  max-width: 100%;
  margin: 20px auto 0;
  min-width: 0;
  padding: 12px;
  background: var(--fb-blue-soft);
  border-radius: 18px;
  border: 1px solid #d6e7ff;
}
.result-preview video { width: 100%; margin: 0; }
.result-title { margin: 12px 0 0; font-weight: 750; text-align: center; color: var(--fb-ink); }

.under-search { text-align: center; margin-top: 16px; font-size: 0.92rem; }
.under-search p { margin: 8px 0; }
.under-search .tutorial {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.play-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.under-search .tutorial span { color: #8a8d91; }

/* Sections */
.home-block { margin-top: 44px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--fb-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-lead, .home-block .fine {
  color: var(--fb-muted);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fb-card);
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-pill);
  padding: 9px 14px;
  font-weight: 650;
  font-size: 0.92rem;
  box-shadow: var(--fb-shadow-sm);
}
.check { width: 20px; height: 20px; flex: 0 0 auto; }

.card-grid { display: grid; gap: 16px; margin-top: 20px; }
ol.card-grid { list-style: none; padding: 0; }
.card {
  background: var(--fb-card);
  border: 1px solid var(--fb-line);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: var(--fb-shadow-sm);
  text-align: center;
}
.card p, .card li { color: var(--fb-muted); }
.card ol { text-align: left; margin: 12px 0 0; padding-left: 1.2rem; }
.badge {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4b9aff 0%, var(--fb-blue) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(24, 119, 242, 0.28);
}
.card-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 12px;
  background: var(--fb-blue-soft);
}

/* Blog */
.blog-head { text-align: left; }
.blog-head h1 { font-size: clamp(1.6rem, 3vw, 1.95rem); }
.blog-head h1 span { color: var(--fb-blue); font-weight: 700; }
.blog-head p { color: var(--fb-muted); margin: 6px 0 0; }
.article-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--fb-card);
  color: var(--fb-ink);
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--fb-line);
  box-shadow: var(--fb-shadow-sm);
}
.article-card:hover { border-color: #c9ddff; box-shadow: var(--fb-shadow); }
.article-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #4b9aff 0%, #1877f2 50%, #0d65d9 100%);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-badge {
  position: absolute;
  bottom: 10px;
  max-width: calc(100% - 130px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(28, 30, 33, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: var(--fb-radius-pill);
}
.article-badge.category { left: 10px; }
.article-badge.time { right: 10px; max-width: none; }
.article-copy { display: block; padding: 14px 16px 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; color: #8a8d91; font-size: 0.85rem; }
.article-excerpt { margin: 0; color: var(--fb-muted); font-size: 0.92rem; }
.article-card h2 { margin: 0 0 8px; color: var(--fb-ink); font-size: 1.05rem; line-height: 1.35; }
.post-category { margin: 0 0 16px; color: var(--fb-blue); font-weight: 750; }
.post-slug { margin: 0 0 12px; color: #8a8d91; font-size: 0.9rem; }
.post-thumb { margin: 0 0 16px; }
.post-thumb img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; display: block; }
.post-body { overflow-wrap: anywhere; }
.post-body h2 { font-size: 1.35rem; }
.post-body h3 { font-size: 1.15rem; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--fb-line); vertical-align: top; overflow-wrap: anywhere; }

/* Last searched */
.last-searched {
  max-width: var(--fb-max);
  margin: 28px auto 0;
  padding: 0 16px;
  min-width: 0;
}
.last-searched h2 { margin: 0 0 14px; }
.last-searched ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.last-searched li {
  background: var(--fb-card);
  border: 1px solid var(--fb-line);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: var(--fb-shadow-sm);
}
.last-searched .thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--fb-blue-soft);
  display: block;
}
.last-searched .thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fb-blue);
  font-weight: 800;
  font-size: 1.2rem;
}
.last-searched a, .last-searched p { overflow-wrap: anywhere; }
.last-searched a { font-weight: 750; text-decoration: none; color: var(--fb-ink); }
.last-searched a:hover { color: var(--fb-blue); }
.last-searched p { margin: 6px 0 0; color: var(--fb-muted); font-size: 0.92rem; }

/* Footer */
.site-footer {
  margin-top: 40px;
  background: #0b3d91;
  background: linear-gradient(180deg, #166fe5 0%, #0b3d91 100%);
  color: #fff;
}
.site-footer .inner {
  max-width: var(--fb-max);
  margin: 0 auto;
  padding: 32px 20px 28px;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: var(--fb-radius-pill);
  font-weight: 650;
}
.site-footer a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.site-footer .copy { margin: 16px 0 0; color: #fff; font-size: 0.95rem; font-weight: 650; }
.site-footer .seo-note { margin: 8px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 0.85rem; max-width: 42rem; }

/* Breadcrumbs / SEO links */
.breadcrumbs {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 0.9rem;
  color: var(--fb-muted);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: #bcc0c4; }
.breadcrumbs a { color: var(--fb-blue); text-decoration: none; font-weight: 650; }
.breadcrumbs a:hover { text-decoration: underline; }

.seo-links {
  margin-top: 32px;
  padding: 20px;
  background: var(--fb-card);
  border: 1px solid var(--fb-line);
  border-radius: 18px;
  text-align: left;
  box-shadow: var(--fb-shadow-sm);
}
.seo-links h2 { margin-top: 0; }
.seo-links ul { margin: 8px 0 0; padding-left: 1.2rem; }
.seo-links .section-lead { margin: 0; text-align: left; }

/* FAQ accordion */
.page.faq-page { max-width: 760px; }
.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  text-align: left;
}
.faq-list.home-faq { margin-top: 18px; }
.faq-item {
  background: var(--fb-card);
  border: 1px solid var(--fb-line);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--fb-shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  color: var(--fb-ink);
  padding: 14px 48px 14px 16px;
  position: relative;
  line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fb-blue-soft);
  color: var(--fb-blue);
  font-size: 1.15rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { border-bottom: 1px solid var(--fb-line); }
.faq-item p {
  margin: 0;
  padding: 14px 16px 16px;
  color: var(--fb-muted);
  text-align: left;
}
.faq-cta { margin-top: 36px; }
.faq-cta .actions, .faq-more {
  justify-content: center;
  margin-top: 18px;
}

@media (min-width: 721px) {
  .card-grid.three, .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .last-searched ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header .bar { padding: 10px 14px; }
  .site-nav { width: 100%; margin-left: 0; gap: 2px; }
  .site-nav a { padding: 8px 10px; font-size: 0.9rem; }
  .page { padding: 20px 14px 16px; }
  .home-lead { padding: 22px 16px 18px; border-radius: 16px; }
  .row { flex-direction: column; }
  .row input, .row button, .actions a, .actions button { width: 100%; }
  .result-preview { width: 100%; }
  table, thead, tbody, tr, th, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--fb-line); padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
